/* ============================================================
   3AM Test — Landing
   A quiet, editorial page for loud decisions.
   Tokens mirror /src/styles/theme.ts in the app.
   ============================================================ */

:root {
  /* Light palette — sourced from src/styles/theme.ts */
  --bg: #FBFAF7;
  --bg-warm: #FFF4EA;
  --surface: #FFFFFF;
  --surface-muted: #F0EDE6;
  --text: #24211E;
  --text-muted: #736B63;
  --border: #E4DED5;
  --primary: #247468;
  --primary-dark: #124D44;
  --primary-soft: #E0F0EC;
  --accent: #D26A46;
  --accent-soft: #F8E5DA;
  --info: #315C9F;

  /* Soft UI Evolution shadows */
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lifted: 0 8px 24px rgba(0, 0, 0, 0.07);
  --shadow-floating: 0 16px 36px rgba(0, 0, 0, 0.10);
  --shadow-card: 0 24px 60px -28px rgba(36, 33, 30, 0.22);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Type scale (display: Fraunces variable serif, body: Newsreader, mono: JetBrains Mono) */
  --font-display: "Fraunces", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --font-body: "Newsreader", "Charter", "Iowan Old Style", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Spacing — generous */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 144px;

  --container: 1200px;
  --container-narrow: 920px;

  --ring: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11140F;
    --bg-warm: #1A140E;
    --surface: #181B17;
    --surface-muted: #20231E;
    --text: #F0EDE6;
    --text-muted: #A09A8E;
    --border: #2B2F2A;
    --primary: #5BB89F;
    --primary-dark: #7DD1B7;
    --primary-soft: #1C342D;
    --accent: #E68B6B;
    --accent-soft: #3A2620;
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lifted: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-floating: 0 16px 36px rgba(0, 0, 0, 0.55);
    --shadow-card: 0 28px 60px -20px rgba(0, 0, 0, 0.55);
  }
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  font-feature-settings: "ss01", "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* Subtle warm grain so off-white never reads as flat */
  background-image:
    radial-gradient(ellipse 1200px 600px at 110% -10%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%),
    radial-gradient(ellipse 900px 500px at -20% 30%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 60%);
  background-attachment: fixed;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  z-index: 100;
}
.skip-link:focus { left: var(--s-4); top: var(--s-4); }

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

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
}
@media (min-width: 768px) { .container { padding: 0 var(--s-7); } }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-5);
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand__time {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--accent-soft);
}
.brand__sep { color: var(--text-muted); opacity: 0.6; }
.brand__name { color: var(--text); }

.site-nav {
  display: none;
  justify-content: center;
  gap: var(--s-6);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-muted);
}
@media (min-width: 880px) { .site-nav { display: flex; } }
.site-nav a {
  position: relative;
  padding: 6px 0;
  transition: color .2s ease;
}
.site-nav a:hover { color: var(--text); }
.site-nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.site-nav a:hover::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

/* Locale switcher (uses <details>) */
.locale-switcher { position: relative; }
.locale-switcher > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 7px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color .2s ease, color .2s ease;
}
.locale-switcher > summary::-webkit-details-marker { display: none; }
.locale-switcher > summary:hover { color: var(--text); border-color: var(--text); }
.locale-switcher[open] > summary { color: var(--text); border-color: var(--text); }
.locale-switcher__menu {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  min-width: 168px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 6px;
  box-shadow: var(--shadow-floating);
  z-index: 60;
}
.locale-switcher__menu a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text);
  transition: background .15s ease;
}
.locale-switcher__menu a:hover { background: var(--surface-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--r-pill);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow-lifted);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-floating);
  background: color-mix(in srgb, var(--text) 92%, var(--accent) 8%);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 16px;
}
.btn--ghost:hover { background: var(--surface-muted); border-color: var(--text); }
.btn--text {
  background: transparent;
  color: var(--text);
  padding: 13px 6px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: color-mix(in srgb, var(--text) 30%, transparent);
}
.btn--text:hover { text-decoration-color: var(--accent); color: var(--accent); }
.btn__arrow { transition: transform .2s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---------- Eyebrows / Section heads ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
  animation: pulse 3.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .eyebrow__dot { animation: none; }
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--s-4);
}
.section-tag::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}
.section-tag--inverse { color: color-mix(in srgb, var(--bg) 70%, transparent); }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 100, "SOFT" 50;
  font-size: clamp(32px, 4.8vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
  max-width: 22ch;
  text-wrap: balance;
}
[lang="ko"] .section-title,
[lang="ja"] .section-title { line-height: 1.3; letter-spacing: -0.01em; max-width: 24ch; }
.section-title--inverse { color: var(--bg); }
.section-title em { font-style: italic; color: var(--accent); font-variation-settings: "opsz" 100, "SOFT" 50; }

.section-head { margin-bottom: var(--s-8); max-width: 760px; }
.section-sub {
  margin-top: var(--s-4);
  font-size: 18px;
  color: var(--text-muted);
  max-width: 56ch;
}
.section-body {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 58ch;
}
.section-body--inverse { color: color-mix(in srgb, var(--bg) 85%, transparent); }
.section-body em { color: var(--accent); font-style: italic; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: clamp(48px, 9vw, 120px) 0 var(--s-7);
  position: relative;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-8);
  align-items: center;
}
@media (min-width: 980px) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.9fr;
    gap: var(--s-9);
  }
}

.hero__copy { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.hero__copy .eyebrow { margin-bottom: var(--s-5); }

.display {
  font-family: var(--font-display);
  font-weight: 350;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: clamp(48px, 8.4vw, 120px);
  line-height: 0.94;
  letter-spacing: -0.038em;
  color: var(--text);
  margin-bottom: var(--s-6);
  text-wrap: balance;
}
/* CJK locales: tighter letterforms read better with looser leading. */
[lang="ko"] .display,
[lang="ja"] .display { line-height: 1.08; letter-spacing: -0.02em; }
[lang="ko"] .display { font-size: clamp(42px, 7.2vw, 96px); }
[lang="ja"] .display { font-size: clamp(40px, 6.6vw, 88px); }
.display__line { display: block; }
.display__line--italic {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
  /* tiny optical nudge so italic doesn't feel detached from previous line */
  margin-left: clamp(8px, 1.2vw, 18px);
}
.display__break { display: block; height: 4px; }

.lede {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: var(--s-6);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
  margin-bottom: var(--s-7);
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hero__trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero__trust-line {
  position: relative;
  padding-left: var(--s-4);
  margin-top: var(--s-2);
  border-left: 1px solid color-mix(in srgb, var(--accent) 60%, var(--border));
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 48ch;
}
[lang="ko"] .hero__trust-line,
[lang="ja"] .hero__trust-line { text-transform: none; letter-spacing: 0.02em; font-size: 13px; }

/* Hero art — editorial mark + conversation card.
   The decision-tree SVG sits behind the card as a faint magazine mark,
   not as a SaaS illustration. */
.hero__art {
  position: relative;
  perspective: 1400px;
  animation: float-in 1.1s cubic-bezier(.2,.7,.2,1) .15s both;
  min-height: 380px;
}
.hero__tree {
  position: absolute;
  inset: -28px -8px auto auto;
  width: clamp(220px, 28vw, 320px);
  height: auto;
  color: color-mix(in srgb, var(--accent) 55%, transparent);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  transform: rotate(2deg);
  animation: tree-trace 2.4s cubic-bezier(.2,.7,.2,1) .4s both;
}
@media (prefers-color-scheme: dark) {
  .hero__tree { color: color-mix(in srgb, var(--accent) 70%, transparent); opacity: 0.35; }
}
@keyframes tree-trace {
  from { opacity: 0; transform: rotate(6deg) scale(0.96); }
  to   { opacity: 0.45; transform: rotate(2deg) scale(1); }
}

.clock-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  transform: rotate(-1.4deg);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
  max-width: 440px;
  margin-left: auto;
}
.hero__art:hover .clock-card { transform: rotate(0deg) translateY(-4px); }

.clock-card__chrome {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: var(--s-4);
  border-bottom: 1px solid var(--border);
}
.clock-card__mark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.clock-card__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}
.clock-card__time {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.clock-card__foot {
  display: flex;
  gap: 6px;
  padding-top: 12px;
  margin-top: var(--s-3);
  border-top: 1px dashed var(--border);
  justify-content: flex-end;
}
.clock-card__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--surface-muted); }
.clock-card__dot:nth-child(1) { background: color-mix(in srgb, var(--accent) 60%, transparent); }
.clock-card__dot:nth-child(2) { background: color-mix(in srgb, var(--primary) 60%, transparent); }

.clock-card__chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bubble {
  max-width: 86%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.45;
  font-family: var(--font-body);
}
.bubble__from {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.bubble--guide {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  color: var(--text);
}
.bubble--user {
  background: var(--primary);
  color: #FFFFFF;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
@media (prefers-color-scheme: dark) {
  .bubble--user { color: #0F1411; }
}
.bubble--typing {
  display: inline-flex;
  align-self: flex-start;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  padding: 14px 14px;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  gap: 4px;
}
.bubble--typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
  animation: typing 1.4s ease-in-out infinite;
}
.bubble--typing span:nth-child(2) { animation-delay: .18s; }
.bubble--typing span:nth-child(3) { animation-delay: .36s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-3px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .bubble--typing span { animation: none; opacity: 0.6; }
}

.clock-card__shadow {
  position: absolute;
  inset: -40px -20px -60px -20px;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 50% 70%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    radial-gradient(ellipse 60% 60% at 30% 30%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

/* Hero marquee — editorial ticker.
   Intentionally slow, large, italic. Separators are typographic
   ·, not visual chrome. Hover pauses for closer reading. */
.hero__marquee {
  margin-top: var(--s-9);
  padding: var(--s-5) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent, black 16%, black 84%, transparent);
  mask-image: linear-gradient(to right, transparent, black 16%, black 84%, transparent);
}
.hero__marquee::before {
  content: "§";
  position: absolute;
  left: max(var(--s-5), calc((100vw - var(--container)) / 2 + var(--s-5)));
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  color: var(--accent);
  z-index: 2;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  letter-spacing: -0.02em;
  pointer-events: none;
}
.marquee {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-5);
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 350;
  font-style: italic;
  font-variation-settings: "opsz" 36, "SOFT" 50;
  font-size: clamp(22px, 2.6vw, 32px);
  letter-spacing: -0.01em;
  color: var(--text);
  animation: marquee 60s linear infinite;
  will-change: transform;
}
.marquee span { display: inline-block; }
.marquee span[aria-hidden="true"] {
  color: var(--accent);
  font-style: normal;
  opacity: 0.5;
  transform: translateY(-0.06em);
}
.hero__marquee:hover .marquee { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; transform: translateX(-10%); }
}

/* ============================================================
   Magazine section markers — tiny § + Roman numeral at top-right
   of each major section, signalling editorial structure.
   ============================================================ */
main { counter-reset: section; }
main > section:not(.hero):not(.cta) {
  counter-increment: section;
  position: relative;
}
main > section:not(.hero):not(.cta)::before {
  content: "§  " counter(section, upper-roman);
  position: absolute;
  top: var(--s-5);
  right: var(--s-5);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.55;
  white-space: pre;
  pointer-events: none;
  z-index: 1;
}
@media (min-width: 768px) {
  main > section:not(.hero):not(.cta)::before {
    top: var(--s-6);
    right: var(--s-7);
  }
}
/* Inverse (dark privacy section) gets a lighter marker. */
.privacy::before {
  color: color-mix(in srgb, var(--bg) 80%, transparent) !important;
  opacity: 0.75;
}

/* ============================================================
   PROBLEM
   ============================================================ */
.problem {
  padding: var(--s-10) 0;
  position: relative;
}
.problem__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
}
@media (min-width: 980px) {
  .problem__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-9);
    align-items: start;
  }
  .problem__grid .section-tag { grid-column: 1 / -1; }
  .problem__grid .section-title { grid-column: 1; }
  .problem__body { grid-column: 2; }
  .problem__pull { grid-column: 1 / -1; margin-top: var(--s-5); }
}
.problem__body p {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--s-4);
}
.problem__body em {
  color: var(--text);
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 500;
}

.problem__pull {
  margin-top: var(--s-6);
  padding: var(--s-6) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.problem__pull blockquote {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
  max-width: 28ch;
}
.problem__pull figcaption {
  margin-top: var(--s-4);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how {
  padding: var(--s-10) 0;
  background:
    linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg-warm) 50%, transparent) 50%, transparent);
}
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  counter-reset: step;
}
@media (min-width: 880px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s-7); }
}

.step {
  position: relative;
  padding: var(--s-6) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease, box-shadow .3s ease;
}
.step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lifted);
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: var(--s-5);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
}
.step__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "opsz" 36, "SOFT" 50;
  font-size: clamp(22px, 2.3vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: var(--s-3);
}
.step__body {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   MODULES
   ============================================================ */
.modules {
  padding: var(--s-10) 0;
}
.module-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 768px) {
  .module-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-5);
  }
}
@media (min-width: 1100px) {
  .module-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "feat second third"
      "feat fourth ghost";
    gap: var(--s-5);
  }
  .module-card--featured { grid-area: feat; }
  .module-card:nth-child(2) { grid-area: second; }
  .module-card:nth-child(3) { grid-area: third; }
  .module-card:nth-child(4) { grid-area: fourth; }
  .module-card--ghost { grid-area: ghost; }
}

.module-card {
  padding: var(--s-6) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  position: relative;
  overflow: hidden;
}
.module-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lifted);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}
.module-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.module-card__tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: var(--r-pill);
}
.module-card__id {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.module-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 60;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--s-3);
}
.module-card__desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
}
.module-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--s-5);
}
.module-card__chips li {
  padding: 5px 11px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-muted);
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
}

.module-card--featured {
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-warm) 100%);
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--s-7) var(--s-6);
}
.module-card--featured .module-card__title {
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 350;
  font-style: italic;
  font-variation-settings: "opsz" 100, "SOFT" 50;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.module-card--featured .module-card__desc {
  font-size: 16px;
  line-height: 1.6;
  max-width: 32ch;
}
.module-card--featured::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 220px; height: 220px;
  background: radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.module-card--featured .module-card__tag {
  color: var(--accent);
  background: transparent;
  padding: 0;
  font-size: 14px;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.module-card--ghost {
  background: transparent;
  border-style: dashed;
  border-color: color-mix(in srgb, var(--border) 90%, transparent);
  box-shadow: none;
}
.module-card--ghost .module-card__title { color: var(--text-muted); }

/* ============================================================
   PRIVACY (dark inversion section)
   ============================================================ */
.privacy {
  padding: var(--s-10) 0;
  margin: var(--s-8) 0;
  background: var(--text);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .privacy { background: #060704; }
}
.privacy::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 400px at 90% 10%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%),
    radial-gradient(ellipse 700px 400px at 10% 90%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}
.privacy > .container { position: relative; z-index: 1; }

.privacy__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-8);
}
@media (min-width: 980px) {
  .privacy__grid {
    grid-template-columns: 1.05fr 1fr;
    gap: var(--s-9);
    align-items: start;
  }
}

.privacy__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 560px) {
  .privacy__list { grid-template-columns: 1fr 1fr; }
}
.privacy__list li {
  padding: var(--s-5);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--bg) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--bg) 14%, transparent);
  transition: background .25s ease, transform .25s ease;
}
.privacy__list li:hover {
  background: color-mix(in srgb, var(--bg) 12%, transparent);
  transform: translateY(-2px);
}
.privacy__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--primary) 25%, transparent);
  color: var(--bg);
  margin-bottom: var(--s-4);
}
.privacy__list h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--bg);
}
.privacy__list p {
  font-size: 14px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--bg) 70%, transparent);
}

/* ============================================================
   COMMUNITY
   ============================================================ */
.community { padding: var(--s-10) 0; }
.community__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
}
@media (min-width: 980px) {
  .community__grid {
    grid-template-columns: 0.9fr 1.3fr;
    gap: var(--s-8);
    align-items: start;
  }
}
.community__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 640px) {
  .community__cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .community__cards {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 1100px) {
  .community__cards { grid-template-columns: 1fr 1fr; }
}

.story-card {
  padding: var(--s-5) var(--s-5) var(--s-6);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease;
  overflow: hidden;
}
.story-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lifted); }
.story-card::before {
  content: "“";
  position: absolute;
  top: 4px; right: 16px;
  font-family: var(--font-display);
  font-size: 72px;
  line-height: 1;
  color: color-mix(in srgb, var(--accent) 18%, transparent);
  font-style: italic;
  font-weight: 400;
  pointer-events: none;
}
.story-card__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--s-3);
}
.story-card p {
  font-family: var(--font-display);
  font-weight: 350;
  font-size: 19px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text);
}
/* Editorial variants — break the "five identical cards" feeling. */
.story-card--accent {
  background:
    linear-gradient(170deg, var(--accent-soft) 0%, var(--surface) 60%);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}
.story-card--accent::before { color: color-mix(in srgb, var(--accent) 35%, transparent); }
.story-card--ink {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.story-card--ink .story-card__tag { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.story-card--ink p { color: var(--bg); }
.story-card--ink::before { color: color-mix(in srgb, var(--accent) 80%, transparent); }

/* ============================================================
   PRICING
   ============================================================ */
.pricing { padding: var(--s-10) 0; }
.pricing__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 880px) {
  .pricing__grid { grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
}

.price-card {
  display: flex;
  flex-direction: column;
  padding: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease, box-shadow .3s ease;
}
.price-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lifted);
}
.price-card__top {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.price-card__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.price-card__top h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.price-card__price {
  font-family: var(--font-display);
  font-weight: 350;
  font-style: italic;
  font-variation-settings: "opsz" 60, "SOFT" 50;
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--s-4);
}
.price-card__desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: var(--s-5);
}
.price-card__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: var(--s-4);
  border-top: 1px dashed var(--border);
}
.price-card__list li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  color: var(--text);
}
.price-card__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 12px; height: 1.5px;
  background: var(--primary);
  border-radius: 2px;
}

.price-card--featured {
  background: linear-gradient(170deg, var(--primary-soft) 0%, var(--surface) 50%);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  position: relative;
}
.price-card--featured::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--r-xl);
  padding: 1px;
  background: linear-gradient(140deg, var(--primary), transparent 40%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}
.price-card--featured .price-card__price { color: var(--primary-dark); }

/* ============================================================
   CTA
   ============================================================ */
.cta {
  padding: var(--s-10) 0;
  position: relative;
}
.cta__inner {
  text-align: center;
  max-width: 740px;
  padding: clamp(40px, 7vw, 80px) clamp(24px, 5vw, 64px);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.cta__inner::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(ellipse 60% 100% at 0% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    radial-gradient(ellipse 60% 100% at 100% 100%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 60%);
  pointer-events: none;
}
.cta__inner > * { position: relative; }

.cta__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-4);
}
.cta__title {
  font-family: var(--font-display);
  font-weight: 350;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: var(--s-5);
}
.cta__title span { display: block; }
.cta__title-italic {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}
.cta__body {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: var(--s-6);
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

.cta__form {
  display: flex;
  gap: var(--s-2);
  max-width: 480px;
  margin: 0 auto var(--s-5);
  flex-wrap: wrap;
}
.cta__form input {
  flex: 1 1 240px;
  padding: 14px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.cta__form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}

.cta__stores {
  display: flex;
  justify-content: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--text);
  transition: border-color .2s ease, transform .2s ease;
}
.store-btn:hover { border-color: var(--text); transform: translateY(-1px); }
.store-btn--disabled { opacity: 0.5; cursor: not-allowed; }
.store-btn--disabled:hover { transform: none; border-color: var(--border); }
.store-btn span { display: flex; flex-direction: column; text-align: left; line-height: 1.1; }
.store-btn small {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.store-btn strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.cta__note {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: var(--s-8);
  padding: var(--s-8) 0 var(--s-6);
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: var(--s-7);
  }
}
.footer__brand .brand__time,
.footer__brand .brand__sep,
.footer__brand .brand__name {
  display: inline-block;
}
.footer__brand .brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin-left: 4px;
}
.footer__tag {
  margin-top: var(--s-3);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 15px;
  max-width: 26ch;
}
.footer__nav, .footer__lang {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer__nav h4, .footer__lang h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.footer__nav a, .footer__lang a {
  font-size: 14.5px;
  color: var(--text);
  transition: color .2s ease;
}
.footer__nav a:hover, .footer__lang a:hover { color: var(--accent); }
.footer__lang ul { display: flex; flex-direction: column; gap: 6px; }

.footer-bottom {
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
}
.footer-bottom small {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ============================================================
   Reveal-on-scroll animations
   ============================================================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float-in {
  from { opacity: 0; transform: translateY(30px) rotate(-3deg); }
  to { opacity: 1; transform: translateY(0) rotate(-1.2deg); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__copy, .hero__art { animation: none; }
  .clock-card { transform: rotate(0deg); }
}

/* RTL safety (none of our 6 locales are RTL, but be safe) */
[dir="rtl"] .display__line--italic { margin-left: 0; margin-right: clamp(8px, 1.2vw, 18px); }

/* ============================================================
   LEGAL PAGES — privacy + terms
   Same shell as the main page (header, footer, tokens, type),
   but with a quieter, reading-first <main>. One <h1> per page.
   ============================================================ */
.legal {
  padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 8vw, 120px);
}
.legal__inner {
  max-width: 720px;
  margin: 0 auto;
}

.legal__head {
  margin-bottom: var(--s-7);
  padding-bottom: var(--s-6);
  border-bottom: 1px dashed var(--border);
}
.legal__title {
  font-family: var(--font-display);
  font-weight: 350;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: var(--s-3) 0 var(--s-4);
  max-width: 18ch;
}
.legal__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--s-5);
}
.legal__lede {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 56ch;
}

/* Body sections, rendered server-side from copy.{page}.sections[] */
.legal__body {
  display: flex;
  flex-direction: column;
  gap: var(--s-7);
}
.legal-section {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.legal-section__heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "opsz" 36, "SOFT" 40;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0;
  /* Sentence case is enforced in copy, not via CSS. */
}
.legal-section__body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
}
.legal-section__body p { margin: 0 0 var(--s-3); }
.legal-section__body p:last-child { margin-bottom: 0; }
.legal-section__body ul,
.legal-section__body ol {
  margin: var(--s-3) 0;
  padding-left: 0;
  list-style: none;
}
.legal-section__body ul li,
.legal-section__body ol li {
  position: relative;
  padding-left: var(--s-5);
  margin-bottom: var(--s-2);
  line-height: 1.55;
}
.legal-section__body ul li::before {
  content: "·";
  position: absolute;
  left: var(--s-3);
  top: -2px;
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
}
.legal-section__body ol { counter-reset: legal-li; }
.legal-section__body ol li {
  counter-increment: legal-li;
}
.legal-section__body ol li::before {
  content: counter(legal-li) ".";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding-top: 4px;
}
.legal-section__body strong { font-weight: 600; color: var(--text); }
.legal-section__body em {
  font-style: italic;
  color: var(--accent);
}
.legal-section__body a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--primary) 45%, transparent);
  transition: color .2s ease, text-decoration-color .2s ease;
}
.legal-section__body a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.legal__foot {
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px dashed var(--border);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-muted);
}
.legal__foot a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.legal__foot a:hover { color: var(--accent); }

