/* ==========================================================
   Carl Avene · Graphic Designer Portfolio
   Tokens
   ========================================================== */
:root {
  --paper: #f7f3ec;
  --sunk: #efe8dd;
  --surface: #ffffff;
  --ink: #17120d;
  --ink-2: rgba(23, 18, 13, 0.64);
  --ink-3: rgba(23, 18, 13, 0.42);
  --hair: rgba(23, 18, 13, 0.09);
  --deep: #1b0f0a;
  --deep-2: #2a150c;
  --accent: #e8461e;      /* vermilion */
  --accent-hot: #ff6a3d;
  --mango: #ffb347;
  --cream-on-dark: #fff4ea;

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --w: 920px;
  --w-wide: 1180px;
  --gutter: clamp(16px, 4vw, 32px);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  --ring: 0 0 0 1px rgba(23, 18, 13, 0.06);
  --shadow-card: var(--ring), 0 1px 2px rgba(23, 18, 13, 0.04), 0 18px 40px -28px rgba(80, 30, 5, 0.28);
  --shadow-lift: 0 0 0 1px rgba(23, 18, 13, 0.08), 0 2px 4px rgba(23, 18, 13, 0.05), 0 28px 50px -26px rgba(80, 30, 5, 0.4);

  /* motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-out-quart: cubic-bezier(.25, 1, .5, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --t-in: .14s;
  --t-out: .22s;
  --t-enter: .9s;
  --rise: 28px;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r);
  transition: top var(--t-out) var(--ease);
}
.skip:focus { top: 12px; }

.grain {
  position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain);
  opacity: .14; mix-blend-mode: overlay;
}

.arrow { transition: transform var(--t-out) var(--ease); }
a:hover .arrow, button:hover .arrow { transform: translateX(3px); }

/* ==========================================================
   Reveal on scroll (staggered)
   ========================================================== */
[data-rise] {
  opacity: 0;
  transform: translateY(var(--rise));
  filter: blur(6px);
  transition:
    opacity var(--t-enter) var(--ease-out-expo),
    transform var(--t-enter) var(--ease-out-expo),
    filter var(--t-enter) var(--ease-out-expo);
  transition-delay: var(--d, 0ms);
}
[data-rise].in { opacity: 1; transform: none; filter: none; }

/* ==========================================================
   Nav
   ========================================================== */
.nav-wrap {
  position: fixed; inset: 14px 0 auto; z-index: 50;
  display: flex; justify-content: center; padding: 0 var(--gutter);
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  width: min(100%, 680px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 6px 6px 14px;
  border-radius: 16px;
  color: var(--cream-on-dark);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  transition: background .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease);
}
.nav-wrap.scrolled .nav {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-card);
}

.brand { display: flex; align-items: center; gap: 9px; font: 600 15.5px/1 var(--sans); letter-spacing: -0.03em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 3.5px rgba(255, 255, 255, .5);
  transition: transform .6s var(--ease-out-expo);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }

.nav-links { position: relative; display: flex; gap: 2px; }
.nav-links a {
  position: relative; z-index: 1;
  padding: 8px 12px; border-radius: 10px;
  font-size: 14.5px; opacity: .78;
  transition: opacity var(--t-in) var(--ease);
}
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-pill {
  position: absolute; top: 0; left: 0; height: 100%;
  border-radius: 10px;
  background: currentColor; opacity: 0;
  transition: transform .5s var(--ease-out-expo), width .5s var(--ease-out-expo), opacity .3s var(--ease);
}
.nav-pill.on { opacity: .1; }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 11px;
  background: var(--cream-on-dark); color: var(--ink);
  font: 500 14px/1 var(--sans);
  transition: transform var(--t-out) var(--ease), background .4s var(--ease), color .4s var(--ease);
}
.nav-wrap.scrolled .nav-cta { background: var(--ink); color: #fff; }
.nav-cta:hover { transform: translateY(-1px); }
.nav-cta:active { transform: translateY(0) scale(.97); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #3ccf6e; box-shadow: 0 0 0 0 rgba(60, 207, 110, .6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(60, 207, 110, .55); } 70% { box-shadow: 0 0 0 7px rgba(60, 207, 110, 0); } 100% { box-shadow: 0 0 0 0 rgba(60, 207, 110, 0); } }

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: var(--cream-on-dark);
  background:
    radial-gradient(120% 70% at 50% 108%, var(--accent-hot) 0%, var(--accent) 22%, #8a2a0c 46%, transparent 72%),
    linear-gradient(180deg, var(--deep) 0%, var(--deep-2) 60%, #4a1a08 100%);
  padding: 150px var(--gutter) 0;
}
.hero-glow {
  position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), rgba(255, 179, 71, .22), transparent 60%);
  transition: opacity .6s var(--ease);
}
.hero-inner { max-width: var(--w-wide); margin: 0 auto; text-align: center; }

.chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  font-size: 14px; color: rgba(255, 244, 234, .88);
  transition: background var(--t-out) var(--ease), transform var(--t-out) var(--ease);
}
.chip:hover { background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.chip-badge { padding: 4px 9px; border-radius: 999px; background: var(--mango); color: var(--deep); font: 600 12px/1 var(--sans); }

h1, h2 { font-family: var(--display); font-weight: 650; margin: 0; text-wrap: balance; }
h1 {
  margin: 26px auto 0;
  font-size: clamp(42px, 7.4vw, 92px);
  line-height: .98;
  letter-spacing: -0.045em;
}
h1 .line { display: block; }
h1 em { font-style: normal; color: var(--mango); position: relative; white-space: nowrap; }
h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .08em;
  background: currentColor; border-radius: 99px;
  transform: scaleX(0); transform-origin: left;
  animation: underline 1.1s 1.1s var(--ease-out-expo) forwards;
}
@keyframes underline { to { transform: scaleX(1); } }

.hero-sub {
  max-width: 560px; margin: 22px auto 0;
  font-size: clamp(16px, 1.6vw, 18px); line-height: 1.6;
  color: rgba(255, 240, 228, .82);
  text-wrap: pretty;
}
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  height: 46px; padding: 0 20px; border-radius: 12px;
  font: 500 15px/1 var(--sans);
  transition: transform var(--t-out) var(--ease), box-shadow var(--t-out) var(--ease), background var(--t-out) var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-light { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(20, 10, 5, .05), 0 6px 16px -8px rgba(80, 30, 5, .5); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(20, 10, 5, .05), 0 14px 26px -12px rgba(80, 30, 5, .6); }
.btn-ghost { background: rgba(0, 0, 0, .25); color: var(--cream-on-dark); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.btn-ghost:hover { background: rgba(0, 0, 0, .38); transform: translateY(-2px); }
.btn-ghost.copied { background: #1f7a43; }

/* Showcase */
.showcase { margin: 56px auto 0; max-width: 1020px; }
.tabs, .filters {
  position: relative; display: inline-flex; gap: 2px; padding: 4px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.tabs button, .filters button {
  position: relative; z-index: 1;
  padding: 8px 14px; border-radius: 9px;
  font-size: 14px; font-weight: 500; color: rgba(23, 18, 13, .7);
  transition: color var(--t-out) var(--ease);
}
.tabs button[aria-selected="true"], .filters button[aria-selected="true"] { color: var(--ink); }
.tabs button:hover, .filters button:hover { color: var(--ink); }
.tab-ind, .filter-ind {
  position: absolute; top: 4px; left: 0; height: calc(100% - 8px);
  border-radius: 9px; background: #fff;
  box-shadow: 0 1px 2px rgba(20, 10, 5, .08), 0 4px 10px -4px rgba(20, 10, 5, .2);
  transition: transform .55s var(--ease-out-expo), width .55s var(--ease-out-expo);
}

.frame {
  margin-top: 20px;
  border-radius: 22px; padding: 8px;
  background: rgba(255, 244, 234, .16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 40px 80px -30px rgba(0, 0, 0, .55);
  transform: translateY(40px);
}
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 6px 10px 10px; }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.frame-url { margin: 0 auto; transform: translateX(-24px); font: 400 12.5px/1 var(--mono); color: rgba(255, 244, 234, .7); }
.frame-url b { font-weight: 500; color: #fff; }
.frame-stage {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 15px; background: #ece6dc;
}
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .7s var(--ease); }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.4s var(--ease-out-expo); }
.slide.is-on { opacity: 1; }
.slide.is-on img { transform: scale(1); }
.slide figcaption {
  position: absolute; left: 16px; bottom: 16px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 14px; border-radius: 12px; text-align: left;
  background: rgba(255, 255, 255, .9); color: var(--ink);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
  transform: translateY(12px); opacity: 0;
  transition: transform .7s .15s var(--ease-out-expo), opacity .5s .15s var(--ease);
}
.slide.is-on figcaption { transform: none; opacity: 1; }
.slide figcaption b { font-size: 14.5px; }
.slide figcaption span { font-size: 12.5px; color: var(--ink-2); }

/* ==========================================================
   Stats with rolling digits
   ========================================================== */
.stats {
  max-width: var(--w-wide); margin: 0 auto;
  padding: 110px var(--gutter) 30px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
}
.stat { padding: 0 22px; border-left: 1px solid var(--hair); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat strong {
  display: flex; font: 650 clamp(40px, 5vw, 60px)/1 var(--display); letter-spacing: -0.04em;
  height: 1em; overflow: hidden;
}
.stat > span { display: block; margin-top: 10px; font-size: 14.5px; color: var(--ink-2); max-width: 18ch; }
.digit { display: inline-block; height: 1em; overflow: hidden; transition: width 1.6s var(--ease-out-expo); transition-delay: var(--dd, 0ms); }
.digit-col { display: flex; flex-direction: column; align-items: flex-start; transition: transform 1.6s var(--ease-out-expo); transition-delay: var(--dd, 0ms); }
.digit-col span { display: block; height: 1em; line-height: 1; margin: 0; color: inherit; font-size: inherit; max-width: none; white-space: nowrap; }
.suffix { color: var(--accent); }

/* ==========================================================
   Sections
   ========================================================== */
.section { position: relative; max-width: var(--w); margin: 0 auto; padding: 110px var(--gutter) 40px; }
.section-wide { max-width: var(--w-wide); }
.sec-head { margin-bottom: 40px; }
.eyebrow {
  margin: 0 0 14px;
  font: 500 12.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow.light { color: var(--mango); }
h2 { font-size: clamp(34px, 5vw, 56px); line-height: 1.02; letter-spacing: -0.04em; }
.sec-sub { margin: 16px 0 0; color: var(--ink-2); font-size: 16.5px; max-width: 52ch; }

/* ==========================================================
   The shelf: scroll-driven 3D drum
   ========================================================== */
.drum-sec { position: relative; padding-top: 110px; }
.drum-head { max-width: var(--w); margin: 0 auto -10vh; padding: 0 var(--gutter); position: relative; z-index: 2; }
.drum { position: relative; height: calc(var(--n, 16) * 14vh + 100vh); }
.drum-stage {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  perspective: 1400px; perspective-origin: 50% 50%;
}
.drum-glow {
  position: absolute; left: 50%; top: 50%; width: min(80vw, 1000px); height: 360px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 106, 61, .16), rgba(255, 179, 71, .07) 55%, transparent);
  pointer-events: none;
}
.drum-band {
  position: absolute; left: clamp(16px, 3vw, 50px); right: clamp(16px, 3vw, 50px); top: 50%;
  height: clamp(110px, 15vh, 150px); transform: translateY(-50%);
  border-block: 1px solid var(--hair);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35) 30%, rgba(255, 255, 255, .35) 70%, transparent);
  pointer-events: none;
}
.drum-tri {
  position: absolute; top: 50%; z-index: 3; width: 28px; height: 28px; margin-top: -14px;
  display: grid; place-items: center; border-radius: 8px;
  transition: background var(--t-out) var(--ease), transform var(--t-out) var(--ease);
}
.drum-tri::before { content: ""; border: 7px solid transparent; }
.drum-tri-l { left: clamp(4px, 1.2vw, 18px); }
.drum-tri-l::before { border-left: 9px solid var(--accent); margin-left: 9px; }
.drum-tri-r { right: clamp(4px, 1.2vw, 18px); }
.drum-tri-r::before { border-right: 9px solid var(--accent); margin-right: 9px; }
.drum-tri:hover { background: rgba(232, 70, 30, .08); }
.drum-tri-l:hover { transform: translateX(2px); }
.drum-tri-r:hover { transform: translateX(-2px); }
.drum-tri:active { transform: scale(.9); }

.drum-count, .drum-desc {
  position: absolute; top: 50%; z-index: 3; margin: 0;
  transform: translateY(calc(-50% + 0.9em));
  font-size: clamp(14px, 1.15vw, 18px); color: var(--ink-2);
}
.drum-count { left: clamp(48px, 11vw, 216px); font-variant-numeric: tabular-nums; }
.drum-count b { color: var(--accent); font-weight: 600; display: inline-block; min-width: 1ch; }
.drum-count b.tick { animation: tick .45s var(--ease-out-expo); }
@keyframes tick { from { transform: translateY(-40%); opacity: 0; } }
.drum-desc { right: clamp(48px, 5.5vw, 104px); color: var(--ink); text-align: right; max-width: 22ch; }
.drum-desc.swap { animation: descIn .5s var(--ease-out-expo); }
@keyframes descIn { from { opacity: 0; transform: translateY(calc(-50% + 0.9em + 8px)); } }

.drum-items { position: absolute; inset: 0; transform-style: preserve-3d; }
.drum-item {
  position: absolute; left: 50%; top: 50%;
  white-space: nowrap;
  font: 650 clamp(30px, 6.2vw, 96px)/1.05 var(--display);
  font-variation-settings: "wdth" 100;
  letter-spacing: -0.045em;
  color: #b9b1aa;
  backface-visibility: hidden;
  will-change: transform, opacity;
  transition: color .35s var(--ease);
  cursor: pointer;
}
.drum-item:hover { color: #9e958d; }
.drum-item.on { color: var(--accent); }
.drum-item.on:hover { color: var(--accent-hot); }
.drum-item em { font-style: italic; font-weight: 600; }

@media (max-width: 760px) {
  .drum-count, .drum-desc { transform: none; top: auto; font-size: 15px; }
  .drum-count b.tick { animation: none; }
  .drum-count { left: 50%; top: calc(50% - 175px); transform: translateX(-50%); }
  .drum-desc { right: auto; left: 0; right: 0; top: calc(50% + 150px); text-align: center; max-width: none; }
  .drum-desc.swap { animation-name: descInM; }
  @keyframes descInM { from { opacity: 0; transform: translateY(8px); } }
}

/* Disciplines list */
.disc { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.disc li { border-bottom: 1px solid var(--hair); }
.disc a {
  position: relative;
  display: grid; grid-template-columns: 56px 1fr auto; align-items: baseline; gap: 12px;
  padding: 22px 6px;
  transition: padding var(--t-out) var(--ease-out-quart);
}
.disc a::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--surface); border-radius: var(--r);
  opacity: 0; transform: scaleY(.6);
  transition: opacity var(--t-out) var(--ease), transform .4s var(--ease-out-expo);
}
.disc a:hover { padding-left: 18px; padding-right: 18px; }
.disc a:hover::before { opacity: 1; transform: none; box-shadow: var(--shadow-card); }
.disc .n { font: 500 13px/1 var(--mono); color: var(--accent); }
.disc .t { font: 600 clamp(20px, 2.6vw, 28px)/1.1 var(--display); letter-spacing: -0.03em; }
.disc .d { font-size: 14.5px; color: var(--ink-3); text-align: right; }

.cursor-preview {
  position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none;
  width: 240px; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-lift);
  opacity: 0; transform: translate(-50%, -50%) scale(.7) rotate(-4deg);
  transition: opacity .25s var(--ease), transform .45s var(--ease-out-expo);
}
.cursor-preview.on { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-3deg); }
.cursor-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Filters + grid */
.filters { background: var(--sunk); box-shadow: inset 0 0 0 1px var(--hair); margin-bottom: 26px; flex-wrap: wrap; }
.filters sup { font: 500 10.5px/1 var(--mono); color: var(--ink-3); margin-left: 2px; vertical-align: 4px; }

.grid { columns: 3 300px; column-gap: 16px; }
.card {
  break-inside: avoid; margin: 0 0 16px;
  position: relative; display: block; width: 100%; text-align: left;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-card);
  transition: transform .5s var(--ease-out-expo), box-shadow .5s var(--ease-out-expo), opacity .4s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card img { width: 100%; height: auto; background: var(--sunk); transition: transform 1s var(--ease-out-expo); }
.card:hover img { transform: scale(1.035); }
.card .meta {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(10px);
  transition: opacity var(--t-out) var(--ease), transform .45s var(--ease-out-expo);
}
.card:hover .meta, .card:focus-visible .meta { opacity: 1; transform: none; }
.card .meta b { font-size: 14px; font-weight: 600; line-height: 1.25; }
.card .meta span { flex: none; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.card.out { opacity: 0; transform: scale(.94); }
.card.gone { display: none; }
.card.enter { animation: cardIn .7s var(--ease-out-expo) both; animation-delay: var(--d, 0ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

/* Process */
.process {
  display: grid; grid-template-columns: 320px 1fr; gap: 18px;
  padding: 10px; border-radius: var(--r-xl);
  background: var(--sunk); box-shadow: inset 0 0 0 1px var(--hair);
}
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.steps button {
  position: relative; overflow: hidden;
  display: flex; gap: 14px; width: 100%; text-align: left;
  padding: 16px; border-radius: 14px;
  transition: background var(--t-out) var(--ease), box-shadow var(--t-out) var(--ease);
}
.steps button:hover { background: rgba(255, 255, 255, .5); }
.steps button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow-card); }
.steps .n {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  font: 500 12.5px/1 var(--mono); background: var(--paper); color: var(--ink-2);
  transition: background var(--t-out) var(--ease), color var(--t-out) var(--ease);
}
.steps button[aria-pressed="true"] .n { background: var(--accent); color: #fff; }
.steps b { display: block; font-size: 16px; }
.steps small { display: block; margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.steps .bar { position: absolute; left: 16px; right: 16px; bottom: 7px; height: 2px; border-radius: 2px; background: var(--hair); opacity: 0; }
.steps .bar::after { content: ""; position: absolute; inset: 0; background: var(--accent); border-radius: inherit; transform: scaleX(0); transform-origin: left; }
.steps button[aria-pressed="true"] .bar { opacity: 1; }
.steps button[aria-pressed="true"] .bar::after { animation: fill var(--step-ms, 4200ms) linear forwards; }
.process.paused .steps .bar::after { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }

.process-view { position: relative; min-height: 380px; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: var(--shadow-card); }
.process-view img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.04) translateY(10px);
  transition: opacity .6s var(--ease), transform 1s var(--ease-out-expo);
}
.process-view img.logo-fit { object-fit: contain; padding: 14%; }
.process-view img.is-on { opacity: 1; transform: none; }

/* Booths (dark) */
.section-dark {
  max-width: none; isolation: isolate; overflow: hidden;
  margin-top: 90px; padding: 110px 0 90px;
  background: radial-gradient(90% 60% at 80% 0%, rgba(232, 70, 30, .35), transparent 70%), var(--deep);
  color: var(--cream-on-dark);
}
.section-dark .sec-head { max-width: var(--w); margin: 0 auto 40px; padding: 0 var(--gutter); }
.section-dark .sec-sub { color: rgba(255, 240, 228, .7); }
.section-dark .eyebrow { color: var(--mango); }
.rail-wrap { position: relative; }
.rail {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px max(var(--gutter), calc((100vw - var(--w-wide)) / 2)) 24px;
  scrollbar-width: none; cursor: grab; user-select: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail.dragging { cursor: grabbing; scroll-snap-type: none; }
.rail.dragging img { pointer-events: none; }
.rail figure {
  flex: none; width: min(78vw, 620px); margin: 0; scroll-snap-align: center;
  border-radius: 18px; overflow: hidden; position: relative;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 60px -30px rgba(0, 0, 0, .7);
  transition: transform .6s var(--ease-out-expo);
}
.rail figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 1.2s var(--ease-out-expo); }
.rail figure:hover img { transform: scale(1.04); }
.rail figcaption {
  position: absolute; left: 12px; bottom: 12px;
  padding: 7px 11px; border-radius: 9px;
  background: rgba(20, 10, 5, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 500 12px/1 var(--mono); color: #fff;
}
.rail-ctrl { max-width: var(--w-wide); margin: 10px auto 0; padding: 0 var(--gutter); display: flex; align-items: center; gap: 14px; }
.rail-ctrl button {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  transition: background var(--t-out) var(--ease), transform var(--t-out) var(--ease);
}
.rail-ctrl button:hover { background: rgba(255, 255, 255, .16); }
.rail-ctrl button:active { transform: scale(.94); }
.rail-progress { flex: 1; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.rail-progress i { display: block; height: 100%; width: 100%; background: var(--mango); transform-origin: left; transform: scaleX(.1); transition: transform .3s var(--ease); }

/* Videos */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; perspective: 900px; }
.vid {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  min-height: 190px; padding: 18px; border-radius: var(--r-lg);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 179, 71, .5), transparent 55%),
    linear-gradient(160deg, var(--deep-2), var(--deep));
  color: var(--cream-on-dark);
  box-shadow: var(--shadow-card);
  transform-style: preserve-3d;
  transition: transform .5s var(--ease-out-expo), box-shadow .5s var(--ease-out-expo);
}
.vid:hover { box-shadow: var(--shadow-lift); }
.vid-n { position: absolute; top: 16px; left: 18px; font: 500 12px/1 var(--mono); color: rgba(255, 244, 234, .6); }
.play {
  position: absolute; top: 14px; right: 14px; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--ink);
  transform: translateZ(30px); transition: transform .5s var(--ease-out-expo), background var(--t-out) var(--ease);
}
.play svg { fill: currentColor; stroke: none; width: 14px; height: 14px; margin-left: 2px; }
.vid:hover .play { transform: translateZ(40px) scale(1.1); background: var(--mango); }
.vid b { font: 600 19px/1.15 var(--display); letter-spacing: -0.02em; transform: translateZ(20px); }
.vid small { font-size: 13.5px; color: rgba(255, 240, 228, .7); transform: translateZ(14px); }

/* Marquee */
.marquee {
  margin-top: 100px; padding: 22px 0; overflow: hidden;
  border-block: 1px solid var(--hair);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; gap: 48px; animation: marquee 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span {
  font: 600 clamp(20px, 2.4vw, 28px)/1 var(--display); letter-spacing: -0.03em; white-space: nowrap;
  color: var(--ink-3); transition: color var(--t-out) var(--ease);
}
.marquee span:hover { color: var(--accent); }
.marquee span::after { content: "✦"; margin-left: 48px; font-size: .6em; color: var(--accent); vertical-align: .25em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* FAQ */
.faq { border-top: 1px solid var(--hair); }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 2px;
  font: 600 clamp(17px, 2vw, 20px)/1.3 var(--display); letter-spacing: -0.02em;
  transition: color var(--t-out) var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary i { position: relative; flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--sunk); transition: background var(--t-out) var(--ease), transform .5s var(--ease-out-expo); }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.6px; background: currentColor; border-radius: 2px; transform: translate(-50%, -50%); }
.faq summary i::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .5s var(--ease-out-expo); }
.faq details[open] summary i { background: var(--accent); color: #fff; }
.faq details[open] summary i::after { transform: translate(-50%, -50%) rotate(0); }
.faq-body { overflow: hidden; }
.faq-body p { margin: 0; padding: 0 2px 24px; color: var(--ink-2); max-width: 62ch; }

/* Contact */
.contact {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 110px var(--gutter) 0; padding: 110px var(--gutter);
  border-radius: 28px; text-align: center; color: var(--cream-on-dark);
  background:
    radial-gradient(110% 80% at 50% 120%, var(--accent-hot) 0%, var(--accent) 25%, #8a2a0c 50%, transparent 75%),
    var(--deep);
}
.contact h2 { font-size: clamp(40px, 6.4vw, 80px); letter-spacing: -0.045em; }

/* Footer */
.footer {
  max-width: var(--w-wide); margin: 0 auto; padding: 28px var(--gutter) 36px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 14px; color: var(--ink-2);
}
.to-top { display: inline-flex; align-items: center; gap: 6px; transition: color var(--t-out) var(--ease); }
.to-top:hover { color: var(--ink); }
.to-top svg { transition: transform var(--t-out) var(--ease); }
.to-top:hover svg { transform: translateY(-3px); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: grid; grid-template-columns: 64px 1fr 64px; align-items: center;
  padding: 24px; background: rgba(20, 10, 5, .86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .35s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.on { opacity: 1; }
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-height: 100%; }
.lb-fig img {
  max-width: 100%; max-height: calc(100vh - 140px); border-radius: 14px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8);
  transform: scale(.94); opacity: 0; transition: transform .6s var(--ease-out-expo), opacity .35s var(--ease);
}
.lightbox.on .lb-fig img.ready { transform: none; opacity: 1; }
.lb-fig figcaption { display: flex; gap: 12px; align-items: baseline; color: #fff; font-size: 15px; flex-wrap: wrap; justify-content: center; }
.lb-fig figcaption span { color: rgba(255, 244, 234, .7); font-size: 14px; }
.lb-fig figcaption em { font: 500 12px/1 var(--mono); font-style: normal; color: var(--mango); }
.lb-close, .lb-nav {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: rgba(255, 255, 255, .1); color: #fff;
  transition: background var(--t-out) var(--ease), transform var(--t-out) var(--ease);
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .2); }
.lb-nav:active, .lb-close:active { transform: scale(.94); }
.lb-close { position: absolute; top: 18px; right: 18px; }
.lb-next { justify-self: end; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 95;
  padding: 11px 16px; border-radius: 12px;
  background: var(--ink); color: #fff; font-size: 14px;
  box-shadow: var(--shadow-lift);
  transform: translate(-50%, 140%); opacity: 0;
  transition: transform .55s var(--ease-out-expo), opacity .3s var(--ease);
  pointer-events: none;
}
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 36px; padding-top: 90px; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .process { grid-template-columns: 1fr; }
  .process-view { min-height: 0; aspect-ratio: 4 / 3; }
  .steps { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .steps li { flex: 1 0 200px; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding-top: 120px; }
  .tabs, .filters { max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
  .tabs button, .filters button { padding: 8px 11px; font-size: 13.5px; white-space: nowrap; flex: none; }
  .frame { padding: 5px; border-radius: 16px; }
  .frame-stage { aspect-ratio: 4 / 3; border-radius: 12px; }
  .frame-url { display: none; }
  .slide figcaption { left: 10px; bottom: 10px; padding: 8px 11px; }
  .disc a { grid-template-columns: 40px 1fr; }
  .disc .d { grid-column: 2; text-align: left; margin-top: -4px; }
  .cursor-preview { display: none; }
  .grid { columns: 2 150px; column-gap: 10px; }
  .card { margin-bottom: 10px; border-radius: 14px; }
  .card .meta { display: none; }
  .lightbox { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; padding: 16px; gap: 12px; }
  .lb-fig { grid-column: 1 / -1; grid-row: 1; }
  .lb-prev { grid-row: 2; justify-self: start; }
  .lb-next { grid-row: 2; }
  .contact { margin-inline: 10px; padding: 80px 20px; border-radius: 22px; }
  .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-rise] { opacity: 1; transform: none; filter: none; }
  .marquee-track { animation: none; }
}
