/* ===== Tokens ===== */
:root {
  --bg: #f3ecdd;
  --surface: #fbf7ee;
  --surface-tint: #ece2cc;
  --text: #1f1811;
  --muted: #6b5f4e;
  --border: #ddd0b4;
  --accent: #a6321e;
  --accent-ink: #7a2416;
  --accent-soft: #f0dac9;
  --ink-dark: #1f1811;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --font-display: "Outfit", "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --shadow-sm: 0 1px 2px rgba(31, 24, 17, 0.08);
  --shadow-md: 0 16px 40px -16px rgba(31, 24, 17, 0.28);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120e;
    --surface: #1f1813;
    --surface-tint: #261e17;
    --text: #f1e7d8;
    --muted: #a99a84;
    --border: rgba(255, 255, 255, 0.1);
    --accent: #d4573c;
    --accent-ink: #e5714f;
    --accent-soft: rgba(212, 87, 60, 0.16);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 20px 48px -16px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.01em; margin: 0; color: var(--text); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }
code, .mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff8ef; }
.btn-primary:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-invert { background: #fff8ef; color: var(--ink-dark); }
.btn-invert:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* ===== Top bar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 68px;
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
}
.back-link:hover { color: var(--text); }
.app-id { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 600; }
.app-id img { width: 30px; height: 30px; border-radius: 8px; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1px dashed var(--accent);
}
.chip-live { display: inline-flex; white-space: nowrap; align-items: center; gap: 0.35rem; background: var(--accent); color: #fff8ef; border-style: solid; transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease); }
.chip-live:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.chip-live i { font-size: 0.95rem; }
@media (max-width: 520px) {
  .chip-live { padding: 0.45rem; }
  .chip-live span { display: none; }
}

/* ===== Hero ===== */
.hero { padding: 56px 0 88px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 4vw; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4.2vw, 3.3rem); line-height: 1.08; max-width: 15ch; }
.hero-sub { margin-top: 1.1rem; font-size: 1.08rem; color: var(--muted); max-width: 46ch; line-height: 1.55; }
.hero-actions { margin-top: 1.9rem; display: flex; gap: 0.9rem; flex-wrap: wrap; }

.phone-frame {
  width: min(280px, 82vw);
  margin: 0 auto;
  aspect-ratio: 9 / 19.5;
  border-radius: 38px;
  background: #14100c;
  padding: 10px;
  box-shadow: var(--shadow-md), 0 0 0 1px var(--border);
  position: relative;
}
.phone-frame::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 74px;
  height: 18px;
  border-radius: var(--radius-pill);
  background: #050403;
  z-index: 2;
}
.phone-frame .screen {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
}
.phone-frame .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .phone-frame { margin-top: 2.5rem; }
}

/* ===== Stats ===== */
.stats-bar { padding: 0 0 72px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-cell {
  padding: 1.75rem 1rem;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-cell:last-child { border-right: none; }
.stat-num { font-family: var(--font-mono); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; color: var(--accent-ink); display: block; }
.stat-label { margin-top: 0.35rem; font-size: 0.85rem; color: var(--muted); }

@media (max-width: 700px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-cell:nth-child(2n) { border-right: none; }
  .stat-cell:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}

/* ===== Section shells ===== */
section { padding: 88px 0; }
.section-head { max-width: 620px; margin-bottom: 3.25rem; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.15; margin-top: 0.4rem; }
.section-head p { margin-top: 0.9rem; font-size: 1.02rem; color: var(--muted); max-width: 52ch; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ===== How steps ===== */
.how-rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.how-step { border-top: 2px solid var(--accent); padding-top: 1.4rem; }
.how-step .num { font-family: var(--font-mono); font-size: 1.6rem; color: var(--accent-ink); }
.how-step h3 { margin-top: 0.6rem; font-size: 1.15rem; }
.how-step p { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }

@media (max-width: 760px) {
  .how-rail { grid-template-columns: 1fr; }
}

/* ===== Feature rows (zigzag) ===== */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4vw;
  align-items: center;
}
.feature-row + .feature-row { margin-top: 88px; }
.feature-row.reverse .feature-media { order: 2; }
.feature-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  max-width: 320px;
  margin: 0 auto;
}
.feature-media img { width: 100%; height: auto; display: block; }
.feature-copy .tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-ink);
  margin-top: 1.1rem;
  display: block;
}
.feature-copy h3 { font-size: 1.5rem; line-height: 1.25; margin-top: 0.5rem; }
.feature-copy p { margin-top: 0.85rem; color: var(--muted); font-size: 1rem; max-width: 46ch; }
.feature-copy p + p { margin-top: 0.6rem; }

@media (max-width: 820px) {
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; }
  .feature-row.reverse .feature-media { order: 0; }
}

/* Full-width showcase (stamps) */
.showcase {
  text-align: center;
}
.showcase .feature-media { max-width: 320px; margin: 0 auto 2rem; }
.showcase .feature-copy { max-width: 52ch; margin: 0 auto; }
.showcase .feature-copy p { margin-left: auto; margin-right: auto; }

/* ===== Why / principles ===== */
.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem 3rem; }
.principle { display: flex; gap: 1rem; align-items: flex-start; }
.principle i { color: var(--accent); font-size: 1.4rem; margin-top: 0.1rem; flex-shrink: 0; }
.principle h4 { font-size: 1.05rem; }
.principle p { margin-top: 0.35rem; color: var(--muted); font-size: 0.94rem; }

@media (max-width: 700px) {
  .principles { grid-template-columns: 1fr; }
}

/* ===== Night mode showcase ===== */
.night-section { background: var(--surface-tint); border-radius: var(--radius-lg); margin: 0 24px; padding: 64px clamp(1.5rem, 5vw, 4rem); }
.night-section .wrap { max-width: 1112px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4vw; align-items: center; }
.night-section .feature-media { max-width: 260px; }

@media (max-width: 820px) {
  .night-section .wrap { grid-template-columns: 1fr; }
  .night-section .feature-media { order: -1; }
}

/* ===== FAQ ===== */
.faq-list { max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 1.4rem 0; }
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: 0.85rem; color: var(--muted); font-size: 0.96rem; max-width: 62ch; }

/* ===== Final CTA ===== */
.cta {
  background: linear-gradient(150deg, #241a14, #17120e 60%);
  border-radius: var(--radius-lg);
  color: #fdf6ea;
  padding: 4rem clamp(1.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
}
.cta h2 { color: #fdf6ea; font-size: clamp(1.8rem, 3vw, 2.3rem); max-width: 16ch; }
.cta p { color: rgba(253, 246, 234, 0.72); margin-top: 1rem; max-width: 42ch; }
.cta-actions { margin-top: 2rem; display: flex; gap: 0.9rem; flex-wrap: wrap; }
.cta-note { margin-top: 1.25rem; font-family: var(--font-mono); font-size: 0.82rem; color: rgba(253, 246, 234, 0.5); }
.cta-note a { color: #fdf6ea; text-decoration: underline; text-decoration-color: rgba(253, 246, 234, 0.35); }
.cta-card {
  background: rgba(255, 248, 239, 0.06);
  border: 1px solid rgba(255, 248, 239, 0.14);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  align-self: start;
}
.cta-card dt { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(253, 246, 234, 0.5); }
.cta-card dd { margin: 0.25rem 0 1.1rem; font-size: 0.96rem; }
.cta-card dd:last-child { margin-bottom: 0; }
.cta-card dd a { color: #fdf6ea; text-decoration: underline; text-decoration-color: rgba(253, 246, 234, 0.35); }

@media (max-width: 820px) {
  .cta { grid-template-columns: 1fr; }
}

/* ===== Footer ===== */
footer { padding: 56px 0 40px; border-top: 1px solid var(--border); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 600; }
.footer-brand img { width: 26px; height: 26px; border-radius: 7px; }
.footer-links { display: flex; gap: 1.75rem; font-size: 0.9rem; color: var(--muted); flex-wrap: wrap; }
.footer-links a:hover { color: var(--accent-ink); }
.footer-legal { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--muted); text-align: center; }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== Legal pages (privacy / terms) ===== */
.legal-hero { padding: 48px 0 24px; }
.legal-hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
.legal-hero .updated { margin-top: 0.75rem; font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
.legal-body { padding: 24px 0 80px; max-width: 760px; }
.legal-body h2 { font-size: 1.3rem; margin-top: 2.75rem; margin-bottom: 0.9rem; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { color: var(--muted); font-size: 1rem; margin-bottom: 1rem; max-width: 68ch; }
.legal-body ul { margin: 0 0 1rem; padding-left: 1.3rem; color: var(--muted); }
.legal-body li { margin-bottom: 0.5rem; max-width: 66ch; }
.legal-body strong { color: var(--text); }
.legal-body a { color: var(--accent-ink); text-decoration: underline; text-decoration-color: var(--accent-soft); }
.legal-table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
.legal-table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 0.92rem; }
.legal-table th, .legal-table td { text-align: left; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal-table th { font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
