/* Tokens mirror apps/mobile/src/theme.ts (Figma "Nuah / Cores" and "Nuah / Papéis"). */
:root {
  --paper: #f8f6f1;
  --white: #ffffff;
  --soft: #e6eef4;
  --navy: #17344b;
  --night: #10293d;
  --text: #243847;
  --muted: #596c78;
  --line: #d8e0e3;
  --sky: #72b9f1;
  --sky-light: #a6d9ff;
  --sky-pale: #ddf0ff;
  --yellow: #f6c844;
  --flame: #f5a524;
  --celebration: #f5e4c7;
  --pink: #f285a4;

  --bg: var(--paper);
  --surface: var(--white);
  --surface-soft: var(--soft);
  --heading: var(--navy);
  --body: var(--text);
  --secondary: var(--muted);
  --border: var(--line);
  --action: var(--navy);
  --on-action: var(--white);
  --action-edge: #0a1c2a;

  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 24px;
  --gutter: 20px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--night);
    --surface: var(--navy);
    --surface-soft: #213e52;
    --heading: var(--paper);
    --body: var(--paper);
    --secondary: #b9cedd;
    --border: #527084;
    --action: var(--sky-light);
    --on-action: var(--navy);
    --action-edge: #5aa4e0;
    --celebration: #413824;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--heading); margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
h3 { font: 600 18px/1.35 var(--sans); }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(1160px, 100% - var(--gutter) * 2); margin-inline: auto; }
.narrow { width: min(760px, 100% - var(--gutter) * 2); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--action); color: var(--on-action); padding: 8px 14px; border-radius: 999px; z-index: 20; }
.skip:focus { left: 8px; }

.eyebrow { font: 600 12px/16px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--secondary); margin-bottom: 14px; }
.lead { font-size: 19px; color: var(--secondary); max-width: 34em; margin-top: 18px; }
.section { padding: clamp(72px, 10vw, 128px) 0; }
.head { text-align: center; margin-bottom: clamp(40px, 6vw, 64px); }
.head .lead { margin-inline: auto; }
h2 { font-size: clamp(34px, 5vw, 52px); line-height: 1.12; }

/* Buttons: same pressable depth as the app (bottom edge). */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--action); color: var(--on-action);
  font: 600 16px/22px var(--sans); text-decoration: none;
  padding: 14px 22px; border-radius: 999px;
  box-shadow: 0 4px 0 var(--action-edge);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--action-edge); }
.btn-small { padding: 9px 16px; font-size: 14px; box-shadow: 0 3px 0 var(--action-edge); }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.top.is-scrolled { border-bottom-color: var(--border); }
.top-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 500 24px/1 var(--serif); color: var(--heading); }
.links { display: flex; gap: 28px; margin-left: auto; }
.links a { text-decoration: none; font-size: 15px; color: var(--secondary); }
.links a:hover { color: var(--heading); }
.top-actions { display: flex; align-items: center; gap: 16px; }
.lang { display: flex; gap: 2px; background: var(--surface-soft); padding: 3px; border-radius: 999px; }
.lang a { text-decoration: none; font: 600 12px/1 var(--sans); padding: 7px 9px; border-radius: 999px; color: var(--secondary); }
.lang a[aria-current] { background: var(--surface); color: var(--heading); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }

/* Hero */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 48px; }
.hero h1 { font-size: clamp(48px, 7.4vw, 88px); line-height: 1.02; }
.swap { display: inline-block; color: var(--action); font-style: italic; }
.swap > span { display: inline-block; }
.swap .out { animation: word-out 0.35s ease forwards; }
.swap .in { animation: word-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes word-out { to { opacity: 0; transform: translateY(-0.25em); filter: blur(4px); } }
@keyframes word-in { from { opacity: 0; transform: translateY(0.3em); filter: blur(4px); } }
.hero .lead { font-size: 20px; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--heading); color: var(--bg);
  padding: 10px 18px 10px 14px; border-radius: 14px;
  font: 600 17px/1.1 var(--sans);
  opacity: 0.92;
}
.store svg { width: 24px; height: 24px; }
.store small { display: block; font: 500 11px/1.2 var(--sans); opacity: 0.75; }
.soon { margin-top: 12px; font-size: 14px; color: var(--secondary); }
.final .stores { justify-content: center; }

.hero-art { position: relative; display: grid; place-items: center; min-height: 560px; }
.glow { position: absolute; inset: 6% 4%; border-radius: 50%; background: radial-gradient(closest-side, var(--sky-pale), transparent 72%); }
@media (prefers-color-scheme: dark) { .glow { background: radial-gradient(closest-side, #1f4562, transparent 72%); } }
.hero-art .phone { width: min(330px, 70vw); transform: rotate(-3deg); }
.float {
  position: absolute; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 18px 40px -18px rgb(16 41 61 / 0.35);
  padding: 12px 16px;
  animation: bob 6s ease-in-out infinite;
}
.float-streak { top: 12%; left: 0; font-size: 14px; color: var(--secondary); }
.float-streak b { font: 500 30px/1 var(--serif); color: var(--heading); }
.flame { display: inline-grid; width: 30px; height: 30px; color: var(--flame); }
.float-sun { position: absolute; bottom: 6%; right: 2%; width: clamp(80px, 9vw, 112px); height: auto; animation: bob 6s ease-in-out infinite; animation-delay: -3s; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* Phone frame around real app screenshots (1206×2622). */
.phone {
  position: relative; width: min(320px, 76vw); aspect-ratio: 1206 / 2622;
  padding: 10px; border-radius: 48px; background: #0d1a24;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06) inset, 0 40px 80px -30px rgb(16 41 61 / 0.55), 0 12px 24px -12px rgb(16 41 61 / 0.3);
}
.phone picture { display: contents; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 38px; background: var(--paper); }

/* Ticker */
.ticker { border-block: 1px solid var(--border); background: var(--surface); overflow: hidden; padding: 18px 0; }
.ticker-track { display: flex; gap: 40px; width: max-content; animation: ticker 48s linear infinite; }
.ticker span { font: 400 22px/1 var(--serif); color: var(--heading); white-space: nowrap; display: inline-flex; align-items: center; gap: 40px; }
.ticker span::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Split sections */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.split-reverse > :first-child { order: 0; }
.split-art { position: relative; display: grid; place-items: center; padding: 40px 0; }
.split-art::before { content: ''; position: absolute; inset: 0 8%; border-radius: 40px; background: var(--surface-soft); }
.split-art .phone { position: relative; }
.char { position: absolute; z-index: 1; width: clamp(80px, 10vw, 120px); height: auto; }
.char-book { top: 4%; left: 2%; transform: rotate(-10deg); }
.char-star { top: 2%; right: 4%; transform: rotate(8deg); }

/* Today's path */
.steps { margin-top: 36px; display: grid; gap: 4px; position: relative; }
.steps::before { content: ''; position: absolute; left: 31px; top: 40px; bottom: 40px; width: 6px; border-radius: 3px; background: var(--surface-soft); }
.steps li { display: flex; gap: 20px; align-items: flex-start; padding: 14px 0; position: relative; }
.step-dot { flex: none; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-soft); color: var(--heading); box-shadow: 0 5px 0 color-mix(in srgb, var(--surface-soft) 70%, #8ea3b2); }
.step-dot.is-on { background: var(--action); color: var(--on-action); box-shadow: 0 5px 0 var(--action-edge), 0 0 0 8px var(--bg), 0 0 0 10px var(--border); }
.step-dot svg { width: 28px; height: 28px; }
.step-min { font: 600 12px/16px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--secondary); margin: 8px 0 2px; }
.steps h3 { font: 600 22px/1.3 var(--sans); }
.steps p:last-child { color: var(--secondary); margin-top: 4px; }

/* Feature tabs */
.features { background: var(--surface); border-block: 1px solid var(--border); }
.tablist { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 48px; }
.tablist button {
  font: 600 15px/1 var(--sans); color: var(--secondary); background: transparent;
  border: 1px solid var(--border); border-radius: 999px; padding: 12px 20px; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tablist button:hover { color: var(--heading); }
.tablist button[aria-selected='true'] { background: var(--action); border-color: var(--action); color: var(--on-action); }
.panel[hidden] { display: none; }
.panel { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.panel:not([hidden]) { animation: panel-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes panel-in { from { opacity: 0; transform: translateY(12px); } }
.panel h3 { font: 400 clamp(30px, 3.6vw, 40px)/1.15 var(--serif); }
.panel-copy > p { margin-top: 18px; font-size: 19px; color: var(--secondary); }
.panel-art { display: grid; place-items: center; padding: 40px 0; border-radius: 40px; background: var(--surface-soft); }
.checks { margin-top: 28px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: center; font-weight: 500; }
.checks svg { flex: none; width: 24px; height: 24px; padding: 3px; border-radius: 50%; background: var(--sky-pale); color: var(--navy); }

/* Habit */
.habit-grid { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.habit-art .phone { width: min(300px, 70vw); }
.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.card p { margin-top: 8px; color: var(--secondary); }
.card-flame { grid-column: span 2; background: var(--celebration); border-color: transparent; }
.card-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--surface-soft); color: var(--heading); margin-bottom: 18px; }
.card-icon svg { width: 24px; height: 24px; }
.card-flame .card-icon { background: var(--surface); color: var(--flame); }

/* Friends */
.points { margin-top: 32px; display: grid; gap: 20px; }
.points li { padding-left: 20px; border-left: 3px solid var(--sky); }
.points p { color: var(--secondary); margin-top: 4px; }
.privacy { margin-top: 32px; padding: 18px 20px; border-radius: 18px; background: var(--surface-soft); font-size: 15px; }

/* Care */
.care { background: var(--surface); border-block: 1px solid var(--border); }
.care-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.care-grid li { padding: 28px; border-radius: var(--radius); background: var(--bg); }
.care-grid p { margin-top: 8px; color: var(--secondary); }

/* Plans */
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 400px)); justify-content: center; gap: 20px; }
.plan { border: 1px solid var(--border); background: var(--surface); border-radius: 28px; padding: 32px; }
.plan h3 { font: 500 26px/1.2 var(--serif); }
.price { margin-top: 16px; color: var(--secondary); }
.price b { font: 500 44px/1 var(--serif); color: var(--heading); }
.plan-premium { border: 2px solid var(--yellow); box-shadow: 0 24px 50px -28px rgb(246 200 68 / 0.8); }
.plan-premium h3::before { content: '♛ '; color: var(--yellow); }
.note { text-align: center; color: var(--secondary); font-size: 14px; margin: 28px auto 0; max-width: 40em; }

/* FAQ */
details { border-bottom: 1px solid var(--border); }
summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative; font: 600 18px/1.4 var(--sans); color: var(--heading); }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 400 28px/1 var(--sans); color: var(--secondary); transition: transform 0.2s; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { padding: 0 40px 24px 0; color: var(--secondary); }

/* Final CTA */
.final { padding: clamp(72px, 10vw, 128px) 0; background: var(--night); color: #b9cedd; text-align: center; }
.final h2 { color: var(--paper); }
.final .lead { margin-inline: auto; color: #b9cedd; }
.final-inner { display: grid; justify-items: center; }
.final-symbol { margin-bottom: 24px; }
.final .store { background: var(--paper); color: var(--navy); }
.final .soon { color: #b9cedd; }

/* Footer */
.foot { padding: 36px 0 48px; border-top: 1px solid var(--border); font-size: 14px; color: var(--secondary); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.foot .brand { font-size: 20px; }
.rights { margin-left: auto; }

/* Scroll reveal (only when JS runs and motion is welcome). */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Tablet */
@media (max-width: 980px) {
  .links { display: none; }
  .top-actions { margin-left: auto; }
  .hero-grid, .split, .panel { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero .lead { margin-inline: auto; }
  .stores { justify-content: center; }
  .hero-art { min-height: 520px; }
  .split-reverse > :first-child { order: 1; }
  .panel-copy { order: 1; }
  .habit-grid { grid-template-columns: 1fr; }
  .habit-art { display: grid; place-items: center; }
  .care-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Phone */
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .top-row { height: 60px; gap: 12px; }
  .top .btn-small { display: none; }
  .brand { font-size: 22px; }
  .lead, .hero .lead, .panel-copy > p { font-size: 17px; }
  .hero-art { min-height: 0; padding: 24px 0 8px; }
  .hero-art .phone { width: 68vw; }
  .float-streak { left: -4px; top: 6%; padding: 10px 12px; }
  .float-streak b { font-size: 24px; }
  .float-sun { right: 0; bottom: 0; width: 72px; }
  .tablist { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .tablist button { flex: none; }
  .bento, .care-grid, .plan-grid { grid-template-columns: 1fr; }
  .card-flame { grid-column: auto; }
  .card, .care-grid li, .plan { padding: 24px; }
  .rights { margin-left: 0; width: 100%; }
}
