/* Hugo Intake. Marketing register, alex-approved-branding tokens:
   sage and white surfaces, warm mid-black, Bricolage display, Inter body,
   pill CTAs, dark hero moments. Lime is the one accent on dark; violet only
   colors the words a person types. No offset shadows (Hugo, 9/22). */

:root {
  --sage: #eef2ea;
  --cream: #f0eee6;
  --card: #ffffff;
  --ink: #1d1c1a;
  --ink-2: #474641;
  --muted: #8a8984;
  --line: #e2e3dc;
  --violet: #4f06eb;
  --lime: #cfff5e;
  --night: #1d1c1a;
  --night-2: #292825;
  --night-line: rgba(238, 242, 234, 0.14);
  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --r-card: 1.4rem;
  --r-inset: 0.75rem;
  --vh: 100dvh;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--night); }
body { font-family: var(--body); color: var(--ink); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }

.app { height: var(--vh); overflow: hidden; position: relative; }

/* ---------- screen shell ---------- */

.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: calc(var(--safe-t) + 14px) 20px calc(var(--safe-b) + 16px);
  background: var(--sage);
}
.screen.night { background: var(--night); color: #fff; }
.screen.enter { animation: enter .45s var(--ease) both; }
.screen.enter.back { animation-name: enter-back; }
.screen.enter.fade { animation: fade .6s ease both; }
@keyframes enter { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.top { display: flex; align-items: center; gap: 12px; min-height: 40px; position: relative; z-index: 2; }
.top .logo { height: 22px; width: auto; display: block; }
.top .spacer { flex: 1; }
.icon-btn { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: rgba(29, 28, 26, 0.07); }
.night .icon-btn { background: rgba(255, 255, 255, 0.1); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.progress { display: flex; gap: 5px; flex: 1; }
.progress i { flex: 1; height: 4px; border-radius: 4px; background: rgba(29, 28, 26, 0.1); overflow: hidden; position: relative; }
.progress i.done::after, .progress i.now::after { content: ""; position: absolute; inset: 0; background: var(--ink); border-radius: 4px; transform-origin: left; }
.enter .progress i.now::after { animation: fill .6s .15s var(--ease) both; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.body { flex: 1; overflow-y: auto; padding: 34px 2px 20px; -webkit-overflow-scrolling: touch; position: relative; z-index: 1; }
.foot { padding-top: 10px; display: grid; gap: 10px; position: relative; z-index: 2; }

/* ---------- motion kit ---------- */

/* Words rise in one after another. Each word is a span with --i. */
.words .w { display: inline-block; white-space: pre; }
.enter .words .w, .moment .words .w {
  animation: rise .7s var(--ease) both;
  animation-delay: calc(var(--d, 0s) + var(--i) * 70ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(0.45em); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.enter .up, .moment .up { animation: rise .7s var(--ease) both; animation-delay: var(--d, .25s); }
.enter .stagger > * { animation: rise .6s var(--ease) both; animation-delay: calc(var(--d, .2s) + var(--i, 0) * 60ms); }

.chip {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase;
  padding: 8px 13px; border-radius: 999px;
  background: var(--lime); color: var(--ink);
}
.enter .chip, .moment .chip { animation: pop .5s .1s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.eyebrow { display: block; font: 600 12px/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.night .eyebrow { color: rgba(238, 242, 234, 0.55); }

.prompt, h1, .huge, .title-sm, .card .t { text-wrap: balance; }
.hint, .card .d, .action .d { text-wrap: pretty; }
.prompt { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 10.5vw, 46px); line-height: 1.02; letter-spacing: -0.03em; }
.hint { font-size: 15px; line-height: 1.45; color: var(--ink-2); margin-top: 12px; }
.night .hint { color: rgba(238, 242, 234, 0.72); }

/* The sentence continues into the field. Big, bold, no box. */
.say {
  display: block; width: 100%; margin-top: 22px;
  border: 0; outline: 0; background: transparent; border-radius: 0; resize: none;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(28px, 8vw, 34px); line-height: 1.15; letter-spacing: -0.02em;
  color: var(--violet); caret-color: var(--violet);
  padding: 6px 0 12px;
  border-bottom: 2px solid rgba(29, 28, 26, 0.14);
  transition: border-color .2s ease;
}
.say:focus { border-bottom-color: var(--ink); }
.say::placeholder { color: rgba(29, 28, 26, 0.22); }
textarea.say { min-height: 96px; }
textarea.say.sm { font-size: 21px; line-height: 1.3; min-height: 110px; }
.field { margin-top: 18px; }
.field label { display: block; font: 600 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field .say { margin-top: 4px; font-size: clamp(24px, 7vw, 28px); }

/* ---------- choices ---------- */

.cards { display: grid; gap: 12px; margin-top: 26px; }
.card {
  text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 20px 20px 20px 22px; display: flex; align-items: center; gap: 14px;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.card:active { transform: scale(.98); }
.card .t, .card .d, .action .t, .action .d { display: block; }
.card .txt { flex: 1; }
.card .t { font: 700 22px/1.1 var(--display); letter-spacing: -0.02em; }
.card .d { font-size: 14.5px; line-height: 1.4; color: var(--ink-2); margin-top: 5px; }
.card .dot { width: 28px; height: 28px; border-radius: 999px; flex: none; border: 2px solid rgba(29, 28, 26, 0.18); display: grid; place-items: center; transition: all .2s ease; }
.card .dot svg { width: 16px; height: 16px; stroke: var(--ink); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; }
.card.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.card.on .d { color: rgba(255, 255, 255, 0.7); }
.card.on .dot { background: var(--lime); border-color: var(--lime); transform: scale(1.08); }
.card.on .dot svg { transition: stroke-dashoffset .35s .05s ease; stroke-dashoffset: 0; }
.card.big { padding: 26px 22px; }
.card.big .t { font-size: 28px; }

.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pill {
  padding: 14px 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  font: 600 16px/1 var(--body); display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s ease, color .2s ease, transform .15s ease;
}
.pill:active { transform: scale(.96); }
.pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill.on::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--lime); animation: pop .35s cubic-bezier(.2, 1.6, .4, 1) both; }
.other { margin-top: 18px; }
.other .say { font-size: 22px; margin-top: 0; }

/* ---------- buttons ---------- */

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 58px; border-radius: 999px;
  font: 600 17px/1 var(--body); background: var(--ink); color: #fff;
  transition: transform .15s ease, opacity .25s ease;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .25; }
.btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.btn:not([disabled]):active svg { transform: translateX(3px); }
.btn.light { background: #fff; color: var(--ink); }

/* ---------- the orbit: technical line art, drawn in then turning ---------- */

.orbit { position: absolute; pointer-events: none; z-index: 0; }
.orbit ellipse, .orbit circle { fill: none; stroke: var(--lime); stroke-width: 1; vector-effect: non-scaling-stroke; }
.orbit .draw { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.2s var(--ease) forwards; }
.orbit .draw:nth-child(2) { animation-delay: .15s; }
.orbit .draw:nth-child(3) { animation-delay: .3s; }
.orbit .spin { transform-origin: 200px 200px; animation: spin 40s linear infinite; }
.orbit .spin.rev { animation-duration: 58s; animation-direction: reverse; }
.orbit .planet { fill: var(--lime); stroke: none; opacity: 0; animation: fade .6s 1.4s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.fast .orbit .spin { animation-duration: 3.2s; }
.fast .orbit .spin.rev { animation-duration: 4.4s; }

/* ---------- cover ---------- */

.cover .body { display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 8px; }
.cover .orbit { width: 150vw; max-width: 720px; top: 2%; left: 50%; transform: translateX(-38%); }
.cover h1 { font: 800 clamp(48px, 14.5vw, 66px)/0.95 var(--display); letter-spacing: -0.04em; margin-top: 18px; }
.cover h1 .lime, .moment .lime { color: var(--lime); }
.cover .hint { font-size: 17px; margin-top: 16px; max-width: 30ch; }
.legal { font: 600 10.5px/1 var(--body); letter-spacing: .08em; color: rgba(238, 242, 234, 0.38); text-align: center; padding-top: 8px; }

/* ---------- moments: full-screen beats between steps ---------- */

.moment .body { display: flex; flex-direction: column; justify-content: center; }
.moment .orbit { width: 140vw; max-width: 680px; top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: .8; }
.moment .small { font: 600 18px/1.3 var(--body); color: rgba(238, 242, 234, 0.72); }
.moment .huge { font: 800 clamp(64px, 20vw, 96px)/0.92 var(--display); letter-spacing: -0.045em; margin-top: 8px; word-break: break-word; }
.underline { display: block; height: 6px; width: 64%; max-width: 280px; background: var(--lime); border-radius: 6px; margin-top: 18px; transform-origin: left; animation: sweep .8s .55s var(--ease) both; }
@keyframes sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ticker { margin-top: 26px; display: grid; gap: 12px; }
.ticker div { display: flex; align-items: center; gap: 12px; font: 600 18px/1.3 var(--body); opacity: 0; animation: rise .6s var(--ease) forwards; }
.ticker div i { width: 22px; height: 22px; border-radius: 99px; border: 2px solid rgba(238, 242, 234, 0.3); display: grid; place-items: center; flex: none; }
.ticker div i::after { content: ""; width: 10px; height: 10px; border-radius: 99px; background: var(--lime); transform: scale(0); animation: pop .4s cubic-bezier(.2, 1.6, .4, 1) forwards; animation-delay: inherit; }

/* ---------- done ---------- */

.done .body { display: flex; flex-direction: column; justify-content: center; overflow: visible; }
.done .orbit { width: 130vw; max-width: 620px; top: -10%; right: -42%; opacity: .55; }
.done h1 { font: 800 clamp(50px, 15vw, 70px)/0.95 var(--display); letter-spacing: -0.04em; }
.burst { position: relative; width: 80px; height: 80px; margin-bottom: 30px; }
.burst .core { position: absolute; inset: 0; border-radius: 999px; background: var(--lime); display: grid; place-items: center; animation: pop .55s cubic-bezier(.2, 1.4, .4, 1) both; }
.burst .core svg { width: 38px; height: 38px; stroke: var(--ink); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.burst .core path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .3s ease forwards; }
.burst .ring { position: absolute; inset: 0; border-radius: 999px; border: 1.5px solid var(--lime); animation: ripple 1.8s .2s ease-out both; }
.burst .ring:nth-child(2) { animation-delay: .5s; }
.burst .ring:nth-child(3) { animation-delay: .8s; }
@keyframes ripple { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.handback { margin-top: 30px; padding: 16px 18px; border-radius: var(--r-inset); border: 1px solid var(--night-line); font-size: 15px; color: rgba(238, 242, 234, 0.8); }

/* ---------- home (Hugo only) ---------- */

.home .body { padding-top: 22px; }
.home .orbit { width: 120vw; max-width: 560px; top: -6%; right: -46%; opacity: .5; }
.event-name { font: 800 clamp(46px, 13.5vw, 62px)/0.95 var(--display); letter-spacing: -0.04em; display: inline-flex; align-items: baseline; gap: 10px; text-align: left; }
.event-name svg { width: 18px; height: 18px; stroke: rgba(255, 255, 255, 0.45); stroke-width: 2; fill: none; }
.stat { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.stat b { font: 800 68px/1 var(--display); letter-spacing: -0.04em; color: var(--lime); }
.stat span { font-size: 16px; color: rgba(238, 242, 234, 0.72); }
.sync { margin-top: 10px; font-size: 13.5px; color: rgba(238, 242, 234, 0.6); display: flex; align-items: center; gap: 8px; }
.sync i { width: 8px; height: 8px; border-radius: 99px; background: var(--lime); display: inline-block; }
.sync.wait i { background: #f8d47a; animation: blink 1.2s ease infinite; }
@keyframes blink { 50% { opacity: .3; } }
.actions { display: grid; gap: 10px; margin-top: 28px; }
.action { display: flex; align-items: center; gap: 14px; text-align: left; padding: 18px; border-radius: var(--r-card); background: var(--night-2); border: 1px solid var(--night-line); color: #fff; transition: transform .15s ease; }
.action:active { transform: scale(.98); }
.action.primary { background: #fff; color: var(--ink); border-color: #fff; }
.action .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); flex: none; }
.action.primary .ic { background: var(--lime); }
.action .ic svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.action .t { font: 700 20px/1.1 var(--display); letter-spacing: -0.02em; }
.action .d { font-size: 13.5px; opacity: .65; margin-top: 3px; }
.recent { margin-top: 30px; }
.recent h3 { font: 600 12px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: rgba(238, 242, 234, 0.5); margin-bottom: 6px; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--night-line); }
.row .n { flex: 1; font-weight: 600; font-size: 16px; }
.row .k { font-size: 13px; opacity: .6; font-weight: 500; }
.row .s { font-size: 12px; opacity: .55; width: 64px; text-align: right; }
.heat-dots { display: inline-flex; gap: 3px; }
.heat-dots i { width: 7px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.18); }
.heat-dots i.on { background: var(--lime); }

/* the private screen: no key, nothing to see */
.locked .body { display: flex; flex-direction: column; justify-content: flex-end; }
.locked .orbit { width: 150vw; max-width: 720px; top: 6%; left: 50%; transform: translateX(-40%); opacity: .7; }
.locked h1 { font: 800 clamp(42px, 12vw, 56px)/0.98 var(--display); letter-spacing: -0.04em; }

/* ---------- rate + quick (Hugo only, light) ---------- */

.heat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.heat { border-radius: 18px; padding: 16px 8px 14px; background: var(--card); border: 1px solid var(--line); display: grid; justify-items: center; gap: 8px; transition: all .2s ease; }
.heat .heat-dots i { width: 9px; height: 9px; background: rgba(29, 28, 26, 0.14); }
.heat .heat-dots i.on { background: var(--ink); }
.heat b { font: 700 16px/1.1 var(--display); text-align: center; }
.heat small { font-size: 12px; color: var(--muted); text-align: center; }
.heat.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.heat.on .heat-dots i.on { background: var(--lime); }
.heat.on .heat-dots i { background: rgba(255, 255, 255, 0.2); }
.heat.on small { color: rgba(255, 255, 255, 0.65); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(29, 28, 26, 0.07); padding: 4px; border-radius: 999px; margin-top: 10px; }
.seg button { padding: 12px 6px; border-radius: 999px; font: 600 14.5px/1 var(--body); transition: background .2s ease; }
.seg button.on { background: var(--ink); color: #fff; }
.section-label { font: 600 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 28px; }
.title-sm { font: 800 34px/1 var(--display); letter-spacing: -0.03em; }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--safe-b) + 18px); z-index: 50; background: var(--lime); color: var(--ink); border-radius: 18px; padding: 16px 18px; font: 600 15px/1.35 var(--body); animation: toast 3.2s ease both; }
@keyframes toast { 0% { opacity: 0; transform: translateY(16px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.err { color: #9c331b; font-size: 14.5px; margin-top: 14px; min-height: 20px; }
.night .err { color: #f8d47a; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .orbit .draw { stroke-dashoffset: 0; }
}

/* ---------- v3: their half, the handoff, Hugo's questions ---------- */

.icon-btn .count { font: 700 15px/1 var(--body); color: var(--lime); }
.seg.two { grid-template-columns: 1fr 1fr; }
.seg.two button { padding: 15px 8px; font-size: 16px; }
.reveal { margin-top: 26px; animation: rise .55s var(--ease) both; }
.prompt.sm { font-size: clamp(26px, 7.5vw, 32px); }
.prompt.ask { font-size: clamp(30px, 8.6vw, 38px); line-height: 1.05; }
.listen { margin-top: 14px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); padding: 12px 14px; background: rgba(29, 28, 26, 0.05); border-radius: var(--r-inset); }
.listen b { display: block; font: 600 11px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid rgba(29, 28, 26, 0.2); }
.handoff .body { justify-content: flex-end; }
.handoff h1 { font: 800 clamp(46px, 13.5vw, 62px)/0.96 var(--display); letter-spacing: -0.04em; margin-top: 26px; }
.phone-pulse { position: relative; width: 72px; height: 72px; border-radius: 22px; background: var(--lime); color: var(--ink); display: grid; place-items: center; }
.phone-pulse svg { width: 34px; height: 34px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; animation: nudge 1.6s 1.2s ease-in-out infinite; }
.phone-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 22px; border: 1.5px solid var(--lime); animation: ripple 2s .6s ease-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0) rotate(0); } 30% { transform: translateX(10px) rotate(8deg); } 60% { transform: translateX(-2px) rotate(-2deg); } }
.recent .row .n .k { margin-left: 4px; }
