/* Cozy Campers · Aurora Explorer campaign page.
   Night sections are deep navy; light sections use Cozy's cream and brown. */

/* Self-hosted latin subsets (SIL Open Font License, assets/fonts/*-OFL.txt):
   the first screen needs no third-party connection before it can paint. */
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("../assets/fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/dm-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/dm-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --night: #04070f;
  --night-2: #0a1222;
  --ink: #f2f4f8;
  --ink-dim: rgba(242, 244, 248, 0.68);
  --line: rgba(242, 244, 248, 0.14);
  --aurora: #5bff9c;
  --violet: #8a5cff;
  --orange: #eb6202;
  --orange-hi: #ff7a1a;
  --cream: #f2f1ed;
  --brown: #52453b;
  --grey: #4a4a4a;
  --gutter: clamp(16px, 4vw, 56px);
  --display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 400 clamp(16px, 1.05vw, 18px) / 1.55 var(--display);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

.mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--orange); color: #fff; padding: 8px 14px; border-radius: 4px;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--aurora); outline-offset: 3px; }

/* GSAP's from() tweens hide elements only once the script runs, so without
   this the first paint shows them, they vanish, then animate back in. Each
   is hidden until main.js has set its start state and removes .is-loading. */
@media (prefers-reduced-motion: no-preference) {
  .is-loading .hero__top, .is-loading .hero__copy, .is-loading .split,
  .is-loading .section-head > p, .is-loading .specs__list, .is-loading .steps,
  .is-loading .kit, .is-loading .safety__hours, .is-loading .cta__inner {
    visibility: hidden;
  }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--orange); color: #fff;
  font: 700 0.85rem/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; padding: 1.05em 1.8em; border-radius: 2px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--orange-hi); transform: translateY(-1px); }
.btn--small { padding: 0.8em 1.2em; font-size: 0.72rem; }
.btn--big { font-size: 1rem; padding: 1.2em 2.6em; }
.link { color: var(--ink); text-underline-offset: 0.3em; text-decoration-color: var(--orange); }

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: linear-gradient(180deg, rgba(4, 7, 15, 0.82), rgba(4, 7, 15, 0));
  transition: color 0.4s ease;
}
.nav__brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.nav__logo {
  display: grid; place-items: center; width: 54px; height: 40px;
  background: var(--cream); border-radius: 8px;
}
.nav__logo img { width: 40px; height: auto; }
.nav__chapter { font: 500 0.74rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); }
.nav__chapter b { color: var(--ink); font-weight: 500; margin-right: 6px; }
.nav__links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
.nav__links a:not(.btn) {
  font: 500 0.74rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
}
.nav__links a:not(.btn):hover { color: var(--aurora); }
body.is-light .nav { color: var(--brown); background: linear-gradient(180deg, rgba(242, 241, 237, 0.9), rgba(242, 241, 237, 0)); }
body.is-light .nav__links a:not(.btn), body.is-light .nav__chapter b { color: var(--brown); }
body.is-light .nav__chapter { color: rgba(82, 69, 59, 0.7); }

/* --------------------------------------------------------------- hero */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr; align-items: end;
  padding: 92px var(--gutter) clamp(28px, 6vh, 64px);
  background: var(--night);
}
.hero__stage, .hero__poster, .hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__poster { object-fit: cover; }
.hero__canvas { opacity: 0; transition: opacity 0.8s ease; }
.hero__stage.is-live .hero__canvas { opacity: 1; }
/* Keeps the nav and the headline legible over the photograph. */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  /* Darkest behind the copy on the left; the van on the right stays lit. */
  background:
    linear-gradient(180deg, rgba(4, 7, 15, 0.55) 0%, rgba(4, 7, 15, 0) 22%),
    linear-gradient(90deg, rgba(4, 7, 15, 0.7) 0%, rgba(4, 7, 15, 0.35) 42%, rgba(4, 7, 15, 0) 66%),
    linear-gradient(0deg, rgba(4, 7, 15, 0.62) 0%, rgba(4, 7, 15, 0) 36%);
}
.hero__top, .hero__copy, .hero__scroll { position: relative; z-index: 1; }
.hero__top {
  align-self: start; display: flex; justify-content: space-between; gap: 16px;
  padding-top: 14px; border-top: 1px solid var(--line);
  font: 500 0.74rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim);
}
.hero__copy { display: grid; gap: clamp(16px, 2.2vh, 26px); max-width: min(60rem, 100%); }
.hero__title {
  font: 900 clamp(2.6rem, 6.6vw, 7rem) / 0.95 var(--display);
  letter-spacing: -0.035em; text-wrap: balance;
  text-shadow: 0 2px 30px rgba(4, 7, 15, 0.5);
}
.hero__lede { max-width: 34rem; font-size: clamp(1.02rem, 1.25vw, 1.2rem); color: var(--ink); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.hero__scroll {
  position: absolute; right: var(--gutter); bottom: clamp(28px, 6vh, 64px);
  writing-mode: vertical-rl; padding-left: 14px; border-left: 1px solid var(--line); color: var(--ink);
}

/* --------------------------------------------------------------- film */
.film { position: relative; background: var(--night); }
.film__pin {
  position: relative; height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
  padding: 88px var(--gutter) 40px;
}
.film__beats { position: relative; height: 100%; display: flex; align-items: center; }
/* Centred with auto margins, not a transform, because GSAP animates y. */
.beat {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0; margin: auto 0; height: fit-content;
  max-width: 34rem; display: grid; gap: 18px;
  opacity: 0; visibility: hidden;
}
.beat h2 { font: 800 clamp(2rem, 3.6vw, 3.6rem) / 1.04 var(--display); letter-spacing: -0.025em; }
.beat p { color: var(--ink-dim); font-size: clamp(1rem, 1.2vw, 1.15rem); max-width: 28rem; }
.film__steps { position: absolute; left: 0; bottom: 6px; display: flex; gap: 6px; }
.film__steps i { display: block; width: 28px; height: 3px; border-radius: 2px; background: var(--line); transition: background 0.3s ease, width 0.3s ease; }
.film__steps i.is-on { background: var(--aurora); width: 46px; }
.film__stage { position: relative; height: 100%; display: grid; place-items: center; perspective: 1400px; }
.film__window {
  position: relative; height: min(78svh, 860px); aspect-ratio: 9 / 15; max-width: 100%;
  border-radius: 28px; overflow: hidden;
  background: #02040a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 40px 120px -20px rgba(91, 255, 156, 0.28), 0 20px 60px rgba(0, 0, 0, 0.6);
  transform-style: preserve-3d;
}
.film__poster, .film__canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film__canvas { opacity: 0; transition: opacity 0.6s ease; }
.film__window.is-live .film__canvas { opacity: 1; }
.film__bloom {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: radial-gradient(circle at 50% 42%, #fff7ec 0%, #ffddb0 45%, #ffb45e 100%);
}

/* -------------------------------------------------------------- specs */
.section-head { display: grid; gap: 16px; max-width: 46rem; margin-bottom: clamp(32px, 5vw, 64px); }
.section-head h2 { font: 800 clamp(2.2rem, 4.6vw, 4.6rem) / 1.02 var(--display); letter-spacing: -0.03em; }
.section-head p { color: var(--ink-dim); font-size: clamp(1rem, 1.2vw, 1.15rem); }

.specs {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center;
  padding: clamp(80px, 12vw, 160px) var(--gutter); background: var(--night-2);
}
.specs__media { margin: 0; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 5; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7); }
.specs__media img { width: 100%; height: 118%; object-fit: cover; object-position: 50% 62%; will-change: transform; }
.specs__body .section-head { margin-bottom: clamp(24px, 3vw, 40px); }
.specs__list { margin: 0; display: grid; }
.specs__list > div {
  display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 16px; align-items: baseline;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.specs__list > div:last-child { border-bottom: 1px solid var(--line); }
.specs__list dt { color: var(--ink-dim); }
.specs__list dd { margin: 0; font: 600 clamp(1.05rem, 1.5vw, 1.35rem) / 1.3 var(--display); color: var(--ink); }

/* --------------------------------------------------------------- hunt */
.hunt { padding: clamp(80px, 12vw, 160px) var(--gutter); background: linear-gradient(180deg, var(--night-2), var(--night)); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); }
.steps li { display: grid; gap: 12px; align-content: start; padding-top: 18px; border-top: 1px solid var(--line); }
.steps__n { color: var(--aurora); }
.steps h3 { font: 700 clamp(1.3rem, 2vw, 1.8rem) / 1.15 var(--display); }
.steps p { color: var(--ink-dim); }
.steps a { color: var(--ink); text-decoration-color: var(--aurora); text-underline-offset: 0.25em; }

/* ------------------------------------------------------------- safety */
.safety { padding: clamp(80px, 12vw, 160px) var(--gutter); background: var(--cream); color: var(--brown); }
.safety .mono { color: rgba(82, 69, 59, 0.7); }
.safety .section-head p { color: var(--grey); }
.kit { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.kit li {
  display: grid; gap: 18px; justify-items: start; padding: clamp(20px, 2.4vw, 32px);
  background: #fff; border-radius: 14px; box-shadow: 0 1px 0 rgba(82, 69, 59, 0.08), 0 18px 40px -24px rgba(82, 69, 59, 0.35);
}
.kit svg { width: 46px; height: 46px; fill: none; stroke: var(--orange); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.kit h3 { font: 700 1.15rem/1.2 var(--display); color: var(--brown); }
.safety__hours { margin-top: clamp(28px, 4vw, 48px); font-family: var(--mono); font-size: 0.86rem; letter-spacing: 0.04em; color: var(--grey); }

/* ---------------------------------------------------------------- cta */
.cta {
  position: relative; overflow: hidden; min-height: 80svh; display: grid; place-items: center;
  padding: clamp(80px, 10vw, 140px) var(--gutter); text-align: center;
  background: var(--night);
}
/* A quiet aurora glow drifting along the top edge; nothing else moves. */
.cta__glow {
  position: absolute; inset: -20% -10% auto; height: 70%; pointer-events: none; filter: blur(40px);
  background:
    radial-gradient(40% 55% at 30% 40%, rgba(91, 255, 156, 0.2), transparent 70%),
    radial-gradient(35% 50% at 68% 35%, rgba(138, 92, 255, 0.16), transparent 70%);
  animation: glow-drift 18s ease-in-out infinite alternate;
}
@keyframes glow-drift {
  from { transform: translateX(-4%) scaleY(0.95); }
  to { transform: translateX(4%) scaleY(1.08); }
}
.cta__inner { position: relative; display: grid; gap: 22px; justify-items: center; max-width: 52rem; }
.cta__logo { width: 72px; padding: 8px 10px; background: var(--cream); border-radius: 10px; box-sizing: content-box; }
.cta h2 { font: 900 clamp(2.4rem, 6vw, 5.6rem) / 1 var(--display); letter-spacing: -0.035em; }
.cta p { color: var(--ink-dim); font-size: clamp(1rem, 1.3vw, 1.2rem); }
.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 22px; margin-top: 8px; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 22px var(--gutter); border-top: 1px solid var(--line);
  font: 400 0.8rem/1.5 var(--mono); color: var(--ink-dim);
}
.foot a { text-decoration: none; color: var(--ink); }
.foot__cookies {
  padding: 0; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.3em; text-decoration-color: var(--line);
}


/* ------------------------------------------------------------- mobile */
@media (max-width: 860px) {
  .nav__links a:not(.btn) { display: none; }
  .nav__chapter span { display: none; }
  .hero__top span:last-child { display: none; }
  .hero__scroll { display: none; }
  .specs { grid-template-columns: 1fr; }
  .specs__media { aspect-ratio: 4 / 3; }
  .specs__list > div { grid-template-columns: minmax(0, 6.5rem) minmax(0, 1fr); }
  .film__pin { display: block; padding: 0; }
  .film__stage { position: absolute; inset: 0; perspective: none; }
  .film__window { height: 100%; width: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
  .film__beats {
    position: absolute; inset: auto 0 0 0; height: 46svh; z-index: 2; align-items: flex-end;
    padding: 0 var(--gutter) 70px;
    background: linear-gradient(180deg, rgba(4, 7, 15, 0) 0%, rgba(4, 7, 15, 0.86) 45%);
  }
  .beat { top: auto; bottom: 70px; margin: 0; left: var(--gutter); right: var(--gutter); }
  .film__steps { left: var(--gutter); bottom: 34px; }
  .steps, .kit { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .steps, .kit { grid-template-columns: 1fr; }
}

/* Without motion the film becomes a still and every beat is listed. */
@media (prefers-reduced-motion: reduce) {
  .film__pin { height: auto; display: grid; }
  .film__beats { height: auto; display: grid; gap: 40px; padding: 40px 0; }
  .beat { position: static; margin: 0; opacity: 1; visibility: visible; }
  .film__canvas, .film__bloom, .hero__canvas { display: none; }
  .cta__glow { animation: none; }
}
