/* Shared by the content pages (not the front page, which keeps its own inline styles).
   Values mirror index.html, which mirrors OffTheHook/DesignSystem/DesignTokens.swift.
   Only what every page shares lives here; each page brings its own sections in an inline <style>. */
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --sky: #050609;
  --sky-top: #171A36;
  --sky-mid: #0A0B14;
  --bg: #0C0D10;
  --surface: #15161A;
  --text: #F4F4F5;
  --text-2: #A1A1AA;
  --text-3: #8A8A93;
  --text-glass: #D4D4DC;
  --violet: #8B7CF6;
  --violet-light: #C9C2FF;
  --green: #4CC764;
  --green-light: #9BE3AE;
  --amber: #F5B547;
  --amber-light: #F7CD7A;
  --pink: #EE7BDD;
  --nebula-violet: #5B47D6;
  --nebula-blue: #2F5BFF;
  --glass: rgba(22, 22, 30, 0.42);
  --glass-strong: rgba(22, 22, 30, 0.62);
  --stroke: rgba(255, 255, 255, 0.14);
  --stroke-soft: rgba(255, 255, 255, 0.08);
  --on-primary: #0C0D10;
  --r-panel: 24px;
  --r-row: 18px;
  --gutter: 20px;
  --max: 1120px;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--sky); overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  position: relative; z-index: 0; background: var(--sky); color: var(--text);
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--violet-light); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
/* Sections set their own vertical padding with the padding shorthand; the side gutter must survive that. */
.wrap.wrap { padding-left: var(--gutter); padding-right: var(--gutter); }
.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 5; padding: 10px 16px; border-radius: 999px;
  background: var(--text); color: var(--on-primary); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Sky, as on the front page ----------
   Desktop: the sky, nebulae and a twinkling star canvas (site.js) stay still while the page scrolls.
   Phones: nothing fixed behind Safari's toolbar (it paints a solid band, docs/12), so the sky scrolls with
   the page and the stars are a still tile with the same seed as StarSky.swift. */
.sky { position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(ellipse 900px 760px at 50% 0%, var(--sky-top), var(--sky-mid) 55%, var(--sky) 100%); }
.nebula { position: fixed; z-index: -2; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.nebula.violet { width: 460px; height: 460px; background: var(--nebula-violet); opacity: .26; left: -18vw; top: 8vh; animation: drift-a 22s ease-in-out infinite alternate; }
.nebula.blue { width: 380px; height: 380px; background: var(--nebula-blue); opacity: .16; right: -14vw; top: 55vh; animation: drift-b 26s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(60px, 50px); } }
@keyframes drift-b { to { transform: translate(-50px, -60px); } }
#stars { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
@media (max-width: 960px) {
  .sky { position: absolute; inset: 0 0 auto; height: 100%;
    background: url("/img/stars.svg") 0 0 / 1200px auto repeat,
      radial-gradient(ellipse 900px 760px at 50% 0%, var(--sky-top), var(--sky-mid) 55%, var(--sky) 100%) top / 100% 1000px no-repeat; }
  .nebula { position: absolute; }
  #stars { display: none; }
  /* Safari takes the status bar colour from a fixed element at the top; the mask fades it into the sky. */
  body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 56px; z-index: 9; pointer-events: none; background-color: #171A36;
    -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
}

/* ---------- Nav ---------- */
/* Fixed like the front page: clear at the top, glass once you scroll (site.js sets .scrolled). */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 10; padding: 14px var(--gutter); }
.nav-inner { max-width: var(--max); margin: 0 auto; height: 56px; padding: 0 8px 0 14px; display: flex; align-items: center; justify-content: space-between;
  border-radius: 999px; border: 1px solid transparent; transition: background .4s var(--ease), border-color .4s var(--ease); }
.nav.scrolled .nav-inner { background: var(--glass-strong); border-color: var(--stroke-soft);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
main { padding-top: 84px; }
/* Korean breaks between words (spaces), never inside one; a word too long for its line may still wrap. */
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; flex: none; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 15px; color: var(--text-2); }
.nav-links a { text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 26px; border-radius: 999px;
  font: 600 17px/1 "Instrument Sans", sans-serif; background: var(--text); color: var(--on-primary) !important; text-decoration: none; border: 0; cursor: pointer; }
.btn.small { height: 40px; padding: 0 18px; font-size: 15px; }
.nav .btn { white-space: nowrap; }
@media (max-width: 400px) { .nav .btn.small { padding: 0 13px; font-size: 14px; } .brand { font-size: 16px; gap: 8px; } }
/* The smallest phones: the logo alone, so a long localized button still fits on one line. */
@media (max-width: 360px) { .brand { font-size: 0; gap: 0; } }
.nav.tight .brand { font-size: 0; gap: 0; }
.btn.ghost { background: transparent; color: var(--text) !important; border: 1px solid var(--stroke); }

/* ---------- Shared type ---------- */
.crumbs { font-size: 14px; color: var(--text-3); }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--text); }
.crumbs span[aria-hidden] { margin: 0 8px; }
.display { font-weight: 600; font-size: clamp(44px, 7.6vw, 96px); line-height: .98; letter-spacing: -0.045em; text-wrap: balance; }
/* Long single words (doomscrolling, Telefoonverslaving) must fit a 320 px phone: hyphenate by the page's language. */
h1, h2, h3, .display, .h2, .h3 { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.lede { font-size: clamp(19px, 2vw, 22px); line-height: 1.45; color: var(--text-glass); max-width: 40ch; text-wrap: pretty; }
.h2 { font-weight: 600; font-size: clamp(34px, 5vw, 60px); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
.h3 { font-weight: 600; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; letter-spacing: -0.02em; }
.sub { font-size: 19px; color: var(--text-2); max-width: 46ch; text-wrap: pretty; }
.fine { font-size: 14px; color: var(--text-3); }
.meta { font-size: 14px; color: var(--text-3); }
.meta a { text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 3px; }
.violet { color: var(--violet-light); }

/* The short answer under each title: the paragraph Google's AI Overview and featured snippets can quote. */
.answer { padding: 24px 26px; border-radius: var(--r-panel); background: var(--glass); border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); font-size: 18px; line-height: 1.5; color: var(--text-glass); }
.answer strong { color: var(--text); font-weight: 600; }

/* Long-form text */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 16px; }
.prose h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 600; line-height: 1.12; letter-spacing: -0.028em; margin-top: 56px; }
.prose h3 { font-size: 20px; font-weight: 600; line-height: 1.3; margin-top: 32px; }
.prose p, .prose li { color: var(--text-2); }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 8px; }
.prose li::marker { color: var(--text-3); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a, .link { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 3px; }
.prose a:hover, .link:hover { text-decoration-color: var(--text); }

.glass-card { background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--r-panel);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }

/* The app's PlatformTile: a dark glass box around a glass glyph. */
.tile { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; flex: none;
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.02)); border: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 18px 40px rgba(0,0,0,.45);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.tile img { width: 70%; height: 70%; object-fit: contain; }

/* Apple's iPhone 16 Pro bezel over a real screenshot. Screen: 1206 × 2622 at (72, 69) of 1350 × 2760. */
.device { position: relative; aspect-ratio: 1350 / 2760; filter: drop-shadow(0 50px 80px rgba(0,0,0,.55)); }
.device-screen { position: absolute; left: 5.333%; top: 2.5%; width: 89.333%; height: 95%; object-fit: cover; border-radius: 13.7% / 6.3%; }
.device-bezel { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: var(--r-row); background: var(--glass); border: 1px solid var(--stroke-soft); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; position: relative; font-weight: 600; font-size: 18px; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 1.6px solid var(--text-3); border-bottom: 1.6px solid var(--text-3); transform: rotate(45deg); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .a { padding: 0 22px 22px; color: var(--text-2); max-width: 68ch; }
.faq .a > * + * { margin-top: 12px; }
.faq .a a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 3px; }

/* ---------- Related pages ---------- */
.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.related a { display: block; padding: 22px; border-radius: var(--r-row); background: var(--glass); border: 1px solid var(--stroke-soft);
  text-decoration: none; transition: border-color .25s, transform .25s var(--ease); }
.related a:hover { border-color: var(--stroke); transform: translateY(-2px); }
.related b { display: block; font-size: 18px; font-weight: 600; line-height: 1.25; }
.related span { display: block; margin-top: 6px; font-size: 15px; color: var(--text-2); }

/* ---------- Sources ---------- */
.sources { font-size: 14px; color: var(--text-3); }
.sources ol { padding-left: 20px; display: grid; gap: 6px; }
.sources a { color: var(--text-2); text-decoration: underline; text-decoration-color: rgba(255,255,255,.2); text-underline-offset: 3px; overflow-wrap: anywhere; }

/* ---------- Waitlist: Lumi rises from the corner, as on the front page ---------- */
.closing { position: relative; isolation: isolate; text-align: center; overflow: hidden; }
.closing-inner { position: relative; padding: 18svh var(--gutter) 22svh; }
.closing .h2 { margin: 0 auto; max-width: 13ch; }
.closing .sub { margin: 20px auto 0; }
.closing-lumi { position: absolute; inset: 0; pointer-events: none; z-index: -1;
  -webkit-mask: linear-gradient(to bottom, transparent 0, #000 35%); mask: linear-gradient(to bottom, transparent 0, #000 35%); }
.lumi { --d: min(110vw, 90svh, 1000px); position: absolute; width: var(--d); height: var(--d); border-radius: 50%;
  left: calc(var(--d) * -0.22); bottom: calc(var(--d) * -0.7);
  background: radial-gradient(circle calc(var(--d) * .75) at 58% 18%, #fff 0%, #C9C0FF 33%, #7B68F0 67%, #4A3BC2 100%); }
.lumi::before, .lumi::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; }
.lumi::before { inset: calc(var(--d) * -.15); background: var(--nebula-violet); opacity: .5; filter: blur(calc(var(--d) * .15)); }
.lumi::after { inset: calc(var(--d) * -.04); background: var(--violet); opacity: .7; filter: blur(calc(var(--d) * .06)); }
@supports (animation-timeline: view()) {
  .closing-lumi .lumi { animation: lumi-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 60%; }
  @keyframes lumi-rise { from { transform: translate(-18%, 45%); opacity: .2; } to { transform: none; opacity: 1; } }
}
.wl { margin: 40px auto 0; max-width: 480px; padding: 6px; display: flex; gap: 4px; align-items: center; border-radius: 999px; }
.cc { position: relative; display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 8px 0 16px; font-weight: 500; font-size: 17px; cursor: pointer; flex: none; }
.cc svg { width: 10px; height: 6px; color: var(--text-3); }
.cc select { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.wl input[type=tel] { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font: 500 17px/1 "Instrument Sans", sans-serif; height: 48px; outline: none; padding-left: 6px; }
.wl input::placeholder { color: var(--text-3); }
.wl .btn { height: 48px; padding: 0 22px; flex: none; }
.wl .btn[disabled] { opacity: .6; cursor: default; }
.wl.done { justify-content: center; padding: 16px 22px; font-weight: 600; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl-msg { margin-top: 14px; font-size: 15px; color: var(--text-2); min-height: 1.5em; }
.wl-msg.err { color: var(--pink); }
.wl-consent { margin: 8px auto 0; max-width: 46ch; font-size: 12px; color: var(--text-3); }
.wl-consent a { text-decoration: underline; }

/* ---------- Footer ---------- */
/* A glass card over the sky and Lumi: readable, with the planet still glowing through. */
.foot { position: relative; width: calc(100% - 2 * var(--gutter)); max-width: var(--max); margin: 0 auto max(16px, env(safe-area-inset-bottom)); padding: 18px 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px 24px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); text-align: left;
  border-radius: var(--r-panel); background: rgba(8, 9, 15, .66); border: 1px solid var(--stroke-soft);
  -webkit-backdrop-filter: blur(28px) saturate(1.2); backdrop-filter: blur(28px) saturate(1.2); }
.foot a { text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 3px; }
.foot .by a { text-decoration: none; color: var(--text); font-weight: 600; }
.foot .na { flex-basis: 100%; font-size: 13px; color: var(--text-3); }
.foot a:hover { color: var(--text); }
.foot .langs { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 6px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--stroke-soft); }
.foot .langs a { text-decoration: none; color: var(--text-2); }
.foot .langs a[aria-current] { color: var(--text); }

/* ---------- Motion, as on the front page ----------
   The hero arrives on load (blur and lift only, so the largest paint isn't delayed). Headings and their
   sub lines rise in as they enter. Scenes (.scene) hold a stage still while something happens, then move on:
   sticky on desktop; on phones a scroll-driven transform does the pinning, because iOS Safari paints a solid
   band under its toolbar once it has seen position: sticky (docs/12). Without scroll timelines, or with
   Reduce Motion, every scene simply shows its end state. */
.hero .crumbs, .hero .display, .hero .lede, .hero .meta, .hero .cta { animation: arrive 1s var(--ease) both; }
.hero .display { animation-delay: .08s; } .hero .lede { animation-delay: .22s; } .hero .meta, .hero .cta { animation-delay: .34s; }
@keyframes arrive { from { transform: translateY(14px); filter: blur(6px); } to { transform: none; filter: none; } }
@supports (animation-timeline: view()) {
  main .h2:not(.scene *):not(.hero *), main .sub:not(.scene *):not(.hero *), main .h3:not(.scene *) {
    animation: rise-in linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
}

.scene { position: relative; height: var(--len, 240svh); view-timeline: --scene block; }
.scene-pin { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: clip; }
@keyframes pin-follow { from { transform: translateY(0); } to { transform: translateY(calc(var(--len, 240svh) - 100svh)); } }
@media (max-width: 960px) {
  .scene-pin { position: relative; padding-top: 72px; }
  @supports (animation-timeline: view()) {
    .scene-pin { animation: pin-follow linear both; animation-timeline: --scene; animation-range: contain 0% contain 100%; }
  }
}
@supports not (animation-timeline: view()) {
  .scene { height: auto; } .scene-pin { position: relative; height: auto; padding: 120px 0; }
}
/* A step inside a scene: fades and lifts in over its own slice of the scene (--a to --b, in % of the scene). */
@supports (animation-timeline: view()) {
  .scene .step { animation: step-in linear both; animation-timeline: --scene; animation-range: contain var(--a, 10%) contain var(--b, 30%); }
  @keyframes step-in { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
  /* Words that light up one by one; each span sets --a/--b. */
  .scene .lit { opacity: .16; animation: lit-up linear both; animation-timeline: --scene; animation-range: contain var(--a) contain var(--b); }
  @keyframes lit-up { to { opacity: 1; } }
}
/* Turkish writes the percent sign first: %91. */
:lang(tr) .count-wrap { display: inline-flex; flex-direction: row-reverse; }
/* A number that counts up while its scene is pinned: <span class="count" style="--to: 91"></span> */
@property --n { syntax: "<integer>"; inherits: false; initial-value: 0; }
.count::before { content: attr(data-n); }
@supports (animation-timeline: view()) {
  .count { counter-reset: n var(--n); animation: count-up linear both; animation-timeline: --scene; animation-range: contain var(--a, 5%) contain var(--b, 45%); }
  .count::before { content: counter(n); }
  @keyframes count-up { from { --n: 0; } to { --n: var(--to); } }
}

/* ---------- Quiet arrival for blocks marked .rise (scroll-driven, no JS) ---------- */
@supports (animation-timeline: view()) {
  .rise { animation: rise-in linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  @keyframes rise-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 960px) {
  .related { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
  .answer { padding: 20px; font-size: 17px; }
  .faq summary { font-size: 17px; padding: 18px 50px 18px 18px; }
  .faq .a { padding: 0 18px 18px; }
}
@media (max-width: 520px) {
  .display { font-size: clamp(34px, 11.2vw, 44px); }
  main .hero .display { max-width: none; }
  .wl { flex-wrap: wrap; border-radius: 28px; } .wl .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scene { height: auto; } .scene-pin { position: relative; height: auto; padding: 120px 0; }
  .scene .lit { opacity: 1; }
  .count::before { content: attr(data-n); }
}
