/* ==========================================================================
   HEXCORE — THE STEAMPUNK EDITION · WINTER '26
   Shopify-Editions layout language, rendered in steampunk brass
   with a single cold-teal spark.

   Type system:
     - Giant words ........... Schibsted Grotesk 800 (2023 editorial grotesque)
     - Editorial titles ...... Schibsted Grotesk 600–700 (wordmark, ledes, titles)
     - UI / body ............. Schibsted Grotesk 400–600
     - Instrument dials ...... Orbitron (gauge digits, build log only)
   ========================================================================== */

:root {
  /* Palette */
  --ink:        #0d0b08;   /* deepest charcoal — slabs, fades, footer    */
  --charcoal:   #14100c;   /* page background                             */
  --brass:      #b98a3c;
  --brass-hi:   #d9a85c;
  --brass-dim:  rgba(185, 138, 60, 0.32);
  --parchment:  #f2e8d8;   /* light text                                  */
  --sepia:      #b9a67f;   /* muted text on dark                          */
  --cream:      #e7dfcc;   /* light slab background                       */
  --ink-cream:  #1c1712;   /* text on cream                               */
  --mute-cream: #6f6450;   /* muted text on cream                         */
  --teal:       #2fe6d6;   /* THE accent — aether spark. Use sparingly.   */
  --teal-deep:  #0c8f83;   /* teal that reads on cream                    */
  --teal-dim:   rgba(47, 230, 214, 0.35);
  --teal-glow:  rgba(47, 230, 214, 0.18);

  /* Type */
  --font-giant:  "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-serif:  "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;   /* no serif voice — one grotesque throughout */
  --font-body:   "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-dial:   "Orbitron", sans-serif;

  /* Rhythm */
  --pad-x: clamp(1.25rem, 5vw, 5rem);

  /* Layers */
  --z-fab: 55;
  --z-dock: 60;
  --z-wordmark: 62;
  --z-menu: 65;
  --z-topbar: 70;
  --z-grain: 90;
  --z-cursor: 100;
}

/* ---------- Reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--charcoal);
  color: var(--parchment);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html.has-cursor body,
html.has-cursor a,
html.has-cursor button { cursor: none; }

img, video, svg { display: block; max-width: 100%; }
picture { display: block; }
ul[role="list"], ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; }

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

::selection { background: var(--teal); color: var(--ink); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Skip nav ---------- */

.skip-nav {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  border: 1px solid var(--teal);
  color: var(--parchment);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: top 0.25s ease;
}
.skip-nav:focus { top: 1rem; }

/* ---------- Film grain ---------- */

.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.024;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 9s steps(6) infinite;
}
/* steam-era projector flicker: position jumps + subtle exposure wobble */
@keyframes grain-shift {
  0%, 100% { transform: translate(0, 0); opacity: 0.035; }
  15% { opacity: 0.045; }
  20% { transform: translate(-3%, 2%); opacity: 0.032; }
  40% { transform: translate(2%, -3%); opacity: 0.042; }
  55% { opacity: 0.028; }
  60% { transform: translate(-2%, -2%); opacity: 0.04; }
  80% { transform: translate(3%, 3%); opacity: 0.034; }
}

/* ---------- Custom cursor (brass ring, teal core) ---------- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-cursor);
  width: 26px;
  height: 26px;
  border: 1px solid var(--brass-hi);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, opacity 0.3s ease;
}
.cursor::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--teal);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px var(--teal);
}
.cursor.is-active {
  width: 50px;
  height: 50px;
  border-color: var(--teal);
}
.cursor.is-on { opacity: 1; }   /* revealed by JS on first mousemove only */

/* ==========================================================================
   TOP BAR — three zones, transparent over art, frosts on scroll
   ========================================================================== */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.7rem var(--pad-x);
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease;
}
.topbar.is-scrolled {
  background: rgba(13, 11, 8, 0.7);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: rgba(185, 138, 60, 0.18);
}

.topbar__left { display: flex; align-items: center; gap: 2.2rem; min-width: 0; }
.topbar__brand { display: flex; align-items: center; gap: 0.55rem; flex-shrink: 0; }
.topbar__logo { width: 20px; height: 20px; }
.topbar__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.topbar__label em {
  font-style: normal;
  font-weight: 400;
  color: var(--sepia);
  margin-left: 0.35rem;
}

.topbar__controls { position: relative; display: flex; align-items: center; gap: 1.6rem; }
.topbar__control {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(242, 232, 216, 0.85);
  transition: color 0.25s ease;
}
.topbar__control:hover { color: var(--teal); }
.topbar__control--ghost { opacity: 0.75; }

/* Editions dropdown */
.editions-menu {
  position: absolute;
  top: calc(100% + 0.9rem);
  left: 0;
  min-width: 11rem;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  background: rgba(13, 11, 8, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--brass-dim);
  border-radius: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}
.editions-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.editions-menu a {
  padding: 0.5rem 1.1rem;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: rgba(242, 232, 216, 0.85);
  transition: color 0.2s ease, background 0.2s ease;
}
.editions-menu a:hover { color: var(--teal); background: rgba(185, 138, 60, 0.08); }

.topbar__right { display: flex; align-items: center; gap: 1.4rem; flex-shrink: 0; }
.topbar__domain {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--sepia);
  transition: color 0.25s ease;
}
.topbar__domain:hover { color: var(--parchment); }

/* Burger (mobile) */
.topbar__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 8px;
}
.topbar__burger span {
  display: block;
  height: 1px;
  background: var(--parchment);
  transition: transform 0.3s ease;
}
body.menu-open .topbar__burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
body.menu-open .topbar__burger span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Stacked serif wordmark (fixed, under the bar) ---------- */

.wordmark {
  position: fixed;
  top: 3.6rem;
  left: var(--pad-x);
  z-index: var(--z-wordmark);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.02rem;
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: var(--parchment);
  transition: color 0.4s ease;
}
.wordmark em {
  font-style: italic;
  font-weight: 600;
  color: var(--teal);
}
body.wm-light .wordmark { color: var(--ink-cream); }
body.wm-light .wordmark em { color: var(--teal-deep); }

/* ---------- Pills / buttons ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--brass-dim);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment);
  background: rgba(13, 11, 8, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  /* transform intentionally NOT transitioned — GSAP magnetic hover drives it */
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.pill:hover {
  border-color: var(--teal);
  box-shadow: 0 0 24px var(--teal-glow);
}
/* Solid pill — Shopify's "Start for free" analogue */
.pill--solid {
  background: var(--parchment);
  color: var(--ink);
  border-color: var(--parchment);
  font-weight: 700;
}
.pill--solid:hover {
  background: #fff;
  border-color: var(--teal);
  box-shadow: 0 0 26px var(--teal-glow);
}
.pill--primary {
  border-color: rgba(47, 230, 214, 0.45);
  box-shadow: 0 0 20px var(--teal-glow);
}
.pill--primary:hover { box-shadow: 0 0 36px rgba(47, 230, 214, 0.3); }
.pill--lg { padding: 0.95rem 2.2rem; font-size: 0.78rem; }
.pill__arrow { transition: transform 0.3s ease; }
.pill:hover .pill__arrow { transform: translateX(4px); }

/* ---------- Mobile menu overlay ---------- */

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  background: rgba(13, 11, 8, 0.96);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
body.menu-open { overflow: hidden; }
body.menu-open .menu-overlay { opacity: 1; visibility: visible; }
.menu-overlay__nav { display: flex; flex-direction: column; align-items: center; gap: 1.3rem; }
.menu-overlay__nav a {
  font-family: var(--font-giant);
  font-size: clamp(1.5rem, 6.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color 0.25s ease;
}
.menu-overlay__nav a:hover { color: var(--teal); }

/* ---------- Mobile progress rail ---------- */

.progress-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: calc(var(--z-topbar) + 1);
  display: none;
}
.progress-rail__fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--brass), var(--teal));
  transform-origin: left center;
  transform: scaleX(0);
  box-shadow: 0 0 8px var(--teal-glow);
}

/* ==========================================================================
   LOWER-LEFT NUMBERED DOCK  (Shopify's fixed chapter index)
   ========================================================================== */

.dock {
  position: fixed;
  left: var(--pad-x);
  bottom: 1.8rem;
  z-index: var(--z-dock);
  opacity: 0;                /* fades in after the hero (JS) */
  pointer-events: none;
}
.dock.is-visible { pointer-events: auto; opacity: 1; }

.dock__list { display: flex; flex-direction: column; }
.dock__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.3rem;
  min-width: 7.2rem;
  padding: 0.06rem 0;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: rgba(242, 232, 216, 0.55);
  transition: color 0.25s ease;
}
.dock__link i {
  font-style: normal;
  font-size: 0.56rem;
  opacity: 0.6;
}
.dock__link:hover { color: var(--parchment); }
.dock__link.is-active { color: var(--teal); }
.dock__link.is-active i { opacity: 1; }

/* underline sweep on the chapter name */
.dock__link span { position: relative; }
.dock__link span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.dock__link:hover span::after,
.dock__link.is-active span::after { transform: scaleX(1); }

.dock__legal {
  display: flex;
  flex-direction: column;
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(242, 232, 216, 0.14);
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  color: rgba(242, 232, 216, 0.38);
}
.dock__legal a { transition: color 0.25s ease; }
.dock__legal a:hover { color: var(--teal); }

/* Dock over cream sections */
body.dock-light .dock__link { color: rgba(28, 23, 18, 0.55); }
body.dock-light .dock__link:hover { color: var(--ink-cream); }
body.dock-light .dock__link.is-active { color: var(--teal-deep); }
body.dock-light .dock__legal { color: rgba(28, 23, 18, 0.4); border-top-color: rgba(28, 23, 18, 0.16); }

/* ==========================================================================
   BOTTOM-RIGHT COG FAB
   ========================================================================== */

.fab {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: var(--z-fab);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(13, 11, 8, 0.88);
  border: 1px solid var(--brass-dim);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  /* transform intentionally NOT transitioned — GSAP magnetic hover drives it */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.fab:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 22px var(--teal-glow);
}
.fab__cog {
  width: 26px;
  height: 26px;
  color: var(--brass-hi);
  animation: fab-spin 16s linear infinite;
}
.fab:hover .fab__cog { color: var(--teal); }
@keyframes fab-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   ACTS — full-bleed illustrated chapters
   ========================================================================== */

.chapter { position: relative; }

.act {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

/* --- 2.5D layer stack inside each isolated .act --------------------------
   z-map: 1 media(bg art / future video) · 2 scrim + steam · 3 GIANT WORD ·
          4 fg figure cutout · 5 ledes/box/CTAs/spark/cue · 6 props + fade ·
          7 hero whiteout.
   The giant word sits BETWEEN the background and the cutout figures —
   the Shopify "Sidekick" trick: heads overlap the word.
   ------------------------------------------------------------------------ */

.act__bg {
  position: absolute;
  inset: 0;
  /* no z-index: children join the .act stacking context directly */
  overflow: hidden;
}

/* Media wrapper: GSAP scrubs THIS, so a future ambient video loop
   (e.g. /videos/edition-foundry-loop.mp4) inherits identical motion. */
.act__media {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: scale(1.12);   /* no-JS overscan baseline */
  will-change: transform;
}
.act__media picture { width: 100%; height: 100%; }
.act__img,
.act__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.act__media video {
  position: absolute;
  inset: 0;
}

/* Foreground figure cutout — pixel-registered 1:1 with its background */
.act__fg {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  will-change: transform;
}

.act__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 42%, rgba(13, 11, 8, 0.5) 100%),
    linear-gradient(180deg, rgba(13, 11, 8, 0.55) 0%, rgba(13, 11, 8, 0.12) 30%, rgba(13, 11, 8, 0.22) 62%, rgba(13, 11, 8, 0.78) 100%);
}

/* Cinematic fade-through-black at act edges (GSAP-scrubbed) */
.act__fade {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
}
/* teal-white veil variant — receives the hero's white-out hand-off */
.act__fade--light {
  background: radial-gradient(ellipse at 50% 55%, #eafffc 0%, #bdf5ee 45%, #7fded2 100%);
}

/* hero white-out: the spark blooms into this full-frame wash */
.whiteout {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: radial-gradient(ellipse at 22% 68%, #f4fffd 0%, #d9fbf6 40%, #8ee8dc 100%);
  opacity: 0;
  pointer-events: none;
}

.act__content {
  position: relative;
  /* NOT a stacking context — children interleave with the fg layer */
  width: 100%;
  padding: clamp(6rem, 12vh, 9rem) var(--pad-x) clamp(4rem, 9vh, 7rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.act__content .giant { z-index: 3; }             /* behind the figures */
.act__lede, .act__actions, .hero-box {
  position: relative;
  z-index: 5;                                    /* readable above the figures */
}
.act__actions { margin-top: clamp(1.6rem, 4vh, 2.6rem); }

/* ---------- Giant kinetic words — heavy neo-grotesque, Shopify-style ---------- */

.giant {
  position: relative;
  font-family: var(--font-giant);
  font-weight: 800;
  font-size: clamp(4rem, 14.5vw, 15rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 4px 60px rgba(13, 11, 8, 0.55);
}
/* teal aether underglow */
.giant::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14%;
  width: 80%;
  height: 48%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--teal-glow) 0%, transparent 70%);
  filter: blur(16px);
  z-index: -1;
  pointer-events: none;
}
.giant .mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.giant .char { display: inline-block; transform: translateZ(0); }

.giant--hero { font-size: clamp(2.8rem, 9.5vw, 9.5rem); }

/* ---------- Editorial serif lede under each giant word ---------- */

.act__lede {
  max-width: 30ch;
  margin-top: clamp(1.1rem, 2.6vh, 1.8rem);
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.35;
  color: rgba(242, 232, 216, 0.95);
  text-shadow: 0 2px 24px rgba(13, 11, 8, 0.6);
}
.act__lede::first-letter {
  font-style: italic;
  font-size: 1.45em;
  line-height: 0.9;
}
/* masked word-by-word reveal (spans injected by JS; inline-block masks
   break ::first-letter on the <p>, so re-apply it to the first word) */
.act__lede .lmask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.act__lede .lword { display: inline-block; }
.act__lede .lmask:first-child .lword::first-letter {
  font-style: italic;
  font-size: 1.45em;
  line-height: 0.9;
}
.act__lede.is-split::first-letter { font-size: inherit; font-style: inherit; }

/* ---------- Hero bordered editorial box (the "Renaissance" panel) ---------- */

.act__content--hero {
  gap: clamp(2rem, 5vh, 3.2rem);
  justify-content: center;
}

.hero-box {
  width: min(88vw, 340px);
  padding: clamp(1.4rem, 2.6vw, 2.1rem);
  border: 1px solid rgba(242, 232, 216, 0.55);
  text-align: left;
  background: rgba(13, 11, 8, 0.18);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.hero-box__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.06;
  margin-bottom: 1.1rem;
}
.hero-box__title em {
  font-style: italic;
  font-weight: 600;
  color: var(--teal);
}
.hero-box__line {
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(242, 232, 216, 0.85);
  margin-bottom: 1.3rem;
}
.hero-box__list { display: flex; flex-direction: column; }
.hero-box__list a {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0.04em;
  color: rgba(242, 232, 216, 0.8);
  transition: color 0.2s ease, transform 0.2s ease;
}
.hero-box__list a:hover { color: var(--teal); transform: translateX(3px); }

/* ---------- Hero teal spark (the "Creation of Adam" burst) ---------- */

.spark {
  position: absolute;
  left: 14%;
  top: 66%;
  z-index: 5;                      /* above the fg robots — it's their forge light */
  mix-blend-mode: screen;
  width: 38vmin;
  height: 38vmin;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(235, 255, 252, 0.85) 0%, rgba(47, 230, 214, 0.5) 18%, rgba(47, 230, 214, 0.14) 45%, transparent 70%);
  filter: blur(6px);
  opacity: 0;
  transform: scale(0.3);
  animation: spark-pulse 3.4s ease-in-out infinite;
}
@keyframes spark-pulse {
  0%, 100% { filter: blur(6px); }
  50% { filter: blur(10px); }
}

/* ---------- Floating teal props (collage foreground items) ---------- */

.prop {
  position: absolute;
  z-index: 6;                      /* in front of the figure cutouts */
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.6;
  pointer-events: none;
  opacity: 0.8;
  filter: drop-shadow(0 0 14px rgba(47, 230, 214, 0.45));
}
.prop--gear-lg    { width: clamp(70px, 8.5vw, 140px); right: 9%; top: 22%; }
.prop--gear-sm    { width: clamp(42px, 4.5vw, 76px); left: 7%; top: 18%; }
.prop--gear-design{ width: clamp(54px, 6vw, 100px); right: 7%; top: 15%; opacity: 0.65; }
.prop--watch      { width: clamp(48px, 5.5vw, 92px); left: 6%; top: 18%; opacity: 0.6; stroke-width: 2.2; }
.prop--valve      { width: clamp(50px, 5.5vw, 95px); right: 8%; top: 20%; opacity: 0.6; }

/* idle motion lives on the inner path/group so GSAP owns the svg transform */
.prop path,
.prop--valve circle:first-of-type {
  transform-box: fill-box;
  transform-origin: center;
}
.prop--gear-lg path,
.prop--gear-design path { animation: prop-spin 26s linear infinite; }
.prop--gear-sm path     { animation: prop-spin 17s linear infinite reverse; }
.prop--valve path       { animation: prop-spin 34s linear infinite; }
.prop--watch .prop__sway {
  transform-box: fill-box;
  transform-origin: 50% 4%;
  animation: prop-sway 5.5s ease-in-out infinite;
}
@keyframes prop-spin { to { transform: rotate(360deg); } }
@keyframes prop-sway {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

/* ---------- Scroll cue ---------- */

.scroll-cue {
  position: absolute;
  bottom: clamp(1.2rem, 4vh, 2.4rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.scroll-cue__label {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--sepia);
}
.scroll-cue__line {
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, var(--brass), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--teal));
  animation: cue-drop 2.2s ease-in-out infinite;
}
@keyframes cue-drop {
  0% { top: -100%; }
  60%, 100% { top: 100%; }
}

/* ---------- Steam drift ---------- */

.steam {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.steam i {
  position: absolute;
  bottom: -22vh;
  width: 42vmin;
  height: 42vmin;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(242, 232, 216, 0.07) 0%, transparent 65%);
  filter: blur(18px);
  animation: steam-rise 16s linear infinite;
}
.steam i:nth-child(1) { left: 8%; animation-duration: 19s; }
.steam i:nth-child(2) { left: 55%; animation-duration: 15s; animation-delay: -6s; width: 56vmin; height: 56vmin; }
.steam i:nth-child(3) { left: 78%; animation-duration: 23s; animation-delay: -12s; }
@keyframes steam-rise {
  0%   { transform: translateY(0) translateX(0) scale(0.9); opacity: 0; }
  12%  { opacity: 1; }
  85%  { opacity: 0.4; }
  100% { transform: translateY(-130vh) translateX(6vw) scale(1.35); opacity: 0; }
}

/* ==========================================================================
   SLABS — the panel sections between art chapters
   ========================================================================== */

.slab { position: relative; z-index: 2; }
.slab--dark { background: var(--ink); color: var(--parchment); }
.slab--cream { background: var(--cream); color: var(--ink-cream); }
.slab--section { padding: clamp(5rem, 12vh, 8.5rem) 0; }

.slab__inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: start;
  gap: clamp(2.5rem, 5vw, 5rem);
  max-width: 78rem;
  margin-inline: auto;
  padding: clamp(4.5rem, 10vh, 7rem) var(--pad-x);
}
.slab__inner--stack {
  display: block;
  max-width: 62rem;
  padding-top: 0;
  padding-bottom: 0;
}
.slab__inner--wide { max-width: 78rem; }

.slab__label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-hi);
  margin-bottom: 1.1rem;
}
.slab--cream .slab__label { color: #8a6425; }

.slab__title {
  font-family: var(--font-giant);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 24ch;
  margin-bottom: 1.4rem;
}
.slab__title--lg { font-size: clamp(1.7rem, 3.4vw, 2.7rem); max-width: 24ch; }
.slab__desc {
  max-width: 38rem;
  font-weight: 300;
  color: var(--sepia);
  margin-bottom: clamp(2.2rem, 5vh, 3.4rem);
}

/* ---------- Feature "changelog" lists ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 1.6rem;
}
.features__item {
  position: relative;
  padding: 1.05rem 1.3rem 1.05rem 1.7rem;
}
.features__item:nth-child(odd) { border-right: 1px solid rgba(185, 138, 60, 0.18); }
.features__item:nth-child(n+3) { border-top: 1px solid rgba(185, 138, 60, 0.18); }
.slab--cream .features__item:nth-child(odd) { border-right-color: rgba(28, 23, 18, 0.14); }
.slab--cream .features__item:nth-child(n+3) { border-top-color: rgba(28, 23, 18, 0.14); }

.tick {
  position: absolute;
  left: 0.15rem;
  top: 1.38rem;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal-glow);
}
.slab--cream .tick { background: var(--teal-deep); box-shadow: none; }

.features__title {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}
.features__desc {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.55;
  color: var(--sepia);
}
.slab--cream .features__desc { color: var(--mute-cream); }

/* ---------- Floating media card (brass-framed device) ---------- */

.media-card {
  position: relative;
  margin-top: calc(-18vh - clamp(4.5rem, 10vh, 7rem));  /* floats up over the art above */
  transform: rotate(-2deg);
  padding: 9px;
  background: linear-gradient(160deg, rgba(32, 25, 16, 0.95), rgba(20, 16, 12, 0.95));
  border: 1px solid var(--brass-dim);
  border-radius: 10px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.3);
  will-change: transform;
}
.media-card__chrome {
  display: flex;
  gap: 5px;
  padding: 2px 4px 8px;
}
.media-card__chrome i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass-dim);
}
.media-card__chrome i:first-child { background: var(--teal-dim); }
.media-card video {
  width: 100%;
  border-radius: 5px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--ink);
}
.media-card__caption {
  padding: 0.7rem 0.4rem 0.3rem;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sepia);
  text-align: center;
}

/* ---------- Floating instruments (Build, on cream) ---------- */

.instruments {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-top: calc(-16vh - clamp(4.5rem, 10vh, 7rem));
}
.float-card {
  padding: 1.1rem 1.2rem 1.2rem;
  background: linear-gradient(160deg, rgba(24, 19, 13, 0.96), rgba(15, 12, 9, 0.96));
  border: 1px solid var(--brass-dim);
  border-radius: 10px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
  color: var(--parchment);
  will-change: transform;
}
.float-card--gauge { transform: rotate(1.5deg); align-self: flex-start; width: min(100%, 240px); }
.float-card--log { transform: rotate(-1.5deg); align-self: flex-end; width: min(100%, 260px); }
.float-card__label {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brass-hi);
  margin-bottom: 0.85rem;
}
.float-card__foot {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sepia);
  margin-top: 0.7rem;
  text-align: center;
}

/* Gauge */
.gauge { position: relative; width: 104px; margin-inline: auto; }
.gauge__svg { width: 100%; transform: rotate(-90deg); }
.gauge__track { fill: none; stroke: rgba(185, 138, 60, 0.25); stroke-width: 5; }
.gauge__needle {
  fill: none;
  stroke: var(--teal);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  filter: drop-shadow(0 0 5px var(--teal-glow));
}
.gauge__num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-dial);
  font-size: 1.6rem;
  font-weight: 700;
}

/* Build log */
.buildlog { display: flex; flex-direction: column; gap: 0.45rem; }
.buildlog li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: rgba(242, 232, 216, 0.85);
}
.buildlog li em {
  margin-left: auto;
  font-style: normal;
  color: var(--sepia);
  font-size: 0.64rem;
}
.buildlog__ok { color: var(--teal); font-size: 0.7rem; }
.buildlog__done {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(185, 138, 60, 0.16);
  color: var(--teal) !important;
  font-family: var(--font-dial);
  font-size: 0.6rem !important;
  letter-spacing: 0.12em;
}

/* ==========================================================================
   WORD-CLOUD — serif "/skills" scattered on cream
   ========================================================================== */

.wordcloud {
  position: relative;
  background: var(--cream);
  color: var(--ink-cream);
  padding: clamp(2rem, 5vh, 4rem) var(--pad-x) clamp(4rem, 9vh, 7rem);
  text-align: center;
  overflow: hidden;
}
.wordcloud__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.1;
  margin-bottom: 0.8rem;
}
.wordcloud__title em {
  font-style: italic;
  font-weight: 600;
  font-size: 1.28em;
  line-height: 0;
}
.wordcloud__sub {
  max-width: 42ch;
  margin-inline: auto;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--mute-cream);
}

.wordcloud__field {
  position: relative;
  height: clamp(380px, 62vh, 560px);
  max-width: 72rem;
  margin: clamp(1.5rem, 4vh, 3rem) auto 0;
}
.wc {
  position: absolute;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: rgba(28, 23, 18, 0.62);   /* dark warm ink — size carries the depth cue */
  white-space: nowrap;
  will-change: transform;
}
.wc--xl { font-size: clamp(1.6rem, 3vw, 2.4rem); color: rgba(28, 23, 18, 0.8); }
.wc--lg { font-size: clamp(1.25rem, 2.2vw, 1.75rem); color: rgba(28, 23, 18, 0.72); }
.wc--md { font-size: clamp(1rem, 1.6vw, 1.3rem); }
.wc--sm { font-size: clamp(0.85rem, 1.2vw, 1.05rem); color: rgba(28, 23, 18, 0.55); }

.wc:nth-child(1)  { left: 16%; top: 34%; }
.wc:nth-child(2)  { left: 55%; top: 8%;  }
.wc:nth-child(3)  { left: 62%; top: 42%; }
.wc:nth-child(4)  { left: 34%; top: 12%; }
.wc:nth-child(5)  { left: 10%; top: 66%; }
.wc:nth-child(6)  { left: 44%; top: 58%; }
.wc:nth-child(7)  { left: 68%; top: 74%; }
.wc:nth-child(8)  { left: 8%;  top: 14%; }
.wc:nth-child(9)  { left: 30%; top: 82%; }
.wc:nth-child(10) { left: 78%; top: 22%; }
.wc:nth-child(11) { left: 48%; top: 30%; }
.wc:nth-child(12) { left: 82%; top: 56%; }

/* ==========================================================================
   PINNED CHAPTER — RANK (sticky art, grimoire scrolls over)
   ========================================================================== */

.chapter--pin { overflow: visible; }
.pin__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  isolation: isolate;
}
.chapter--pin .act__bg,
.chapter--pin .act__fade { position: absolute; }
.act__content--pin { padding-bottom: 16vh; }   /* keeps the lede clear of the grimoire panel */

.pin__scroll {
  position: relative;
  z-index: 4;
  margin-top: -100vh;
  margin-top: -100svh;
  pointer-events: none;
}
.pin__spacer { height: 100vh; height: 100svh; }
.pin__spacer--end { height: 22vh; }
.pin__panel-wrap {
  display: flex;
  justify-content: center;
  padding: 0 var(--pad-x);
}

.panel {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--brass-dim);
  border-radius: 6px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  /* rivet dots in the four corners over the glass gradient */
  background-image:
    radial-gradient(circle 2.5px at 11px 11px, var(--brass) 0 1.6px, transparent 2.5px),
    radial-gradient(circle 2.5px at calc(100% - 11px) 11px, var(--brass) 0 1.6px, transparent 2.5px),
    radial-gradient(circle 2.5px at 11px calc(100% - 11px), var(--brass) 0 1.6px, transparent 2.5px),
    radial-gradient(circle 2.5px at calc(100% - 11px) calc(100% - 11px), var(--brass) 0 1.6px, transparent 2.5px),
    linear-gradient(160deg, rgba(20, 16, 12, 0.8), rgba(30, 23, 15, 0.68));
}
.panel--over {
  pointer-events: auto;
  width: 100%;
  max-width: 52rem;
  box-shadow: 0 30px 80px rgba(13, 11, 8, 0.6);
}
.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--brass-dim);
}
.panel__title {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass-hi);
}
.panel__meta {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--teal);
  opacity: 0.9;
}
.features--panel { margin-top: 0.4rem; }
.panel__note {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--brass-dim);
  font-size: 0.86rem;
  color: var(--sepia);
}
.panel__note strong { color: var(--teal); font-weight: 600; }

/* ==========================================================================
   BEFORE / AFTER SLIDER (verbatim markup, edition dress)
   ========================================================================== */

.slider-frame {
  position: relative;
  padding: 10px;
  border: 1px solid var(--brass-dim);
  border-radius: 10px;
  background-image:
    radial-gradient(circle 2.5px at 11px 11px, var(--brass) 0 1.6px, transparent 2.5px),
    radial-gradient(circle 2.5px at calc(100% - 11px) 11px, var(--brass) 0 1.6px, transparent 2.5px),
    radial-gradient(circle 2.5px at 11px calc(100% - 11px), var(--brass) 0 1.6px, transparent 2.5px),
    radial-gradient(circle 2.5px at calc(100% - 11px) calc(100% - 11px), var(--brass) 0 1.6px, transparent 2.5px),
    linear-gradient(160deg, rgba(185, 138, 60, 0.08), rgba(20, 16, 12, 0.4));
}
.slider {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.slider__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.slider__clip {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  overflow: hidden;
  border-right: 1px solid rgba(47, 230, 214, 0.6);
}
.slider__clip .slider__img { max-width: none; }
.slider__handle {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}
.slider__handle-line {
  flex: 1;
  width: 1px;
  background: rgba(47, 230, 214, 0.55);
  box-shadow: 0 0 10px var(--teal-glow);
}
.slider__handle-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--teal);
  background: rgba(13, 11, 8, 0.75);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 24px var(--teal-glow);
}
.slider-frame__labels {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 0.4rem 0.2rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--sepia);
}
.slider-frame__labels span:last-child { color: var(--teal); }

/* ==========================================================================
   PORTFOLIO (verbatim cards, edition dress)
   ========================================================================== */

.portfolio__track {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.4rem, 3vw, 2.5rem);
}
.portfolio__card {
  position: relative;
  display: block;
  border: 1px solid var(--brass-dim);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(20, 16, 12, 0.6);
  transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}
.portfolio__card:hover {
  border-color: rgba(47, 230, 214, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(13, 11, 8, 0.55), 0 0 30px rgba(47, 230, 214, 0.07);
}
.portfolio__card-index {
  position: absolute;
  top: 0.9rem;
  left: 1rem;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--brass-hi);
  text-shadow: 0 1px 8px rgba(13, 11, 8, 0.8);
}
.portfolio__card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.portfolio__card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.portfolio__card:hover .portfolio__card-media video { transform: scale(1.04); }
.portfolio__card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1.1rem;
  background: linear-gradient(180deg, transparent 55%, rgba(13, 11, 8, 0.55));
  opacity: 0;
  transition: opacity 0.35s ease;
}
.portfolio__card:hover .portfolio__card-overlay,
.portfolio__card:focus-visible .portfolio__card-overlay { opacity: 1; }
.portfolio__card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--teal);
  border-radius: 100px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--parchment);
  background: rgba(13, 11, 8, 0.7);
  box-shadow: 0 0 18px var(--teal-glow);
}
.portfolio__card-info {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.1rem 1.2rem 1.25rem;
  border-top: 1px solid rgba(185, 138, 60, 0.16);
}
.portfolio__card-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.portfolio__card-tag {
  padding: 0.22rem 0.65rem;
  border: 1px solid var(--brass-dim);
  border-radius: 100px;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sepia);
}
.portfolio__card-title {
  font-family: var(--font-giant);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
}

/* ==========================================================================
   AWARDS (verbatim marquee, edition dress)
   ========================================================================== */

.awards-marquee {
  overflow: hidden;
  margin: clamp(1.5rem, 4vh, 2.5rem) 0 clamp(2.5rem, 6vh, 4rem);
  padding: 1.6rem 0;
  border-top: 1px solid var(--brass-dim);
  border-bottom: 1px solid var(--brass-dim);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.awards-marquee__track {
  display: flex;
  width: max-content;
  animation: awards-scroll 32s linear infinite;
}
.awards-marquee:hover .awards-marquee__track { animation-play-state: paused; }
@keyframes awards-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.3333%); }
}
.awards-marquee__set {
  display: flex;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-right: clamp(2.5rem, 6vw, 5rem);
}
.awards-marquee__item img { height: 74px; width: auto; filter: sepia(0.25) saturate(0.9); }
.awards-marquee__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.9rem 1.6rem;
  border: 1px solid var(--brass-dim);
  border-radius: 4px;
  white-space: nowrap;
}
.awards-marquee__badge-label {
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sepia);
}
.awards-marquee__badge-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brass-hi);
}
.awards-marquee__badge-stars {
  color: var(--brass-hi);
  letter-spacing: 0.25em;
  font-size: 0.85rem;
}

.awards-message {
  max-width: 44rem;
  margin-inline: auto;
  padding: 0 var(--pad-x);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
}
.awards-message__text {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 500;
  line-height: 1.5;
  color: rgba(242, 232, 216, 0.9);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  position: relative;
  background: var(--ink);
  border-top: 1px solid var(--brass-dim);
  padding: clamp(3rem, 8vh, 5.5rem) var(--pad-x) 5.5rem;  /* extra bottom room for dock/FAB */
}

.footer-logo {
  overflow: hidden;
  text-align: center;
  margin-bottom: clamp(3rem, 8vh, 5rem);
}
.footer-logo__text {
  font-family: var(--font-giant);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 7rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(185, 138, 60, 0.55);
}
.footer-logo__char { display: inline-block; }

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 78rem;
  margin-inline: auto;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(185, 138, 60, 0.16);
}
.footer__brand {
  font-family: var(--font-dial);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.24em;
  margin-bottom: 0.8rem;
}
.footer__desc { color: var(--sepia); font-size: 0.9rem; font-weight: 300; max-width: 22rem; }
.footer__social { display: flex; gap: 0.7rem; margin-top: 1.4rem; }
.footer__social-link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--brass-dim);
  border-radius: 50%;
  font-size: 0.72rem;
  color: var(--sepia);
  transition: border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.footer__social-link:hover {
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 0 16px var(--teal-glow);
}
.footer__heading {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brass-hi);
  margin-bottom: 1.1rem;
}
.footer__links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__link {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--sepia);
  transition: color 0.25s ease;
}
.footer__link:hover { color: var(--teal); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 78rem;
  margin-inline: auto;
  padding-top: 1.6rem;
  font-size: 0.78rem;
  color: var(--sepia);
}
.footer__legal { display: flex; gap: 1.6rem; }
.footer__legal a { color: var(--sepia); transition: color 0.25s ease; }
.footer__legal a:hover { color: var(--teal); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Clear the fixed lower-left dock: slab content's left edge lands at >=230px.
   The calc subtracts the container's auto-margin, so wide viewports (where
   the margin alone already clears the dock) keep their normal padding. */
@media (min-width: 1200px) {
  .slab__inner,
  .slab__inner--stack.slab__inner--wide {
    padding-left: max(var(--pad-x), calc(230px - (100vw - 78rem) / 2));
  }
  .slab__inner--stack:not(.slab__inner--wide) {
    padding-left: max(var(--pad-x), calc(230px - (100vw - 62rem) / 2));
  }
}

@media (max-width: 1100px) {
  .slab__inner { grid-template-columns: 1fr; }
  .media-card {
    margin-top: 0;
    max-width: 30rem;
    justify-self: center;
    transform: rotate(-1deg);
  }
  .instruments {
    margin-top: 0;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .float-card--gauge, .float-card--log { align-self: auto; }
}

@media (max-width: 1024px) {
  .dock { display: none; }
  .wordmark { display: none; }
  .progress-rail { display: block; }
  .topbar__controls { display: none; }
  .topbar__domain { display: none; }
  .topbar__burger { display: flex; }
  .footer { padding-bottom: 2rem; }
}

@media (max-width: 768px) {
  :root { --pad-x: 1.25rem; }

  .topbar { padding: 0.6rem var(--pad-x); }
  .topbar__label em { display: none; }
  .pill--solid { padding: 0.5rem 1rem; font-size: 0.62rem; }

  .giant { font-size: clamp(3rem, 14vw, 6.5rem); }
  .giant--hero { font-size: clamp(2.4rem, 13vw, 5rem); }
  .giant::before { display: none; }

  .act__content { padding-top: 6.5rem; padding-bottom: 5rem; }
  .act__lede { font-size: 1.2rem; }

  .hero-box { width: min(88vw, 320px); }

  .features { grid-template-columns: 1fr; }
  .features__item { padding: 1rem 0.4rem 1rem 1.5rem; }
  .features__item:nth-child(odd) { border-right: none; }
  .features__item:nth-child(n+2) { border-top: 1px solid rgba(185, 138, 60, 0.18); }
  .slab--cream .features__item:nth-child(n+2) { border-top-color: rgba(28, 23, 18, 0.14); }
  .tick { left: 0; top: 1.3rem; }

  .pin__spacer--end { height: 12vh; }

  .steam, .prop { display: none; }
  .spark { width: 46vmin; height: 46vmin; left: 8%; top: 60%; }

  /* Word-cloud: static wrapped list, no absolute scatter */
  .wordcloud__field {
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 0.9rem 1.4rem;
    padding: 1rem 0;
  }
  .wc { position: static; }

  .portfolio__track { grid-template-columns: 1fr; }
  .portfolio__card-overlay { opacity: 1; }

  .awards-marquee__item img { height: 56px; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__about { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }

  .fab { width: 46px; height: 46px; right: 1rem; bottom: 1rem; }
}

@media (max-width: 480px) {
  .slab__title--lg { font-size: 1.4rem; }
  .slider-frame { padding: 6px; }
  .slider__handle-btn { width: 38px; height: 38px; }
}

/* ==========================================================================
   REDUCED MOTION — everything static and readable
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .act__media { transform: none; will-change: auto; }
  .act__fg { will-change: auto; }   /* cutout sits registered on its background */
  .act__fade, .whiteout, .steam, .scroll-cue, .cursor { display: none; }
  .grain { animation: none; }
  .spark { opacity: 0.55; transform: scale(1); animation: none; }
  .prop { opacity: 0.5; }
  .prop path, .prop--watch .prop__sway { animation: none; }
  .fab__cog { animation: none; }
  .dock { opacity: 1; pointer-events: auto; }
  .awards-marquee__track { animation: none; flex-wrap: wrap; width: auto; }
  .awards-marquee__set[aria-hidden="true"] { display: none; }
  .awards-marquee { mask-image: none; -webkit-mask-image: none; }
  .gauge__needle { stroke-dashoffset: 0; }
  .media-card, .instruments { margin-top: 0; }
  /* release the pin: read as a normal chapter */
  .pin__stage { position: relative; height: auto; min-height: 100svh; }
  .pin__scroll { margin-top: 0; }
  .pin__spacer { display: none; }
  .pin__panel-wrap { padding-bottom: 4rem; }
}
