/* Nana's design system, carried over from the iOS app. */

@font-face { font-family: "Bricolage Condensed"; font-weight: 800; font-display: swap; src: url("/fonts/BricolageGrotesqueCondensed-ExtraBold.ttf") format("truetype"); }
@font-face { font-family: "Bricolage Condensed"; font-weight: 700; font-display: swap; src: url("/fonts/BricolageGrotesqueCondensed-Bold.ttf") format("truetype"); }
@font-face { font-family: "Bricolage"; font-weight: 800; font-display: swap; src: url("/fonts/BricolageGrotesque-ExtraBold.ttf") format("truetype"); }
@font-face { font-family: "Bricolage"; font-weight: 700; font-display: swap; src: url("/fonts/BricolageGrotesque-Bold.ttf") format("truetype"); }
@font-face { font-family: "Atkinson"; font-weight: 400; font-display: swap; src: url("/fonts/AtkinsonHyperlegibleNext-Regular.ttf") format("truetype"); }
@font-face { font-family: "Atkinson"; font-weight: 700; font-display: swap; src: url("/fonts/AtkinsonHyperlegibleNext-Bold.ttf") format("truetype"); }

:root {
  --butter: #FFF3D1;
  --cobalt: #2438C9;
  --ink: #151843;
  --ink-soft: #3B3F70;
  --lilac: #DCD0FF;
  --banana: #FFD45C;
  --tangerine: #FF7A45;
  --card: #FFFFFF;
  --slot: #FFFBF0;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1320px;
  --display: "Bricolage Condensed", "Arial Narrow", sans-serif;
  --heading: "Bricolage", system-ui, sans-serif;
  --text: "Atkinson", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--butter); color: var(--ink); font: 400 18px/1.5 var(--text); overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible { outline-color: var(--butter); }

[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 12px; top: -80px; background: var(--card); padding: 10px 16px; border: 3px solid var(--ink); border-radius: 14px; font-weight: 700; z-index: 10; }
.skip:focus { top: 12px; }

.display { font-family: var(--display); font-weight: 800; color: var(--cobalt); letter-spacing: -.01em; }
.caption { font-weight: 700; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.wordmark { font: 800 34px/1 var(--display); color: var(--cobalt); text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); font-weight: 700; font-size: 16px; }
.nav-links a:not(.pill) { text-decoration: none; padding-block: 10px; }
.nav-links a:not(.pill):hover, .nav-links a[aria-current] { text-decoration: underline; text-decoration-thickness: 2.5px; text-underline-offset: 5px; }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 58px; padding: 0 34px; background: var(--cobalt); color: var(--butter); border-radius: 20px; font: 700 20px/1 var(--heading); text-decoration: none; box-shadow: 0 5px 0 var(--ink); margin-bottom: 5px; transition: transform .08s, box-shadow .08s; }
.btn:hover { transform: translateY(1px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn.alt { background: var(--banana); color: var(--ink); box-shadow: 0 5px 0 var(--butter); }
.btn.alt:hover { box-shadow: 0 4px 0 var(--butter); }
.btn.alt:active { box-shadow: 0 1px 0 var(--butter); }

.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; background: var(--card); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 16px; font: 700 16px/1 var(--text); text-decoration: none; cursor: pointer; }
.pill:hover { background: var(--banana); }
.pill:disabled { opacity: .45; cursor: default; background: var(--card); }

.choices { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.choice { min-height: 44px; min-width: 88px; padding: 0 16px; background: var(--card); border: 2.5px solid var(--ink); border-radius: 14px; font: 700 15px/1 var(--text); cursor: pointer; }
.choice[aria-pressed="true"] { background: var(--cobalt); color: var(--butter); }

.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; background: var(--lilac); border: 2.5px solid var(--ink); border-radius: 99px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--cobalt); }
.chip.note { background: var(--tangerine); transform: rotate(-3deg); }
.chip.note::before { display: none; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); grid-template-areas: "head art" "copy demo"; column-gap: clamp(24px, 4vw, 64px); align-items: start; padding-top: clamp(20px, 3vw, 44px); padding-bottom: clamp(48px, 7vw, 92px); }
.hero-head { grid-area: head; align-self: end; }
.hero-head h1 { font-size: clamp(84px, 11.6vw, 172px); line-height: .86; }
.hero-copy { grid-area: copy; padding-top: 30px; max-width: 34em; }
.hero-copy p { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.38; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 30px; }
.hero-cta small { font-size: 15px; color: var(--ink-soft); }

.hero-art { grid-area: art; position: relative; display: grid; place-items: center; min-height: clamp(310px, 31vw, 440px); }
.hero-art::before { content: ""; position: absolute; width: min(82%, 400px); aspect-ratio: 1; border-radius: 50%; background: var(--banana); transform: translate(3%, 4%); }
.charm { position: relative; width: min(94%, 500px); height: auto; transform: rotate(-7deg); transform-origin: 12% 10%; }
.charm.swing { animation: swing .55s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes swing { 0% { transform: rotate(-7deg); } 30% { transform: rotate(-1.5deg); } 65% { transform: rotate(-9.5deg); } 100% { transform: rotate(-7deg); } }
.slot .filled, .slot .empty { transition: opacity .12s; }
.slot.out .filled { opacity: 0; }
.slot:not(.out) .empty { opacity: 0; }

.hero-demo { grid-area: demo; padding-top: 18px; }
.readout { display: flex; align-items: baseline; gap: 14px; }
.readout b { font: 800 clamp(116px, 12vw, 168px)/.8 var(--display); color: var(--cobalt); min-width: .5em; }
.readout span { font: 700 clamp(28px, 2.8vw, 38px)/.98 var(--display); color: var(--cobalt); white-space: pre-line; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; min-height: 36px; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Sections */
.band { padding-block: clamp(64px, 9vw, 128px); border-top: 3px solid var(--ink); }
.band h2 { font-size: clamp(58px, 8vw, 118px); line-height: .9; }
.lede { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.42; max-width: 31em; }

/* Lock screen */
.lock { background: var(--cobalt); color: var(--butter); }
.lock-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
.lock h2 { color: var(--butter); }
.lock .caption { color: var(--lilac); margin-bottom: 18px; }
.lock .lede { margin-top: 28px; }
.notice { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--card); color: var(--ink); border: 3px solid var(--ink); border-radius: 24px; box-shadow: 8px 8px 0 var(--ink); transform: rotate(-2deg); }
.mark { flex: none; display: grid; place-items: center; width: 52px; height: 52px; background: var(--butter); color: var(--cobalt); border: 2.5px solid var(--ink); border-radius: 15px; font: 800 26px/1 var(--heading); padding-bottom: 4px; }
.notice div { min-width: 0; flex: 1; }
.notice strong { display: block; font-size: 18px; }
.notice p { font-size: 18px; line-height: 1.25; }
.notice time { align-self: flex-start; font-size: 14px; color: var(--ink-soft); }

/* Left behind */
.behind-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
.behind-grid h2 { margin-block: 18px 26px; }
.wait { margin-top: 30px; }
.wait p { font-weight: 700; margin-bottom: 10px; }
.map { position: relative; aspect-ratio: 5 / 4; background: var(--lilac); border: 3px solid var(--ink); border-radius: 32px; overflow: hidden; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stayed { position: absolute; left: 4%; right: 4%; bottom: 5%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--tangerine); border: 3px solid var(--ink); border-radius: 20px; }
.stayed img { flex: none; width: 30px; }
.stayed strong { display: block; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.2; }
.stayed span { font-size: 14px; }

/* Fruit stand */
.stand { background: var(--banana); }
.stand-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px 48px; margin-bottom: clamp(32px, 4vw, 52px); }
.stand-head h2 { margin-bottom: 18px; }
.stand .caption { color: var(--ink); margin-bottom: 14px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { display: flex; flex-direction: column; background: var(--card); border: 3px solid var(--ink); border-radius: 24px; overflow: hidden; counter-increment: step; }
.step[hidden] { display: none; }
.step figure { position: relative; background: var(--slot); border-bottom: 3px solid var(--ink); container-type: inline-size; }
.step figure::before { content: counter(step); position: absolute; left: 12px; top: 8px; font: 800 38px/1 var(--display); color: var(--cobalt); }
.step img { width: 100%; height: auto; }
.step figure i { position: absolute; font: 700 5.2cqw/1 var(--text); font-style: normal; color: var(--ink); white-space: nowrap; transform: translate(-50%, -50%) rotate(var(--r, 0deg)); }
.step div { padding: 16px 16px 20px; }
.step h3 { font: 800 24px/1.02 var(--display); color: var(--cobalt); margin-bottom: 8px; }
.step p { font-size: 15.5px; line-height: 1.42; }

/* Privacy summary */
.diary-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.diary-grid p.lede { margin-top: 26px; }
.diary-grid .pill { margin-top: 26px; }
.rows { background: var(--card); border: 3px solid var(--ink); border-radius: 24px; }
.rows li { padding: 20px 22px; }
.rows li + li { border-top: 2px solid var(--lilac); }
.rows h3 { font: 800 21px/1.15 var(--heading); margin-bottom: 4px; }
.rows p { font-size: 16.5px; line-height: 1.42; color: var(--ink-soft); }

/* Footer */
.foot { background: var(--ink); color: var(--butter); padding-top: clamp(64px, 8vw, 112px); overflow: hidden; }
.foot h2 { font-size: clamp(58px, 8vw, 118px); line-height: .9; color: var(--banana); }
.foot-top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 32px; }
.foot-top p { margin-top: 20px; max-width: 30em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: clamp(48px, 6vw, 80px); padding-top: 20px; border-top: 2px solid var(--ink-soft); font-size: 16px; }
.foot-links a { font-weight: 700; }
.foot-links span:last-child { margin-left: auto; }
.giant { font: 800 clamp(150px, 37vw, 560px)/.72 var(--display); color: var(--cobalt); text-align: center; margin-top: 28px; margin-bottom: -.09em; letter-spacing: -.015em; user-select: none; }

/* Legal */
.legal-head { padding-block: clamp(28px, 5vw, 72px) clamp(32px, 4vw, 56px); }
.legal-head h1 { font-size: clamp(68px, 10vw, 148px); line-height: .88; white-space: pre-line; }
.legal-head p { margin-top: 24px; }
.legal-head .lede + .caption { margin-top: 18px; }
.legal { display: grid; grid-template-columns: 250px minmax(0, 44em); gap: clamp(32px, 7vw, 110px); padding-bottom: clamp(64px, 9vw, 120px); }
.toc { position: sticky; top: 24px; align-self: start; }
.toc ol { margin-top: 12px; }
.toc a { display: block; padding: 5px 0; font-size: 16px; text-decoration: none; }
.toc a:hover { text-decoration: underline; text-underline-offset: 4px; }
.prose section + section { margin-top: 48px; padding-top: 40px; border-top: 3px solid var(--ink); }
.prose h2 { font: 800 clamp(34px, 3.6vw, 46px)/1 var(--display); color: var(--cobalt); margin-bottom: 16px; scroll-margin-top: 24px; }
.prose h3 { font: 800 21px/1.2 var(--heading); margin-block: 24px 6px; }
.prose p + p { margin-top: 14px; }
.prose ul { margin-top: 14px; }
.prose ul + p { margin-top: 14px; }
.prose ul li { position: relative; padding-left: 24px; }
.prose ul li + li { margin-top: 10px; }
.prose ul li::before { content: ""; position: absolute; left: 2px; top: .52em; width: 10px; height: 10px; background: var(--banana); border: 2px solid var(--ink); border-radius: 3px; }
.prose a { font-weight: 700; text-underline-offset: 3px; }
.callout { padding: 20px; border: 3px solid var(--ink); border-radius: 24px; }
.callout.cobalt { background: var(--cobalt); color: var(--butter); }
.callout.tangerine { background: var(--tangerine); }
.callout.lilac { background: var(--lilac); }
.callout h3 { margin-top: 0; }
.callout + * { margin-top: 18px; }
.mini-foot { background: var(--ink); color: var(--butter); padding-block: 26px; font-size: 16px; }
.mini-foot .foot-links { margin: 0; padding: 0; border: 0; }

@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .toc ol { columns: 2; column-gap: 24px; }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "art" "head" "copy" "demo"; padding-top: 0; }
  .hero-art { min-height: 0; padding-block: 16px 30px; }
  .hero-art::before { width: min(74%, 300px); }
  .charm { width: min(88%, 400px); }
  .hero-head h1 { font-size: clamp(84px, 24vw, 150px); }
  .hero-copy { padding-top: 22px; }
  .hero-demo { margin-top: 44px; padding-top: 26px; border-top: 3px solid var(--ink); }
  .lock-grid, .behind-grid, .diary-grid { grid-template-columns: minmax(0, 1fr); }
  .band h2, .foot h2 { font-size: clamp(58px, 16vw, 104px); }
  .nav-links a:not(.pill) { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .btn { width: 100%; }
  .hero-cta small { width: 100%; text-align: center; }
  .notice { box-shadow: 5px 5px 0 var(--ink); }
  .notice time { display: none; }
  .steps { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-bottom: 8px; scroll-padding-inline: var(--gutter); }
  .step { flex: 0 0 min(78vw, 310px); scroll-snap-align: start; }
  .choices { width: 100%; }
  .choice { min-width: 0; }

  .foot-links span:last-child { margin-left: 0; width: 100%; }
  .toc ol { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .charm.swing { animation: none; }
  .btn, .slot .filled, .slot .empty { transition: none; }
}
