/* Start page: one scroll story in sand and blue. CSS only (no scripts, see _headers).
   Scroll effects use scroll-driven animations; every element's normal style is its finished state,
   so browsers without them (and "reduce motion") show a calm, complete page.
   App pictures are screenshots from the simulator in /img/app. */

.wrap-wide { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

main h2 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 16px; text-wrap: balance; }
main p { text-wrap: pretty; }
.line { display: block; }

.button { display: inline-flex; align-items: center; min-height: 48px; padding: 0 28px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 17px; font-weight: 600; text-decoration: none; transition: background-color 160ms ease, transform 160ms var(--ease-out); }
.button:hover { background: #1D3A55; }
.button:active { transform: scale(.97); }
.actions { display: grid; gap: 16px; justify-items: start; }
.waitlist { margin: 0; max-width: 400px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.waitlist a { color: var(--ink); font-weight: 600; }

/* iPhone frame around a whole screenshot */
.device { --w: 300px; position: relative; flex: none; box-sizing: content-box; width: calc(var(--w) * .93); aspect-ratio: 920 / 2000; border-radius: calc(var(--w) * .17); border: calc(var(--w) * .035) solid #111316; background: #111316; overflow: hidden; box-shadow: 0 32px 48px -24px rgba(15, 37, 57, .45); }
.device img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.device .island { position: absolute; top: calc(var(--w) * .035); left: 50%; width: 30%; height: calc(var(--w) * .085); transform: translateX(-50%); border-radius: 999px; background: #111316; }

/* ---------- Opening: text beside the whole phone, the faceted sand star peeks out below left ---------- */
.hero { display: grid; gap: 48px; align-items: center; padding-top: 32px; padding-bottom: 32px; }
.eyebrow { margin: 0 0 16px; font-size: 15px; color: var(--muted); }
.hero h1 { font-size: clamp(44px, 6.4vw, 76px); font-weight: 600; line-height: 1.02; letter-spacing: -.03em; margin: 0 0 24px; text-wrap: balance; }
.hero .lede { font-size: clamp(18px, 1.8vw, 20px); color: var(--muted); max-width: 520px; margin: 0 0 32px; }
.hero { overflow-x: clip; }
.stage { position: relative; justify-self: center; padding: 0 0 24px 72px; }
.stage .device { --w: 240px; z-index: 1; box-shadow: 0 40px 60px -30px rgba(15, 37, 57, .5); }
.stage .credit { position: relative; z-index: 1; width: 240px; margin: 10px 0 0; font-size: 11px; line-height: 1.4; opacity: .8; color: var(--muted); text-align: center; }
.stage .star { position: absolute; width: 220px; max-width: none; left: -16px; bottom: 56px; transform: rotate(10deg); pointer-events: none; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.1fr .9fr; gap: 64px; min-height: calc(100svh - 76px); padding-bottom: 64px; }
  .stage { justify-self: end; padding: 0 40px 0 140px; }
  .stage .device { --w: 300px; }
  .stage .credit { width: 300px; }
  .stage .star { width: 320px; left: -40px; bottom: 48px; }
}
.hero-text > * { animation: rise 600ms var(--ease-out) both; }
.hero-text > :nth-child(2) { animation-delay: 60ms; } .hero-text > :nth-child(3) { animation-delay: 120ms; } .hero-text > :nth-child(4) { animation-delay: 180ms; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Scanning: the page pauses; the plus button is pressed, categories come out, a line scans the card ---------- */
.ch-scan { height: 240vh; height: 240svh; view-timeline-name: --scan; }
.ch-scan .pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; align-content: center; justify-items: center; gap: 24px; text-align: center; }
.ch-scan .head { max-width: 640px; }
.ch-scan .head p { font-size: 18px; color: var(--muted); margin: 0; }
.plus { position: relative; width: 64px; height: 64px; }
.plus .btn, .plus .ripple { position: absolute; inset: 0; border-radius: 50%; }
.plus .btn { background: var(--ink); }
.plus .btn::before, .plus .btn::after { content: ""; position: absolute; left: 50%; top: 50%; width: 24px; height: 3px; border-radius: 2px; background: var(--on-accent); transform: translate(-50%, -50%); }
.plus .btn::after { transform: translate(-50%, -50%) rotate(90deg); }
.plus .ripple { border: 2px solid var(--ink); opacity: 0; }
.cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 640px; list-style: none; padding: 0; margin: 0; }
.cats li { font-size: 15px; line-height: 1.4; padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
/* The three ways in, drawn like the app's add screen: search field, then Barcode, Foto, Eintragen */
.entry { width: min(440px, 100%); display: grid; gap: 12px; }
.entry svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.search { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 6px 0 20px; border: 2px solid var(--ink); border-radius: 999px; background: var(--canvas); color: var(--muted); font-size: 16px; text-align: left; }
.search > svg { width: 20px; height: 20px; flex: none; }
.search > span:first-of-type { flex: 1; }
.go { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--on-accent); display: grid; place-items: center; }
.go svg { width: 20px; height: 20px; }
.methods { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.method { position: relative; overflow: hidden; display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 112px; padding: 16px 8px; border-radius: 20px; background: var(--surface); }
.method > svg { width: 28px; height: 28px; margin-bottom: 4px; }
.method strong { font-size: 17px; font-weight: 600; line-height: 1.3; }
.method .free { font-size: 14px; line-height: 28px; color: var(--muted); }
.method.barcode { box-shadow: inset 0 0 0 2px var(--ink); }
.scanline { position: absolute; left: 16px; right: 16px; top: 0; height: 2px; border-radius: 2px; background: var(--ink); opacity: 0; }

/* ---------- Features: text beside an app picture ---------- */
.feature { display: grid; gap: 40px; align-items: center; padding-top: 80px; }
.feature-text { max-width: 520px; }
.feature-text p { font-size: 18px; color: var(--muted); margin: 0; }
.shot { margin: 0; width: min(520px, 100%); justify-self: center; }
.shot img { display: block; width: 100%; height: auto; border-radius: 24px; border: 1px solid var(--line); box-shadow: 0 24px 48px -32px rgba(15, 37, 57, .35); }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 80px; padding-top: 120px; }
  .feature .shot, .feature .finder { justify-self: end; }
  .feature.flip .shot { order: -1; justify-self: start; }
}

/* Photo recognition: the viewfinder closes in on the star, then the star badge says "found" */
.finder { position: relative; width: min(400px, 100%); aspect-ratio: 1; justify-self: center; display: grid; place-items: center; border-radius: 32px; background: var(--surface); }
.finder > img { width: 48%; height: auto; }
.target { position: absolute; inset: 18%; }
.corner { position: absolute; width: 40px; height: 40px; border: 3px solid var(--ink); }
.corner.tl { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 20px; }
.corner.tr { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 20px; }
.corner.bl { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 20px; }
.corner.br { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 20px; }
.found { position: absolute; right: -20px; bottom: -20px; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.found img { width: 22px; height: 22px; }
@media (min-width: 900px) { .recog .finder { margin-right: 96px; } }

/* ---------- Photos: a dark blue band, the phone rises from its lower edge ---------- */
.band { background: var(--ink); color: var(--night-ink); margin-top: 120px; overflow: clip; }
.band-inner { display: grid; gap: 48px; align-items: center; padding-top: 96px; }
.band-text { max-width: 520px; }
.band-text p { font-size: 18px; color: var(--night-muted); margin: 0; }
/* Two phones side by side, the band's lower edge cuts them off */
/* Two pictures at the same height, overlapping like cards laid side by side */
.duo { display: flex; justify-content: center; align-items: flex-start; padding-bottom: 80px; }
.duo .screen { display: block; flex: none; height: 240px; width: auto; border-radius: 16px; }
.duo .screen + .screen { margin: 40px 0 0 -24px; box-shadow: -16px 0 32px rgba(0, 0, 0, .35); }
/* Fanned out like two photos laid on a table */
.duo .screen:first-child { transform: rotate(-3deg); }
.duo .screen + .screen { transform: rotate(4deg); }
/* Wide screens: text left, pictures right */
@media (min-width: 900px) {
  .band-inner { grid-template-columns: .8fr 1.2fr; gap: 64px; padding-bottom: 96px; }
  .duo { padding-bottom: 0; }
  .duo .screen { height: 420px; border-radius: 24px; }
  .duo .screen + .screen { margin: 56px 0 0 -48px; }
}

/* ---------- Privacy: one sentence, its words light up ---------- */
.private { padding-top: 120px; padding-bottom: 120px; }
.private p { max-width: 880px; margin: 0; font-size: clamp(30px, 4.6vw, 52px); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
.private .line { text-wrap: balance; }
.private .line > span { display: inline-block; }
.private .soft { color: var(--muted); }

/* ---------- Free and Pro ---------- */
.pricing { padding-bottom: 120px; }
.pricing-head { max-width: 640px; }
.pricing-head p { font-size: 18px; color: var(--muted); margin: 0; }
.plans { display: grid; gap: 16px; margin-top: 40px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 32px 24px; display: flex; flex-direction: column; }
.plan h3 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.plan-sub { margin: 4px 0 24px; font-size: 15px; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.plan li { font-size: 16px; line-height: 1.5; }
.plan.pro { background: var(--ink); border-color: var(--ink); color: var(--night-ink); }
.plan.pro .plan-sub { color: var(--night-muted); }
.plan.pro li::before { background-image: url("/img/stern-sand.svg"); }
.price { margin: auto 0 0; padding-top: 32px; font-size: 15px; color: var(--night-muted); }
.price span { margin-right: 8px; font-size: 28px; font-weight: 600; letter-spacing: -.01em; color: var(--night-ink); font-variant-numeric: tabular-nums; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } .plan { padding: 32px; } }

/* ---------- Sparks: what they cost, what you get, packs in one line ---------- */
.sparks { display: grid; gap: 24px; margin-top: 16px; padding: 32px 24px; border: 1px solid var(--line); border-radius: var(--radius-card); }
.sparks h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.sparks h3 img { width: 18px; height: 18px; }
.sparks-about > p { margin: 0; max-width: 440px; font-size: 15px; color: var(--muted); }
.costs { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.costs li { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.4; }
.token { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 56px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--ink); color: var(--on-accent); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.token img { width: 12px; height: 12px; }
.token.free { background: var(--sand); color: var(--ink); }
.gifts { background: var(--sand); border-radius: 16px; padding: 24px; align-self: start; }
.gifts-title { margin: 0; font-size: 15px; font-weight: 600; }
.gifts dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 16px 0 0; }
.gifts dl > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.gifts dd { display: flex; align-items: center; gap: 8px; margin: 0; font-size: clamp(36px, 4vw, 48px); font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gifts dd img { width: .5em; height: .5em; }
.packs span:not(.lead) img { width: 12px; height: 12px; }
.gifts dt { margin-top: 8px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.packs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.packs .lead { margin-right: 8px; }
.packs span:not(.lead) { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--canvas); color: var(--ink); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (min-width: 760px) {
  .sparks { grid-template-columns: 1fr 1fr; gap: 32px 48px; padding: 32px; }
  .packs { grid-column: 1 / -1; }
}

/* ---------- Closing: star and name as on the app's launch screen, the big star turns in the corner ---------- */
.splash { position: relative; overflow: hidden; background: var(--surface); padding: 120px 0 360px; view-timeline-name: --splash; }
.giant { position: absolute; width: 900px; max-width: none; right: -280px; bottom: -400px; transform: rotate(4deg); pointer-events: none; }
.splash-inner { position: relative; display: grid; justify-items: center; text-align: center; }
.mark { display: grid; justify-items: center; gap: 16px; margin-bottom: 64px; }
.mark img { width: clamp(104px, 14vw, 152px); height: auto; }
.mark .name { margin: 0; padding-left: .2em; font-size: clamp(32px, 5vw, 48px); font-weight: 600; line-height: 1.1; letter-spacing: .2em; text-transform: uppercase; }
.mark .rule { width: clamp(96px, 12vw, 120px); height: 3px; border-radius: 2px; background: var(--ink); }
.splash blockquote { margin: 0; max-width: 680px; font-size: clamp(22px, 3vw, 30px); line-height: 1.4; letter-spacing: -.01em; text-wrap: balance; }
.splash blockquote p { margin: 0; }
.splash .signature { margin: 16px 0 0; font-size: 15px; color: var(--muted); }
.splash .actions { justify-items: center; margin-top: 40px; }
@media (max-width: 700px) {
  .splash { padding: 96px 0 340px; }
  .giant { width: 540px; right: -180px; bottom: -250px; }
}

/* ---------- Scroll-driven movement ---------- */
@supports (animation-timeline: view()) {
  /* Opening: the star turns a little as you start scrolling */
  .stage .star { animation: hero-turn linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
  @keyframes hero-turn { to { transform: rotate(40deg); } }

  /* Scanning: while pinned, the plus button is pressed, categories pop in one by one, then the line scans */
  .ch-scan .head { animation: rise linear both; animation-timeline: --scan; animation-range: entry 30% entry 80%; }
  .plus { animation: pop-in linear both; animation-timeline: --scan; animation-range: contain 3% contain 9%; }
  .plus .btn { animation: press linear both; animation-timeline: --scan; animation-range: contain 10% contain 16%; }
  .plus .ripple { animation: ripple linear both; animation-timeline: --scan; animation-range: contain 12% contain 24%; }
  @keyframes pop-in { from { opacity: 0; transform: scale(.8); } }
  @keyframes press { 0% { transform: scale(1); } 45% { transform: scale(.86); } 100% { transform: scale(1); } }
  @keyframes ripple { 0% { transform: scale(1); opacity: 0; } 10% { opacity: .4; } 100% { transform: scale(2.4); opacity: 0; } }
  .cats li { animation: chip linear both; animation-timeline: --scan; }
  .cats li:nth-child(1) { animation-range: contain 16% contain 23%; }
  .cats li:nth-child(2) { animation-range: contain 19% contain 26%; }
  .cats li:nth-child(3) { animation-range: contain 22% contain 29%; }
  .cats li:nth-child(4) { animation-range: contain 25% contain 32%; }
  .cats li:nth-child(5) { animation-range: contain 28% contain 35%; }
  .cats li:nth-child(6) { animation-range: contain 31% contain 38%; }
  .cats li:nth-child(7) { animation-range: contain 34% contain 41%; }
  .cats li:nth-child(8) { animation-range: contain 37% contain 44%; }
  .cats li:nth-child(9) { animation-range: contain 40% contain 47%; }
  @keyframes chip { from { opacity: 0; transform: translateY(12px) scale(.92); } }
  .search { animation: rise linear both; animation-timeline: --scan; animation-range: contain 44% contain 52%; }
  .method { animation: chip linear both; animation-timeline: --scan; }
  .method:nth-child(1) { animation-range: contain 50% contain 56%; }
  .method:nth-child(2) { animation-range: contain 54% contain 60%; }
  .method:nth-child(3) { animation-range: contain 58% contain 64%; }
  .scanline { animation: sweep linear both; animation-timeline: --scan; animation-range: contain 66% contain 96%; }
  @keyframes sweep { 0% { top: 0; opacity: 0; } 8% { opacity: .7; } 92% { opacity: .7; } 100% { top: 100%; opacity: 0; } }

  /* Photo recognition: the corners close in, then the star appears */
  .recog .feature-text { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
  .finder { view-timeline-name: --finder; }
  .target { animation: close-in linear both; animation-timeline: --finder; animation-range: entry 20% cover 45%; }
  @keyframes close-in { from { inset: 4%; opacity: 0; } }
  .found { animation: found linear both; animation-timeline: --finder; animation-range: cover 45% cover 52%; }
  @keyframes found { from { transform: scale(.4) rotate(-30deg); opacity: 0; } }

  /* Photos: both pictures rise and fan out */
  .duo .screen { animation: fan-a linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  .duo .screen + .screen { animation-name: fan-b; animation-range: entry 10% cover 55%; }
  @keyframes fan-a { from { transform: translateY(80px) rotate(0deg); } }
  @keyframes fan-b { from { transform: translate(-80px, 120px) rotate(0deg); } }
  .band-text { animation: rise linear both; animation-timeline: view(); animation-range: entry 10% cover 35%; }

  /* Levels: the card slides in from its side */
  .feature.flip .shot { animation: from-side linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
  @keyframes from-side { from { opacity: 0; transform: translate(-40px, 24px) rotate(-2deg); } }
  .feature.flip .feature-text { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }

  /* Privacy: words light up */
  .private .line > span { animation: word-on linear both; animation-timeline: view(); animation-range: cover 20% cover 45%; }
  @keyframes word-on { from { opacity: .14; } }

  /* Pricing: plans, then the gifts one after another */
  .plan { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 25%; }
  .plan.pro { animation-range: entry 8% cover 32%; }
  .gifts dl > div { animation: rise linear both; animation-timeline: view(); }
  .gifts dl > div:nth-child(1) { animation-range: entry 20% cover 30%; }
  .gifts dl > div:nth-child(2) { animation-range: entry 30% cover 36%; }

  /* Sparks: the card rises, costs slide in one by one, the gift stars spin in, packs pop up */
  .sparks { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 20%; }
  .costs li { animation: slide-in linear both; animation-timeline: view(); }
  .costs li:nth-child(1) { animation-range: entry 40% cover 18%; }
  .costs li:nth-child(2) { animation-range: entry 60% cover 22%; }
  .costs li:nth-child(3) { animation-range: entry 80% cover 26%; }
  @keyframes slide-in { from { opacity: 0; transform: translateX(-24px); } }
  .gifts dd img { animation: spin-in linear both; animation-timeline: view(); animation-range: entry 50% cover 30%; }
  @keyframes spin-in { from { opacity: 0; transform: rotate(-120deg) scale(.3); } }
  .packs span:not(.lead) { animation: chip linear both; animation-timeline: view(); }
  .packs span:nth-child(2) { animation-range: entry 60% cover 14%; }
  .packs span:nth-child(3) { animation-range: entry 80% cover 18%; }
  .packs span:nth-child(4) { animation-range: entry 100% cover 22%; }

  /* Closing: the mark rises, the big star turns into place like on the launch screen */
  .mark { animation: rise linear both; animation-timeline: --splash; animation-range: entry 10% cover 35%; }
  .giant { animation: turn linear both; animation-timeline: --splash; animation-range: entry 0% cover 60%; }
  @keyframes turn { from { transform: rotate(-6deg) translateY(60px); } to { transform: rotate(4deg); } }
}

/* "Reduce motion" and browsers without scroll animations: nothing moves, nothing is pinned */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ch-scan { height: auto; } .ch-scan .pin { position: static; height: auto; padding: 80px 20px 0; }
}
@supports not (animation-timeline: view()) {
  .ch-scan { height: auto; } .ch-scan .pin { position: static; height: auto; padding: 80px 20px 0; }
}

/* Small phones: tighten the pinned scan chapter so it fits on one screen */
@media (max-height: 760px) and (max-width: 700px) {
  .ch-scan .pin { gap: 16px; }
  .ch-scan h2 { font-size: 28px; margin-bottom: 8px; }
  .ch-scan .head p { font-size: 16px; }
  .plus { width: 52px; height: 52px; }
  .cats li { font-size: 14px; padding: 6px 12px; }
  .method { min-height: 96px; padding: 12px 4px; }
}
