/* Telomni's website: the Mini App's night sky (deep blue, royal blue and star gold), on every screen size.
   System fonts only: nothing is loaded from anyone else. */
:root {
  --night: #070b1f;
  --deep: #0f1a3d;
  --card: #0d1533;
  --royal: #3a6ee8;
  --royal-soft: #7aa2ff;
  --gold: #f4c76b;
  --amber: #b9791c;
  --paper: #f7f1e3;
  --text: #e8ecf8;
  --muted: #b3bcdb;
  --line: rgb(255 255 255 / 0.1);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* the sticky bar doesn't cover a section's title */
}

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

img,
canvas,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--royal-soft);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--gold);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: rgb(255 255 255 / 0.07);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

h1,
h2,
h3 {
  color: var(--paper);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 750;
}

h3 {
  font-size: 1.15rem;
  font-weight: 650;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--night);
  border-radius: 10px;
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

.gold {
  color: var(--gold);
}

.eyebrow {
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.8em;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 62ch;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* --- buttons --- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffd98a, var(--gold) 45%, #e0a647);
  color: var(--night);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 200ms var(--ease), background-color 200ms, border-color 200ms;
  box-shadow: 0 8px 26px rgb(244 199 107 / 0.25);
}

.button:hover {
  color: var(--night);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgb(244 199 107 / 0.38);
}

.button:active {
  transform: scale(0.98);
}

.button.ghost {
  background: rgb(255 255 255 / 0.04);
  border-color: rgb(255 255 255 / 0.22);
  color: var(--paper);
  box-shadow: none;
}

.button.ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.button.small {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 0.95rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 24px;
}

.actions.center {
  justify-content: center;
}

/* --- the bar at the top --- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(7 11 31 / 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
}

.brand img {
  border-radius: 10px;
}

.nav nav {
  margin-left: auto;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 10px 12px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 550;
  border-radius: 10px;
}

.nav-links a:hover {
  color: var(--paper);
  background: rgb(255 255 255 / 0.05);
}

/* --- the first screen --- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 88px;
  background:
    radial-gradient(60% 70% at 78% 40%, rgb(58 110 232 / 0.28), transparent 70%),
    radial-gradient(45% 50% at 12% 10%, rgb(244 199 107 / 0.1), transparent 70%),
    linear-gradient(180deg, var(--night), var(--deep) 75%, var(--night));
}

.stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 32px;
}

.hero-galaxy {
  display: grid;
  place-items: center;
  min-height: 360px; /* room kept for the galaxy, so nothing moves when it appears */
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.facts li::before {
  content: "✦";
  color: var(--gold);
  margin-right: 8px;
}

/* --- sections --- */

.section {
  padding: 96px 0;
}

.section.alt {
  background: linear-gradient(180deg, rgb(15 26 61 / 0.55), rgb(15 26 61 / 0.25));
  border-block: 1px solid var(--line);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
}

.cards.compact {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  padding: 26px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.015));
  border: 1px solid var(--line);
  transition: border-color 200ms, transform 200ms var(--ease);
}

.card:hover {
  border-color: rgb(244 199 107 / 0.4);
  transform: translateY(-2px);
}

.card p {
  color: var(--muted);
  margin: 0;
}

.card-icon,
.point-icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: rgb(244 199 107 / 0.12);
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.models {
  margin-top: 28px;
  padding: 26px 28px;
  border-radius: var(--radius);
  border: 1px solid rgb(58 110 232 / 0.4);
  background: linear-gradient(135deg, rgb(58 110 232 / 0.16), rgb(58 110 232 / 0.04));
}

.models p {
  margin: 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.split.top {
  align-items: start;
}

.split.top > :first-child {
  position: sticky;
  top: 110px; /* stays in view while the points beside it scroll past */
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
  padding-left: 14px;
  border-left: 3px solid var(--gold);
}

.points {
  display: grid;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.points li {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.03);
  border: 1px solid var(--line);
}

.points .point-icon {
  margin: 0;
}

.points h3 {
  margin-bottom: 0.25em;
}

.points p {
  color: var(--muted);
  margin: 0;
}

/* --- Galaxy --- */

.galaxy-stage {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px 0;
  border-radius: 28px;
  background: radial-gradient(closest-side, rgb(58 110 232 / 0.22), transparent);
}

.galaxy-stage canvas {
  min-height: 260px;
}

/* --- how to start --- */

.step-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd98a, var(--gold) 45%, #e0a647);
  color: var(--night);
  font-weight: 800;
  font-size: 1.15rem;
}

.card strong {
  color: var(--paper);
}

/* --- the end --- */

.cta {
  padding: 96px 0;
  text-align: center;
  background: radial-gradient(50% 80% at 50% 100%, rgb(244 199 107 / 0.14), transparent 70%);
}

.cta-inner img {
  margin: 0 auto 24px;
  border-radius: 28px;
  box-shadow: 0 16px 60px rgb(58 110 232 / 0.35);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
}

.footer-row p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  display: inline-block;
  padding: 10px 0;
  color: var(--muted);
}

.small-print {
  width: 100%;
  font-size: 0.85rem;
}

/* --- appearing as they scroll in (only with motion allowed: see site.js) --- */

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}

.js-reveal .reveal.shown {
  opacity: 1;
  transform: none;
}

/* --- smaller screens --- */

@media (max-width: 960px) {
  .cards,
  .cards.compact {
    grid-template-columns: repeat(2, 1fr);
  }
  .split,
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .split.reverse > :first-child {
    order: 2;
  }
  .split.top > :first-child {
    position: static;
  }
  .hero-galaxy {
    min-height: 260px;
  }
}

@media (max-width: 720px) {
  .nav nav {
    display: none; /* the page is short enough to scroll; GitHub stays */
  }
  .nav .button {
    margin-left: auto;
  }
  .hero {
    padding: 44px 0 64px;
  }
  .section,
  .cta {
    padding: 68px 0;
  }
  .cards,
  .cards.compact {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

.center-text {
  margin-inline: auto;
}

/* --- the Privacy Policy and Terms: long reading, kept narrow and calm --- */

.legal {
  padding: 64px 0 96px;
  background: radial-gradient(60% 40% at 80% 0%, rgb(58 110 232 / 0.16), transparent 70%);
}

.legal-wrap {
  max-width: 780px;
}

.legal h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.1rem);
  margin-bottom: 0.3em;
}

.legal h2 {
  font-size: 1.45rem;
  margin: 2.2em 0 0.6em;
}

.legal p,
.legal li {
  color: var(--muted);
}

.legal strong {
  color: var(--paper);
}

.legal ul,
.legal ol {
  padding-left: 1.3em;
}

.legal li {
  margin-bottom: 0.55em;
}

.updated {
  font-size: 0.92rem;
}

.summary {
  margin-top: 32px;
  padding: 24px 28px;
  border-radius: var(--radius);
  border: 1px solid rgb(244 199 107 / 0.35);
  background: linear-gradient(160deg, rgb(244 199 107 / 0.08), rgb(244 199 107 / 0.02));
}

.summary h2,
.toc h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.summary ul {
  margin: 0;
}

.toc {
  margin-top: 20px;
  padding: 20px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 0.03);
}

.toc ol {
  margin: 0;
  columns: 2;
  column-gap: 32px;
}

.toc a {
  display: inline-block;
  padding: 4px 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.2em 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.legal table {
  width: 100%;
  min-width: 560px; /* on a phone it scrolls sideways in its frame rather than squeezing the words */
  border-collapse: collapse;
  font-size: 0.95rem;
}

.legal th,
.legal td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.legal thead th {
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgb(255 255 255 / 0.04);
}

.legal tbody th {
  color: var(--paper);
  font-weight: 550;
  width: 50%;
}

.legal td {
  color: var(--muted);
}

.legal tbody tr:last-child > * {
  border-bottom: 0;
}

.checks {
  list-style: none;
  padding-left: 0 !important;
}

.checks li {
  position: relative;
  padding-left: 30px;
}

.checks li::before {
  content: "✓";
  position: absolute;
  left: 4px;
  color: var(--gold);
  font-weight: 800;
}

.nav-links a[aria-current="page"] {
  color: var(--gold);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .toc ol {
    columns: 1;
  }
  .legal tbody th {
    width: auto;
  }
}
