/* Butanding waitlist page v2: base styles and the three palettes.
   Every colour is a custom property. Palettes: night (default), donsol, paper. */

@font-face { font-family: "Unbounded"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/unbounded-500.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 400 800; font-style: normal; font-display: swap;
  src: url("fonts/hanken-grotesk.woff2") format("woff2"); }

:root[data-palette="night"] {
  --ground: #0E1012; --text: #F1EDE4; --muted: #BDB9B0;
  --accent: #D9F24A; --accent-ink: #0E1012;
  --surface: #1A1D20; --field: #15181A; --line: #F1EDE4; --edge: #8A877F;
  --focus: #D9F24A; --you: #D9F24A; --court: #2C353C; --court-line: #CFCBC2;
}
:root[data-palette="donsol"] {
  --ground: #0A2533; --text: #F1EDE4; --muted: #B8D2DA;
  --accent: #F1EDE4; --accent-ink: #0A2533;
  --surface: #173C4F; --field: #0F3042; --line: #9CC3CF; --edge: #7FA9B6;
  --focus: #F1EDE4; --you: #F1EDE4; --court: #2C6178; --court-line: #BFD9E2;
}
:root, :root[data-palette="paper"] {
  --ground: #F1EDE4; --text: #121314; --muted: #484A4C;
  --accent: #2F6EA5; --accent-ink: #F1EDE4;
  --surface: #E5DFD1; --field: #F8F5EE; --line: #121314; --edge: #6D6C68;
  --focus: #2F6EA5; --you: #2F6EA5; --court: #C3D3E0; --court-line: #F7F4EC; --btn-bg: #121314; --btn-ink: #F1EDE4;
  --court-3d: #7d9cb9; --kitchen-3d: #98b3cb; --apron-3d: #6786a5;
}
:root[data-palette="paper"][data-you="ink"] { --you: #121314; }

:root {
  --font-display: "Unbounded", "Hanken Grotesk", system-ui, sans-serif;
  --font-text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --m: clamp(16px, 2.2vw, 32px);           /* the one outer margin */
  --bar: 72px;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  color-scheme: dark;
}
:root, :root[data-palette="paper"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--font-text);
  font-size: 1.0625rem; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, svg { display: block; max-width: 100%; }
h1, h2, p, figure, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-underline-offset: .18em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Bar ---------------------------------------------------------------------------------- */
.bar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; height: var(--bar);
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--m); }
.brand { display: block; width: 140px; line-height: 0; }
/* The lockup file has side padding and is centred in its box; object-fit crops it so the mark sits on the margin. */
.brand img { width: 140px; height: 50px; object-fit: cover; }
.on-light { display: none; }
:root[data-palette="paper"] .on-dark { display: none; }
:root[data-palette="paper"] .on-light { display: block; }


/* ---- Hero --------------------------------------------------------------------------------- */
.hero { position: relative; }
.hero-pin { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-art { position: absolute; inset: 0; z-index: 0; }
.hero-art canvas { transition: opacity .6s var(--ease-out); }
.hero.is-engaged .hero-art canvas { opacity: .55; }
.hero-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; }

.hero-copy { position: relative; z-index: 2; width: min(100%, 44rem); padding: calc(var(--bar) + 10vh) var(--m) var(--m); }
h1, h2, .btn, .brand-type { font-family: var(--font-display); font-weight: 500; }
h1 { font-size: clamp(1.6rem, 4.2vw, 4rem); line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }
.sub { margin-top: 24px; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.45; max-width: 38rem; text-wrap: balance; }

.waitlist { margin-top: 28px; width: 100%; max-width: 32rem; min-height: 9.5rem; }
.wl-row { display: flex; gap: 8px; }
.wl-row input[type="email"] { flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 16px; border-radius: 4px;
  border: 1px solid var(--edge); background: var(--field); color: var(--text); font: inherit; font-size: 1rem; }
.wl-row input[type="email"]::placeholder { color: var(--muted); opacity: 1; }
.wl-row input[aria-invalid="true"] { border-color: var(--text); border-width: 2px; }
.btn { flex: 0 0 auto; height: 52px; padding: 0 22px; border: 0; border-radius: 4px; cursor: pointer;
  background: var(--btn-bg, var(--accent)); color: var(--btn-ink, var(--accent-ink)); font-size: .9375rem; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .14s var(--ease-out), opacity .18s ease; }
.btn:hover { opacity: .9; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-quiet { background: var(--surface); color: var(--text); height: 44px; padding: 0 18px; }
:root[data-palette="paper"] .btn-quiet { background: var(--text); color: var(--ground); }

.chk { display: flex; align-items: center; gap: 12px; margin-top: 14px; min-height: 44px; cursor: pointer; font-size: 1rem; }
.chk input { appearance: none; flex: 0 0 auto; width: 22px; height: 22px; margin: 0; border: 1px solid var(--edge);
  background: var(--field); border-radius: 4px; display: grid; place-content: center; cursor: pointer; }
.chk input::after { content: ""; width: 12px; height: 12px; transform: scale(.9); opacity: 0; background: var(--accent);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%); transition: transform .14s var(--ease-out), opacity .14s ease; }
:root[data-palette="paper"] .chk input::after { background: var(--accent); }
.chk input:checked::after { transform: scale(1); opacity: 1; }
.chk input[type="radio"] { border-radius: 50%; }
.chk input[type="radio"]::after { width: 10px; height: 10px; border-radius: 50%; clip-path: none; }
.chk input:checked { border-color: var(--accent); }
.wl-fine { margin-top: 8px; font-size: 1rem; color: var(--muted); max-width: 30rem; }
.wl-fine a { color: var(--text); }

.wl-err { margin-top: 10px; font-size: 1rem; font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.wl-err[hidden], .wl-done[hidden], .wl[hidden], .wl-extra[hidden], .wl-saved[hidden] { display: none; }
.wl-retry { background: none; border: 0; padding: 0; min-height: 44px; cursor: pointer; text-decoration: underline; font-weight: 600; }

.wl-ok { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.15rem, 1.9vw, 1.5rem); line-height: 1.2; letter-spacing: -.02em; }
.wl-extra { margin-top: 18px; display: grid; gap: 4px; justify-items: start; }
.wl-extra .chk { margin-top: 4px; }
.wl-extra .field { display: grid; gap: 6px; width: 100%; max-width: 24rem; }
.wl-extra label[for] { font-weight: 600; }
.wl-extra input[type="text"] { height: 48px; padding: 0 14px; border: 1px solid var(--edge); border-radius: 4px; background: var(--field); color: var(--text); font: inherit; }
.wl-extra .btn-quiet { margin-top: 10px; }
.wl-saved { margin-top: 14px; font-size: 1.0625rem; }

/* ---- Clips -------------------------------------------------------------------------------- */
.clips { background: var(--surface); padding: clamp(72px, 10vw, 160px) 0 clamp(72px, 9vw, 140px); }
.clips-head { display: block; padding: 0 var(--m); margin-bottom: clamp(28px, 4vw, 56px); }
h2 { font-size: clamp(1.6rem, 4vw, 3.4rem); line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; max-width: 16ch; }
.car-ctl { display: flex; gap: 8px; margin-top: 20px; }
.car-ctl .btn { height: 48px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; }
.car-ctl .btn:disabled { opacity: .35; cursor: default; }
.car { position: relative; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 var(--m); scroll-padding-inline: var(--m); overscroll-behavior-x: contain; }
.car::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 calc((100vw - 2 * var(--m) - 32px) / 1.6); max-width: 560px; scroll-snap-align: start; }
@media (min-width: 1100px) { .slide { flex-basis: clamp(420px, 38vw, 560px); } }
.frame { position: relative; aspect-ratio: 16 / 9; border-radius: 4px; background: var(--ground); overflow: hidden; cursor: pointer; }
.frame video { width: 100%; height: 100%; object-fit: cover; }
.slide figcaption { margin-top: 14px; font-size: 1.125rem; font-weight: 600; line-height: 1.3; }

/* ---- Footer ------------------------------------------------------------------------------- */
.foot { padding: clamp(56px, 6vw, 96px) var(--m) 28px; }
.foot-lockup { overflow: hidden; line-height: 0; }
.foot-lockup img { width: 100%; height: auto; aspect-ratio: 837 / 300; object-fit: cover; }
.foot-row { margin-top: clamp(40px, 6vw, 88px); display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; align-items: center; }
.foot-row ul { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.foot-row a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-legal { font-size: .9375rem; color: var(--muted); }

/* ---- Phone / tablet ------------------------------------------------------------------------ */
@media (max-width: 899px) {
  /* The graphic is a band across the top of the first screen; the copy and form sit below it. */
  :root { --art-h: max(42svh, 300px); }
  .hero-art { bottom: auto; height: var(--art-h); }
  .hero-copy { padding-top: var(--art-h); }
  .hero-still { object-position: center; }
  .clips-head { display: block; }
  .car-ctl { margin-top: 20px; }
  .hero-pin { align-items: flex-start; }
  .hero-copy { width: 100%; max-width: 34rem; }
  h1 { font-size: clamp(1.7rem, 7.6vw, 2.8rem); }
  .waitlist { margin-top: 20px; }
  .sub { margin-top: 16px; }
  .still-note { display: none; }
}
@media (max-width: 599px) {
  .brand { width: 126px; }
  .brand img { width: 126px; height: 45px; }
  .btn { padding: 0 16px; }
  .slide { flex-basis: 82vw; }
  .wl-row input[type="email"] { padding: 0 12px; }
}

/* ---- Motion: load entrance for the hero copy, reveal once for the rest -------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .bar { animation: rise .7s var(--ease-out) both; }
  .hero-copy h1 { animation: rise .8s var(--ease-out) both; }
  .art-ctl { animation: rise .8s var(--ease-out) 260ms both; }
  .hero-copy .sub { animation: rise .8s var(--ease-out) 90ms both; }
  .clips-note { animation: none; }
  .hero-copy .waitlist { animation: rise .8s var(--ease-out) 180ms both; }
  .hero-video-label { animation: rise .8s var(--ease-out) 300ms both; }
  .js .rv { opacity: 0; transform: translateY(24px);
    transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--d, 0ms); }
  .js .rv.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .chk input::after, .hero-art canvas { transition: none; }
}

/* ---- Added: art note and controls, clip controls, release mode -------------------------------- */
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
.hero-copy > * { max-width: 100%; }
.art-ctl { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.art-note { font-size: 1rem; }
.clips-title { display: grid; gap: 10px; }
.clips-note { font-size: 1.0625rem; color: var(--muted); }
.clip-btn { position: absolute; right: 10px; bottom: 10px; min-width: 64px; height: 44px; padding: 0 16px; border: 0; border-radius: 4px; cursor: pointer;
  background: var(--btn-bg, var(--accent)); color: var(--btn-ink, var(--accent-ink)); font-family: var(--font-display); font-weight: 500; font-size: .8125rem; }
@media (max-width: 899px) {
  :root { --art-h: clamp(280px, 34svh, 420px); }
  .hero-pin { min-height: 0; }
}
@media (max-width: 599px) {
  .wl-row { flex-direction: column; }
  .wl-row .btn { width: 100%; }
}

.clip-label { position: absolute; left: 10px; bottom: 10px; padding: 6px 10px; border-radius: 4px; background: var(--ground); color: var(--text);
  font-size: .9375rem; font-weight: 600; line-height: 1.2; }

/* ---- Icon buttons (Lucide style, stroke 1.75): 32 px visual inside a 44 px target ------------------ */
.icon-btn { position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer;
  display: inline-grid; place-items: center; }
.icon-btn::before { content: ""; position: absolute; width: 32px; height: 32px; border-radius: 4px; background: var(--ground); }
.icon-btn svg { position: relative; }
.icon-btn:hover::before { background: var(--surface); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.clip-btn { position: absolute; right: 4px; bottom: 4px; left: auto; min-width: 0; padding: 0; }
.clip-btn::before { background: var(--ground); }
.hero-pause { position: absolute; z-index: 4; right: var(--m); bottom: 16px; }
.hero-pause::before { background: var(--surface); }
.car-ctl { gap: 0; margin-left: -6px; }
.car-ctl .icon-btn::before { background: var(--surface); }
.car-ctl .icon-btn:hover::before { background: var(--ground); }

/* ---- Hero V: video behind a flat paper panel --------------------------------------------------------- */
.hero-video-label { position: absolute; left: var(--m); bottom: 16px; padding: 6px 10px; border-radius: 4px; background: var(--ground);
  color: var(--text); font-size: .9375rem; font-weight: 600; line-height: 1.2; }
@media (min-width: 900px) {
  .hero.is-video .hero-pin { justify-content: flex-end; }
  .hero.is-video .hero-copy { align-self: stretch; background: var(--ground); }
}
@media (max-width: 899px) {
  .hero-pause { right: var(--m); bottom: auto; top: calc(var(--art-h) - 52px); }
  /* On the stacked layout the video band sits above the H1, so a label at its foot reads as an eyebrow.
     It goes to the top of the band, under the bar, well away from the headline. */
  .hero-video-label { bottom: auto; top: calc(var(--bar) + 8px); left: auto; right: var(--m); }
}
.video-hero .brand { box-sizing: content-box; background: var(--ground); padding: 4px 10px; margin-left: -10px; border-radius: 4px; }
@media (max-width: 899px) { .hero.is-video .hero-copy { padding-top: calc(var(--art-h) + 20px); } }

/* ---- Hero 3D: a pinned stage, 160svh tall in all; the camera eases overhead as it scrolls ------------- */
.hero.is-3d::after { content: ""; display: block; height: 60svh; }
.hero.is-3d .hero-pin { position: sticky; top: var(--pin-top, 0px); overflow: clip; }
.hero.is-3d .hero-art canvas, .hero.is-3d.is-engaged .hero-art canvas { opacity: 0; transition: opacity .6s var(--ease-out); }
.hero.is-3d .hero-art canvas.is-ready { opacity: 1; }
.hero-art .h3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-still { transition: opacity .6s var(--ease-out); }
.hero-still.is-covered { opacity: 0; }
.h3d-layer { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.h3d-you { position: absolute; left: 0; top: 0; padding: 2px 7px; border-radius: 4px; background: var(--you); color: var(--ground);
  font-size: .875rem; font-weight: 700; line-height: 1.3; white-space: nowrap; will-change: transform; }
.h3d-card { position: absolute; display: grid; gap: 2px; padding: 12px 16px; border-radius: 4px; background: var(--text); color: var(--ground);
  font-size: .9375rem; line-height: 1.3; white-space: nowrap; opacity: 0; transform: translate(var(--h3d-shift, 0px), 12px);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }
.h3d-card strong { font-size: 1.0625rem; font-weight: 700; }
.h3d-card.is-shown { opacity: 1; transform: translate(var(--h3d-shift, 0px), 0); }
/* Wide screens: the picture owns the right 58% of the stage, so nothing in it can sit behind the copy. */
@media (min-width: 1280px) { .hero.is-3d .hero-art { left: 42%; } }
@media (max-width: 1279px) {
  /* The stage is a band above the copy on tablets and phones. */
  .hero.is-3d { --art-h: clamp(300px, 45svh, 460px); }
  .hero.is-3d .hero-art { bottom: auto; height: var(--art-h); }
  .hero.is-3d .hero-copy { padding-top: var(--art-h); width: 100%; max-width: 34rem; }
  .hero.is-3d .hero-pin { align-items: flex-start; min-height: 100svh; }
  .hero.is-3d .hero-pause { right: var(--m); bottom: auto; top: calc(var(--art-h) - 52px); }
  .hero.is-3d h1 { font-size: clamp(1.7rem, 7.6vw, 2.8rem); }
  .hero.is-3d .waitlist { margin-top: 20px; }
  .h3d-card { display: flex; gap: 6px 14px; align-items: baseline; padding: 8px 12px; font-size: .875rem; }
  .h3d-card strong { font-size: .9375rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero.is-3d::after { display: none; }
  .hero.is-3d .hero-pin { position: relative; }
  .h3d-card { transition: none; }
}
