/* The Deck Crew. Colours are the logo's: deep-sea teal hull, cream, coral flag. */
:root {
  --sea-0: oklch(0.205 0.03 207);   /* page */
  --sea-1: oklch(0.245 0.035 208);  /* raised */
  --sea-2: oklch(0.33 0.045 210);   /* porthole */
  --foam: oklch(0.82 0.11 182);     /* waves only */
  --cream: oklch(0.93 0.04 85);
  --cream-2: oklch(0.82 0.03 200);  /* secondary text on sea */
  --coral: oklch(0.69 0.15 35);
  --coral-hi: oklch(0.74 0.15 38);
  --ink: oklch(0.205 0.03 207);

  --display: "Barlow Condensed", "Bahnschrift", "Arial Narrow", sans-serif;
  --body: "Barlow", "Bahnschrift", system-ui, sans-serif;

  --r: 14px;            /* one radius for every panel */
  --pill: 999px;        /* buttons and tabs */
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --z-nav: 10;
  --z-skip: 20;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sea-0);
  color: var(--cream);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: 0.005em; text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--coral-hi); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 12px; top: -48px; z-index: var(--z-skip); background: var(--coral); color: var(--ink); padding: 8px 14px; border-radius: var(--pill); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 68px; padding: 0 var(--gutter);
  background: color-mix(in oklch, var(--sea-0) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in oklch, var(--cream) 8%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 50%; }
.brand-word { font: 700 1.3rem/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.brand-the { color: var(--coral); font-size: 0.72em; letter-spacing: 0.3em; margin-right: 0.15em; }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); }
.nav nav a { text-decoration: none; color: var(--cream-2); font-weight: 500; font-size: 0.98rem; transition: color .2s var(--ease); }
.nav nav a:hover { color: var(--cream); }
.nav nav .nav-cta { color: var(--cream); border: 1px solid color-mix(in oklch, var(--cream) 30%, transparent); padding: 7px 16px; border-radius: var(--pill); }
.nav nav .nav-cta:hover { border-color: var(--coral); color: var(--coral-hi); }
@media (max-width: 640px) {
  .nav nav a:not(.nav-cta) { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  min-height: 48px; padding: 0 26px; border-radius: var(--pill);
  font: 600 1.02rem/1 var(--body); text-decoration: none;
  transition: transform .18s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn-primary { background: var(--coral); color: var(--ink); }
.btn-primary:hover { background: var(--coral-hi); }
.btn-ghost { color: var(--cream); border: 1px solid color-mix(in oklch, var(--cream) 28%, transparent); }
.btn-ghost:hover { border-color: var(--cream); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-dark:hover { background: var(--sea-1); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center;
  gap: clamp(28px, 4vw, 64px);
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) var(--gutter) clamp(96px, 10vw, 140px);
  min-height: min(calc(100dvh - 68px), 820px);
}
.hero h1 { font-size: clamp(2.9rem, 5.6vw, 5.4rem); text-transform: uppercase; }
.lede { margin-top: 22px; max-width: 34ch; font-size: clamp(1.1rem, 1.4vw, 1.28rem); color: var(--cream-2); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-deck { margin: 0; }
.deck-video {
  width: 100%; border-radius: var(--r);
  background: #070c0e;
  box-shadow: 0 0 0 1px color-mix(in oklch, var(--cream) 10%, transparent), 0 40px 90px -30px oklch(0.1 0.03 210 / 0.9);
}
.hero-deck figcaption { margin-top: 14px; color: var(--cream-2); font-size: 0.95rem; }
.waves { position: absolute; left: 0; right: 0; bottom: 18px; width: 100%; height: 64px; pointer-events: none; }
.wave { fill: none; stroke-width: 2.5; }
.wave-a { stroke: color-mix(in oklch, var(--foam) 55%, transparent); }
.wave-b { stroke: color-mix(in oklch, var(--foam) 22%, transparent); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .lede { max-width: 46ch; }
}

/* First-load choreography: content is visible without it. */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .lede, .ctas, .hero-deck { animation: rise .9s var(--ease) both; }
  .lede { animation-delay: .08s; }
  .ctas { animation-delay: .16s; }
  .hero-deck { animation: dock 1.1s var(--ease) .1s both; }
  .wave-a { animation: drift 14s linear infinite; }
  .wave-b { animation: drift 22s linear infinite reverse; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes dock { from { opacity: 0; transform: translateY(28px) scale(0.97); filter: blur(6px); } }
@keyframes drift { to { transform: translateX(-720px); } }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Brand film: the 16:9 cut on wide screens, the 9:16 cut on phones; the hidden one never loads (preload none). */
.film { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(16px, 3vw, 40px) var(--gutter) clamp(48px, 6vw, 80px); }
.film video { width: 100%; border-radius: var(--r); background: #070c0e; box-shadow: 0 0 0 1px color-mix(in oklch, var(--cream) 10%, transparent); }
.film-tall { display: none; max-width: 420px; margin: 0 auto; }
@media (max-width: 700px) and (orientation: portrait) {
  .film-wide { display: none; }
  .film-tall { display: block; }
}

/* Works with */
.works-with {
  max-width: 72ch; margin: 0 auto; padding: 0 var(--gutter) clamp(24px, 4vw, 48px);
  text-align: center; color: var(--cream-2); font-size: 1.05rem;
}
.works-with strong { color: var(--cream); font-weight: 600; }

/* Keys */
.keys {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); align-items: center;
  gap: clamp(32px, 5vw, 80px);
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) var(--gutter);
}
.keys h2, .knobs h2, .looks h2, .crew h2 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); text-transform: uppercase; }
.keys-copy > p:first-of-type { margin-top: 18px; max-width: 46ch; color: var(--cream-2); }
.states { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 12px; }
.states li { display: grid; grid-template-columns: 7.5rem 1fr; align-items: baseline; gap: 14px; }
.tag { font: 600 1.15rem/1 var(--display); letter-spacing: 0.02em; }
.tag-work { color: oklch(0.78 0.15 75); }
.tag-ask { color: oklch(0.8 0.12 205); }
.tag-ok { color: oklch(0.8 0.15 70); }
.tag-done { color: oklch(0.8 0.15 150); }
.states li span:last-child { color: var(--cream-2); }
.small { color: var(--cream-2); font-size: 0.96rem; max-width: 46ch; }
.keys-art { margin: 0; }
.keys-art video { width: 100%; border-radius: var(--r); }
@media (max-width: 900px) {
  .keys { grid-template-columns: 1fr; }
  .keys-art { order: -1; }
}

/* Knobs bento */
.knobs { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(64px, 8vw, 112px) var(--gutter); }
.bento {
  margin-top: clamp(28px, 4vw, 44px);
  display: grid; gap: 16px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-areas:
    "strip strip strip strip answer answer"
    "limits limits sleep sleep sleep sleep";
}
.cell { border-radius: var(--r); overflow: hidden; background: var(--sea-1); display: flex; flex-direction: column; }
.cell h3 { font-size: 1.6rem; text-transform: uppercase; letter-spacing: 0.02em; }
.cell p { color: var(--cream-2); margin-top: 8px; max-width: 44ch; }
.cell-text { padding: 22px 24px 26px; }
.cell-strip { grid-area: strip; }
.cell-strip img { width: 100%; background: #070c0e; }
.cell-answer { grid-area: answer; padding: 24px; background: var(--coral); color: var(--ink); justify-content: space-between; }
.cell-answer p { color: color-mix(in oklch, var(--ink) 82%, var(--coral)); }
.cell-answer .cell-big { font: 700 clamp(2.4rem, 4vw, 3.4rem)/1 var(--display); color: var(--ink); margin-top: 24px; }
.cell-limits {
  grid-area: limits; padding: 24px; justify-content: flex-end; min-height: 260px;
  background:
    linear-gradient(to top, var(--sea-1) 38%, transparent),
    repeating-linear-gradient(90deg, transparent 0 18px, color-mix(in oklch, var(--foam) 9%, transparent) 18px 19px),
    linear-gradient(160deg, var(--sea-2), var(--sea-1));
}
.cell-limits .cell-limit { font: 700 clamp(2.4rem, 4vw, 3.4rem)/1 var(--display); color: var(--cream); margin-top: 22px; }
.cell-limit span { display: block; margin-top: 6px; font: 500 1rem/1.3 var(--body); color: oklch(0.8 0.14 75); }
.cell-sleep { grid-area: sleep; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.cell-sleep video { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; grid-template-areas: "strip" "answer" "limits" "sleep"; }
  .cell-sleep { grid-template-columns: 1fr; }
  .cell-limits { min-height: 0; }
}

/* Looks */
.looks { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(64px, 8vw, 112px) var(--gutter); }
.looks-head p { margin-top: 14px; max-width: 52ch; color: var(--cream-2); }
.looks-stage { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.looks-controls { display: grid; gap: 22px; }
.skin-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs-break { flex-basis: 100%; margin-top: 10px; font: 600 1rem/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--coral-hi); }
.page-switch { display: inline-flex; justify-self: start; padding: 4px; gap: 4px; border-radius: var(--pill); background: var(--sea-1); }
.page-switch button {
  font: 600 0.95rem/1 var(--body); color: var(--cream-2); background: transparent; border: 0; cursor: pointer;
  min-height: 38px; padding: 0 16px; border-radius: var(--pill); transition: background-color .2s var(--ease), color .2s var(--ease);
}
.page-switch button[aria-pressed="true"] { background: var(--sea-2); color: var(--cream); }
.skin-note { margin-top: 12px; color: var(--cream-2); font-size: 0.96rem; }
@media (max-width: 900px) { .looks-stage { grid-template-columns: 1fr; } }
.skin-tabs button {
  font: 600 1rem/1 var(--body); color: var(--cream-2); background: transparent; cursor: pointer;
  min-height: 42px; padding: 0 18px; border-radius: var(--pill);
  border: 1px solid color-mix(in oklch, var(--cream) 18%, transparent);
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.skin-tabs button:hover { color: var(--cream); border-color: color-mix(in oklch, var(--cream) 40%, transparent); }
.skin-tabs button[aria-selected="true"] { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.skin-view video { width: 100%; border-radius: var(--r); background: #070c0e; transition: opacity .35s var(--ease), filter .35s var(--ease); }
.skin-view.swapping video { opacity: 0; filter: blur(8px); }
.painted { margin-top: clamp(40px, 5vw, 64px); max-width: 60ch; }
.painted h3 { font-size: clamp(1.9rem, 3vw, 2.6rem); text-transform: uppercase; }
.painted p { margin-top: 12px; color: var(--cream-2); }

/* Crew */
.crew { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(64px, 8vw, 112px) var(--gutter); }
.crew-grid { margin-top: 36px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px; }
.bundle {
  border-radius: var(--r); padding: clamp(28px, 4vw, 44px);
  background: radial-gradient(120% 90% at 0% 0%, var(--sea-2), var(--sea-1) 70%);
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
}
.bundle-name { font: 700 clamp(2.4rem, 4vw, 3.4rem)/1 var(--display); text-transform: uppercase; }
.bundle-price { color: var(--cream-2); max-width: 30ch; }
.bundle-price span { display: block; font: 700 3.2rem/1 var(--display); color: var(--coral-hi); margin-bottom: 10px; }
.bundle-save { color: var(--cream-2); font-size: 0.95rem; }
.hands { list-style: none; margin: 0; padding: 8px clamp(20px, 3vw, 32px); border-radius: var(--r); background: var(--sea-1); }
.hands li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; }
.hands li + li { border-top: 1px solid color-mix(in oklch, var(--cream) 8%, transparent); }
.role { font: 700 1.7rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.cli { color: var(--cream-2); }
.hands .hands-price { justify-content: flex-end; color: var(--coral-hi); font-weight: 600; }
.extras { margin-top: 28px; display: grid; gap: 10px; max-width: 70ch; color: var(--cream-2); }
.extras strong { color: var(--cream); }
.soon { color: var(--cream); font-weight: 500; }
@media (max-width: 900px) { .crew-grid { grid-template-columns: 1fr; } }

/* Theme Kit */
.kit { padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(72px, 9vw, 120px); }
.kit-inner {
  max-width: var(--max); margin: 0 auto; border-radius: var(--r);
  background: var(--coral); color: var(--ink);
  padding: clamp(36px, 6vw, 80px);
  display: grid; justify-items: start; gap: 18px;
}
.kit h2 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); text-transform: uppercase; }
.kit p { max-width: 52ch; font-size: 1.12rem; color: color-mix(in oklch, var(--ink) 85%, var(--coral)); }
.kit .btn { margin-top: 10px; }

/* Footer */
.foot { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 32px var(--gutter) 48px; border-top: 1px solid color-mix(in oklch, var(--cream) 8%, transparent); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.slogan { color: var(--cream-2); }
.links { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.links a { color: var(--cream-2); text-decoration: none; }
.links a:hover { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; }
.legal { margin-top: 24px; font-size: 0.85rem; color: color-mix(in oklch, var(--cream-2) 80%, var(--sea-0)); max-width: 90ch; }
@media (max-width: 640px) { .links { margin-left: 0; } }

/* Scroll reveals: visible by default, animated only where the browser drives them from scroll. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skin-view video { transition: none; }
}
