/* YOOR public site. Tokens and rules come from ~/yoor-app/DESIGN.md (« Encre et papier »): cream page, ink text,
   peach as the only ambient colour, Geist only, big light sentences, bold figures, and only the bot bounces. */
@font-face { font-family: Geist; font-weight: 300; src: url(../fonts/Geist-Light.woff2) format("woff2"), url(../fonts/Geist-Light.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: Geist; font-weight: 400; src: url(../fonts/Geist-Regular.woff2) format("woff2"), url(../fonts/Geist-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: Geist; font-weight: 600; src: url(../fonts/Geist-SemiBold.woff2) format("woff2"), url(../fonts/Geist-SemiBold.ttf) format("truetype"); font-display: swap; }

:root {
  --bg: #F7F3EE;
  --surface: #FFFFFF;
  --surface-2: #F1ECE5;
  --surface-3: #E8E1D8;
  --text: #2B1F1A;
  --text-2: #4A3D37;
  --muted: #6D6059;
  --peach-a: #F8D2BC;
  --success: #197A4F;
  --success-soft: #E3F1EA;
  --aura: rgba(244, 195, 170, .55);
  --line: rgba(43, 31, 26, .14);
  --night-surface-2: #2C231F;
  --night-text: #F4EEE7;
  --night-muted: #A3968C;
  --gutter: 24px;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 400 17px/1.45 Geist, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img, svg { display: block; }
b { font-weight: 600; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.logo { height: 22px; width: auto; }

/* ---------- The waitlist pill: input and button in one shape ---------- */
.waitlist { width: 100%; max-width: 460px; }
.pill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px; border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(43, 31, 26, .10);
  transition: box-shadow .2s var(--ease-out);
}
.pill:focus-within { box-shadow: 0 0 0 3px var(--line), 0 10px 30px rgba(43, 31, 26, .12); }
.pill input {
  flex: 1; min-width: 0; height: 48px; padding: 0 14px;
  border: 0; outline: 0; background: transparent;
  font: 400 17px/1 Geist, sans-serif; color: inherit;
}
.pill input::placeholder { color: var(--muted); }
.pill button {
  flex: none; height: 48px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--text); color: var(--bg); font: 600 16px/1 Geist, sans-serif;
  transition: transform .12s var(--ease-out), opacity .2s;
}
.pill button:active { transform: scale(.97); }
.pill button:disabled { opacity: .4; cursor: default; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fine { margin-top: 12px; font-size: 13px; color: var(--muted); }
.fine a { text-underline-offset: 2px; }
.status { margin-top: 10px; font-size: 15px; }
.done-line { display: none; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.waitlist.is-done .pill, .waitlist.is-done .fine { display: none; }
.waitlist.is-done .done-line { display: block; }

/* ---------- The bot: one perfect circle, two light eyes ---------- */
.bot { overflow: visible; width: 100%; height: 100%; transform-origin: 50% 100%; }
.bot .eye { fill: var(--bg); }
.bot .blink { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
.bot .smile { display: none; fill: none; stroke: var(--bg); stroke-width: 9; stroke-linecap: round; }
.bot.is-happy .eye { display: none; }
.bot.is-happy .smile { display: block; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(.08); } }
.bot.is-hopping { animation: hop .7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes hop {
  0% { transform: translateY(0) scale(1, 1); }
  20% { transform: translateY(0) scale(1.06, .92); }
  55% { transform: translateY(-9%) scale(.96, 1.05); }
  80% { transform: translateY(0) scale(1.03, .97); }
  100% { transform: translateY(0) scale(1, 1); }
}

/* ---------- « Le mystère »: the sticky stage ----------
   Geometry, in svh: the card is centred at 42 and is never taller than 40. The bot is 78 wide, enough to cover
   the card's corners, and his origin is centred on the card; the script moves him from there in units of his
   size. Sunk, his top is at 64, under the card and under the intro. Captions sit between 4 and 18. */
.story { position: relative; height: 440svh; }
/* One swipe, one scene: the page stops on the intro, each card, the outro, the finale and the footer. */
html.home { scroll-snap-type: y mandatory; }
.snap { position: absolute; left: 0; width: 1px; height: 1px; top: calc(var(--at) * 340svh); scroll-snap-align: start; pointer-events: none; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.stage::before {
  content: ""; position: absolute; left: 50%; top: 42svh; width: 130svh; height: 90svh;
  transform: translate(-50%, -50%);
  background: radial-gradient(50% 50% at 50% 50%, var(--aura), transparent 70%);
}

.cards { position: absolute; inset: 0; opacity: 0; }
.card {
  position: absolute; left: 50%; top: 42svh; transform: translate(-50%, -50%);
  width: min(86vw, 500px); max-height: 40svh; padding: 22px;
  border-radius: 26px; background: var(--surface);
  box-shadow: 0 10px 30px rgba(43, 31, 26, .10);
  opacity: 0; transition: opacity .2s;
}
.card.is-on { opacity: 1; }
.me {
  width: fit-content; margin-left: auto; padding: 11px 18px; border-radius: 22px 22px 8px 22px;
  background: var(--text); color: var(--bg); font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.said {
  margin-top: 16px; font-weight: 300; font-size: clamp(22px, min(6.2vw, 3.4svh), 30px); line-height: 1.18; letter-spacing: -.02em;
}
.card > .said:first-child { margin-top: 0; }
.said b { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.actions { display: flex; gap: 8px; margin-top: 18px; }
.btn {
  display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px;
  font-size: 15px; font-weight: 600; transition: transform .12s var(--ease-out), background-color .12s;
}
.btn.ink { background: var(--text); color: var(--bg); }
.btn.soft { background: var(--surface-2); color: var(--text-2); }
.btn.is-pressed { transform: scale(.94); }

.card-head { display: flex; align-items: center; justify-content: space-between; }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--text-2); }
.check { width: 36px; height: 36px; border-radius: 50%; background: var(--success-soft); display: grid; place-items: center; }
.check svg { width: 20px; height: 20px; fill: none; stroke: var(--success); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.amount {
  margin-top: 6px; font-weight: 600; font-size: clamp(40px, min(11.6vw, 6.4svh), 60px); line-height: 1.05;
  letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.rows { margin-top: 16px; display: grid; gap: 6px; }
.rows > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 11px 14px; border-radius: 14px; background: var(--surface-2); font-size: 15px;
}
.rows dt { color: var(--text-2); }
.rows dd { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows .zero { background: var(--success-soft); }
.rows .zero dt, .rows .zero dd { color: var(--success); }
.rows .zero dd { font-size: 17px; }

.bot-pos {
  position: absolute; left: calc(50% - 39svh); top: 3svh; width: 78svh; height: 78svh;
  will-change: transform;
}
.bot-jelly { width: 100%; height: 100%; transform-origin: 50% 50%; will-change: transform; }
/* His contact shadow, only at the end, when he stands whole: bot centre at 42 + 0.395 x 78, radius 0.48 x 39. */
.ground {
  position: absolute; left: 50%; top: 91.5svh; width: 30svh; height: 4svh; transform: translate(-50%, -50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(43, 31, 26, .22), transparent 70%); opacity: 0;
}

.captions { position: absolute; left: var(--gutter); right: var(--gutter); top: 4svh; height: 14svh; }
.caption {
  position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: flex-end; justify-content: center;
  column-gap: .26em; text-align: center;
  font-weight: 300; font-size: clamp(32px, min(9vw, 6svh), 72px); line-height: 1; letter-spacing: -.04em;
  opacity: 0;
}
/* Long lines break between sentences, never inside one. */
.outro span { display: inline-block; }

.intro {
  position: absolute; inset: 0 0 auto; padding: 28px var(--gutter) 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.intro .logo { align-self: flex-start; }
.intro h1 {
  margin-top: clamp(24px, 6svh, 80px); max-width: 13ch; text-wrap: balance;
  font-weight: 300; font-size: clamp(42px, min(11.6vw, 7.4svh), 104px); line-height: .96; letter-spacing: -.045em;
}
.intro .sub { margin-top: 14px; font-size: clamp(18px, 4.6vw, 24px); line-height: 1.3; color: var(--text-2); }
.intro .waitlist { margin-top: 22px; }
.intro.is-gone { pointer-events: none; }

.outro {
  position: absolute; left: var(--gutter); right: var(--gutter); top: 27svh; transform: translateY(-50%);
  text-align: center; text-wrap: balance; opacity: 0;
  font-weight: 300; font-size: clamp(46px, min(12.6vw, 8svh), 112px); line-height: .96; letter-spacing: -.045em;
}

/* ---------- Finale: the ink block, and the app rising from its bottom edge ---------- */
.finale {
  margin: 0 16px; padding: 56px var(--gutter) 0; border-radius: 30px; overflow: hidden;
  background: var(--text); color: var(--night-text);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  scroll-snap-align: start;
}
.finale-text { width: 100%; display: flex; flex-direction: column; align-items: center; }
.finale-app { width: 100%; height: min(380px, 50svh); margin-top: 40px; display: flex; justify-content: center; align-items: flex-start; }
.device {
  width: min(66vw, 300px); padding: 8px; border-radius: 46px; background: #0E0A08;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 -18px 50px rgba(0, 0, 0, .35);
}
.device img { width: 100%; height: auto; border-radius: 38px; }
.js .device { transform: translateY(56px); opacity: 0; transition: transform .48s var(--ease-out), opacity .48s var(--ease-out); }
.js .finale-app.is-in .device { transform: none; opacity: 1; }
.finale h2 { max-width: 100%; text-wrap: balance; font-weight: 300; font-size: clamp(40px, 10.5vw, 72px); line-height: 1; letter-spacing: -.04em; }
.finale .waitlist { margin-top: 28px; }
.finale .pill { background: var(--night-surface-2); box-shadow: 0 4px 10px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06); }
.finale .pill:focus-within { box-shadow: 0 0 0 3px rgba(244, 238, 231, .22), 0 4px 10px rgba(0, 0, 0, .45); }
.finale .pill input::placeholder { color: var(--night-muted); }
.finale .pill button { background: var(--night-text); color: var(--text); }
.finale .fine { color: var(--night-muted); }
.finale :focus-visible { outline-color: var(--night-text); }

/* ---------- Footer ---------- */
.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 36px var(--gutter) 40px; font-size: 14px; color: var(--muted);
  scroll-snap-align: end;
}
.foot .logo { height: 18px; }
.foot nav { display: flex; gap: 20px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* ---------- Legal page ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: 28px var(--gutter) 24px; }
.legal .back { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.legal h1 { margin-top: 56px; font-weight: 300; font-size: clamp(44px, 11vw, 72px); line-height: 1; letter-spacing: -.04em; }
.legal .intro-line { margin-top: 16px; color: var(--text-2); font-size: 19px; }
.legal section { margin-top: 24px; padding: 24px; border-radius: 26px; background: var(--surface); }
.legal h2 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.legal section p, .legal section ul { margin-top: 10px; color: var(--text-2); }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 4px; }
.todo { background: var(--peach-a); color: var(--text); border-radius: 6px; padding: 0 6px; font-style: normal; }

/* ---------- Without the script: a still page that still reads ---------- */
html:not(.js) .story { height: auto; }
html:not(.js) .stage { position: relative; height: 100svh; }
html:not(.js) .bot-pos { transform: translateY(61svh); }

/* ---------- Wide screens ---------- */
@media (min-width: 900px) {
  :root { --gutter: 64px; }
  .intro { padding-top: 40px; }
  .intro h1 { max-width: 20ch; font-size: clamp(56px, min(7.4vw, 9.4svh), 112px); }
  .card { width: 580px; padding: 30px; }
  .me { font-size: 22px; }
  .said { font-size: clamp(26px, 3.8svh, 36px); }
  .amount { font-size: clamp(52px, 7.6svh, 72px); }
  .rows > div { font-size: 16px; padding: 13px 16px; }
  .finale {
    display: grid; grid-template-columns: 1fr 360px; column-gap: 72px; align-items: stretch;
    max-width: 1180px; min-height: 560px; margin: 0 auto; padding: 0 88px; text-align: left;
  }
  .finale-text { align-items: flex-start; align-self: center; padding: 72px 0; }
  .finale h2 { font-size: clamp(56px, 5.4vw, 80px); }
  .finale-app { align-self: end; height: 500px; margin-top: 64px; }
  .device { width: 340px; }
  .foot { max-width: 1308px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .bot .blink, .bot.is-hopping { animation: none; }
  .card, .btn, .js .device { transition: none; }
}
