/* ==========================================================================
   Hack the Island — styles
   ========================================================================== */

:root {
  /* Palette pulled from the hero art */
  --c-bg: #0a1611;            /* deep jungle night */
  --c-bg-2: #0f2119;          /* raised jungle */
  --c-bg-3: #132a20;
  --c-line: rgba(232, 180, 74, 0.18);
  --c-gold: #e8b44a;          /* doubloon gold */
  --c-gold-2: #f6d27a;
  --c-ember: #ff8a2b;         /* campfire */
  --c-parchment: #f1dfb8;
  --c-ink: #3a2614;           /* ink on parchment */
  --c-moon: #8fd0cf;          /* moonlit sky */
  --c-text: #e9e4d4;
  --c-muted: #a8b3a6;

  --f-display: "Pirata One", "IM Fell English", Georgia, serif;
  --f-serif: "IM Fell English", Georgia, serif;
  --f-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-ui: "Poppins", var(--f-sans);   /* nav + hero, per the design reference */
  --c-register: #f7d64a;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --container: 1180px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: var(--c-gold); text-decoration: none; }
a:hover { color: var(--c-gold-2); }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-weight: 400; }
p { margin: 0 0 1em; }

:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.container--narrow { max-width: 820px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--c-gold);
  color: var(--c-bg);
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-pad-y: 0.8em;
  --btn-pad-x: 1.4em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 600 1rem/1 var(--f-sans);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background-color 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--gold {
  background: linear-gradient(180deg, var(--c-gold-2), var(--c-gold) 55%, #c98f2a);
  color: #241505;
  box-shadow: 0 8px 24px -8px rgba(232, 180, 74, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn--gold:hover {
  color: #241505;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -10px rgba(255, 170, 60, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn--ghost {
  background: rgba(10, 22, 17, 0.35);
  color: var(--c-parchment);
  border-color: rgba(241, 223, 184, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  color: var(--c-bg);
  background: var(--c-parchment);
  border-color: var(--c-parchment);
  transform: translateY(-2px);
}

.btn--lg { font-size: 1.075rem; --btn-pad-y: 1em; --btn-pad-x: 1.7em; }
.btn--small { font-size: 0.9rem; --btn-pad-y: 0.6em; --btn-pad-x: 1.1em; }
.btn--block { width: 100%; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  padding-top: 12px;
  pointer-events: none;            /* only the capsule itself is clickable */
}
/* floating frosted-glass capsule */
.nav__inner {
  pointer-events: auto;
  height: 56px;
  width: calc(100% - 32px);
  max-width: 1180px;
  margin-inline: auto;
  padding: 0 6px 0 24px;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 36px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05)), rgba(12, 28, 22, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
          backdrop-filter: blur(16px) saturate(160%);
  transition: background-color 0.35s, box-shadow 0.35s;
}
.nav.is-scrolled .nav__inner {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)), rgba(10, 22, 17, 0.55);
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
  transition: opacity 0.2s;
}
.nav__brand:hover { opacity: 0.85; }
.nav__logo { height: 32px; width: auto; }   /* 76px source → ≤0.5× on 1× screens, ~1× on retina */

.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
}
.nav__menu a {
  position: relative;
  font: 500 1rem/1 var(--f-ui);
  color: #f3f1ea;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.nav__menu a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -7px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-register);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__menu a:hover,
.nav__menu a.is-active { color: #fff; }
.nav__menu a:hover::after,
.nav__menu a.is-active::after { transform: scaleX(1); }

/* "register" sits on the leaf cluster, hanging into the top-right corner */
.nav__register {
  --leaf: 170px;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 118px;
  height: 100%;
  border-radius: 999px;
  font: 700 1.2rem/1 var(--f-ui);
  color: var(--c-register);
  text-shadow: 0 1px 0 #2a3a0c, 0 2px 8px rgba(10, 25, 5, 0.75);
}
.nav__register span { position: relative; z-index: 1; }
.nav__register-leaf {
  position: absolute;
  z-index: 0;
  width: var(--leaf);
  max-width: none;
  height: auto;
  /* centre the leaf art (bbox centre ≈ 49%, 47% of the 310px canvas) behind the text */
  left: calc(50% - var(--leaf) * 0.494);
  top: calc(50% - var(--leaf) * 0.48);  /* centres the leaf cluster (bbox centre ≈ 48% down the art) on the word */
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
  transition: rotate 0.4s var(--ease), scale 0.4s var(--ease);
}
.nav__register:hover { color: #ffe680; }
.nav__register:hover .nav__register-leaf { rotate: -6deg; scale: 1.04; }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav__toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   HERO
   --------------------------------------------------------------------------
   Source art is 1533 × 688. To keep it razor sharp we:
   1. render it as an <img> with object-fit: cover (no CSS transforms/filters
      on the image itself, which force resampling and cause blur);
   2. size the hero so the image is never scaled much beyond its native size
      (height tracks the image's aspect ratio: 688/1533 ≈ 44.88vw);
   3. cap the art at 1920px wide on ultra-wide screens and feather the edges
      into the page colour instead of stretching it further.
   ========================================================================== */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  /* 44.88vw = image aspect; 862px = that height at the 1920px art cap.
     The second term makes the hero nearly fill the screen, so only a sliver
     of the About painting peeks in below it (capped so huge screens don't
     over-enlarge the art). */
  min-height: max(clamp(660px, min(44.88vw, 862px), 100svh), min(calc(100svh - 48px), 1000px));
  padding: calc(var(--nav-h) + 32px) 0 calc(var(--seam, 96px) + 16px);
  overflow: hidden;
  background: var(--c-bg);
}

.hero__media {
  position: absolute;
  top: 0; bottom: 0;
  left: 0; right: 0;
  max-width: 1920px;
  margin-inline: auto;
  z-index: 0;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 50%;
  /* keep the browser on its best-quality resampling path */
  image-rendering: auto;
  -webkit-user-drag: none;
  user-select: none;
}

.hero__embers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Readability overlays — gradients only, the image itself is untouched */
.hero__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 22, 17, 0.72) 0%, rgba(10, 22, 17, 0) 22%),
    radial-gradient(ellipse 52% 48% at 50% 46%, rgba(6, 14, 11, 0.62) 0%, rgba(6, 14, 11, 0.25) 60%, rgba(6, 14, 11, 0) 100%),
    linear-gradient(0deg, rgba(10, 22, 17, 0.45) 0%, rgba(10, 22, 17, 0) 22%);
}

/* Feather the art into the page on screens wider than the capped art */
@media (min-width: 1921px) {
  .hero__media {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
  }
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 860px;
  margin-top: clamp(28px, 6vw, 96px);   /* sits the title/countdown lower in the painting, like the reference */
}

.hero__title {
  font: 800 clamp(2.6rem, 5.6vw, 5.2rem)/1.05 var(--f-ui);
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.55), 0 2px 4px rgba(0, 0, 0, 0.35);
}
.hero__sub {
  margin: 2px 0 0;
  font: 700 clamp(1.15rem, 2.1vw, 1.85rem)/1.2 var(--f-ui);
  color: rgba(238, 238, 230, 0.85);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* Countdown on leaves — left-facing leaf: days : hours, right-facing: minutes : seconds.
   Each leaf box is sized to the leaf art's opaque area (≈220 × 86 of its canvas);
   the <img> overhangs it by the transparent padding so the leaf sits exactly behind. */
.countdown {
  --leaf-w: clamp(176px, 18vw, 262px);
  --cd-size: calc(var(--leaf-w) * 0.118);   /* digits scale with the leaf so they always fit on it */
  --cd-colon: calc(var(--leaf-w) * 0.1);
  display: flex;
  justify-content: center;
  margin-top: clamp(18px, 2.6vw, 34px);
}
.cd-group { width: var(--leaf-w); }
/* overlap the two stems (each ≈15% of the leaf) so the leaf bodies nearly touch;
   the right leaf sits on top */
.cd-group + .cd-group { position: relative; margin-left: calc(var(--leaf-w) * -0.27); }
.cd-leaf {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 220 / 86;
}
.cd-leaf img {
  position: absolute;
  max-width: none;
  height: auto;
  top: -67.4%;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}
.cd-leaf img { transition: filter 0.3s var(--ease), translate 0.3s var(--ease); }
.cd-leaf--left img  { width: 103.6%; left: -2.7%; transform-origin: 96% 72%; }   /* pivots on its stem */
.cd-leaf--right img { width: 103.7%; left: -0.5%; transform-origin: 4% 72%; }
.cd-group:hover .cd-leaf img,
.cd-group.is-rustling .cd-leaf img {
  translate: 0 -3px;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 12px rgba(190, 240, 120, 0.45)) brightness(1.08);
  animation: leaf-rustle 0.9s ease-in-out;
}
.cd-group:hover .cd-labels,
.cd-group.is-rustling .cd-labels { color: var(--c-register); }
.cd-labels { transition: color 0.3s; }
.countdown__num { display: inline-block; }
.countdown__num.is-tick { animation: digit-pop 0.35s var(--ease); }

/* digits and labels are centred on the leaf BODY (not the stem):
   left leaf body centre ≈ 43% across its box, right leaf ≈ 57% */
.cd-digits,
.cd-labels {
  display: grid;
  grid-template-columns: 1fr var(--cd-colon) 1fr;
  align-items: center;
  width: 60%;
  text-align: center;
}
.cd-digits {
  position: relative;
  translate: 0 -4%;
  font: 700 var(--cd-size)/1 var(--f-ui);
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-shadow: 0 2px 5px rgba(20, 40, 5, 0.8);
}
.cd-leaf--left .cd-digits  { margin-right: 14%; }
.cd-leaf--right .cd-digits { margin-left: 14%; }
.cd-colon { translate: 0 -0.06em; }
.cd-labels {
  margin-top: 10px;
  font: 500 calc(var(--leaf-w) * 0.062)/1 var(--f-ui);
  color: rgba(238, 238, 230, 0.9);
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}
.cd-group:first-child .cd-labels { margin-left: 13%; }
.cd-group + .cd-group .cd-labels { margin-left: 27%; }

/* down arrow at the bottom of every section; sits just above the blend into the next one */
.scroll-down {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(var(--seam, 0px) + 14px);
  translate: -50% 0;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: #fff;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
  animation: bob 2.2s ease-in-out infinite;
  transition: color 0.2s;
}
.scroll-down svg { width: 26px; height: 26px; }
.scroll-down:hover { color: var(--c-register); }
/* hero: sit the arrow down in the blend so it clears the (lowered) countdown */
.hero .scroll-down { bottom: calc(var(--seam, 0px) * 0.3); }
/* the last painting is followed by plain sections, so nothing overlaps its bottom */
.scene--end .scroll-down { bottom: 18px; }

/* ---------- Generic sections ---------- */
.section { padding-block: clamp(80px, 11vw, 140px); position: relative; }

.section__head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto clamp(40px, 6vw, 64px);
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--c-gold);
}
.kicker::before,
.kicker::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.section__title {
  font-family: var(--f-display);
  font-size: clamp(2.4rem, 5.2vw, 3.8rem);
  color: var(--c-parchment);
}
.section__lead {
  margin-top: 14px;
  color: var(--c-muted);
  font-size: 1.1rem;
}

/* ==========================================================================
   SCENES — full-bleed painted sections (About, Tracks, …; text to come)
   --------------------------------------------------------------------------
   Each source painting is ~1552 × 688. Same sharpness rules as the hero:
   - plain <img> + object-fit, no transforms/filters on the image;
   - box height follows the image aspect (688/1552 ≈ 44.33vw), so on desktop
     the art is shown uncropped at ~1:1 scale;
   - art is capped at 1920px wide and feathered into the page beyond that.
   Every scene overlaps the section above it by --seam and fades its top edge
   in with a mask, so consecutive paintings cross-dissolve into each other.
   Per-scene crop: set --pos (desktop) and --pos-sm (phones) on the section.
   Add .scene--end to the last scene in a run so it fades into the page.
   ========================================================================== */
:root { --seam: clamp(64px, 6vw, 110px); } /* overlap + blend height for every painting→painting join; change here to adjust all */

.scene {
  --pos: 50% 50%;
  --pos-sm: 50% 50%;
  position: relative;
  overflow-x: clip;      /* edge clouds may hang off the sides without widening the page */
  margin-top: calc(var(--seam) * -1);
}
/* later scenes stack above earlier ones so each top fade lies over the previous art */
.voyage   { z-index: 2; --pos: 60% 50%; --pos-sm: 70% 50%; }
.bounties { z-index: 3; --pos: 50% 50%; --pos-sm: 55% 50%; }
.log      { z-index: 4; --pos: 50% 50%; --pos-sm: 79% 50%; }
.sponsors { z-index: 6; --pos: 50% 50%; --pos-sm: 38% 50%; }

/* Clouds drift over each painting→painting join to soften it. The cloud art is
   soft fog, so upscaling it doesn't read as blur. They sit above the art (z 1)
   but below any content in the section (z 2). */
.scene::before,
.scene::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: calc(var(--seam) * 0.5);
  width: clamp(240px, 30vw, 560px);
  aspect-ratio: 284 / 169;
  background: url("../assets/cloud.png") center / contain no-repeat;
  translate: 0 -50%;
  opacity: 0.8;
  pointer-events: none;
  animation: cloud-drift 22s ease-in-out infinite alternate;
}
.scene::before { left: -11%; }
.scene::after  { right: -11%; scale: -1 1; animation-delay: -11s; }

.scene__media {
  position: relative;
  max-width: 1920px;
  margin-inline: auto;
  height: max(420px, min(44.33vw, 851px));
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 var(--seam));
          mask-image: linear-gradient(180deg, transparent 0, #000 var(--seam));
}

.scene__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos);
  image-rendering: auto;
  -webkit-user-drag: none;
  user-select: none;
}

/* light edge shading only — the image itself is untouched */
.scene__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(10, 22, 17, 0.4) 0%, rgba(10, 22, 17, 0) 22%),
    linear-gradient(180deg, rgba(10, 22, 17, 0.3) 0%, rgba(10, 22, 17, 0) 24%);
}
.scene--end .scene__shade {
  background:
    linear-gradient(0deg, var(--c-bg) 0%, rgba(10, 22, 17, 0.55) 10%, rgba(10, 22, 17, 0) 26%),
    linear-gradient(180deg, rgba(10, 22, 17, 0.3) 0%, rgba(10, 22, 17, 0) 24%);
}

@media (min-width: 1921px) {
  .scene__media {
    -webkit-mask-image:
      linear-gradient(180deg, transparent 0, #000 var(--seam)),
      linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
            mask-image:
      linear-gradient(180deg, transparent 0, #000 var(--seam)),
      linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
    -webkit-mask-composite: source-in;
            mask-composite: intersect;
  }
}

/* ==========================================================================
   ABOUT — ruins scene with a crystal carousel
   --------------------------------------------------------------------------
   The section keeps the painting's own height on desktop (so the ruins stay
   ~1:1), with the title and crystal laid over it. The crystal art
   (781 × 534); text, arrows and dots are positioned in % of the crystal box and line up
   with its faces at any size.
   ========================================================================== */
.about__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: max(420px, min(44.33vw, 851px));
  padding-top: calc(var(--seam) + 8px);
  padding-bottom: calc(var(--seam) + 64px);
}
.about__title {
  font: 800 clamp(1.7rem, 3.2vw, 2.7rem)/1.1 var(--f-ui);
  letter-spacing: -0.01em;
  color: #fff;
  text-align: center;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.35);
}

.crystal {
  --cw: min(40vw, 560px);                 /* crystal width */
  position: relative;
  width: var(--cw);
  aspect-ratio: 781 / 534;
  margin-top: clamp(4px, 1vw, 14px);
  touch-action: pan-y;
}
/* soft cyan glow so the crystal feels lit from within */
.crystal::before {
  content: "";
  position: absolute;
  inset: 8% 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(140, 230, 255, 0.35), transparent);
  filter: blur(18px);
  z-index: -1;
}
.crystal__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 18px 24px rgba(0, 30, 40, 0.45));
}

/* text sits on the large front face */
.crystal__slides {
  position: absolute;
  left: 27%;
  right: 19%;
  top: 24%;
  bottom: 26%;
  display: grid;
}
.crystal__slide {
  grid-area: 1 / 1;
  align-self: center;
  margin: 0;
  font: 500 clamp(0.78rem, calc(var(--cw) * 0.034), 1.2rem)/1.45 var(--f-ui);
  color: #36535e;
  text-align: center;
  text-wrap: balance;
  opacity: 0;
  translate: 12px 0;
  transition: opacity 0.45s var(--ease), translate 0.45s var(--ease);
  pointer-events: none;
}
.crystal__slide.is-active { opacity: 1; translate: 0 0; pointer-events: auto; }
.crystal__slide.is-leaving-back { translate: 12px 0; }
.crystal__slide.is-leaving { translate: -12px 0; }

/* arrows sit on the left and right facets */
.crystal__arrow {
  position: absolute;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: clamp(32px, calc(var(--cw) * 0.075), 44px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #4a6670;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s, scale 0.2s;
}
.crystal__arrow svg { width: 62%; height: 62%; }
.crystal__arrow--prev { left: 18%; top: 50%; }
.crystal__arrow--next { left: 83%; top: 55%; }
.crystal__arrow:hover { color: #1f3a44; background: rgba(255, 255, 255, 0.25); scale: 1.08; }
.crystal__arrow:focus-visible { outline: 2px solid #1f3a44; outline-offset: 2px; }

.crystal__dots {
  position: absolute;
  left: 52%;
  top: 79%;
  translate: -50% -50%;
  display: flex;
  gap: clamp(5px, calc(var(--cw) * 0.012), 8px);
}
.crystal__dot {
  width: clamp(7px, calc(var(--cw) * 0.016), 10px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: background-color 0.2s, scale 0.2s;
}
.crystal__dot:hover { scale: 1.25; }
.crystal__dot.is-active { background: #36535e; }
.crystal__dot:focus-visible { outline: 2px solid #1f3a44; outline-offset: 2px; }

/* ==========================================================================
   TRACKS — "choose your challenge": a fleet sailing across the shore scene
   --------------------------------------------------------------------------
   Ship art is 356 × 322 (≈0.7× on desktop). The fleet is a horizontally
   scrollable row (JS drifts it slowly and loops it), placed so each hull's
   waterline (~90% down the ship art) sits on the sea at ~64% of the section.
   ========================================================================== */
.tracks__inner {
  position: relative;
  z-index: 2;
  min-height: max(420px, min(44.33vw, 851px));
  padding-top: calc(var(--seam) + 8px);
  text-align: center;
}
.tracks__title {
  font: 800 clamp(1.7rem, 3.2vw, 2.7rem)/1.1 var(--f-ui);
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 3px 18px rgba(30, 40, 70, 0.55), 0 1px 3px rgba(0, 0, 0, 0.35);
}
.tracks__hint {
  margin: 6px 0 0;
  font: 500 clamp(0.85rem, 1.1vw, 1rem)/1.3 var(--f-ui);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 8px rgba(30, 40, 70, 0.6);
}

.fleet {
  --ship-w: clamp(180px, 17vw, 250px);
  --ship-gap: clamp(28px, 4vw, 64px);
  position: absolute;
  z-index: 2;
  left: 0; right: 0;
  top: calc(64% - var(--ship-w) * 0.814 - 18px);
  padding: 18px 0 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.fleet::-webkit-scrollbar { display: none; }
.fleet.is-dragging { cursor: grabbing; }
.fleet.is-dragging .ship { pointer-events: none; }
.fleet__track { display: flex; width: max-content; }

.ship {
  --glow: 255, 90, 78;
  position: relative;
  flex: none;
  width: var(--ship-w);
  aspect-ratio: 356 / 322;
  margin-right: var(--ship-gap);
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ship--red    { --glow: 255, 92, 80;   --bob-delay: 0s; }
.ship--purple { --glow: 190, 140, 255; --bob-delay: -1.3s; }
.ship--blue   { --glow: 90, 195, 255;  --bob-delay: -2.6s; }
.ship--green  { --glow: 190, 240, 95;  --bob-delay: -3.9s; }

/* The wrapper bobs; the image inside changes brightness. Keeping them on separate
   elements matters: iPhone Safari doesn't repaint a filter change on an element that is
   itself animating, so a closed ship used to stay dark. */
.ship__bob {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  animation: ship-bob 5.2s ease-in-out infinite;
  animation-delay: var(--bob-delay);
}
.ship__img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 10px 10px rgba(10, 40, 60, 0.35));
  transition: filter 0.35s var(--ease);
}
/* open = hovered with a mouse, or .is-open (set by JS when tapped or reached with the
   keyboard; tapping anywhere else closes it) */
.ship.is-open .ship__img {
  filter: brightness(0.5) saturate(1.1) drop-shadow(0 0 24px rgba(var(--glow), 0.85));
}
/* hover only with a real mouse; .is-touch (set by JS on the first touch) turns it off
   even on phones that claim to support hover, so a tapped ship can't stay "hovered" */
@media (hover: hover) and (pointer: fine) {
  .fleet:not(.is-touch) .ship:hover .ship__img { filter: brightness(0.5) saturate(1.1) drop-shadow(0 0 24px rgba(var(--glow), 0.85)); }
  .fleet:not(.is-touch) .ship:hover .ship__card { opacity: 1; scale: 1; visibility: visible; transition-delay: 0s; }
}

/* the track card fades in over the ship, tinted with that ship's glow */
.ship__card {
  position: absolute;
  inset: 2% -8% 10%;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 20px;
  text-align: center;
  /* no backdrop blur: iPhone Safari kept showing a frozen, darkened copy of the ship
     behind a closed card. Fully hidden (visibility) once it has faded out, for the same reason. */
  background: radial-gradient(ellipse at 50% 45%, rgba(var(--glow), 0.45), rgba(8, 18, 14, 0.78) 78%);
  box-shadow: 0 0 0 1px rgba(var(--glow), 0.35), 0 18px 30px -12px rgba(0, 0, 0, 0.55);
  opacity: 0;
  scale: 0.94;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), scale 0.35s var(--ease), visibility 0s linear 0.35s;
  pointer-events: none;
}
.ship.is-open .ship__card { opacity: 1; scale: 1; visibility: visible; transition-delay: 0s; }
.ship__card h3 {
  font: 800 calc(var(--ship-w) * 0.075)/1.15 var(--f-ui);
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.ship__card p {
  margin: 0;
  font: 500 calc(var(--ship-w) * 0.054)/1.45 var(--f-ui);
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.ship__card p strong { display: block; margin-bottom: 4px; font-weight: 700; color: #fff; }
.ship:focus-visible .ship__card { box-shadow: 0 0 0 2px #fff, 0 18px 30px -12px rgba(0, 0, 0, 0.55); }

/* ==========================================================================
   SCHEDULE — book bookmarks switch the day shown on the parchment scroll
   --------------------------------------------------------------------------
   .desk-stage is sized by JS to the painting's rendered (object-fit: cover)
   box, so everything inside is placed in % of the 1552 × 688 painting and
   sized with container units (cqw) — it stays glued to the book and scroll
   at any screen size.
   ========================================================================== */
.schedule__inner {
  position: relative;
  z-index: 2;
  min-height: max(420px, min(44.33vw, 851px));
  padding-top: calc(var(--seam) + 8px);
  text-align: center;
}
.schedule__title {
  font: 800 clamp(1.7rem, 3.2vw, 2.7rem)/1.1 var(--f-ui);
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.35);
}

.desk-stage {
  position: absolute;
  z-index: 2;
  left: 0; top: 0; width: 100%; height: 100%;   /* JS refines this */
  container-type: size;
  pointer-events: none;
}
.desk-stage > * { pointer-events: auto; }

/* --- bookmark tabs, laid exactly over the three painted ribbons --- */
.day-tabs { position: absolute; inset: 0; pointer-events: none; }
.day-tab {
  position: absolute;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  transition: translate 0.3s var(--ease), filter 0.3s;
  filter: drop-shadow(0 3px 4px rgba(30, 10, 5, 0.45)) brightness(0.85);
}
.day-tab img { width: 100%; height: auto; display: block; }
.day-tab { container-type: inline-size; }
/* label sits on the ribbon body (left of the swallowtail notch), along its ~15° tilt,
   and is sized from the bookmark's own width so it can't spill out */
.day-tab span {
  position: absolute;
  left: 37%;
  top: 50%;
  translate: -50% -50%;
  rotate: -15deg;
  font: 700 16cqi/1 var(--f-ui);
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(60, 10, 5, 0.7);
}
.day-tab--1 { left: 39.05%; top: 27.9%;  width: 5.3%; }
.day-tab--2 { left: 39.95%; top: 36.05%; width: 5.9%; }
.day-tab--3 { left: 42.33%; top: 42.44%; width: 7%; }
.day-tab:hover { translate: 4px -2px; filter: drop-shadow(0 4px 6px rgba(30, 10, 5, 0.5)) brightness(1); }
.day-tab.is-active { translate: 8px -4px; filter: drop-shadow(0 6px 8px rgba(30, 10, 5, 0.55)) brightness(1.12) saturate(1.1); }
.day-tab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

/* --- the text written on the open scroll --- */
.parchment-text {
  position: absolute;
  left: 56.06%;
  top: 35%;          /* clear of the scroll's wavy top edge */
  width: 22.6%;
  height: 41%;       /* …and of the bottom roller */
  overflow-y: auto;
  overscroll-behavior: contain;
  /* top/bottom room taller than the edge fade, so the first and last lines
     scroll fully clear of it instead of looking cut off */
  padding: max(14px, 1.2cqw) 0.3cqw max(28px, 2.4cqw);   /* top: just clear of the shorter top fade */
  text-align: center;
  color: #7a5530;
  scrollbar-width: none;            /* replaced by the always-visible ink bar below */
}
.parchment-text::-webkit-scrollbar { display: none; }

/* custom scroll bar drawn in ink on the parchment (native ones hide on macOS) */
.parchment-bar {
  position: absolute;
  left: 79.05%;
  top: 36%;
  width: max(6px, 0.42cqw);
  height: 39%;
  border-radius: 99px;
  background: rgba(122, 85, 48, 0.16);
  cursor: pointer;
  visibility: hidden;
}
.parchment-bar.is-on { visibility: visible; }
.parchment-bar__thumb {
  position: absolute;
  left: 0; right: 0; top: 0;
  min-height: 24px;
  border-radius: 99px;
  background: rgba(122, 85, 48, 0.62);
  cursor: grab;
  transition: background-color 0.2s;
}
.parchment-bar__thumb:hover,
.parchment-bar.is-dragging .parchment-bar__thumb { background: rgba(109, 74, 40, 0.85); }
.parchment-bar.is-dragging .parchment-bar__thumb { cursor: grabbing; }
/* soft fade at the edges only when there is more to scroll */
.parchment-text.is-scrollable {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 5%, #000 88%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 5%, #000 88%, transparent 100%);
}
.parchment-text:focus-visible { outline: 2px dashed rgba(122, 85, 48, 0.6); outline-offset: 4px; border-radius: 6px; }

.day-panel { animation: ink-in 0.45s var(--ease); }
.day-panel h3 {
  margin: 0.4cqw 0 1.6cqw;
  font: 700 max(13px, 1.36cqw)/1.25 var(--f-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6d4a28;
}
.day-panel ul { list-style: none; margin: 0; padding: 0 0 0.6cqw; display: grid; gap: 1.5cqw; }
.day-panel li { display: grid; gap: 0.25cqw; }
.day-panel strong {
  font: 700 max(12px, 1.24cqw)/1.25 var(--f-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a5530;
}
/* small subtitle under an event (talk or workshop title) */
.day-panel li em {
  font: italic 500 max(11px, 0.98cqw)/1.3 var(--f-ui);
  color: #6d4a28;
}
.day-panel li span {
  font: 600 max(11px, 1.12cqw)/1.3 var(--f-ui);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #8a6640;
}

/* ==========================================================================
   FAQ — water scene + floating plank accordion
   --------------------------------------------------------------------------
   Water art is 1376 × 768; plank art is 2000 × 162 (transparent PNG-style webp).
   - Unlike the image-only scenes, this one is sized by its content, so the
     water <img> is absolutely positioned behind it with object-fit: cover.
   - JS reserves room for the tallest answer up front (min-height), so opening
     a plank never changes the section height → the water never re-scales.
   - Planks render at ≤ 0.5× their native size on desktop (sharp on retina too).
   ========================================================================== */
.faq { z-index: 5; --pos: 50% 50%; --pos-sm: 50% 50%; }

.scene--content .scene__media {
  position: absolute;
  top: 0; bottom: 0;
  left: 0; right: 0;
  height: auto;
}
.faq .scene__shade {
  background:
    /* deeper water at the top eases the jump from the dark cabin into bright sea */
    linear-gradient(180deg, rgba(8, 30, 40, 0.55) 0%, rgba(8, 30, 40, 0.2) 18%, rgba(8, 30, 40, 0) 34%);
}

.faq__inner {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--seam) + 24px);
  padding-bottom: calc(var(--seam) + 76px);
}
/* a raft: wide planks stacked with a sliver of water between them */
.faq__list {
  display: grid;
  gap: 6px;
  max-width: 1120px;
  margin-inline: auto;
}

/* --- category tabs: crabs scuttling on the water, the label written on the shell --- */
.faq-tabs {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 4vw, 64px);                     /* room between the crabs */
  margin: clamp(26px, 3vw, 44px) 0 clamp(40px, 4.6vw, 64px);   /* room above (after "FAQ") and before the first question */
}
.faq-tab {
  position: relative;
  width: clamp(150px, 14vw, 205px);
  aspect-ratio: 640 / 471;
  padding: 0;
  border: 0;
  background: url("../assets/crab.png") center / contain no-repeat;
  container-type: inline-size;
  cursor: pointer;
  filter: drop-shadow(0 8px 8px rgba(6, 40, 60, 0.35)) saturate(0.8) brightness(0.95);
  transition: filter 0.3s var(--ease), scale 0.3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.faq-tab span {
  position: absolute;
  left: 50%;
  top: 54%;                                        /* centred on the shell */
  translate: -50% -50%;
  font: 700 7cqi/1 var(--f-ui);                    /* "registration" stays inside the ~52%-wide shell */
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 1px 0 #7a1c0c, 0 2px 6px rgba(80, 15, 5, 0.7);
}
.faq-tab:hover { animation: crab-wiggle 0.5s ease-in-out; filter: drop-shadow(0 10px 10px rgba(6, 40, 60, 0.4)) saturate(1) brightness(1); }
.faq-tab.is-active {
  scale: 1.1;
  filter: drop-shadow(0 0 14px rgba(255, 230, 128, 0.85)) drop-shadow(0 10px 10px rgba(6, 40, 60, 0.4)) saturate(1.1);
}
.faq-tab:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 16px; }

.faq-group { display: grid; gap: 6px; }
.faq-group[hidden] { display: none; }
.faq-group:not([hidden]) { animation: ink-in 0.4s var(--ease); }

/* --- Plank (summary) --- */
.plank { position: relative; }
/* board art is 1510 × 429: a rounded left end, plain grain, and a knot near the
   right end. It is drawn as a 9-slice so the ends (incl. the knot) keep their
   shape and only the plain grain in the middle stretches to the plank width. */
.plank__bar {
  --ph: clamp(60px, 6.2vw, 84px);              /* plank height */
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--ph);
  margin: 0;
  padding: 0 calc(var(--ph) * 0.95) 0 calc(var(--ph) * 0.62);   /* right: keeps the chevron just left of the knot */
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: translate 0.3s var(--ease);
}
.plank__bar::before {                 /* the wood itself */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 0 solid transparent;
  border-image: url("../assets/faq-board.png") 0 400 0 110 fill / 0 calc(var(--ph) * 400 / 429) 0 calc(var(--ph) * 110 / 429) stretch;
  filter: drop-shadow(0 8px 8px rgba(6, 40, 60, 0.35));
  transition: filter 0.3s var(--ease);
  /* own layer: as planks slide while an answer opens/closes, phones otherwise leave
     streaks of the old shadow behind */
  will-change: transform;
  transform: translateZ(0);
}
.plank__bar::-webkit-details-marker { display: none; }
.plank__bar::marker { content: ""; }
/* lift on hover only with a mouse; on phones a tap would leave it stuck lifted */
@media (hover: hover) and (pointer: fine) {
  details.plank > .plank__bar:hover { translate: 0 -2px; }
  details.plank > .plank__bar:hover::before { filter: drop-shadow(0 12px 12px rgba(6, 40, 60, 0.4)) brightness(1.07); }
  details.plank > .plank__bar:hover .plank__icon { opacity: 1; }
}
.plank__bar:focus-visible { outline: none; }
.plank__bar:focus-visible .plank__q { text-decoration: underline; text-underline-offset: 6px; }

.plank__q {
  font: 600 clamp(1rem, 1.55vw, 1.3rem)/1.2 var(--f-ui);
  color: #4a2a0c;                                  /* dark brown reads best on the light wood */
  text-shadow: 0 1px 0 rgba(255, 228, 170, 0.55);
}

/* title plank: "FAQ" carved on the top board */
.plank--title .plank__bar {
  justify-content: center;
  padding: 0;
  cursor: default;
  font: 800 clamp(1.5rem, 2.6vw, 2.3rem)/1 var(--f-ui);
  letter-spacing: 0.02em;
  color: #4a2a0c;
  text-shadow: 0 1px 0 rgba(255, 228, 170, 0.6);
}

/* subtle white chevron, same language as the scroll-down arrows */
.plank__icon {
  display: grid;
  place-items: center;
  margin-left: auto;
  width: 30px;
  height: 30px;
  flex: none;
  color: #5a3613;
  opacity: 0.8;
  transition: rotate 0.35s var(--ease), opacity 0.2s;
}
.plank__icon svg { width: 22px; height: 22px; }
.plank[open] .plank__icon { rotate: 180deg; }

/* --- Answer: a parchment slip hanging under the plank --- */
.plank__body {
  overflow: hidden;
  margin: -4px 7% 4px;
  transform: translateZ(0);   /* clip and slide as one layer (no leftover shadow lines) */
}
.plank__body p {
  margin: 0;
  padding: 20px 28px 18px;
  border-radius: 0 0 12px 12px;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(180deg, #f1dfb8, #e6cb94);
  box-shadow: 0 12px 24px -10px rgba(6, 40, 60, 0.45), inset 0 8px 10px -6px rgba(90, 50, 15, 0.45);
  color: #4a2c10;
  font: 500 clamp(0.95rem, 1.15vw, 1.05rem)/1.6 var(--f-ui);
}

/* ==========================================================================
   SPONSORS — "Meet the SPONSORS" over the sea, logo cards on the sand.
   Card size follows the tier: partners largest, gold medium, supporters small.
   ========================================================================== */
/* the painting keeps its natural height (--paint-h, ~1:1 on desktop);
   the section continues below it as extra sand */
.sponsors {
  --paint-h: max(420px, min(44.33vw, 851px));
  --sand: 227, 201, 117;               /* sampled from the painting's bottom edge */
}
.sponsors .scene__media {
  bottom: auto;
  height: var(--paint-h);
  /* top: blend from the FAQ water; bottom: melt into the extra sand */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 var(--seam), #000 92%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 var(--seam), #000 92%, transparent 100%);
}
.sponsors .scene__shade {
  background: linear-gradient(180deg, rgba(10, 22, 17, 0.3) 0%, rgba(10, 22, 17, 0) 24%);
}
.sponsors__sand {
  position: absolute;
  left: 0; right: 0;
  top: calc(var(--paint-h) * 0.86);
  bottom: 0;
  /* faint grain + the beach's sand warming into the register painting's sand */
  background:
    radial-gradient(rgba(150, 110, 50, 0.12) 0.8px, transparent 1.4px) 0 0 / 23px 19px,
    radial-gradient(rgba(255, 250, 225, 0.25) 0.8px, transparent 1.4px) 11px 7px / 29px 31px,
    radial-gradient(rgba(160, 118, 55, 0.09) 1px, transparent 1.8px) 5px 13px / 43px 37px,
    linear-gradient(180deg, rgb(var(--sand)) 0%, rgb(238, 207, 120) 55%, rgb(245, 211, 122) 100%);
}

.sponsors__inner {
  position: relative;
  z-index: 2;
  padding-bottom: calc(var(--seam) + clamp(70px, 7vw, 110px));   /* sand below the cards + arrow */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 2.2vw, 30px);
  text-align: center;
}
/* the title owns the sea; the cards start at the shoreline (~64% down the painting) */
.sponsors__head {
  width: 100%;
  height: calc(var(--paint-h) * 0.64);
  padding-top: calc(var(--seam) + clamp(16px, 2.6vw, 44px));
}
.sponsors__title {
  display: grid;
  justify-items: center;
  color: #2b6a70;
  font-family: var(--f-ui);
  /* soft light rim + glow, like the reference lettering on the sea */
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.75), 0 6px 22px rgba(255, 255, 255, 0.55);
}
.sponsors__title-small { font: 700 clamp(1.5rem, 3vw, 2.6rem)/1 var(--f-ui); }
.sponsors__title-big {
  font: 800 clamp(3rem, 7.4vw, 6.6rem)/0.95 var(--f-ui);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.sponsor-tier { width: 100%; }
.sponsor-tier__label {
  margin-bottom: 8px;
  font: 600 clamp(0.8rem, 1vw, 0.92rem)/1 var(--f-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2b6a70;
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.7);
}
.sponsor-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(12px, 1.6vw, 22px);
}

/* frosted-glass logo card */
.sponsor-card {
  --card-w: 200px;
  --card-h: 84px;
  display: grid;
  place-items: center;
  width: var(--card-w);
  height: var(--card-h);
  padding: calc(var(--card-h) * 0.18) calc(var(--card-h) * 0.26);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px -14px rgba(20, 70, 80, 0.55), inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(10px) saturate(140%);
          backdrop-filter: blur(10px) saturate(140%);
  transition: translate 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s;
}
.sponsor-card img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.sponsor-card:hover {
  translate: 0 -4px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 36px -14px rgba(20, 70, 80, 0.6), 0 0 0 3px rgba(247, 214, 74, 0.7);
}
.sponsor-card:focus-visible { outline: 3px solid #2b6a70; outline-offset: 3px; }

.sponsor-tier--partner   .sponsor-card { --card-w: clamp(280px, 32vw, 460px); --card-h: clamp(90px, 9vw, 130px); }
.sponsor-tier--gold      .sponsor-card { --card-w: clamp(200px, 19vw, 280px); --card-h: clamp(72px, 6.4vw, 96px); }
.sponsor-tier--supporter .sponsor-card { --card-w: clamp(140px, 13vw, 190px); --card-h: clamp(56px, 4.8vw, 72px); border-radius: 16px; }


/* ==========================================================================
   ENLIST / REGISTER — top-down sand (1552 × 688). The heading sits on open
   sand right of the bottle & shells; the form is a rolled parchment letter
   — a message in a bottle — on the right.
   ========================================================================== */
.enlist { z-index: 7; --pos: 50% 50%; --pos-sm: 62% 50%; }
.enlist.scene::before,
.enlist.scene::after { display: none; }          /* sand → sand needs no clouds */
/* the sand below the painting: its bottom-edge colour plus the same faint grain as the crew section */
.enlist {
  background:
    radial-gradient(rgba(150, 110, 50, 0.12) 0.8px, transparent 1.4px) 0 0 / 23px 19px,
    radial-gradient(rgba(255, 250, 225, 0.25) 0.8px, transparent 1.4px) 11px 7px / 29px 31px,
    radial-gradient(rgba(160, 118, 55, 0.09) 1px, transparent 1.8px) 5px 13px / 43px 37px,
    rgb(240, 213, 121);
}
.enlist .scene__shade { background: none; }
.enlist .scene__media {
  bottom: auto;
  height: max(420px, min(44.33vw, 851px));   /* fixed, so the art never rescales as pages change */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 var(--seam), #000 90%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 var(--seam), #000 90%, transparent 100%);
}

.enlist__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 470px);
  align-items: center;
  gap: clamp(32px, 4vw, 64px);
  min-height: max(420px, min(44.33vw, 851px));
  padding: calc(var(--seam) + 24px) 8vw clamp(80px, 8vw, 120px) 30vw;   /* left: clear of the bottle & shells */
}
.enlist__title {
  font: 800 clamp(2rem, 3.8vw, 3.3rem)/1.08 var(--f-ui);
  letter-spacing: -0.01em;
  color: #5a3613;
  text-shadow: 0 2px 0 rgba(255, 240, 200, 0.6);
}
.enlist__lead {
  margin: 16px 0 0;
  max-width: 420px;
  font: 500 clamp(1rem, 1.3vw, 1.15rem)/1.6 var(--f-ui);
  color: #7a5530;
}
.enlist__lead strong { color: #a2321c; font-weight: 700; }

/* --- the letter: parchment with rolled ends, tilted as if just pulled from the bottle --- */
.bottle-note {
  position: relative;
  rotate: -2.5deg;
  padding: 44px 34px 40px;
  border-radius: 4px;
  background:
    radial-gradient(ellipse at 18% 8%, rgba(255, 255, 255, 0.45), transparent 50%),
    radial-gradient(ellipse at 85% 95%, rgba(140, 90, 30, 0.25), transparent 55%),
    linear-gradient(180deg, #f6e7c4, #ead1a0);
  box-shadow: 0 30px 50px -24px rgba(90, 60, 15, 0.65), inset 0 0 36px rgba(140, 90, 30, 0.28);
}
.bottle-note::before,
.bottle-note::after {               /* the rolled top & bottom of the scroll */
  content: "";
  position: absolute;
  left: -14px; right: -14px;
  height: 30px;
  border-radius: 16px;
  background: linear-gradient(180deg, #c9a061 0%, #f2deb3 38%, #e2c58c 62%, #b88b4b 100%);
  box-shadow: 0 6px 10px -4px rgba(90, 60, 15, 0.5);
}
.bottle-note::before { top: -16px; }
.bottle-note::after  { bottom: -16px; }

.bottle-note { scroll-margin-top: calc(var(--nav-h) + 24px); }
.enlist__form {
  display: grid;
  gap: 14px;
  color: var(--c-ink);
  text-align: left;       /* labels line up with their inputs even when the section is centred */
}
.bottle-note__head { text-align: center; margin-bottom: 2px; }
.bottle-note__head h3 {
  font: 800 clamp(1.4rem, 2vw, 1.75rem)/1.1 var(--f-ui);
  color: #5a3613;
}
.bottle-note__head p {
  margin: 8px 0 0;
  font: 500 0.95rem/1.5 var(--f-ui);
  color: #7a5530;
}
.field { display: grid; gap: 6px; }
.field label {
  font: 600 0.9rem/1.2 var(--f-ui);
  color: #4a2c10;
}
.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1.5px solid rgba(90, 50, 15, 0.3);
  background-color: rgba(255, 250, 238, 0.55);
  color: var(--c-ink);
  font: 500 1rem var(--f-ui);
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b4318 50%),
    linear-gradient(135deg, #6b4318 50%, transparent 50%);
  background-position: calc(100% - 22px) 55%, calc(100% - 16px) 55%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
.field select option { background: #f3e2bd; color: var(--c-ink); }
.field input::placeholder { color: rgba(58, 38, 20, 0.45); }
.field input:focus,
.field select:focus {
  outline: none;
  border-color: #8a5a14;
  background-color: rgba(255, 252, 244, 0.85);
  box-shadow: 0 0 0 3px rgba(215, 155, 45, 0.35);
}
.field.is-invalid input,
.field.is-invalid select { border-color: #b23b22; }
.field__error { font: 500 0.82rem var(--f-ui); color: #a2321c; }
.field__error:empty { display: none; }

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font: 500 0.95rem/1.4 var(--f-ui);
  color: #4a2c10;
  cursor: pointer;
}
.check input {
  width: 18px; height: 18px;
  margin-top: 1px;
  accent-color: #8a5a14;
}

/* form button: the same board as the FAQ planks and footer, 9-sliced */
.plank-btn {
  --ph: 58px;
  flex: 1;
  height: var(--ph);
  padding: 0 calc(var(--ph) * 0.8);
  border: 0 solid transparent;
  border-image: url("../assets/faq-board.png") 0 400 0 110 fill / 0 calc(var(--ph) * 400 / 429) 0 calc(var(--ph) * 110 / 429) stretch;
  background: none;
  font: 700 1.1rem/1 var(--f-ui);
  color: #4a2a0c;
  text-shadow: 0 1px 0 rgba(255, 228, 170, 0.55);
  cursor: pointer;
  filter: drop-shadow(0 8px 7px rgba(90, 60, 15, 0.35));
  transition: translate 0.25s var(--ease), filter 0.25s;
}
@media (hover: hover) and (pointer: fine) {
  .plank-btn:hover { translate: 0 -2px; filter: drop-shadow(0 11px 9px rgba(90, 60, 15, 0.4)) brightness(1.06); }
}
.plank-btn:focus-visible { outline: 3px solid #8a5a14; outline-offset: 3px; border-radius: 10px; }

/* --- multi-page form: only the current page is laid out, so the letter is
       exactly as tall as the page you're on --- */
.form-step,
.form-done {
  display: none;
  align-content: start;
  gap: 12px;
  min-width: 0;
}
.form-step.is-active { display: grid; animation: ink-in 0.4s var(--ease); }
.enlist__form.is-sent .form-step,
.enlist__form.is-sent .form-nav,
.enlist__form.is-sent .form-dots { display: none; }
.enlist__form.is-closed .form-step,
.enlist__form.is-closed .form-nav,
.enlist__form.is-closed .form-dots,
.enlist__form.is-closed .form__error { display: none; }
.enlist__form.is-closed .form-closed { display: grid; align-content: center; text-align: center; padding-block: 24px; }
.form-closed a { color: #5a3613; font-weight: 700; text-decoration: underline; overflow-wrap: anywhere; }
.enlist__form.is-sent .form-done:not(.form-closed) { display: grid; align-content: center; text-align: center; padding-block: 24px; animation: ink-in 0.4s var(--ease); }
.form-done h3 { font: 800 clamp(1.4rem, 2vw, 1.75rem)/1.2 var(--f-ui); color: #5a3613; }
.form-done p { margin: 0; font: 500 1rem/1.5 var(--f-ui); color: #7a5530; }
.form-done:focus, .bottle-note__head h3:focus { outline: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
fieldset.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field legend { padding: 0; margin-bottom: 6px; font: 600 0.9rem/1.2 var(--f-ui); color: #4a2c10; }
.field .optional { font: 500 0.78rem var(--f-ui); color: #8a6640; }
.field .field__sub { font: 500 0.78rem/1 var(--f-ui); color: #7a5530; }
.field textarea {
  width: 100%;
  border-radius: 8px;
  border: 1.5px solid rgba(90, 50, 15, 0.3);
  background-color: rgba(255, 250, 238, 0.55);
  color: var(--c-ink);
  resize: vertical;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.field textarea::placeholder { color: rgba(58, 38, 20, 0.45); }
.field textarea:focus {
  outline: none;
  border-color: #8a5a14;
  background-color: rgba(255, 252, 244, 0.85);
  box-shadow: 0 0 0 3px rgba(215, 155, 45, 0.35);
}
.field.is-invalid textarea { border-color: #b23b22; }
.bottle-note .field input:not([type="radio"]):not([type="checkbox"]),
.bottle-note .field select,
.bottle-note .field textarea { padding: 9px 12px; font: 500 0.95rem var(--f-ui); }
.bottle-note .field select { padding-right: 30px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.field-row[hidden] { display: none; }

.choices { display: grid; gap: 7px; }
.choice {
  display: flex;
  gap: 10px;
  align-items: center;
  font: 500 0.92rem/1.3 var(--f-ui);
  color: #4a2c10;
  cursor: pointer;
}
.field .choice input,
.field .check input {
  flex: none;
  width: 18px; height: 18px;
  margin: 0;
  padding: 0;
  box-shadow: none;
  accent-color: #8a5a14;
}
.field .choice input:focus-visible,
.field .check input:focus-visible { outline: 2px solid #8a5a14; outline-offset: 2px; box-shadow: none; }
.field .check { font-size: 0.88rem; }
.field .check input { margin-top: 1px; }
.choices--cards .choice {
  padding: 13px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(90, 50, 15, 0.3);
  background: rgba(255, 250, 238, 0.45);
  transition: border-color 0.2s, background-color 0.2s;
}
.choices--cards .choice:hover { background: rgba(255, 250, 238, 0.75); }
.choices--cards .choice:has(input:checked) { border-color: #8a5a14; background: rgba(255, 244, 205, 0.9); }
.choice b { display: block; font-weight: 500; }
.choices--cards .choice b { font-weight: 700; }
.choice small { display: block; font-size: 0.82rem; color: #7a5530; }

.form-nav { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.req { color: #a2321c; font-weight: 700; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(162, 50, 28, 0.1);
  border: 1.5px solid rgba(162, 50, 28, 0.45);
  color: #8a2a17;
  font: 600 0.9rem/1.4 var(--f-ui);
}
.plank-btn:disabled { cursor: progress; filter: drop-shadow(0 8px 7px rgba(90, 60, 15, 0.35)) saturate(0.7) brightness(0.95); }

/* hidden pieces of the form (role/answer dependent) never take up space */
.enlist__form [hidden] { display: none !important; }
.field-row--dob { grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.9fr) minmax(0, 1.1fr); }

/* pages a role doesn't use are taken out completely, so they don't make the letter taller */
.form-step.is-skipped { display: none; }
/* workshop ideas (mentors) */
.ws + .ws { padding-top: 12px; border-top: 1px dashed rgba(122, 85, 48, 0.4); }
.ws legend { font-weight: 700; color: #5a3613; }
.field-row--ws { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.ws-add {
  justify-self: start;
  min-height: 40px;
  padding: 8px 14px;
  border: 1.5px dashed rgba(122, 85, 48, 0.6);
  border-radius: 10px;
  background: rgba(255, 250, 238, 0.35);
  font: 600 0.9rem var(--f-ui);
  color: #6d4a28;
  cursor: pointer;
}
.ws-add:hover { background: rgba(255, 250, 238, 0.7); color: #4a2a0c; }
.ws-remove {
  margin-left: 6px;
  padding: 2px 4px;
  border: 0;
  background: none;
  font: 600 0.8rem var(--f-ui);
  color: #a2321c;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.ws-add:focus-visible, .ws-remove:focus-visible { outline: 2px solid #8a5a14; outline-offset: 2px; }
.field-row--ws .field + .field .pick__list { left: auto; right: 0; }

/* --- themed dropdowns: a parchment list replaces the browser's own menu.
       The real <select> stays (hidden) so the answers submit as usual. --- */
.pick__native { display: none; }
.pick { position: relative; }
.pick__button {
  position: relative;
  display: block;
  width: 100%;
  min-height: 41px;
  padding: 9px 34px 9px 12px;
  border-radius: 8px;
  border: 1.5px solid rgba(90, 50, 15, 0.3);
  background: rgba(255, 250, 238, 0.55);
  color: var(--c-ink);
  font: 500 0.95rem/1.35 var(--f-ui);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.pick__button.is-placeholder { color: rgba(58, 38, 20, 0.5); }
.pick__button::after {               /* chevron */
  content: "";
  position: absolute;
  right: 14px; top: 50%;
  width: 7px; height: 7px;
  border-right: 2px solid #6b4318;
  border-bottom: 2px solid #6b4318;
  translate: 0 -70%;
  rotate: 45deg;
  transition: rotate 0.25s var(--ease), translate 0.25s var(--ease);
}
.pick.is-open .pick__button::after { rotate: -135deg; translate: 0 -25%; }
.pick__button:focus-visible,
.pick.is-open .pick__button {
  outline: none;
  border-color: #8a5a14;
  background-color: rgba(255, 252, 244, 0.85);
  box-shadow: 0 0 0 3px rgba(215, 155, 45, 0.35);
}
.field.is-invalid .pick__button { border-color: #b23b22; }
.pick__list {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  max-height: 232px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  border-radius: 10px;
  border: 1.5px solid rgba(138, 90, 20, 0.55);
  background:
    radial-gradient(ellipse at 15% 0%, rgba(255, 255, 255, 0.45), transparent 55%),
    linear-gradient(180deg, #f8ebcd, #efd9a9);
  box-shadow: 0 18px 30px -12px rgba(90, 60, 15, 0.55);
  scrollbar-width: thin;
  scrollbar-color: rgba(122, 85, 48, 0.55) transparent;
}
.pick__option {
  position: relative;
  padding: 8px 10px 8px 30px;
  border-radius: 7px;
  font: 500 0.92rem/1.3 var(--f-ui);
  color: #4a2c10;
  white-space: nowrap;
  cursor: pointer;
}
.pick__option.is-active { background: rgba(215, 155, 45, 0.28); }
.pick__option[aria-selected="true"] { font-weight: 700; color: #3a2410; }
.pick__option[aria-selected="true"]::before { content: "✓"; position: absolute; left: 11px; color: #8a5a14; }
.pick__list[aria-multiselectable="true"] .pick__option::after {   /* multi-choice: a little box per option */
  content: "";
  position: absolute;
  left: 9px; top: 50%;
  width: 13px; height: 13px;
  translate: 0 -50%;
  border: 1.5px solid #8a6640;
  border-radius: 3px;
}
.pick__list[aria-multiselectable="true"] .pick__option[aria-selected="true"]::before { left: 10px; font-size: 0.8rem; top: 50%; translate: 0 -55%; }

/* navigation circles: a 24px target around a small dot */
.form-dots { display: flex; justify-content: center; gap: 2px; margin-top: -4px; }
.form-dot {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.form-dot::before {
  content: "";
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 1.5px solid #8a6640;
  transition: background-color 0.2s, border-color 0.2s, scale 0.2s;
}
.form-dot:hover::before { scale: 1.2; }
.form-dot.is-done::before { background: rgba(138, 102, 64, 0.55); }
.form-dot.is-current::before { background: #6d4a28; border-color: #6d4a28; scale: 1.2; }
.form-dot:focus-visible { outline: 2px solid #8a5a14; outline-offset: -1px; border-radius: 50%; }

/* ==========================================================================
   CREW — organizers on the sand: clam (with a face on the pearl) + named shell.
   Drifts sideways in a loop like the Tracks fleet (same JS helper).
   ========================================================================== */
.crew {
  position: relative;
  margin-top: -2px;                 /* closes a sub-pixel gap where the dark page showed as a hairline */
  overflow-x: clip;
  padding: clamp(36px, 4vw, 60px) 0 clamp(110px, 10vw, 150px);
  background:
    radial-gradient(rgba(150, 110, 50, 0.12) 0.8px, transparent 1.4px) 0 0 / 23px 19px,
    radial-gradient(rgba(255, 250, 225, 0.25) 0.8px, transparent 1.4px) 11px 7px / 29px 31px,
    radial-gradient(rgba(160, 118, 55, 0.09) 1px, transparent 1.8px) 5px 13px / 43px 37px,
    linear-gradient(180deg, rgb(240, 213, 121) 0%, rgb(232, 202, 112) calc(100% - 90px), rgb(60, 62, 36) calc(100% - 20px), #08140e 100%);
}
.crew__inner { text-align: center; }
.crew__title {
  font: 800 clamp(1.8rem, 3.4vw, 2.9rem)/1.1 var(--f-ui);
  letter-spacing: -0.01em;
  color: #5a3613;
  text-shadow: 0 2px 0 rgba(255, 240, 200, 0.6);
}
.crew__hint {
  margin: 6px 0 0;
  font: 500 clamp(0.95rem, 1.2vw, 1.08rem)/1.4 var(--f-ui);
  color: #7a5530;
}

.crew-row {
  margin-top: clamp(18px, 2.4vw, 34px);
  padding: 12px 0 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.crew-row::-webkit-scrollbar { display: none; }
.crew-row.is-dragging { cursor: grabbing; }
.crew-row.is-dragging .crew-card { pointer-events: none; }
.crew-row__track { display: flex; width: max-content; align-items: flex-end; }

.crew-card {
  --clam-w: clamp(160px, 15vw, 220px);
  flex: none;
  display: flex;
  align-items: flex-end;
  margin: 0 clamp(44px, 5vw, 88px) 0 0;
  user-select: none;
}
.crew-card__clam {
  position: relative;
  width: var(--clam-w);
  aspect-ratio: 446 / 460;
  animation: clam-bob 6s ease-in-out infinite;
  filter: drop-shadow(0 12px 12px rgba(110, 80, 20, 0.3));
}
.crew-card:nth-child(4n+2) .crew-card__clam { animation-delay: -1.5s; }
.crew-card:nth-child(4n+3) .crew-card__clam { animation-delay: -3s; }
.crew-card:nth-child(4n+4) .crew-card__clam { animation-delay: -4.5s; }
.crew-card__clam-img { width: 100%; height: 100%; pointer-events: none; }
/* the organizer's photo, clipped to a circle sitting exactly on the painted pearl */
.crew-card__face {
  position: absolute;
  left: 50.2%;
  top: 59.3%;
  width: 45.6%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6), 0 4px 10px rgba(80, 50, 120, 0.35);
}
.crew-card__face { height: auto; border: 3px solid rgba(255, 255, 255, 0.85); background: #e7dcff; }   /* height:auto keeps it a circle despite the height attribute */
.crew-card__clam { container-type: inline-size; }
/* the organizer's role, in the open top shell above their photo */
.crew-card__role {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 23%;
  translate: -50% -50%;
  width: max-content;
  max-width: 90%;
  padding: 0.35em 0.7em;
  border-radius: 12px;
  background: rgba(86, 58, 160, 0.78);
  box-shadow: 0 3px 8px rgba(60, 30, 120, 0.35);
  font: 700 5.9cqi/1.18 var(--f-ui);
  color: #fff;
  text-align: center;
  text-wrap: balance;                /* long titles wrap onto two even lines */
}

.crew-card__shell {
  position: relative;
  width: calc(var(--clam-w) * 0.8);
  aspect-ratio: 420 / 369;
  margin-left: calc(var(--clam-w) * -0.08);
  container-type: inline-size;
  filter: drop-shadow(0 10px 10px rgba(110, 80, 20, 0.3));
}
.crew-card__shell img { width: 100%; height: 100%; pointer-events: none; }
.crew-card__name {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 70%;
  translate: -50% -50%;
  font: 700 10cqi/1.15 var(--f-ui);
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 0 #4b2d9a, 0 2px 8px rgba(60, 30, 140, 0.6);
}

/* ==========================================================================
   FOOTER — a wooden beam across the top, leaves, logo, lowercase links
   ========================================================================== */
.footer {
  position: relative;
  overflow-x: clip;      /* beam may overhang the section above; sides stay clipped */
  padding: clamp(56px, 6vw, 80px) 0 36px;
  background:
    radial-gradient(ellipse 50% 80% at 50% 0%, rgba(232, 180, 74, 0.06), transparent 70%),
    #08140e;
}
.footer__beam {                       /* the new board, 9-sliced like the FAQ planks */
  --ph: clamp(58px, 6vw, 86px);
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% -42%;
  width: min(1400px, 120vw);
  height: var(--ph);
  border: 0 solid transparent;
  border-image: url("../assets/faq-board.png") 0 400 0 110 fill / 0 calc(var(--ph) * 400 / 429) 0 calc(var(--ph) * 110 / 429) stretch;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.55));
  pointer-events: none;
}
.footer__inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 20px;
  text-align: center;
}
.footer__brand img { height: 44px; width: auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45)); }
.footer__brand:hover { opacity: 0.85; }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px clamp(18px, 3vw, 34px);
}
.footer__links a {
  font: 500 1rem/1 var(--f-ui);
  color: #f3f1ea;
}
.footer__links a:hover { color: var(--c-register); }
.footer__muted {
  margin: 4px 0 0;
  font: 400 0.88rem/1.5 var(--f-ui);
  color: rgba(238, 238, 230, 0.55);
}

/* ---------- Reveal on scroll ---------- */
/* Elements fade/slide in as they enter the viewport and back out as they
   leave, so text only appears while its section is on screen. */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: 0s;               /* leave immediately */
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition-delay: var(--delay, 0s); /* stagger only on the way in */
}
.reveal.is-above { transform: translateY(-28px); }  /* scrolled past: exit upward */
.reveal--zoom { transform: translateY(30px) scale(0.86); }
.reveal--zoom.is-above { transform: translateY(-30px) scale(0.86); }
.reveal--zoom.is-visible { transform: none; transition-duration: 0.9s; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(7px); }
}
@keyframes ink-in {
  from { opacity: 0; transform: translateY(8px); filter: blur(2px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes leaf-rustle {
  0%, 100% { rotate: 0deg; }
  20%      { rotate: -4deg; }
  45%      { rotate: 3deg; }
  70%      { rotate: -1.5deg; }
}
@keyframes digit-pop {
  0%   { transform: translateY(-4px) scale(1.12); opacity: 0.6; }
  100% { transform: none; opacity: 1; }
}
@keyframes clam-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes crab-wiggle {
  0%, 100% { rotate: 0deg; }
  25%      { rotate: -6deg; }
  75%      { rotate: 6deg; }
}
@keyframes ship-bob {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50%      { transform: translateY(-6px) rotate(1.2deg); }
}
@keyframes cloud-drift {
  from { transform: translateX(-18px); }
  to   { transform: translateX(18px); }
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 138, 43, 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 138, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 138, 43, 0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  /* tablets: heading above the letter, both centred on the sand */
  .enlist__inner {
    grid-template-columns: minmax(0, 520px);
    justify-content: center;
    padding: calc(var(--seam) + 32px) 8vw 120px;
    text-align: center;
  }
  .enlist__lead { margin-inline: auto; }
}

@media (max-width: 860px) {
  .nav__toggle { display: flex; margin-right: -8px; }
  .nav__menu {
    position: fixed;
    top: calc(var(--nav-h) + 6px);
    left: 10px; right: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 22px 14px;
    border-radius: 22px;
    background: rgba(10, 22, 17, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
            backdrop-filter: blur(16px) saturate(160%);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0.25s;
  }
  .nav__menu.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav__menu a {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
  }
  .nav__menu a:last-child { border-bottom: 0; }
  .nav__menu a::after { display: none; }
  .nav__register { --leaf: 150px; width: 100px; font-size: 1.05rem; }
  .nav__inner { width: calc(100% - 20px); padding-left: 18px; gap: 10px; }
  body.menu-open .nav__inner { background: rgba(10, 22, 17, 0.9); }

}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .container { padding-inline: 16px; }
  .nav__logo { height: 30px; }

  .hero { min-height: 100svh; }
  .hero__img { object-position: 58% 50%; }
  .countdown { --leaf-w: min(52vw, 200px); }
  .hero__embers { display: none; }   /* no fireflies on phones */


  .scene__media { height: 460px; }
  .about__inner { min-height: 0; padding-bottom: calc(var(--seam) + 70px); }
  .crystal { --cw: min(96vw, 440px); }
  /* on phones the text may spread onto the neighbouring facets so long slides still fit;
     the arrows sit inside the left and right facets, clear of the text */
  .crystal__slides { left: 19%; right: 16%; top: 17%; bottom: 23%; }
  .crystal__dots { top: 81%; }
  .crystal__arrow { width: 30px; }
  .crystal__arrow--prev { left: 12%; top: 48%; }
  .crystal__arrow--next { left: 89%; top: 54%; }
  .crystal__slide { line-height: 1.38; }
  .tracks__inner { min-height: 540px; }
  .sponsors { --pos-sm: 40% 50%; --paint-h: 460px; }
  .scene--content.sponsors .scene__media { height: var(--paint-h); }
  .sponsors__head { height: calc(var(--paint-h) * 0.62); padding-top: calc(var(--seam) + 24px); }
  /* schedule: scroll centred on screen; the bookmarks stick out from the left edge
     of the screen over the scroll, turned level, the active one pulled out furthest */
  .log { --pos-sm: 74% 50%; }
  .schedule__inner { min-height: 640px; }
  .day-tabs {
    inset: auto;
    left: var(--stage-x, 0px);
    top: 37%;
    z-index: 3;               /* above the scroll's text box so the tabs stay tappable */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .day-tab { position: relative; left: auto; top: auto; width: 80px; margin-left: -14px; rotate: 15deg; }
  .day-tab.is-active { translate: 12px 0; }
  .day-tab:hover { translate: 6px 0; }
  .day-tab.is-active:hover { translate: 12px 0; }
  .parchment-text { padding-left: 44px; }
  .fleet { --ship-w: 210px; --ship-gap: 26px; }
  .scene__img { object-position: var(--pos-sm); }
  .scene--content .scene__media { height: auto; }

  /* planks: keep a readable height and let the ends run off-screen */
  .faq__list { gap: 5px; margin-inline: -16px; }
  .plank__bar { --ph: 64px; padding: 0 calc(var(--ph) * 0.95) 0 26px; }
  .plank__q { font-size: 0.98rem; }
  .faq-tabs { gap: 6px; margin: 22px 4px 34px; }
  .faq-tab { width: 32vw; }
  .faq-tab span { font-size: 7.4cqi; }
  .plank__body { margin-inline: 18px; }
  .plank__body p { padding: 16px 18px 14px; font-size: 0.95rem; }
  .enlist .scene__media { height: 560px; }
  .enlist__inner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: calc(var(--seam) + 24px) 20px 110px;
    text-align: center;
  }
  .enlist__lead { margin-inline: auto; }
  .bottle-note { rotate: -1.5deg; padding: 38px 22px 34px; margin-inline: 8px; }
  .field-row:not(.field-row--keep) { grid-template-columns: minmax(0, 1fr); }
  .bottle-note .field input:not([type="radio"]):not([type="checkbox"]),
  .bottle-note .field select,
  .bottle-note .field textarea,
  .bottle-note .pick__button { font-size: 16px; }   /* stops iOS zooming in on focus */
  /* Back and Next share the row equally, text centred; a long label ("Cast your message")
     wraps onto two lines instead of running into the knot */
  .plank-btn {
    flex: 1 1 0; min-width: 0; font-size: 0.95rem; line-height: 1.1; padding: 0 18px; text-align: center;
    border-image-width: 0 calc(var(--ph) * 0.6) 0 calc(var(--ph) * 110 / 429);   /* narrower knot end, so the knot clears the label */
  }
  .footer__muted { font-size: 0.8rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Code of Conduct page (code-of-conduct.html)
   ========================================================================== */
.conduct-page { background: #e9d3a4; }
.conduct {
  position: relative;
  padding: calc(var(--nav-h) + clamp(40px, 6vw, 72px)) 0 clamp(96px, 10vw, 140px);
  background:
    linear-gradient(180deg, rgba(10, 22, 17, 0.55), rgba(10, 22, 17, 0) 260px),
    url("../assets/register-sand.jpg") center top / cover;
  color: var(--c-ink);
}
.conduct__inner { max-width: 860px; }
.conduct__head { text-align: center; margin-bottom: clamp(36px, 5vw, 56px); }
.conduct__eyebrow {
  margin: 0 0 10px;
  font: 600 0.95rem/1.3 var(--f-ui);
  letter-spacing: 0.04em;
  color: #fff3d6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}
.conduct__title {
  font: 800 clamp(2.4rem, 6vw, 4rem)/1.05 var(--f-ui);
  color: #fff;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.55);
}
.conduct__lead {
  margin: 12px 0 0;
  font: 600 clamp(1.05rem, 2vw, 1.3rem)/1.3 var(--f-ui);
  color: #fff3d6;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

/* the parchment scroll, rolled at the top and bottom like the registration note */
.conduct__scroll {
  position: relative;
  padding: clamp(40px, 5vw, 60px) clamp(22px, 5vw, 56px) clamp(36px, 5vw, 52px);
  border-radius: 4px;
  background:
    radial-gradient(ellipse at 18% 4%, rgba(255, 255, 255, 0.45), transparent 45%),
    radial-gradient(ellipse at 85% 98%, rgba(140, 90, 30, 0.22), transparent 50%),
    linear-gradient(180deg, #f6e7c4, #ead1a0);
  box-shadow: 0 30px 50px -24px rgba(90, 60, 15, 0.65), inset 0 0 40px rgba(140, 90, 30, 0.26);
  font: 400 1.0625rem/1.7 var(--f-sans);
  color: #3a2614;
}
.conduct__scroll::before,
.conduct__scroll::after {
  content: "";
  position: absolute;
  left: -14px; right: -14px;
  height: 30px;
  border-radius: 16px;
  background: linear-gradient(180deg, #c9a061 0%, #f2deb3 38%, #e2c58c 62%, #b88b4b 100%);
  box-shadow: 0 6px 10px -4px rgba(90, 60, 15, 0.5);
}
.conduct__scroll::before { top: -16px; }
.conduct__scroll::after  { bottom: -16px; }

.conduct__scroll section + section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px dashed rgba(122, 85, 48, 0.4);
}
.conduct__scroll h2 {
  margin-bottom: 12px;
  font: 800 clamp(1.35rem, 2.6vw, 1.7rem)/1.2 var(--f-ui);
  color: #5a3613;
}
.conduct__scroll h3 {
  margin: 22px 0 8px;
  font: 700 1.1rem/1.3 var(--f-ui);
  color: #5a3613;
}
.conduct__scroll strong { color: #4a2a0c; }
.conduct__scroll a {
  color: #8a3b12;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}
.conduct__scroll a:hover { color: #5a3613; }
.conduct__scroll p:last-child { margin-bottom: 0; }
.conduct__list { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.conduct__list li { break-inside: avoid; margin-bottom: 4px; }

/* emergency box: red ink so it can't be missed */
.conduct__alert {
  margin: 18px 0 8px;
  padding: 18px 22px;
  border: 2px solid #a8321e;
  border-radius: 10px;
  background: rgba(255, 245, 230, 0.6);
}
.conduct__alert h3 { margin-top: 0; color: #a8321e; }
.conduct__alert ol { margin: 0 0 10px; padding-left: 1.3em; }
.conduct__alert li { margin-bottom: 4px; }
.conduct__alert p { margin: 0; font-size: 0.95rem; color: #6b4a2a; }

/* organizer contact card */
.conduct__contact {
  margin-top: 20px;
  padding: 16px 22px;
  border-radius: 10px;
  background: rgba(90, 54, 19, 0.1);
  border: 1px solid rgba(90, 54, 19, 0.25);
}
.conduct__contact h3 { margin-top: 0; }
.conduct__contact dl { margin: 0; display: grid; gap: 6px; }
.conduct__contact dl div { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.conduct__contact dt { min-width: 88px; font: 600 0.95rem/1.6 var(--f-ui); color: #7a5530; }
.conduct__contact dd { margin: 0; }

.conduct__signoff { margin-top: 18px; font-style: italic; }
.conduct__signoff span { font: 700 1.1rem/1.6 var(--f-ui); font-style: normal; color: #5a3613; }

.conduct__back { margin: 44px 0 0; text-align: center; }
.conduct__back a {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(10, 22, 17, 0.7);
  color: #fff3d6;
  font: 600 1rem/1 var(--f-ui);
}
.conduct__back a:hover { background: rgba(10, 22, 17, 0.85); color: var(--c-register); }

@media (max-width: 600px) {
  .conduct__scroll { font-size: 1rem; }
  .conduct__scroll::before, .conduct__scroll::after { left: -8px; right: -8px; }
  .conduct__list { columns: 1; }
  .conduct__alert, .conduct__contact { padding: 14px 16px; }
}
