/* ==========================================================================
   Bernard — landing page
   Retro seaside zine that dresses for the weather.
   ========================================================================== */

@import url("tokens.css");

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--sand); color: var(--navy);
  font-family: var(--ui); font-size: 18px; line-height: 1.55;
  font-optical-sizing: auto; overflow-x: hidden;
}
body::after { /* paper grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { max-width: 100%; }
a { color: var(--coral-dk); }
a:hover { color: #8F2A13; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--coral-dk); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.muted { color: var(--muted); }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--navy); color: var(--foam);
  padding: 10px 16px; border-radius: 12px; font-weight: 800; text-decoration: none; transition: top .2s;
}
.skip:focus { top: 16px; }

.display { font-family: var(--display); font-weight: 400; line-height: .98; letter-spacing: -.01em; text-wrap: balance; }
.display em {
  font-style: normal; color: var(--coral-dk); padding-bottom: .1em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='12' viewBox='0 0 40 12'%3E%3Cpath d='M0 7 C5 1 15 1 20 7 S35 13 40 7' fill='none' stroke='%23E8A93B' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 0 100% / .62em .19em;
}
.eyebrow {
  margin: 0 0 14px; font-size: .82rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--coral-dk);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: currentColor; }
.eyebrow-mustard { color: var(--mustard); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2.5px solid var(--navy);
  font-weight: 800; text-decoration: none; cursor: pointer; line-height: 1.1;
  box-shadow: var(--pop-sm); transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--navy); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--navy); }
.btn-big { min-height: 60px; padding: 0 28px; font-size: 1.08rem; }
.btn-small { min-height: 44px; padding: 0 18px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-coral { background: var(--coral-dk); color: #fff; }
.btn-coral:hover { color: #fff; background: #B23315; }
.btn-navy { background: var(--navy); color: var(--foam); box-shadow: 4px 4px 0 var(--mustard); }
.btn-navy:hover { color: var(--foam); box-shadow: 6px 6px 0 var(--mustard); }
.btn-ghost { background: var(--foam); color: var(--navy); }
.btn-ghost:hover { color: var(--navy); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 78px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 var(--gutter);
  transition: background-color .3s, box-shadow .3s, height .3s;
}
.nav.is-scrolled { background: rgba(255, 253, 248, .86); backdrop-filter: blur(10px); box-shadow: 0 2px 0 rgba(29, 43, 79, .08); height: 66px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--navy); text-decoration: none; }
.brand-crab { width: 58px; display: block; }
.brand-name { font-family: var(--display); font-size: 1.9rem; line-height: 1; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { color: var(--navy); font-weight: 700; text-decoration: none; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; border-radius: 3px; background: var(--coral); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease-out); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang {
  min-width: 48px; height: 44px; border-radius: 999px; border: 2px solid var(--navy); background: transparent;
  font-weight: 800; cursor: pointer; letter-spacing: .06em;
}
.lang:hover { background: var(--foam); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; background: var(--sky);
  background-image: radial-gradient(ellipse at 80% 20%, var(--sky-2), transparent 60%);
  transition: background-color .9s ease; padding-top: 110px;
}
.hero-inner {
  position: relative; z-index: 2; max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter) 150px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 64px); align-items: center; min-height: min(86vh, 860px);
}
.weather-chip {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 8px 16px 8px 10px;
  background: rgba(255, 253, 248, .75); border: 2px solid var(--navy); border-radius: 999px;
  font-weight: 800; font-size: .95rem;
}
.wicon { width: 24px; height: 24px; color: var(--navy); }
.nw { white-space: nowrap; }
.hero h1 { font-size: clamp(3.1rem, 7.4vw, 6.6rem); }
.hero h1 em { white-space: nowrap; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.35rem); max-width: 34ch; margin: 26px 0 32px; color: var(--ink-2); }
.lede strong { color: var(--navy); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-demo { margin: 18px 0 0; font-weight: 700; }
.hero-demo a { color: var(--coral-dk); text-underline-offset: 4px; }

.weather-switch { margin-top: 38px; padding-top: 22px; border-top: 2px dashed rgba(29, 43, 79, .25); max-width: 560px; }
.ws-label { font-weight: 800; margin: 0 0 12px; }
.ws-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-buttons button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px 0 12px;
  border-radius: 999px; border: 2px solid var(--navy); background: rgba(255, 253, 248, .7);
  font-weight: 800; cursor: pointer; transition: background-color .2s, color .2s, transform .15s;
}
.ws-buttons button:hover { transform: translateY(-2px); }
.ws-buttons button svg { width: 22px; height: 22px; }
.ws-buttons button[aria-pressed="true"] { background: var(--navy); color: var(--foam); }
.ws-line { margin: 14px 0 0; min-height: 1.6em; color: var(--ink-2); font-weight: 600; }

/* weather atmosphere */
.weather-fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.sun {
  position: absolute; right: -140px; top: -140px; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, #FBE7A6 0 36%, transparent 37%),
              repeating-conic-gradient(from 0deg, rgba(255, 253, 248, .55) 0 8deg, transparent 8deg 22deg);
  opacity: 0; transform: scale(.7); transition: opacity .9s, transform .9s var(--ease-out);
  animation: spin 60s linear infinite;
}
html[data-weather="soleil"] .sun { opacity: 1; transform: scale(1); }
@keyframes spin { to { rotate: 360deg; } }
.particles i {
  position: absolute; top: -40px; left: var(--x); display: block; opacity: 0;
  animation-duration: calc(var(--base, 1s) + var(--r) * var(--spread, 1s));
  animation-delay: calc(var(--r2) * -6s); animation-timing-function: linear; animation-iteration-count: infinite;
}
html[data-weather="pluie"] .particles i {
  width: 2px; height: 30px; border-radius: 2px; opacity: .8;
  background: linear-gradient(transparent, rgba(255, 253, 248, .95));
  --base: .7s; --spread: .6s; animation-name: rain;
}
html[data-weather="neige"] .particles i {
  width: calc(6px + var(--r) * 6px); height: calc(6px + var(--r) * 6px); border-radius: 50%; opacity: .95;
  background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .8);
  --base: 6s; --spread: 6s; animation-name: snow;
}
html[data-weather="misaison"] .particles i {
  width: 16px; height: 10px; border-radius: 0 100% 0 100%; opacity: .9; background: var(--mustard);
  --base: 7s; --spread: 5s; animation-name: leaf;
}
html[data-weather="misaison"] .particles i:nth-child(3n) { background: var(--coral); }
html[data-weather="misaison"] .particles i:nth-child(3n+1) { background: #B38B63; }
html[data-weather="soleil"] .particles i { display: none; }
@keyframes rain { from { transform: translate(0, 0) rotate(14deg); } to { transform: translate(-140px, 1100px) rotate(14deg); } }
@keyframes snow {
  0% { transform: translate(0, 0); } 25% { transform: translate(18px, 260px); } 50% { transform: translate(-12px, 520px); }
  75% { transform: translate(14px, 780px); } 100% { transform: translate(-6px, 1040px); }
}
@keyframes leaf {
  0% { transform: translate(0, 0) rotate(0); } 33% { transform: translate(-60px, 340px) rotate(160deg); }
  66% { transform: translate(40px, 700px) rotate(300deg); } 100% { transform: translate(-30px, 1060px) rotate(460deg); }
}

/* the clothes rack */
.rack { position: relative; width: 100%; max-width: 600px; aspect-ratio: 600 / 560; justify-self: center; }
.rack-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.rack-items { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.hanger {
  position: absolute; top: 8.6%; left: calc(var(--x) - 11%); width: 22%; transform-origin: 50% 4%;
  animation: swing 3.4s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -.85s);
}
@keyframes swing { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }
.hook { display: block; width: 100%; height: auto; }
.hanger .garment { display: block; width: 100%; height: auto; margin-top: -21%; filter: drop-shadow(0 10px 8px rgba(29, 43, 79, .14)); }
.hanger.is-new .garment { animation: drop-in .7s var(--ease-bounce); }
@keyframes drop-in { from { transform: translateY(-38%) scale(.7); opacity: 0; } }
.tag {
  position: absolute; top: 58%; right: -14%; z-index: 2; padding: 3px 9px 3px 16px;
  background: var(--foam); border: 2px solid var(--navy); border-radius: 6px 10px 10px 6px;
  font-size: clamp(.62rem, 1.05vw, .82rem); font-weight: 700; white-space: nowrap; transform: rotate(9deg);
  box-shadow: 2px 3px 0 rgba(29, 43, 79, .18);
}
.tag::before { /* eyelet */
  content: ""; position: absolute; left: 5px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%; border: 1.5px solid var(--navy); background: var(--sky);
}
.tag b { font-family: var(--display); font-weight: 400; font-size: 1.15em; }
.rack-crab { position: absolute; left: 29%; bottom: 5%; width: 40%; }

/* ---------- Crab ---------- */
.crab { display: block; width: 100%; height: auto; overflow: visible; }
.crab .shell { display: none; }
html[data-weather="soleil"]   .crab .shell[data-shell="paille"],
html[data-weather="pluie"]    .crab .shell[data-shell="cire"],
html[data-weather="neige"]    .crab .shell[data-shell="tuque"],
html[data-weather="misaison"] .crab .shell[data-shell="mariniere"] {
  display: inline; transform-box: fill-box; transform-origin: 50% 100%; animation: shell-pop .7s var(--ease-bounce);
}
@keyframes shell-pop { from { transform: translateY(-35%) scale(.55); opacity: 0; } }
.crab-eyeballs { transform-box: fill-box; transform-origin: 50% 50%; animation: blink 5.5s infinite; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
.crab-pupil { animation: look 7s ease-in-out infinite; }
@keyframes look { 0%, 40%, 100% { transform: translate(0, 0); } 50%, 60% { transform: translate(-3px, 1px); } 70%, 80% { transform: translate(2px, -1px); } }
.crab-claw { transform-box: view-box; transform-origin: 176px 120px; animation: wave 4s ease-in-out infinite; }
@keyframes wave { 0%, 55%, 100% { transform: rotate(0); } 65% { transform: rotate(-18deg); } 75% { transform: rotate(6deg); } 85% { transform: rotate(-12deg); } }
.rack-crab .crab, .waitlist-crab .crab { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }

/* ---------- Awning ---------- */
.awning {
  position: relative; z-index: 3; height: 56px;
  background:
    radial-gradient(circle at 24px 0, var(--coral) 23.5px, transparent 24.5px) 0 32px / 96px 24px repeat-x,
    radial-gradient(circle at 24px 0, var(--foam) 23.5px, transparent 24.5px) 48px 32px / 96px 24px repeat-x,
    repeating-linear-gradient(90deg, var(--coral) 0 48px, var(--foam) 48px 96px) 0 0 / 100% 32px no-repeat;
  filter: drop-shadow(0 4px 0 rgba(29, 43, 79, .12));
}
.hero .awning { position: absolute; left: 0; right: 0; bottom: 0; }
.awning-top { position: absolute; top: 0; left: 0; right: 0; }

/* ---------- Marquee ---------- */
.marquee { background: var(--navy); color: var(--foam); overflow: hidden; border-block: 6px double var(--foam); }
.marquee-track { display: flex; align-items: center; gap: 28px; width: max-content; padding: 16px 0; animation: marquee 38s linear infinite; }
.marquee span { font-family: var(--display); font-size: clamp(1.4rem, 2.6vw, 2.1rem); white-space: nowrap; }
.marquee i { width: 22px; height: 22px; border-radius: 50%; background: var(--mustard); border: 3px solid var(--foam); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(84px, 11vw, 150px) var(--gutter); }
.section > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: clamp(36px, 5vw, 64px); }
.section h2 { font-size: clamp(2.5rem, 5.4vw, 4.6rem); }

/* how */
.how { background: var(--foam); }
.steps { list-style: none; padding: 0; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.step {
  position: relative; padding: 26px 26px 30px; background: var(--sand); border: 2.5px solid var(--navy);
  border-radius: var(--r-lg); box-shadow: var(--pop); transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.step:hover { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: 9px 9px 0 var(--navy); }
.step-num {
  position: absolute; top: -22px; left: 22px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  background: var(--mustard); border: 2.5px solid var(--navy); font-family: var(--display); font-size: 1.6rem;
}
.step-art { height: 210px; border-radius: 22px; display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 22px; position: relative; overflow: hidden; }
.step-art .garment { width: 150px; height: auto; transition: transform .4s var(--ease-bounce); }
.step:hover .step-art .garment { transform: rotate(-5deg) scale(1.04); }
.step-art .garment-2 { width: 108px; margin-left: -34px; margin-top: 50px; }
.art-mint { background: var(--mint); }
.art-sun { background: #F6D98B; }
.art-sky { background: #CFE0EE; }
.photo-corners::before, .photo-corners::after {
  content: ""; position: absolute; width: 34px; height: 34px; border: 4px solid var(--navy);
}
.photo-corners::before { top: 18px; left: 18px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.photo-corners::after { bottom: 18px; right: 18px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.coin { width: 36px; height: 36px; flex: none; }
.coin-big { width: 118px; height: 118px; animation: coin 3s ease-in-out infinite; }
@keyframes coin { 50% { transform: rotateY(180deg); } }
.plus { font-family: var(--display); font-size: 3.6rem; }
.step h3 { font-family: var(--display); font-weight: 400; font-size: 2rem; margin-bottom: 8px; }
.step p { margin: 0; color: var(--ink-2); }

/* calculator */
.calc { background: var(--sand); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.calc > * { margin: 0; }
.calc-intro h2 { margin-bottom: 30px; }
.calc-intro p { max-width: 38ch; font-size: 1.12rem; }
.calc-card {
  background: var(--foam); border: 2.5px solid var(--navy); border-radius: var(--r-lg); box-shadow: 10px 10px 0 var(--navy);
  padding: clamp(22px, 3vw, 36px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 20px 28px;
}
.chips { border: 0; margin: 0; padding: 0; grid-column: 1; min-width: 0; }
.chips legend, .month label { font-weight: 800; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; padding: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row label { position: relative; cursor: pointer; }
.chip-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-row span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; border-radius: 999px;
  border: 2px solid var(--navy); background: var(--foam); font-weight: 700; font-size: .95rem; transition: background-color .15s, color .15s, transform .15s;
}
.chip-row span svg { width: 24px; height: 28px; }
.chip-row label:hover span { transform: translateY(-2px); }
.chip-row input:checked + span { background: var(--navy); color: var(--foam); }
.chip-row input:focus-visible + span { outline: 3px solid var(--coral-dk); outline-offset: 3px; }
.month { grid-column: 1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px; }
.month label { grid-column: 1 / -1; margin: 0; }
.month input { grid-column: 1 / 3; width: 100%; accent-color: var(--coral-dk); height: 28px; }
.month output { font-weight: 800; min-width: 7ch; text-align: right; }
.calc-result {
  grid-column: 2; grid-row: 1 / span 4; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; background: #F6D98B; border-radius: 24px; padding: 20px 14px; position: relative; overflow: hidden;
}
.calc-result::before { content: ""; position: absolute; inset: -40% -40% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: #FBE7A6; }
.calc-garment { position: relative; width: 70%; max-width: 190px; }
.calc-garment .garment { width: 100%; height: auto; }
.calc-garment.is-new .garment { animation: drop-in .6s var(--ease-bounce); }
.calc-value { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.calc-number { font-family: var(--display); font-size: clamp(3.4rem, 6vw, 4.8rem); line-height: 1; font-variant-numeric: tabular-nums; }
.calc-unit { font-weight: 800; font-size: 1.2rem; }
.calc-range { position: relative; margin: 6px 0 4px; font-weight: 800; }
.calc-formula { position: relative; margin: 0; font-size: .86rem; color: var(--ink-2); }

/* swap */
.swap { background: var(--foam); padding-top: clamp(120px, 13vw, 180px); }
.swap-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-rows: auto auto; gap: 26px; }
.swap-card {
  padding: 28px; border-radius: var(--r-lg); border: 2.5px solid var(--navy); box-shadow: var(--pop);
}
.card-hand { background: var(--blush); }
.card-cabane { background: var(--mint); }
.swap-icon { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--foam); border: 2.5px solid var(--navy); margin-bottom: 14px; }
.swap-icon svg { width: 32px; height: 32px; }
.swap-card h3 { font-family: var(--display); font-weight: 400; font-size: 2rem; }
.swap-lede { margin: 8px 0 14px; font-size: 1.05rem; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 34px; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .15em; width: 22px; height: 22px; border-radius: 50%;
  background: var(--mustard) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%231D2B4F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
  border: 2px solid var(--navy);
}
.swap-map { grid-column: 2; grid-row: 1 / span 2; margin: 0; align-self: center; }
.swap-map svg { width: 100%; height: auto; display: block; border-radius: var(--r-lg); border: 2.5px solid var(--navy); box-shadow: var(--pop); }
.meet-path { animation: march 1.2s linear infinite; }
@keyframes march { to { stroke-dashoffset: -26; } }
.meet-spot { transform-box: fill-box; transform-origin: center; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.25); } }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-weight: 700; font-size: .95rem; }
.map-legend > span { display: inline-flex; align-items: center; gap: 8px; }
.lg { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.lg-meet { background: var(--coral-dk); }
.lg-cab { background: var(--navy); }

/* loop */
.loop { background: var(--sand); }
.loop-track { list-style: none; padding: 0; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; position: relative; }
.loop-track::before { content: ""; position: absolute; left: 28px; right: calc((100% - 72px) / 5 - 28px); top: 27px; border-top: 3px dashed rgba(29, 43, 79, .35); }
.loop-track li { position: relative; display: flex; flex-direction: column; gap: 6px; }
.loop-n {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px;
  background: var(--foam); border: 2.5px solid var(--navy); font-family: var(--display); font-size: 1.5rem; box-shadow: var(--pop-sm);
}
.loop-track li:last-child .loop-n { background: var(--mustard); }
.loop-track b { font-family: var(--display); font-weight: 400; font-size: 1.25rem; line-height: 1.15; }
.loop-track span:last-child { color: var(--ink-2); font-size: .98rem; }
.escrow {
  display: flex; align-items: center; gap: 14px; margin-top: 44px; padding: 16px 22px; border-radius: 999px;
  background: var(--navy); color: var(--foam); font-weight: 700; max-width: 900px;
}

/* quartier race */
.race { background: var(--foam); }
.race-lede { max-width: 46ch; font-size: 1.15rem; color: var(--ink-2); margin: 18px 0 0; }
.race-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.race-map {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: clamp(74px, 8.4vw, 112px); gap: 10px;
  grid-template-areas:
    "legend legend ahun ahun away"
    "legend legend vill vill away"
    "outr   mile   ppat rose rose"
    "cdn    parc   plat hoch hoch"
    "sth    verd   river river river";
}
.tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; text-align: left;
  padding: 10px 12px; border-radius: 18px; border: 2.5px solid var(--navy); background: var(--sand); color: var(--navy);
  font: inherit; cursor: pointer; transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.tile:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--navy); }
.tile:focus-visible { outline: 3px solid var(--coral-dk); outline-offset: 3px; }
.tile[aria-pressed="true"] { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--navy); }
.tile-fill {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--p, 0) * 100%); background: var(--mustard);
  transition: height 1.4s var(--ease-out);
}
.tile-fill::before { /* the level ripples like water */
  content: ""; position: absolute; left: 0; right: 0; top: -7px; height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8' viewBox='0 0 24 8'%3E%3Cpath d='M0 4 C6 0 6 0 12 4 S18 8 24 4 V8 H0 Z' fill='%23E8A93B'/%3E%3C/svg%3E") repeat-x 0 0 / 24px 8px; animation: ripple 2.4s linear infinite;
}
@keyframes ripple { to { background-position: 24px 0; } }
.tile-name, .tile-count { position: relative; z-index: 1; }
.tile-name { font-weight: 800; font-size: .95rem; line-height: 1.1; }
.tile .short { display: none; }
.tile-count { font-family: var(--display); font-size: 1.25rem; line-height: 1; font-variant-numeric: tabular-nums; }
.tile.is-empty { border-style: dashed; background: transparent; }
.tile.is-empty .tile-fill { display: none; }
.tile.is-empty .tile-count { font-family: var(--ui); font-size: .8rem; font-weight: 700; color: var(--muted); }
.tile.is-lead .tile-fill { background: var(--coral); }
.tile.is-lead .tile-fill::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8' viewBox='0 0 24 8'%3E%3Cpath d='M0 4 C6 0 6 0 12 4 S18 8 24 4 V8 H0 Z' fill='%23E4572E'/%3E%3C/svg%3E"); }
.tile.is-lead { color: #fff; }
.race-crab { /* Bernard sits on the roof of the leading quartier */
  position: relative; z-index: 3; align-self: start; justify-self: end; width: 48px; height: auto;
  margin: -30px 6px 0 0; pointer-events: none; animation: bob 3s ease-in-out infinite;
}
.tile.is-mine { outline: 3.5px solid var(--coral-dk); outline-offset: 3px; }
.tile-park { border-radius: 46% 54% 50% 50% / 55% 45% 55% 45%; background: #B9D8C6; display: grid; place-items: center; }
.tile-river {
  border-radius: 18px 18px 40px 18px; background: #CFE0EE url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cpath d='M0 6 C10 0 10 0 20 6 S30 12 40 6' fill='none' stroke='%23FFFDF8' stroke-width='2.5' opacity='.8'/%3E%3C/svg%3E") repeat-x 0 38% / 40px 10px;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 10px 14px;
}
.tile-park span, .tile-river span { font-size: .8rem; font-style: italic; color: var(--ink-2); }
.race-legend { display: flex; flex-direction: column; justify-content: center; gap: 8px; font-size: .88rem; font-weight: 700; color: var(--ink-2); }
.race-legend > span { display: inline-flex; align-items: center; gap: 10px; }
.sw { width: 26px; height: 20px; border-radius: 7px; border: 2px solid var(--navy); flex: none; }
.sw-empty { border-style: dashed; }
.sw-growing { background: linear-gradient(to top, var(--mustard) 55%, var(--sand) 55%); }
.sw-lead { background: var(--coral); }
.race-elsewhere {
  align-self: center; justify-self: center; text-align: center; padding: 10px 12px; border-radius: 50%;
  aspect-ratio: 1; display: grid; place-items: center; background: var(--mint); font-size: .8rem; font-weight: 700; line-height: 1.2;
}
.race-elsewhere b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.4rem; }
.race-panel {
  position: sticky; top: 100px; padding: clamp(22px, 3vw, 32px); border-radius: var(--r-lg); border: 2.5px solid var(--navy);
  background: var(--sand); box-shadow: var(--pop);
}
.race-panel h3 { font-family: var(--display); font-weight: 400; font-size: 2rem; margin: 0 0 6px; }
.race-panel p { margin: 0 0 12px; color: var(--ink-2); }
.race-panel .btn { margin-top: 8px; }
.race-panel-hint { font-weight: 700; }
.panel-count { font-weight: 700; }
.panel-count b { font-family: var(--display); font-weight: 400; font-size: 2.6rem; color: var(--navy); }
.bar { height: 14px; border-radius: 999px; border: 2px solid var(--navy); background: var(--foam); overflow: hidden; margin: 4px 0 12px; }
.bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); min-width: 6px; background: var(--mustard); border-radius: 999px; transition: width 1s var(--ease-out); }
.success-progress { margin: 6px 0 14px; font-weight: 700; }
.success-progress .bar { background: var(--sand); }
.cabane-link { display: inline-block; margin-top: 18px; font-weight: 800; color: var(--navy); }

/* waitlist */
.waitlist { background: var(--navy); color: var(--foam); padding: clamp(84px, 11vw, 150px) var(--gutter); position: relative; overflow: hidden; }
.waitlist::before {
  content: ""; position: absolute; inset: auto -10% -60% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: var(--navy-2);
}
.waitlist-inner { position: relative; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 90px); align-items: center; }
.waitlist-crab { width: 170px; margin-bottom: 18px; }
.waitlist h2 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); color: var(--foam); }
.waitlist-copy p { font-size: 1.15rem; color: #C9CFDD; max-width: 38ch; margin-top: 20px; }
.count { font-family: var(--display); font-size: 1.5rem; color: var(--mustard) !important; }
.form-card {
  background: var(--foam); color: var(--navy); border-radius: var(--r-lg); padding: clamp(24px, 3.4vw, 40px);
  border: 2.5px solid var(--foam); box-shadow: 12px 12px 0 var(--mustard);
}
.field { display: grid; gap: 8px; margin-bottom: 18px; font-weight: 800; }
.field input, .field select {
  height: 58px; padding: 0 18px; border-radius: 16px; border: 2.5px solid var(--navy); background: var(--foam);
  font-weight: 600; font-size: 1.05rem; width: 100%;
}
.field select {
  appearance: none; padding-right: 48px; cursor: pointer;
  background: var(--foam) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%231D2B4F' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 16px center / 20px no-repeat;
}
.field input:focus, .field select:focus { outline: none; box-shadow: 0 0 0 4px rgba(192, 57, 27, .35); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--coral-dk); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; margin: 6px 0 22px; font-size: .95rem; color: var(--ink-2); }
.consent input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--coral-dk); cursor: pointer; }
.form-msg { min-height: 1.4em; margin: 14px 0 0; font-weight: 700; color: var(--coral-dk); }
.btn[disabled] { opacity: .7; cursor: progress; }
.success { text-align: left; }
.success:focus { outline: none; }
.success-badge {
  display: inline-block; padding: 8px 18px; border-radius: 12px; background: var(--mustard); border: 2.5px solid var(--navy);
  font-family: var(--display); font-size: 1.6rem; transform: rotate(-3deg); box-shadow: var(--pop-sm); margin-bottom: 18px;
  animation: stamp .6s var(--ease-bounce);
}
@keyframes stamp { from { transform: scale(1.6) rotate(-12deg); opacity: 0; } }
.success-rank { font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; }
.success-rank b { color: var(--coral-dk); font-weight: 400; }
.share { display: flex; gap: 10px; margin-top: 8px; }
.share input { flex: 1; min-width: 0; height: 52px; border-radius: 14px; border: 2px solid var(--navy); padding: 0 14px; background: var(--sand); font-weight: 700; }

/* footer */
.footer { background: var(--sand); padding: 36px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 36px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .brand-crab { width: 52px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--navy); font-weight: 700; }
.footer-note { width: 100%; margin: 0; font-size: .9rem; }

/* ---------- Cabane page ---------- */
.cab-hero { position: relative; background: var(--sand); background-image: radial-gradient(ellipse at 85% 10%, #FBE7A6, transparent 55%); padding: 120px var(--gutter) clamp(60px, 8vw, 110px); }
.cab-hero-inner { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.cab-hero h1 { font-size: clamp(2.8rem, 6vw, 5.2rem); }
.cab-hero .lede { max-width: 42ch; }
.cab-free { display: flex; align-items: center; gap: 12px; margin: 28px 0 0; font-weight: 800; color: var(--navy); }
.storefront { width: 100%; max-width: 560px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.storefront-crab { animation: bob 3s ease-in-out infinite; transform-box: fill-box; }
.cab-how { background: var(--foam); }
.cab-steps { list-style: none; padding: 0; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.cab-steps li { padding: 26px; border-radius: var(--r-lg); border: 2.5px solid var(--navy); background: var(--sand); box-shadow: var(--pop); }
.cab-steps h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; line-height: 1.1; margin: 14px 0 8px; }
.cab-steps p { margin: 0; color: var(--ink-2); }
.cab-why { background: var(--sand); }
.cab-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.cab-card { padding: 24px; border-radius: 24px; border: 2.5px solid var(--navy); box-shadow: var(--pop); }
.cab-card h3 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; margin: 0 0 8px; }
.cab-card p { margin: 0; color: var(--ink-2); }
.card-mint { background: var(--mint); }
.card-sky { background: #DCE8F2; }
.card-mustard { background: #F6D98B; }
.cab-needs {
  display: flex; align-items: flex-start; gap: 14px; margin-top: 40px; padding: 18px 24px; border-radius: 24px;
  background: var(--foam); border: 2.5px dashed var(--navy); font-size: 1.08rem;
}
.cab-needs svg { width: 30px; height: 30px; flex: none; color: var(--coral-dk); }
.cab-faq { background: var(--foam); }
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 18px; align-items: start; }
.faq details { border: 2.5px solid var(--navy); border-radius: 20px; background: var(--sand); padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 800; font-size: 1.1rem; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); font-size: 1.6rem; line-height: 1; color: var(--coral-dk); transition: transform .2s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--ink-2); }
.faq a, .cab-steps a { color: var(--coral-dk); font-weight: 700; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.field textarea {
  font: inherit; font-weight: 600; font-size: 1.05rem; padding: 14px 18px; border-radius: 16px; border: 2.5px solid var(--navy);
  background: var(--foam); color: var(--navy); resize: vertical; min-height: 96px; width: 100%;
}
.field textarea:focus { outline: none; box-shadow: 0 0 0 4px rgba(192, 57, 27, .35); }
.field textarea[aria-invalid="true"], .field input[aria-invalid="true"] { border-color: var(--coral-dk); }
.cab-form-section .success .btn { margin-top: 10px; }
.cab-form-section .waitlist-inner { align-items: start; }
.cab-form-section .waitlist-copy { position: sticky; top: 110px; }
.nav .btn { white-space: nowrap; }

/* ---------- Privacy page ---------- */
.legal-page { background: var(--foam); }
.legal-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 820px; margin: 0 auto; padding: 22px var(--gutter) 0; }
.legal-top .lang { display: inline-grid; place-items: center; color: var(--navy); text-decoration: none; }
.legal { max-width: 820px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) var(--gutter) clamp(60px, 9vw, 110px); }
.legal h1 { font-size: clamp(2.8rem, 7vw, 4.6rem); margin: 0 0 22px; }
.legal h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.45rem, 3vw, 1.8rem); margin: 44px 0 12px; }
.legal p, .legal li { max-width: 66ch; color: var(--ink-2); }
.legal ul { padding-left: 1.2em; display: grid; gap: 6px; }
.legal h3 { font-size: 1.08rem; font-weight: 800; color: var(--navy); margin: 28px 0 8px; }
.legal code { font-size: .92em; padding: 1px 6px; border-radius: 6px; background: var(--sand); color: var(--navy); overflow-wrap: anywhere; }
.legal li::marker { color: var(--coral-dk); }
.legal-lede { font-size: 1.2rem; padding: 18px 22px; border-radius: 22px; background: var(--sand); border: 2.5px solid var(--navy); box-shadow: var(--pop); }
.legal .legal-lede { color: var(--navy); }
.legal-back { margin-top: 44px; }
.legal-rule { border: 0; border-top: 3px dashed rgba(29, 43, 79, .3); margin: clamp(60px, 9vw, 100px) 0; }

.unsub { text-align: center; }
.unsub .legal-lede { margin-inline: auto; text-align: left; }
.unsub-crab { display: block; margin: 0 auto 18px; width: 140px; height: auto; animation: bob 3s ease-in-out infinite; }
.unsub-done .unsub-crab { transform: scaleX(-1); animation: none; } /* walks off */
.unsub-form { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 26px; margin-top: 34px; }
.unsub-stay { color: var(--navy); font-weight: 700; }

/* ---------- Reveal ---------- */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: calc(var(--d, 0) * 110ms); }
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .calc-card { grid-template-columns: 1fr; }
  .calc-result { grid-column: 1; grid-row: auto; }
  /* single column: the total rides along at the bottom of the screen while you tap chips */
  .calc-result {
    position: sticky; bottom: 12px; z-index: 3; display: grid; grid-template-columns: auto auto; justify-content: center;
    column-gap: 16px; text-align: left; padding: 12px 18px; border: 2.5px solid var(--navy); box-shadow: 0 10px 28px rgba(29, 43, 79, .22);
  }
  .calc-garment { grid-row: span 2; width: 70px; }
  .calc-value { margin: 0; }
  .calc-number { font-size: 2.9rem; }
  .calc-range { margin: 0; font-size: .95rem; }
  .calc-formula { grid-column: 1 / -1; margin-top: 6px; text-align: center; font-size: .8rem; }
}
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hero-inner { grid-template-columns: 1fr; min-height: 0; padding-bottom: 130px; }
  .rack { max-width: 460px; }
  .steps { grid-template-columns: 1fr; gap: 40px; max-width: 520px; }
  .calc { grid-template-columns: 1fr; }
  .swap-grid { grid-template-columns: 1fr; }
  .swap-map { grid-column: 1; grid-row: auto; }
  .loop-track { grid-template-columns: 1fr; gap: 22px; max-width: 520px; }
  .loop-track::before { left: 27px; right: auto; top: 20px; bottom: 20px; border-top: 0; border-left: 3px dashed rgba(29, 43, 79, .35); }
  .loop-track li { padding-left: 76px; min-height: 56px; }
  .loop-n { position: absolute; left: 0; top: 0; }
  .escrow { border-radius: 24px; }
  .waitlist-inner { grid-template-columns: 1fr; }
  .race-grid { grid-template-columns: 1fr; }
  .race-panel { position: static; }
  .cab-hero-inner { grid-template-columns: 1fr; }
  .cab-steps { grid-template-columns: 1fr; max-width: 560px; }
  .cab-cards { grid-template-columns: 1fr 1fr; }
  .faq { grid-template-columns: 1fr; }
  .cab-form-section .waitlist-copy { position: static; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .brand-name { font-size: 1.6rem; }
  .brand-crab { width: 48px; }
  .nav .btn-small { padding: 0 16px; font-size: .9rem; }
  .hide-sm { display: none; }
  .weather-chip { font-size: .8rem; padding-right: 12px; }
  .weather-chip .wicon { width: 20px; height: 20px; }
  .hero { padding-top: 96px; }
  .hero-ctas .btn { width: 100%; }
  .step-art { height: 180px; }
  .share { flex-direction: column; }
  .share input { flex: none; }
  .race-map { gap: 6px; grid-auto-rows: 70px; }
  .tile { padding: 6px 7px; border-radius: 12px; border-width: 2px; }
  .tile .full { display: none; }
  .tile .short { display: inline; }
  .tile-name { font-size: .7rem; }
  .tile-count { font-size: .95rem; }
  .tile.is-empty .tile-count { font-size: .64rem; }
  .race-crab { width: 32px; margin: -20px 2px 0 0; }
  .tile-name { hyphens: manual; }
  .race-legend { font-size: .7rem; gap: 5px; }
  .race-legend > span { gap: 6px; }
  .sw { width: 18px; height: 14px; }
  .race-elsewhere { font-size: .64rem; padding: 4px; }
  .race-elsewhere b { font-size: 1.05rem; }
  .tile-park span, .tile-river span { font-size: .62rem; }
  .cab-hero { padding-top: 96px; }
  .cab-cards { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .cab-free { align-items: flex-start; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .particles { display: none; }
  html.js .reveal { opacity: 1; transform: none; }
}
