:root {
  --black: #050505;
  --carbon: #12100D;
  --champagne: #F5E7C1;
  --ivory: #FAF7EF;
  --gold: #C8A24A;
  --rose: #D99A8A;
  --violet: #8D6BFF;
  --teal: #62F2D2;
  --display: "Bebas Neue", "Space Grotesk", "Arial Narrow", "Helvetica Neue Condensed", Impact, sans-serif;
  --body: Inter, Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Cormorant, "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--champagne);
  font-family: var(--body);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(200, 162, 74, .12), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(141, 107, 255, .10), transparent 30%),
    linear-gradient(115deg, transparent 0 48%, rgba(245, 231, 193, .035) 49%, transparent 51% 100%);
}

a { color: inherit; text-decoration: none; }

.chapter {
  position: relative;
  min-height: 100vh;
  z-index: 1;
  padding: clamp(32px, 6vw, 84px);
  overflow: hidden;
}

.cursor-gravity {
  position: fixed;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgba(200, 162, 74, .72);
  border-radius: 50%;
  pointer-events: none;
  z-index: 20;
  mix-blend-mode: screen;
  transform: translate3d(-80px, -80px, 0);
  transition: width .35s ease, height .35s ease, border-color .35s ease, background .35s ease;
}

.cursor-gravity.active {
  width: 86px;
  height: 86px;
  margin: -43px 0 0 -43px;
  border-color: rgba(98, 242, 210, .75);
  background: radial-gradient(circle, rgba(98, 242, 210, .12), transparent 62%);
}

.gallery-index {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font: 700 10px/1 var(--body);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(245, 231, 193, .56);
}

.gallery-index a {
  position: relative;
  padding-right: 28px;
  transition: color .3s ease, transform .3s ease;
}

.gallery-index a::after {
  content: attr(data-index);
  position: absolute;
  right: 0;
  color: var(--gold);
}

.gallery-index a.active, .gallery-index a:hover { color: var(--champagne); transform: translateX(-8px); }

.progress-bead {
  position: fixed;
  left: 26px;
  top: 18vh;
  bottom: 18vh;
  width: 1px;
  background: rgba(200, 162, 74, .25);
  z-index: 15;
}

.progress-bead span {
  position: absolute;
  left: -4px;
  top: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 22px rgba(200, 162, 74, .8);
}

.black-ice-entry {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(18, 16, 13, .94), rgba(5, 5, 5, 1) 44%, rgba(18, 16, 13, .92)),
    repeating-linear-gradient(90deg, rgba(200, 162, 74, .03) 0 1px, transparent 1px 90px);
}

.aurora-veil {
  position: absolute;
  width: 135vw;
  height: 42vh;
  left: -18vw;
  top: 18vh;
  transform: rotate(-13deg);
  filter: blur(22px);
  opacity: .55;
  background: linear-gradient(90deg, transparent, rgba(98, 242, 210, .12), rgba(141, 107, 255, .32), rgba(200, 162, 74, .13), transparent);
  animation: veilBreath 9s ease-in-out infinite alternate;
}

.hero-lockup { position: relative; text-align: center; max-width: 960px; }

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(118px, 25vw, 330px);
  line-height: .78;
  letter-spacing: -.025em;
  color: var(--champagne);
  text-shadow: 0 0 1px var(--ivory), 0 24px 80px rgba(141, 107, 255, .22);
  background: linear-gradient(180deg, var(--ivory), var(--champagne) 42%, rgba(200, 162, 74, .72));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.serif-whisper {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 30px);
  font-style: italic;
  color: rgba(245, 231, 193, .78);
  margin: 0 0 18px;
}

.entry-rule {
  width: min(520px, 62vw);
  height: 1px;
  margin: 28px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.entry-copy {
  width: min(540px, 80vw);
  margin: auto;
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(245, 231, 193, .68);
}

.gold-coordinate {
  font: 800 10px/1 var(--body);
  letter-spacing: .24em;
  color: var(--gold);
  text-transform: uppercase;
}

.coord-north, .coord-east { position: absolute; }
.coord-north { top: 38px; left: 42px; }
.coord-east { right: 42px; bottom: 38px; writing-mode: vertical-rl; }

.vertical-label {
  position: absolute;
  left: 54px;
  bottom: 54px;
  writing-mode: vertical-rl;
  font-family: var(--display);
  letter-spacing: .16em;
  color: rgba(200, 162, 74, .56);
}

.memphis-inlay { position: absolute; transition: transform .4s ease; }
.fragment-one { width: 90px; height: 45px; border-radius: 90px 90px 0 0; border: 1px solid var(--gold); left: 13%; top: 22%; }
.fragment-two { width: 16px; height: 120px; right: 18%; top: 30%; background: repeating-linear-gradient(180deg, var(--rose) 0 12px, transparent 12px 22px); opacity: .75; }
.fragment-three { width: 82px; height: 82px; right: 28%; bottom: 18%; border: 1px solid rgba(98, 242, 210, .66); transform: rotate(45deg); }

.magnetic-field { background: var(--black); padding-top: 100px; }
.chapter-heading { max-width: 760px; margin-bottom: 48px; }
.chapter-heading h2, .study-copy h2, .corridor h2 {
  margin: 14px 0 0;
  font-family: var(--display);
  font-size: clamp(58px, 9vw, 126px);
  line-height: .86;
  letter-spacing: -.02em;
  font-weight: 900;
}

.magnetic-salon-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 150px;
  gap: 22px;
}

.tile {
  position: relative;
  min-height: 0;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
  will-change: transform;
}

.frosted-artifact {
  border: 1px solid rgba(200, 162, 74, .38);
  background: linear-gradient(145deg, rgba(250, 247, 239, .07), rgba(18, 16, 13, .88));
  box-shadow: inset 0 0 40px rgba(250, 247, 239, .035), 0 28px 80px rgba(0, 0, 0, .45);
  padding: 28px;
  overflow: hidden;
}

.tile.is-active { border-color: rgba(200, 162, 74, .95); box-shadow: 0 0 0 1px rgba(200, 162, 74, .26), 0 38px 110px rgba(98, 242, 210, .10); }
.tile-large { grid-column: span 5; grid-row: span 2; }
.tile-slim { grid-column: span 2; grid-row: span 2; }
.tile-wide { grid-column: span 5; grid-row: span 1; }
.tile-paper { grid-column: span 7; grid-row: span 2; background: var(--ivory); color: var(--carbon); }
.punctuation-cell { grid-column: span 2; grid-row: span 1; display: grid; place-items: center; border: 1px solid rgba(217,154,138,.55); background: radial-gradient(circle at 65% 40%, rgba(217,154,138,.18), transparent 42%), var(--carbon); }
.medallion-module { grid-column: span 3; grid-row: span 2; display: grid; place-items: center; text-align: center; border: 1px solid rgba(98,242,210,.4); background: radial-gradient(circle, rgba(141,107,255,.18), transparent 60%), var(--carbon); }

.tile h3 { position: relative; margin: 0; font-family: var(--display); font-size: clamp(36px, 5vw, 72px); line-height: .9; z-index: 2; }
.tile p { position: relative; z-index: 2; max-width: 360px; font-size: 13px; line-height: 1.7; color: rgba(245,231,193,.70); }
.tile-paper p { color: rgba(18,16,13,.72); }
.tile-number { position: absolute; right: 20px; top: 14px; font-family: var(--display); font-size: 82px; color: rgba(200, 162, 74, .18); line-height: 1; z-index: 1; }
.tile-number.vertical { writing-mode: vertical-rl; right: auto; left: 12px; top: 22px; }

.watercolor-specimen { position: absolute; inset: 18px; opacity: .9; filter: blur(.2px); transition: transform 1.2s ease, opacity 1.2s ease; }
.tile.is-active .watercolor-specimen { transform: scale(1.08); opacity: 1; }
.bloom-gold { background: radial-gradient(circle at 28% 34%, rgba(245,231,193,.8), transparent 20%), radial-gradient(circle at 52% 45%, rgba(200,162,74,.38), transparent 36%), radial-gradient(circle at 68% 30%, rgba(98,242,210,.16), transparent 32%); }
.bloom-aurora { background: linear-gradient(120deg, transparent, rgba(98,242,210,.26), rgba(141,107,255,.34), transparent), radial-gradient(circle at 76% 55%, rgba(245,231,193,.18), transparent 28%); }
.gold-corners::before, .gold-corners::after { content: ""; position: absolute; width: 46px; height: 46px; border-color: var(--gold); opacity: .8; }
.gold-corners::before { left: 16px; top: 16px; border-left: 1px solid; border-top: 1px solid; }
.gold-corners::after { right: 16px; bottom: 16px; border-right: 1px solid; border-bottom: 1px solid; }
.memphis-stack { position: absolute; right: 24px; bottom: 24px; display: grid; gap: 8px; }
.memphis-stack i { width: 54px; height: 18px; background: var(--gold); opacity: .5; }
.paper-pin { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 6px rgba(217,154,138,.18); }
.pin-a { left: 24px; top: 24px; } .pin-b { right: 24px; top: 24px; }
.punctuation-cell span { font-family: var(--display); font-size: 74px; color: var(--champagne); }
.punctuation-cell b { position: absolute; width: 70px; height: 1px; background: var(--gold); transform: rotate(-30deg); }
.medallion-ring { width: 154px; height: 154px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--gold); font-family: var(--display); font-size: 76px; color: var(--champagne); }
.medallion-module h3 { font-size: 38px; }

.studies { display: grid; grid-template-columns: .85fr 1.25fr; align-items: center; gap: 6vw; background: linear-gradient(180deg, var(--black), var(--carbon)); }
.study-copy p { max-width: 560px; color: rgba(245,231,193,.68); line-height: 1.8; }
.study-wall { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 130px; gap: 18px; }
.watercolor-card { position: relative; padding: 20px; color: var(--carbon); background-color: var(--ivory); box-shadow: 0 25px 80px rgba(0,0,0,.36); transform: rotate(var(--tilt)); }
.watercolor-card span { position: absolute; bottom: 18px; left: 20px; font-family: var(--serif); font-size: 24px; font-style: italic; }
.wash-one { --tilt: -2deg; grid-column: span 4; grid-row: span 2; background-image: radial-gradient(circle at 30% 36%, rgba(200,162,74,.45), transparent 28%), radial-gradient(circle at 60% 58%, rgba(98,242,210,.16), transparent 30%); }
.wash-two { --tilt: 3deg; grid-column: span 2; grid-row: span 3; background-image: radial-gradient(circle at 55% 30%, rgba(98,242,210,.42), transparent 35%), radial-gradient(circle at 45% 68%, rgba(141,107,255,.28), transparent 32%); }
.wash-three { --tilt: -1deg; grid-column: span 4; grid-row: span 1; background-image: radial-gradient(circle at 22% 50%, rgba(217,154,138,.42), transparent 26%), repeating-linear-gradient(90deg, transparent 0 26px, rgba(200,162,74,.22) 26px 27px); }

.corridor { display: grid; align-content: center; background: var(--black); }
.chapter-heading.narrow { width: min(760px, 86vw); }
.corridor-light { position: absolute; left: -10vw; right: -10vw; height: 18vh; filter: blur(18px); opacity: .55; transform: rotate(-8deg); }
.light-one { top: 24%; background: linear-gradient(90deg, transparent, rgba(98,242,210,.22), rgba(141,107,255,.24), transparent); animation: corridorFloat 12s ease-in-out infinite; }
.light-two { bottom: 24%; background: linear-gradient(90deg, transparent, rgba(200,162,74,.16), rgba(245,231,193,.10), transparent); animation: corridorFloat 15s ease-in-out infinite reverse; }
.process-track { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 54px; }
.process-track article { min-height: 210px; padding: 24px; border: 1px solid rgba(200,162,74,.34); background: rgba(18,16,13,.82); display: flex; flex-direction: column; justify-content: space-between; }
.process-track b { font-family: var(--display); font-size: 46px; font-weight: 900; }
.process-track span { font-family: var(--serif); font-style: italic; color: rgba(245,231,193,.7); font-size: 22px; }

.quietus { min-height: 100vh; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at 50% 48%, rgba(200,162,74,.12), transparent 38%), var(--black); }
.quietus-frame { position: absolute; inset: 8vw; width: calc(100% - 16vw); height: calc(100% - 16vw); fill: none; stroke: var(--gold); stroke-width: .18; stroke-dasharray: 384; stroke-dashoffset: 384; animation: drawFrame 5.5s ease-in-out infinite alternate; }
.particle-field { position: absolute; inset: 0; pointer-events: none; }
.particle-field i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--gold); opacity: .5; animation: particleDrift 6s ease-in-out infinite; }
.quietus h2 { margin: 0; font-family: var(--display); font-size: clamp(86px, 18vw, 220px); line-height: .8; color: var(--champagne); }
.quietus p:last-child { max-width: 520px; line-height: 1.8; color: rgba(245,231,193,.7); }

@keyframes veilBreath { from { transform: rotate(-13deg) translateX(-4vw) scaleY(.82); } to { transform: rotate(-9deg) translateX(5vw) scaleY(1.08); } }
@keyframes corridorFloat { 0%,100% { transform: translateX(-4vw) rotate(-8deg); } 50% { transform: translateX(7vw) rotate(-5deg); } }
@keyframes drawFrame { to { stroke-dashoffset: 0; } }
@keyframes particleDrift { 0%,100% { transform: translateY(0); opacity: .18; } 50% { transform: translateY(-30px); opacity: .75; } }

@media (max-width: 900px) {
  .gallery-index, .progress-bead { display: none; }
  .chapter { padding: 28px; }
  .vertical-label { display: none; }
  .magnetic-salon-grid, .studies, .process-track { display: block; }
  .tile, .watercolor-card, .process-track article { min-height: 280px; margin-bottom: 18px; }
  .tile-paper { color: var(--carbon); }
  .study-wall { display: block; }
  .corridor { display: block; padding-top: 100px; }
  .coord-east { display: none; }
}
