/* TypeOnTV website. One dark world, like the app's welcome and launch screens: an evening TV scene.
   Every value comes from Docs/design/DESIGN.md (§2.2 dark tokens, §3 type, §8.2 welcome). */

@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-display: swap; src: url("fonts/BricolageGrotesque-Bold.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("fonts/Figtree-Regular.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("fonts/Figtree-SemiBold.woff2") format("woff2"); }

:root {
  --ink: #0D1117;     /* brand.ink, bg.app (dark) */
  --card: #171C24;    /* bg.card (dark) */
  --line: #2A313C;    /* border.card (dark) */
  --text: #F3EFE6;    /* text.primary (dark), 16.5:1 */
  --white: #FFFFFF;   /* headings: pure white, not the warm text tone (2026-10-21) */
  --text-2: #B9C0CC;  /* text.secondary (dark) */
  --text-3: #A8B0BD;  /* text.tertiary (dark), 7.8:1 */
  --blue: #006FDE;    /* action.primary.bg: display text only on ink (3.9:1) */
  --glow: #5AA6F2;    /* icon glow: focus and links on ink (7:1) */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --peek: 120px; /* how far the video rises into the hero */
  color-scheme: dark;
  scrollbar-color: var(--line) var(--ink);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.125rem/1.55 "Figtree", system-ui, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--blue); color: #FFFFFF; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--glow); }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 4px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

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

h1, h2, .wordmark { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 700; margin: 0; color: var(--white); }
h2 { font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4.5rem); line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance; max-width: 16ch; }
h2 em { font-style: normal; color: var(--blue); display: block; } /* headlines break after each sentence */
.wordmark { font-size: 1.5rem; letter-spacing: -0.02em; text-decoration: none; justify-self: start; }
.wordmark span { color: var(--blue); }
.wordmark:hover { color: var(--white); }

/* MARK: Hero — the welcome screen */

.hero { position: relative; min-height: 100svh; overflow: hidden; touch-action: pan-y; isolation: isolate; }
.sea { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-inner {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding-block: 28px calc(var(--peek) + 40px);
}

h1 { margin-top: clamp(48px, 9vh, 112px); pointer-events: none; position: relative; } /* the sea gets the pointer */
.typed {
  display: block;
  font-size: clamp(3.375rem, 1.4rem + 6.4vw, 6rem); /* type.hero: 54 pt on a phone */
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.typed .seg { display: block; }
.typed.accent { color: var(--blue); }
.typed .r { color: transparent; }
.typed.ghost { position: absolute; left: 0; right: 0; animation: rise-away 0.6s var(--ease-out) forwards; }
@keyframes rise-away { to { transform: translateY(-0.45em); opacity: 0; filter: blur(8px); } }
.caret {
  display: inline-block;
  width: 0.045em; height: 0.82em;
  margin-inline: 0.03em -0.075em; /* takes no room, so letters never shift */
  vertical-align: -0.06em;
  background: var(--text-3);
  opacity: 0;
}
.caret.on { opacity: 1; }
.caret.blink { animation: blink 1.06s steps(1) 10; } /* stops after ~10 s: a page shouldn't blink forever */
@keyframes blink { 50% { opacity: 0; } }

.hero-cta { display: grid; gap: 28px; pointer-events: none; }
.hero-cta a { pointer-events: auto; }
.lead {
  margin: 0; max-width: 30ch;
  font-size: clamp(1.1875rem, 1rem + 0.6vw, 1.5rem); line-height: 1.45; color: var(--text);
  text-shadow: 0 2px 16px var(--ink); /* stays readable over lit boxes */
}
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.badge { display: inline-block; line-height: 0; border-radius: 10px; }
.badge img { width: 168px; height: auto; display: block; }
.fine { margin: 0; font-size: 0.9375rem; color: var(--text-3); text-shadow: 0 1px 10px var(--ink); }

@media (min-width: 900px) {
  .typed .seg { display: inline; } /* one line on a wide screen, two on a phone */
  .typed { font-size: min(11.6vw - 6px, 9.25rem); white-space: nowrap; } /* sized so "With your phone." fills the line */
  :root { --peek: 168px; }
  .hero-inner { padding-block: 36px calc(var(--peek) + 56px); grid-template-rows: auto 1fr auto auto 1.3fr; } /* one big line: headline and CTA sit together, a little above center */
  .hero-inner h1 { grid-row: 3; margin-top: 0; }
  .hero-cta { grid-row: 4; margin-top: 40px; }
}

/* MARK: Sections */

.section { padding-top: clamp(112px, 14vw, 192px); }
.section > p { margin: 24px 0 0; max-width: 46ch; color: var(--text-2); font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem); }
.section.last { padding-bottom: clamp(112px, 14vw, 192px); }
.section.last .badge { margin-top: 40px; }

/* Video */
.film { position: relative; z-index: 1; margin-top: calc(-1 * var(--peek)); }
.player {
  position: relative; display: block; width: 100%;
  box-shadow: 0 32px 80px rgb(0 0 0 / 0.6), 0 8px 24px rgb(0 0 0 / 0.4); /* lifts it off the sea */
  aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden;
  border: 1px solid var(--line); background: var(--card);
}
.player img, video.player { display: block; width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--blue); color: #FFFFFF;
  box-shadow: 0 14px 36px rgb(0 0 0 / 0.45);
  transition: transform 0.4s var(--ease-out);
}
.play svg { margin-left: 4px; }
.player:hover .play { transform: scale(1.07); }
.duration {
  position: absolute; left: 20px; bottom: 18px; padding: 4px 10px; border-radius: 999px;
  background: rgb(13 17 23 / 0.8); font-size: 0.875rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
@media (max-width: 699px) {
  .player { aspect-ratio: 9 / 16; max-width: 440px; margin-inline: auto; }
}

/* Brands: outlined pills that stretch to fill each row edge to edge */
.brands { list-style: none; padding: 0; margin: 48px 0 0; display: flex; flex-wrap: wrap; gap: clamp(8px, 0.4rem + 0.3vw, 12px); }
.brands li {
  flex: 1 1 auto; text-align: center;
  padding: clamp(10px, 0.5rem + 0.4vw, 14px) clamp(16px, 0.8rem + 1vw, 26px); border: 1.5px solid var(--line); border-radius: 999px;
  font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 700;
  font-size: clamp(1rem, 0.8rem + 0.9vw, 1.625rem); letter-spacing: -0.01em; color: var(--white);
  transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.brands li:hover { border-color: var(--blue); }
.brands::after { content: ""; flex: 999 1 auto; } /* soaks up a short last row so its pills don't stretch */
/* With JS and motion: a pit the pills fall into (main.js brandPit). Without, the rows above stay. */
.section:has(> .brands) { position: relative; }
.pit-space { margin-top: 48px; }
.brands.physics { /* a layer over the whole section, edge to edge of the screen (left and width set in main.js) */
  position: absolute; top: 0; bottom: 0; margin: 0; z-index: 1;
  display: block; overflow: hidden; pointer-events: none; user-select: none; -webkit-user-select: none;
}
.brands.physics::after { content: none; }
.brands.physics li { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform; cursor: grab; touch-action: none; pointer-events: auto; background: var(--ink); }
.brands.physics li.grabbing { cursor: grabbing; border-color: var(--blue); }

/* MARK: Footer */

.site-footer { border-top: 1px solid var(--line); padding-block: 28px 56px; font-size: 0.9375rem; color: var(--text-3); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 28px; margin-bottom: 12px; }
.site-footer nav a { color: var(--text); font-weight: 600; display: inline-block; padding-block: 12px; }
.site-footer nav a:hover { color: var(--glow); }
.site-footer p { margin: 8px 0 0; max-width: 80ch; }

/* MARK: Text pages (privacy, support) */

.site-header { padding-block: 28px; }
.page { padding-block: 40px 112px; }
.page > * { max-width: 68ch; }
.page h1 { font-size: clamp(2.75rem, 1.8rem + 3.4vw, 4rem); line-height: 1.02; letter-spacing: -0.03em; margin: 0 0 24px; }
.page h2 { font-size: 1.5rem; letter-spacing: -0.01em; margin-top: 56px; }
.page p, .page li { color: var(--text-2); }
.page strong { color: var(--text); }
.page a { color: var(--glow); }
.page li + li { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
