:root {
  --bg: #dfe6ff;
  --paper: #f7f8ff;
  --ink: #1c1a5e;
  --ink-2: #4b4a8a;
  --rule: rgba(28, 26, 94, .14);
  --ribbon: #f4f6ff;
  --c: #8ea6ff;
  --on: #1c1a5e;
  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --header: 72px;
  --goal-space: 22rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header); }
body { font: 400 17px/1.55 var(--sans); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: min(100% - 2 * var(--pad), 1200px); margin-inline: auto; }

.logo { font: 600 24px/1 var(--display); letter-spacing: .06em; }
.label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.lead { font-size: clamp(18px, 1.4vw, 21px); color: var(--ink-2); max-width: 38ch; margin: 20px 0 32px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 54px; padding: 0 28px;
  border-radius: 8px; font-size: 16px; font-weight: 600; white-space: nowrap; transition: background-color .15s, color .15s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2a2880; }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: #fff; }

/* header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-color: var(--rule); }
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header); gap: 24px; }
.nav ul { display: flex; gap: clamp(18px, 3vw, 36px); font-size: 15px; font-weight: 600; }
.nav ul a { padding-bottom: 3px; border-bottom: 2px solid transparent; }
.nav ul a:hover { border-color: var(--ink); }
.age-pill { font-size: 13px; font-weight: 600; border: 1.5px solid var(--ink); border-radius: 99px; padding: 4px 11px; }

/* main + trail (the daddl mechanic: one wave through the whole page, drawn as you scroll) */
main { position: relative; isolation: isolate; padding-bottom: var(--goal-space); }
.trail { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; contain: strict; }
.trail-svg { display: block; opacity: 0; transition: opacity .4s; }
.trail.is-ready .trail-svg { opacity: 1; }
.trail-path { stroke: var(--ribbon); stroke-width: var(--trail-stroke, 36px); }
.trail-route { fill: #fff; opacity: .6; }
.trail-rider { transition: opacity .3s; }
.trail-rider.is-hidden { opacity: 0; }
.rider-img { opacity: 0; transition: opacity .35s; }
.rider-img.on { opacity: 1; }
.rider-ring { stroke: var(--ink); stroke-width: 3; }

.pop.trail-goal { position: absolute; left: 50%; bottom: calc(var(--goal-space) / 2); transform: translate(-50%, 50%); }

/* pop (goal) */
.pop { position: relative; display: grid; place-items: center; }
.pop-strip { position: relative; z-index: 1; font-size: clamp(28px, 1.6vw + 18px, 44px); white-space: nowrap; }
.burst { position: absolute; inset: 50% auto auto 50%; }
.burst i { position: absolute; inset: -6px auto auto -6px; width: 12px; height: 12px; background: var(--ink); opacity: 0; }
.burst i:nth-child(3n+2) { background: #8ea6ff; }
.burst i:nth-child(3n) { background: #fff; }
.pop.is-armed .pop-strip { opacity: 0; transform: rotate(-2.5deg) scale(.6); transition: opacity .2s, transform .2s; }
.pop.is-armed.is-popped .pop-strip { opacity: 1; transform: rotate(-2.5deg) scale(1); animation: pop-in .55s cubic-bezier(.3, 1.6, .5, 1) both; }
.pop.is-armed.is-popped .burst i { animation: pop-spark .9s cubic-bezier(.15, .7, .3, 1) both; }
@keyframes pop-in { 0% { opacity: 0; transform: rotate(-14deg) scale(.4); } }
@keyframes pop-spark {
  0% { opacity: 1; transform: rotate(var(--a)) translateY(0) rotate(0); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) rotate(180deg); }
}

/* strips (the rotated labels) */
.strip {
  display: inline-block; padding: 8px 16px; background: var(--c); color: var(--on);
  font-family: var(--display); font-size: clamp(16px, .9vw + 11px, 23px); font-weight: 600; line-height: 1.15; letter-spacing: -.01em;
  transform: rotate(-2.5deg);
}
.pop-strip { --c: var(--ink); --on: #fff; }

/* hero */
.hero { position: relative; min-height: max(92svh, 640px); display: grid; align-items: center; padding: calc(var(--header) + 24px) 0 48px; background: var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 40px; }
.hero h1 { font-size: clamp(52px, 7.2vw, 112px); line-height: .95; margin-top: 18px; }
.hero-can { position: relative; width: min(100%, 560px); justify-self: end; rotate: -6deg; }
.hero-can img { aspect-ratio: 1; border-radius: 50%; }

/* sections */
.section-head h2 { font-size: clamp(38px, 4.6vw, 68px); line-height: 1.02; margin-top: 14px; max-width: 16ch; }
.section-head .lead { margin-bottom: 0; }
.flavors { padding-top: clamp(64px, 10vh, 120px); }

/* flavor rows, same grid as daddl: media | details, flipped every other row */
.flavor { padding-block: clamp(40px, 6vh, 64px); }
.flavor-inner { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "details"; gap: 24px; align-items: center; --from: -1; }
.flavor--media-right .flavor-inner { --from: 1; }
.flavor-media { grid-area: media; position: relative; min-width: 0; }
.flavor-media img { width: 100%; aspect-ratio: 1; border-radius: 50%; }
.flavor-strip { position: absolute; left: 0; bottom: 6%; max-width: 92%; }

/* the strength dots on the lid, drawn over the photo so the picker can change them */
.flavor-media, .hero-can { container-type: inline-size; }
.lid-dots { position: absolute; left: 39.5cqw; top: 75.92cqw; display: flex; gap: .833cqw; }
.lid-dots i { width: 3.5cqw; height: 3.5cqw; border-radius: .75cqw; border: .29cqw solid #fff; background: transparent; transition: background-color .2s; }
.lid-dots[data-n="1"] i:nth-child(-n+1), .lid-dots[data-n="2"] i:nth-child(-n+2), .lid-dots[data-n="3"] i:nth-child(-n+3),
.lid-dots[data-n="4"] i:nth-child(-n+4), .lid-dots[data-n="5"] i:nth-child(-n+5) { background: #fff; }
.flavor-details { grid-area: details; min-width: 0; }

.flavor-card { position: relative; padding: clamp(24px, 3vw, 40px); border-radius: 12px; background: var(--paper); }
.flavor-card h3 { font-size: clamp(36px, 4.2vw, 60px); line-height: 1; margin: 10px 0 14px; }
.desc { font-size: 18px; color: var(--ink-2); max-width: 42ch; }
.sticker {
  position: absolute; right: -12px; top: -52px; z-index: 1; display: grid; justify-items: center; gap: 2px; padding: 14px 22px;
  background: var(--c); color: var(--on); text-align: center; rotate: 8deg;
}
.sticker b { font: 600 clamp(22px, 2vw, 32px)/1.05 var(--display); letter-spacing: -.02em; }
.sticker span { font-size: 13px; font-weight: 600; opacity: .8; white-space: nowrap; }

.flavor-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.flavor-actions .btn { width: 100%; }

.picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 24px; font-size: 14px; color: var(--ink-2); }
.picker button {
  display: grid; justify-items: center; gap: 9px; padding: 12px 4px 10px; border: 1.5px solid var(--rule); border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--ink); transition: border-color .15s, background-color .15s, color .15s;
}
.picker button:hover { border-color: var(--ink); }
.picker button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.picker-note { margin-top: 12px; min-height: 1.5em; font-size: 15px; color: var(--ink-2); }
.picker-note b { color: var(--ink); font-weight: 600; margin-right: 6px; }

.dots { display: flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid currentColor; opacity: .5; }
.dots i.on { background: currentColor; opacity: 1; }

/* strengths */
.strengths { padding: clamp(64px, 10vh, 120px) 0 clamp(48px, 8vh, 96px); }
.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 48px; }
.level { position: relative; overflow: hidden; padding: 24px 22px 30px; border-radius: 12px; background: var(--paper); }
.level::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: calc(var(--p) * 100%); background: var(--ink); }
.mg { display: block; margin: 26px 0 4px; font: 600 clamp(44px, 4.2vw, 64px)/1 var(--display); letter-spacing: -.04em; }
.mg small { font-size: .38em; color: var(--ink-2); margin-left: 5px; letter-spacing: 0; }
.level h3 { font-size: 17px; letter-spacing: -.01em; }
.level p { margin-top: 6px; font-size: 15px; color: var(--ink-2); }

/* about */
.about { padding: clamp(48px, 8vh, 96px) 0 0; }
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; padding-top: 40px; border-top: 1.5px solid var(--rule); }
.about h2 { font-size: clamp(36px, 4.2vw, 60px); line-height: 1.02; }
.about-copy p { font-size: 18px; color: var(--ink-2); max-width: 44ch; }
.about-copy p + p { margin-top: 16px; }
.about-copy .btn { margin-top: 28px; }

/* footer */
.site-footer { overflow: hidden; border-top: 1.5px solid var(--rule); padding-top: 40px; }
.warning { font-size: 15px; font-weight: 600; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: 20px; font-size: 14px; color: var(--ink-2); }
.foot-row nav { display: flex; gap: 24px; }
.foot-row a:hover { color: var(--ink); }
.foot-mark { margin-top: 32px; font: 600 clamp(120px, 24vw, 420px)/.74 var(--display); letter-spacing: -.05em; text-align: center; white-space: nowrap; user-select: none; translate: 0 6%; }

/* age gate */
.gate { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 24px; background: var(--bg); transition: opacity .3s; }
.js:not(.age-ok) .gate { display: grid; }
.js:not(.age-ok) body { overflow: hidden; }
.gate.out { opacity: 0; }
.gate-box { width: min(100%, 460px); padding: 40px 36px 28px; text-align: center; border-radius: 12px; background: var(--paper); }
.gate-box h2 { font-size: 36px; line-height: 1.05; margin: 20px 0 10px; }
.gate-box > p { color: var(--ink-2); font-size: 16px; }
.gate-box .actions { justify-content: center; margin-top: 26px; }
.gate-box .btn-ghost { background: var(--bg); }
.gate-no { margin-top: 18px; color: var(--ink) !important; font-weight: 600; }
.gate-warn { margin-top: 26px; padding-top: 18px; border-top: 1.5px solid var(--rule); font-size: 13px !important; }

/* reveal, same choreography as daddl: media slides in from its side, details lift, strip and sticker follow */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal].is-armed { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .9s var(--ease); }
  .js [data-reveal].is-armed.is-inview { opacity: 1; transform: none; }
  .js .flavor-inner.is-armed { opacity: 1; transform: none; transition: none; }
  .js .flavor-inner.is-armed .flavor-media, .js .flavor-inner.is-armed .flavor-details { opacity: 0; transition: opacity .6s, transform .9s var(--ease); }
  .js .flavor-inner.is-armed .flavor-media { transform: translateX(calc(var(--from) * 8%)); }
  .js .flavor-inner.is-armed .flavor-details { transform: translateY(32px); transition-delay: .12s; }
  .js .flavor-inner.is-armed .flavor-strip { opacity: 0; transform: translateX(-32px) rotate(-2.5deg); transition: opacity .5s .35s, transform .7s var(--ease) .35s; }
  .js .flavor-inner.is-armed .sticker { opacity: 0; rotate: 0deg; scale: .6; transition: opacity .3s .5s, scale .6s cubic-bezier(.34, 1.56, .64, 1) .5s, rotate .6s cubic-bezier(.34, 1.56, .64, 1) .5s; }
  .js .flavor-inner.is-armed.is-inview .flavor-media, .js .flavor-inner.is-armed.is-inview .flavor-details { opacity: 1; transform: none; }
  .js .flavor-inner.is-armed.is-inview .flavor-strip { opacity: 1; transform: rotate(-2.5deg); }
  .js .flavor-inner.is-armed.is-inview .sticker { opacity: 1; rotate: 8deg; scale: 1; }
}

/* responsive */
@media (min-width: 990px) {
  .flavor-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-areas: "media details"; gap: clamp(32px, 5vw, 80px); }
  .flavor--media-right .flavor-inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "details media"; }
}
@media (max-width: 1000px) {
  .levels { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .hero { min-height: 0; padding-bottom: 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-can { justify-self: center; width: min(78%, 420px); }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 749px) {
  :root { --goal-space: 16rem; }
  body { font-size: 16px; }
  .age-pill { display: none; }
  .nav ul { font-size: 14px; }
  .flavor-media { width: min(100%, 420px); margin-inline: auto; }
  .flavor-card { padding: 24px 20px; }
  .sticker { right: -4px; top: -44px; padding: 10px 14px; }
  .sticker b { font-size: 20px; }
  .sticker span { font-size: 12px; }
  .desc { font-size: 16px; }
  .picker { gap: 5px; }
  .picker button { gap: 7px; padding: 10px 0 8px; font-size: 12.5px; }
  .picker .dots { gap: 2px; }
  .picker .dots i { width: 4px; height: 4px; }
  .levels { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 70%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scroll-padding-inline: var(--pad); }
  .levels::-webkit-scrollbar { display: none; }
  .level { scroll-snap-align: start; }
  .foot-row { flex-direction: column; }
  .hero .actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
