
  :root {
    --bg: #050403;
    --ink: #fbf6f2;
    --ink-2: #b9b0aa;
    --ink-3: #7d7570;
    --accent: #e8643f;
    --line: rgba(232, 214, 200, 0.14);
    --cell: rgba(12, 10, 9, 0.78);
    --cell-hover: rgba(20, 15, 13, 0.9);
    --nav-bg: rgba(8, 7, 7, 0.72);
    --nav-ink: rgba(217, 210, 205, 1);
    --nav-border: rgba(255, 255, 255, 0.07);
    --lift: rgba(0, 0, 0, 0);                 /* soft shadow colour: only shows once the page is cream */
    --btn-bg: rgba(217, 84, 47, 1);           /* copper on dark, ink on cream */
    --btn-glow: rgba(232, 100, 63, .7);
    --row: 100px;
    --card-rows: 5;
    --step-rows: 3;
    --cream: 251, 248, 243;
    --ease-out: cubic-bezier(.16, .84, .24, 1);
  }
  :where(.dive, .dive *, .nav, .nav *, .pause, .pause *, .aura, .aura *) { box-sizing: border-box; margin: 0; padding: 0; }
  html { background: var(--bg); }
  body.gallery-edition.redesign-v3 {
    background: var(--bg);
    color: var(--ink);
    font-family: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
  :where(.dive, .nav) a { color: inherit; text-decoration: none; }
  em.serif { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -.01em; font-size: 1.08em; }

  /* ---------- fixed background layers ---------- */
  .aura {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    transform-origin: 55% 45%;
    -webkit-mask-image: radial-gradient(ellipse 55% 60% at 55% 42%, #000 30%, transparent 75%);
            mask-image: radial-gradient(ellipse 55% 60% at 55% 42%, #000 30%, transparent 75%);
  }
  .streak {
    position: absolute; top: 4vh; height: 78vh; width: 9vw; min-width: 60px;
    border-radius: 50%;
    filter: blur(34px);
    mix-blend-mode: screen;
    opacity: .75;
    animation: sway 11s ease-in-out infinite alternate;
  }
  .s1 { left: 38%; background: linear-gradient(transparent, #6e3424 40%, #3a1a12 75%, transparent); transform: skewX(-22deg); animation-duration: 13s; }
  .s2 { left: 47%; background: linear-gradient(transparent, #d6b29d 35%, #8a5a46 70%, transparent); transform: skewX(-20deg); opacity: .6; }
  .s3 { left: 56%; background: linear-gradient(transparent, #7a8fa6 30%, #3b4d63 70%, transparent); transform: skewX(-18deg); animation-duration: 9s; }
  .s4 { left: 64%; background: linear-gradient(transparent, #4f6f93 35%, #1f2f44 75%, transparent); transform: skewX(-16deg); opacity: .55; animation-duration: 15s; }
  @keyframes sway {
    from { translate: -1.5vw 0; scale: 1 1; }
    to   { translate: 1.5vw -2vh; scale: 1.15 1.05; }
  }
  body.paused .streak { animation-play-state: paused; }

  /* cream light spreading out from the upright grid (beat 3) */
  body > .reveal { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

  #grid {
    position: fixed; inset: 0; width: 100vw; height: 100vh;
    z-index: 1; pointer-events: none;
  }

  /* ---------- nav ---------- */
  .nav {
    position: fixed; top: 16px; left: 50%; translate: -50% 0; z-index: 20;
    width: min(1536px, calc(100vw - 32px));
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 10px 10px 28px;
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    border: 1px solid var(--nav-border);
    color: var(--ink);
    border-radius: 14px;
    box-shadow: 0 14px 34px -22px var(--lift);
  }
  .brand { font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
  .nav ul { list-style: none; display: flex; align-items: center; gap: 28px; font-size: 15px; color: var(--nav-ink); }
  .nav ul a:hover { color: var(--ink); }
  .btn-primary {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--btn-bg);
    color: #fff; font-weight: 500; font-size: 15px;
    padding: 13px 20px; border-radius: 9px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 8px 30px -10px var(--btn-glow);
    transition: filter .25s, translate .35s var(--ease-out);
  }
  .btn-primary svg { transition: translate .35s var(--ease-out); }
  .btn-primary:hover { filter: brightness(1.12); }
  .btn-primary:hover svg { translate: 2px 0; }
  @media (max-width: 760px) { .nav ul li:not(:last-child) { display: none; } .nav { padding-left: 18px; } }

  /* ---------- dive ---------- */
  .dive { position: relative; height: 240vh; z-index: 2; }
  .stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
  .hero {
    position: absolute; left: 0; right: 0; top: 0; bottom: 0;
    width: min(1536px, calc(100vw - 32px)); margin: 0 auto;
    padding: 0 28px;
    display: flex; flex-direction: column; justify-content: center;
  }
  .eyebrow { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); }
  .hero h1 {
    margin: 36px 0 40px -0.06em;
    font-size: clamp(64px, 12.6vw, 220px);
    font-weight: 600; line-height: .9; letter-spacing: -.06em;
    color: #fbf6f2;
    text-shadow: 0 0 28px rgba(255, 210, 185, .18);
    /* no will-change: lets the browser re-rasterise every frame so the type stays razor sharp while it scales */
  }
  .hero .sub { font-size: clamp(16px, 1.25vw, 19px); line-height: 1.5; color: #d9d2cd; max-width: 34em; letter-spacing: -.01em; }
  .ctas { display: flex; align-items: center; gap: 28px; margin-top: 30px; }
  .btn-hero {
    display: inline-flex; align-items: center; gap: 14px;
    padding: 17px 28px; border-radius: 999px;
    border: 1px solid rgba(232,100,63,.6);
    background: rgba(232,100,63,.08);
    box-shadow: 0 0 28px -6px rgba(232,100,63,.5);
    font-size: 16px; font-weight: 500; color: #fbf6f2;
    transition: background .25s, box-shadow .25s;
  }
  .btn-hero svg { transition: translate .35s var(--ease-out); }
  .btn-hero:hover { background: rgba(232,100,63,.18); box-shadow: 0 0 36px -4px rgba(232,100,63,.6); }
  .btn-hero:hover svg { translate: 0 3px; }
  .scroll-hint {
    position: absolute; left: 50%; bottom: 28px; translate: -50% 0;
    font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
  }
  .scroll-hint i { width: 1px; height: 36px; background: linear-gradient(var(--ink-3), transparent); animation: drip 1.8s ease-in-out infinite; }
  @keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

  /* ---------- motion control ---------- */
  .pause {
    position: fixed; right: 24px; bottom: 24px; z-index: 20;
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--nav-bg); color: var(--nav-ink);
    border: 1px solid var(--nav-border); border-radius: 12px;
    padding: 12px 16px; font: 500 14px "Inter Tight", sans-serif; cursor: pointer;
    backdrop-filter: blur(10px);
  }
  .pause:hover { color: var(--ink); }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Integration only: preserve every existing content block and its layout. */
html { scroll-behavior: auto !important; }
body.gallery-edition.redesign-v3 { background:var(--bg); }
body > .v-nav { display:none !important; }
body > .nav, .dive { line-height:normal; font-family:"Inter Tight","Helvetica Neue",Arial,sans-serif; }
body > .aura, body > #grid, body > .reveal { line-height:normal; }
body > .reveal { opacity:1; transform:none; visibility:visible; }
html.study-on body.gallery-edition #main { position:relative; z-index:3; margin-top:-78vh; padding-top:0; background:transparent; opacity:0; visibility:hidden; transition:opacity .8s ease; }
html.study-on body.gallery-edition.lit #main { opacity:1; visibility:visible; }
#layout { position:absolute; top:0; left:50%; translate:-50% 0; width:min(1200px,calc(100vw - 32px)); height:0; pointer-events:none; }
body > .nav ul { margin:0; }
body > .nav .brand { color:var(--ink); }
body > .nav .btn-primary { color:#fff; }
.dive .hero { max-width:none; min-height:0; background:none; border:0; }
.dive .hero h1 { font-family:inherit; max-width:none; }
@media(prefers-reduced-motion:reduce) { .streak,.scroll-hint i { animation:none; } }

body > .aura .s1 { width:7.5vw; min-width:50px; filter:blur(clamp(22px,2vw,28px)); }
body > .aura .s2 { left:48%; width:8vw; min-width:54px; filter:blur(clamp(24px,2.1vw,30px)); }
body > .aura .s3 { filter:blur(clamp(24px,2.1vw,30px)); }

/* Selected work sits directly on the page; individual project cards stay intact. */
html.study-on body.gallery-edition .work-content #work {
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
}

/* Open every content chapter onto the shared page instead of stacked panels. */
html.study-on body.gallery-edition.redesign-v3 #main > :is(section, article),
html.study-on body.gallery-edition.redesign-v3 #main .content-arrival > :is(section, article) {
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  margin-bottom:0 !important;
}
html.study-on body.gallery-edition.redesign-v3 #main > :is(section, article):not(.contact-finale),
html.study-on body.gallery-edition.redesign-v3 #main .content-arrival > :is(section, article):not(.contact-finale) {
  background:transparent !important;
}

/* Off-white surfaces for the individual Selected work cards. */
html.study-on body.gallery-edition.redesign-v3 #work[data-work-layout="bento"] .wi-index > li {
  background:#fffefa;
}
html.study-on body.gallery-edition.redesign-v3 #work .rd-card-foot {
  background:#fffefa;
}

/* Carry the card interaction state through to its primary case-study CTA. */
body.gallery-edition.redesign-v3 #work[data-work-layout="bento"] .wi-index > li:is(:hover, :focus-within) .rd-card-foot > a.rd-case-link {
  background:#a64330;
  color:#fff7f5;
  text-decoration:none;
}
