/* ─────────────────────────────────────────────────────────────
   Imanza — design system
   Mirrors the app's themes (src/constants/themes.ts):
   default = "Light" (green light), secondary = "Frosted Latte"
   (the app's Emerald Tide palette). Icons are the app's Hugeicons
   set; the brand mark is the app's lucide crescent.
   Self-contained: the only font is self-hosted Fraunces.
   ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/Fraunces-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  /* app "Light" theme (Green Light) — exact tokens from src/constants/themes.ts */
  --bg: #f3f6f9;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #334155;
  --mut: #64748b;
  --faint: #94a3b8;
  --teal: #0d9488;
  --teal-deep: #0f766e;
  --teal-night: #134e4a;
  --mint: #f0fdfa;
  --mint-line: #ccfbf1;
  --glow: #a7f3d0;
  --on-accent: #ffffff;
  --grad-a: #059669;
  --grad-b: #0d9488;
  --gold: #f5c542;

  /* text on the dark hero / night bands */
  --on-night: #f0fdfa;
  --on-night-soft: #ccfbf1;

  /* night band (app header gradient family, deepened) */
  --night-hi: #0f766e;
  --night-md: #134e4a;
  --night-lo: #042f2e;

  --display: 'Fraunces', 'Iowan Old Style', Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1120px;
  --r: 22px;
  --r-sm: 14px;
  --shadow-lg: 0 24px 60px -24px rgba(19, 78, 74, 0.35);
  --shadow-sm: 0 8px 26px -14px rgba(19, 78, 74, 0.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme='latte'] {
  /* app "Frosted Latte" theme — exact tokens (caramel accent) */
  --bg: #efe6da;
  --surface: #fbf7f1;
  --surface-alt: #efe6da;
  --line: #e0d3c2;
  --line-soft: #ece2d5;
  --ink: #2a1f16;
  --ink-2: #4d3b2c;
  --mut: #8a715a;
  --faint: #b39c86;
  --teal: #a97b52;
  --teal-deep: #7a5433;
  --teal-night: #5f4023;
  --mint: #f3e9dc;
  --mint-line: #e2ccb2;
  --glow: #f0dcc4;
  --on-accent: #fffaf3;
  --grad-a: #c0996c;
  --grad-b: #a97b52;
  --night-hi: #8a6038;
  --night-md: #5f4023;
  --night-lo: #35200e;
  --on-night: #fdf6ec;
  --on-night-soft: #f0dcc4;
  --shadow-lg: 0 24px 60px -24px rgba(107, 74, 42, 0.35);
  --shadow-sm: 0 8px 26px -14px rgba(107, 74, 42, 0.28);
}

[data-theme='dark'] {
  /* app "Dark" theme (Green Dark) — exact tokens */
  --bg: #0a0f1a;
  --surface: #1e2d40;
  --surface-alt: #162032;
  --line: #2d4060;
  --line-soft: #1e2d40;
  --ink: #e2e8f0;
  --ink-2: #cbd5e1;
  --mut: #94a3b8;
  --faint: #64748b;
  --teal: #2dd4bf;
  --teal-deep: #99f6e4;
  --teal-night: #134e4a;
  --mint: #0c2a28;
  --mint-line: #134e4a;
  --glow: #99f6e4;
  --on-accent: #04211f;
  --grad-a: #2dd4bf;
  --grad-b: #14b8a6;
  --night-hi: #1e2d40;
  --night-md: #111a2e;
  --night-lo: #080d16;
  --on-night: #e2e8f0;
  --on-night-soft: #cbd5e1;
  --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 8px 26px -14px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1rem;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }

.ic {
  display: inline-flex;
  width: 1em;
  height: 1em;
  flex: none;
}
.ic svg { width: 100%; height: 100%; }

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.nav__in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px clamp(18px, 4vw, 40px);
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.22rem;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.brand .ic { font-size: 24px; color: var(--teal); stroke-width: 2; }
.brand .ic svg * { stroke-width: 2; }
.nav__links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  align-items: center;
  font-size: 0.95rem;
}
.nav__links a { color: var(--ink-2); font-weight: 500; }
.nav__links a:hover { color: var(--teal-deep); text-decoration: none; }

.theme-flip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 6px 13px;
  font: 500 0.83rem var(--sans);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.theme-flip:hover { border-color: var(--teal); box-shadow: var(--shadow-sm); }
.theme-flip .swatch {
  width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--bg) 50%, var(--teal) 50%);
  border: 1px solid var(--line);
}

@media (max-width: 720px) {
  .nav__links a.nav__hide { display: none; }
}

/* ── Hero: the day arc ───────────────────────────────────── */
.hero {
  position: relative;
  overflow: clip;
  color: var(--on-night);
  background: var(--night-md);
}
.hero__sky, .hero__sky span { position: absolute; inset: 0; }
.hero__sky .sky-dawn {
  background: linear-gradient(180deg, var(--night-hi) 0%, #d97706 130%);
  opacity: 0;
}
.hero__sky .sky-day {
  background: linear-gradient(180deg, var(--grad-b) 0%, var(--night-hi) 65%, var(--night-md) 110%);
  opacity: 1;
}
.hero__sky .sky-night {
  background: linear-gradient(180deg, var(--night-md) 0%, var(--night-lo) 80%);
  opacity: 0;
}
.hero__sky span { transition: opacity 0.25s linear; }

.stars { position: absolute; inset: 0; pointer-events: none; }
.hero .stars { opacity: 0; transition: opacity 0.4s; }
.star {
  position: absolute;
  width: 12px; height: 12px;
  color: var(--gold);
  animation: twinkle 3.2s ease-in-out infinite;
}
.hero .star svg { width: 100%; height: 100%; }
@keyframes twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}

.hero__in {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) clamp(18px, 4vw, 40px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.6vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
}
.hero h1 em {
  font-style: italic;
  color: var(--glow);
}
.hero .sub {
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  color: var(--on-night-soft);
  max-width: 34rem;
  margin: 0 0 30px;
}
.eyebrow {
  font: 600 0.78rem var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--glow);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow .ic { font-size: 16px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border-radius: 14px;
  padding: 13px 22px;
  font: 600 0.98rem var(--sans);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--play {
  background: #051f1c;
  color: #fff;
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.55);
}
.btn--play small { display: block; font-weight: 400; font-size: 0.68rem; opacity: 0.75; line-height: 1.1; }
.btn--play b { display: block; font-size: 1.02rem; line-height: 1.15; }
.btn--play .soon {
  margin-left: 6px;
  font: 600 0.62rem var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--gold);
  color: #051f1c;
  padding: 3px 8px;
  border-radius: 999px;
}
.btn--ghost {
  border: 1.5px solid color-mix(in srgb, var(--on-night) 40%, transparent);
  color: var(--on-night);
}
.btn--ghost:hover { border-color: var(--glow); background: color-mix(in srgb, var(--on-night) 8%, transparent); }

/* the arc itself */
.hero__stage {
  position: relative;
  padding: clamp(8px, 2vw, 24px) 0 0;
  min-height: 380px;
  touch-action: pan-y;
  cursor: ew-resize;
}
.arc-track {
  position: absolute;
  inset: auto 0 86px;
  height: 260px;
  pointer-events: none;
}
.arc-track svg { width: 100%; height: 100%; overflow: visible; }
.arc-track .rail { stroke: color-mix(in srgb, var(--on-night) 28%, transparent); stroke-dasharray: 3 7; }
.orb {
  position: absolute;
  width: 54px; height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  pointer-events: none;
  will-change: transform;
}
.orb--sun {
  background: radial-gradient(circle at 35% 30%, #fde68a, var(--gold) 65%);
  box-shadow: 0 0 44px 10px rgba(245, 197, 66, 0.55);
}
.orb--moon {
  color: #f8fafc;
  font-size: 40px;
  filter: drop-shadow(0 0 18px rgba(167, 243, 208, 0.8));
}
.orb--moon svg * { stroke-width: 1.6; }

.prayer-stops {
  position: absolute;
  inset: auto 0 26px;
  display: flex;
  justify-content: space-between;
  padding: 0 6px;
}
.stop {
  display: grid;
  justify-items: center;
  gap: 5px;
  font: 600 0.72rem var(--sans);
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--on-night) 55%, transparent);
  transition: color 0.3s, transform 0.3s var(--ease);
}
.stop .ic { font-size: 20px; opacity: 0.75; }
.stop time { font-weight: 400; font-size: 0.66rem; opacity: 0.7; }
.stop.on {
  color: var(--glow);
  transform: translateY(-4px);
}
.stop.on .ic { opacity: 1; filter: drop-shadow(0 0 10px rgba(167, 243, 208, 0.7)); }

.hero__hint {
  position: absolute;
  inset: auto 0 2px;
  text-align: center;
  font: 500 0.75rem var(--sans);
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--on-night) 55%, transparent);
}

/* horizon fade into next section */
.hero__horizon {
  position: relative;
  height: clamp(48px, 7vw, 84px);
  margin-top: clamp(20px, 4vw, 44px);
  background: linear-gradient(180deg, transparent, var(--bg));
}

@media (max-width: 860px) {
  .hero__in { grid-template-columns: 1fr; }
  .hero__stage { min-height: 300px; }
  .arc-track { height: 190px; bottom: 80px; }
}

/* ── Marquee ribbon ──────────────────────────────────────── */
.ribbon {
  border-block: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  padding: 15px 0;
}
.ribbon__track {
  display: flex;
  gap: 44px;
  width: max-content;
  animation: ribbon 36s linear infinite;
}
.ribbon:hover .ribbon__track { animation-play-state: paused; }
@keyframes ribbon { to { transform: translateX(-50%); } }
.ribbon__item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 500 0.95rem var(--sans);
  color: var(--teal-deep);
  white-space: nowrap;
}
.ribbon__item .ic { font-size: 19px; color: var(--teal); }

/* ── Sections ────────────────────────────────────────────── */
.band { padding: clamp(64px, 9vw, 120px) 0; }
.band--night {
  background:
    radial-gradient(110% 80% at 50% -20%, var(--night-hi) 0%, var(--night-md) 46%, var(--night-lo) 100%);
  color: var(--on-night);
}
.band--night .eyebrow { color: var(--glow); }
.band--night .section-head p { color: var(--on-night-soft); }
.band--night a { color: var(--glow); }

.section-head { max-width: 40rem; margin-bottom: clamp(34px, 5vw, 56px); }
.section-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.section-head p { color: var(--mut); margin: 0; font-size: 1.05rem; }
.band--night .section-head h2 { color: var(--on-night); }

/* ── Features ────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px 24px 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
  will-change: transform;
}
.feature:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--mint-line);
}
.feature::after {
  content: '';
  position: absolute;
  inset: auto -30% -60% auto;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--teal) 14%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}
.feature:hover::after { opacity: 1; }
.feature .fic {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--mint);
  border: 1px solid var(--mint-line);
  color: var(--teal-deep);
  font-size: 26px;
  margin-bottom: 16px;
  transition: transform 0.35s var(--ease);
}
.feature:hover .fic { transform: rotate(-6deg) scale(1.08); }
.feature h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.22rem;
  margin: 0 0 8px;
}
.feature p { margin: 0; color: var(--mut); font-size: 0.95rem; }

/* ── Playground ──────────────────────────────────────────── */
.playground {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.toy {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px 24px;
  display: grid;
  gap: 6px;
  align-content: start;
  text-align: center;
  justify-items: center;
}
.toy h3 { font-family: var(--display); font-weight: 600; font-size: 1.15rem; margin: 0; }
.toy > p { color: var(--mut); font-size: 0.88rem; margin: 0 0 12px; }

/* tasbeeh toy */
.bead-btn {
  position: relative;
  width: 148px; height: 148px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(160deg, var(--grad-a), var(--grad-b));
  color: var(--on-accent);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
  transition: transform 0.12s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.bead-btn:active { transform: scale(0.94); }
.bead-btn .count {
  font: 600 2.6rem var(--display);
  line-height: 1;
}
.bead-btn .of { font: 500 0.72rem var(--sans); opacity: 0.85; letter-spacing: 0.08em; }
.bead-ring { position: absolute; inset: -9px; pointer-events: none; }
.bead-ring circle {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
}
.bead-ring .rail { stroke: var(--line); }
.bead-ring .fill {
  stroke: var(--teal);
  stroke-dasharray: 1 1;
  transition: stroke-dashoffset 0.25s var(--ease);
  transform: rotate(-90deg);
  transform-origin: center;
}
.bead-btn.done { animation: celebrate 0.7s var(--ease); }
@keyframes celebrate {
  0% { transform: scale(1); }
  35% { transform: scale(1.12) rotate(3deg); }
  60% { transform: scale(0.97) rotate(-2deg); }
  100% { transform: scale(1); }
}
.toy .toy-note { font: 500 0.78rem var(--sans); color: var(--faint); min-height: 1.2em; }
.toy .toy-note.pop { color: var(--teal-deep); }

/* qibla toy */
.dial {
  position: relative;
  width: 158px; height: 158px;
  border-radius: 50%;
  border: 2px solid var(--mint-line);
  background:
    radial-gradient(circle at 50% 50%, var(--mint) 0%, var(--surface) 72%);
  display: grid;
  place-items: center;
}
.dial .tick { position: absolute; inset: 6px; border-radius: 50%; border: 1px dashed var(--line); }
.dial .n { position: absolute; top: 7px; font: 700 0.7rem var(--sans); color: var(--faint); letter-spacing: 0.1em; }
.needle {
  position: absolute;
  width: 4px; height: 62px;
  bottom: 50%;
  left: calc(50% - 2px);
  transform-origin: 50% 100%;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--grad-a), var(--grad-b));
  will-change: transform;
}
.needle::after {
  content: '';
  position: absolute;
  top: -7px; left: -5px;
  border: 7px solid transparent;
  border-bottom: 12px solid var(--grad-a);
}
.dial .kaaba-dot {
  position: absolute;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  color: var(--teal-deep);
  font-size: 18px;
  top: 12px; right: 30px;
}
.dial .hub {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--teal);
  z-index: 2;
}

/* theme toy */
.swatches { display: grid; gap: 12px; width: 100%; }
.swatch-row {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-alt);
  padding: 12px 15px;
  cursor: pointer;
  font: 600 0.92rem var(--sans);
  color: var(--ink-2);
  transition: border-color 0.25s, transform 0.25s var(--ease);
  text-align: left;
}
.swatch-row:hover { transform: translateX(4px); }
.swatch-row.on { border-color: var(--teal); background: var(--mint); }
.swatch-row .chip {
  width: 34px; height: 34px;
  border-radius: 11px;
  border: 1px solid var(--line);
  flex: none;
}
.swatch-row small { display: block; font-weight: 400; color: var(--mut); }
.chip--latte { background: linear-gradient(135deg, #efe6da 55%, #a97b52 55%); }
.chip--light { background: linear-gradient(135deg, #f3f6f9 55%, #0d9488 55%); }
.chip--dark { background: linear-gradient(135deg, #0a0f1a 55%, #2dd4bf 55%); }
.swatch-row .mark { margin-left: auto; color: var(--teal); font-size: 20px; opacity: 0; transition: opacity 0.2s; }
.swatch-row.on .mark { opacity: 1; }

/* ── Phone mockups ───────────────────────────────────────── */
.showcase {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(14px, 3vw, 34px);
  flex-wrap: wrap;
  perspective: 1400px;
}
.phone {
  width: min(250px, 78vw);
  border-radius: 34px;
  background: #0b1220;
  padding: 10px;
  box-shadow: 0 40px 80px -36px rgba(2, 24, 20, 0.75);
  transition: transform 0.5s var(--ease);
  will-change: transform;
}
.phone.raise { margin-bottom: 34px; }
.phone:hover { transform: translateY(-10px) rotateX(2deg); }
.phone img {
  border-radius: 26px;
  width: 100%;
  height: auto;
}

.lang-chips { display: flex; justify-content: center; gap: 10px; margin-top: clamp(26px, 4vw, 40px); flex-wrap: wrap; }
.lang-chip {
  border: 1px solid color-mix(in srgb, var(--on-night) 30%, transparent);
  color: var(--on-night-soft);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.88rem;
}

/* ── FAQ ─────────────────────────────────────────────────── */
.faq { max-width: 46rem; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.25s;
}
.faq details[open] { border-color: var(--mint-line); box-shadow: var(--shadow-sm); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 19px;
  font-weight: 600;
  font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic {
  margin-left: auto;
  font-size: 20px;
  color: var(--teal);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq .faq__body { padding: 0 19px; color: var(--mut); overflow: hidden; }
.faq .faq__body p { margin: 0 0 17px; }

/* ── Contact ─────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-side h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  margin: 0 0 12px;
  color: var(--on-night);
}
.contact-side p { color: var(--on-night-soft); margin: 0 0 18px; }
.contact-side .alt { font-size: 0.9rem; color: color-mix(in srgb, var(--on-night-soft) 75%, transparent); }

.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(20px, 3vw, 30px);
  display: grid;
  gap: 15px;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.form label { display: grid; gap: 6px; font: 600 0.85rem var(--sans); color: var(--ink-2); }
.form input, .form textarea {
  border: 1.5px solid var(--line);
  background: var(--surface-alt);
  border-radius: 11px;
  padding: 12px 14px;
  font: 400 0.97rem var(--sans);
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--surface);
}
.form textarea { min-height: 130px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form button {
  border: none;
  cursor: pointer;
  border-radius: 13px;
  padding: 14px 20px;
  font: 600 1rem var(--sans);
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.form button:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.form button:disabled { opacity: 0.6; transform: none; cursor: wait; }
.form .form-note { font-size: 0.85rem; min-height: 1.3em; margin: 0; }
.form .form-note.ok { color: var(--teal-deep); font-weight: 600; }
.form .form-note.err { color: #dc2626; font-weight: 600; }

/* ── Footer ──────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(30px, 5vw, 48px) 0;
}
.foot__in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 18px 34px;
  align-items: center;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.92rem; }
.foot nav a { color: var(--ink-2); }
.foot nav a:hover { color: var(--teal-deep); }
.foot .copy { margin-left: auto; color: var(--faint); font-size: 0.85rem; }
@media (max-width: 640px) { .foot .copy { margin-left: 0; } }

/* ── Legal pages ─────────────────────────────────────────── */
.legal-hero {
  background:
    radial-gradient(110% 90% at 50% -30%, var(--night-hi) 0%, var(--night-md) 55%, var(--night-lo) 100%);
  color: var(--on-night);
  text-align: center;
  padding: clamp(52px, 8vw, 90px) clamp(18px, 4vw, 40px) clamp(44px, 6vw, 70px);
  position: relative;
  overflow: hidden;
}
.legal-hero .stars { position: absolute; inset: 0; pointer-events: none; }
.legal-hero .ic--moon {
  font-size: 46px;
  color: var(--glow);
  margin: 0 auto 14px;
}
.legal-hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.legal-hero .eyebrow { justify-content: center; }
.legal-hero .meta { color: var(--on-night-soft); font-size: 0.9rem; margin: 0; }

.legal-body {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 64px) clamp(18px, 4vw, 40px) clamp(48px, 7vw, 88px);
}
.legal-body .lede {
  font-size: 1.12rem;
  color: var(--ink-2);
  border-left: 3px solid var(--teal);
  padding-left: 18px;
  margin: 0 0 32px;
}
.legal-body h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.45rem;
  margin: 38px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.legal-body h2 .ic { font-size: 22px; color: var(--teal); flex: none; }
.legal-body p, .legal-body li { color: var(--ink-2); }
.legal-body ul, .legal-body ol { padding-left: 22px; }
.legal-body li { margin-bottom: 8px; }
.legal-body .box {
  background: var(--mint);
  border: 1px solid var(--mint-line);
  border-radius: var(--r-sm);
  padding: 18px 22px;
  margin: 18px 0;
}
.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--r-sm); }
.legal-body table { border-collapse: collapse; width: 100%; font-size: 0.92rem; min-width: 560px; }
.legal-body th, .legal-body td { text-align: left; padding: 11px 15px; border-bottom: 1px solid var(--line-soft); }
.legal-body th { background: var(--surface-alt); font-weight: 600; }
.legal-body tr:last-child td { border-bottom: none; }

/* ── Reveal on scroll ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ── 404 ─────────────────────────────────────────────────── */
.lost {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 20px;
}
.lost h1 { font-family: var(--display); font-size: clamp(2.4rem, 6vw, 4rem); margin: 0 0 10px; }
.lost p { color: var(--mut); margin: 0 0 22px; }
.lost .btn { background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); color: #fff; }

/* ── Motion safety ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .ribbon__track { animation: none; }
}


/* ── Screens gallery ─────────────────────────────────────── */
.shots {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 6px max(24px, calc((100vw - var(--wrap)) / 2)) 26px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.shot { flex: 0 0 auto; width: 276px; margin: 0; scroll-snap-align: center; }
.shot--missing { display: none; }
.shot__frame {
  border-radius: 34px;
  padding: 8px;
  background: rgba(240, 253, 250, 0.12);
  border: 1px solid rgba(240, 253, 250, 0.22);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1096 / 2318; /* 1080×2302 screenshot + 8px frame padding */
  overflow: hidden;
  transition: transform 0.4s var(--ease);
}
.shot:hover .shot__frame { transform: translateY(-8px); }
/* Exact-size, pre-resampled WebPs (1x/2x/3x) so the browser never downsamples a
   1080px PNG; contain (not cover) so nothing is cropped or rescaled unevenly. */
.shot__frame img {
  display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 27px;
  background: var(--night-lo); image-rendering: auto; backface-visibility: hidden;
}
.shot figcaption { margin-top: 12px; text-align: center; }
.shot figcaption b { display: block; font: 600 0.98rem var(--display); color: #f0fdfa; }
.shot figcaption span { display: block; font-size: 0.8rem; color: #ccfbf1; opacity: 0.85; margin-top: 2px; }
[data-screens].is-empty { display: none; }

/* ── Plans ───────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 26px 24px; }
.plan h3 { font: 600 1.35rem var(--display); margin: 0 0 14px; display: flex; align-items: baseline; gap: 10px; }
.plan h3 small { font: 500 0.78rem var(--sans); color: var(--mut); }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.plan li { position: relative; padding-left: 24px; color: var(--ink-2); font-size: 0.95rem; line-height: 1.45; }
.plan li::before {
  content: ''; position: absolute; left: 0; top: 0.42em; width: 14px; height: 14px; border-radius: 50%;
  background: var(--mint); border: 1.5px solid var(--teal); box-shadow: inset 0 0 0 3px var(--surface);
}
.plan--pro { border-color: var(--mint-line); background: linear-gradient(180deg, var(--mint), var(--surface) 55%); box-shadow: var(--shadow-sm); }
.plan--pro li::before { background: var(--teal); }
.plan__note { margin: 16px 0 0; font-size: 0.82rem; color: var(--mut); }
