:root {
  --absinthe: #A7C957;
  --claret: #4A0F1F;
  --cream: #F6E9D0;
  --glass-blue: #BFD7EA;
  --meadow: #10170D;
  --lampblack: #070606;
  --gold: #B88746;
  --sidebar: clamp(72px, 10vw, 132px);
  --sans: "Space Grotesk", sans-serif;
  --display: "Oswald", sans-serif;
  --accent: "Cormorant Garamond", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--lampblack);
  color: var(--cream);
  font-family: var(--sans);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 18%, rgba(191, 215, 234, 0.12), transparent 25vw),
    radial-gradient(circle at 82% 82%, rgba(167, 201, 87, 0.08), transparent 28vw),
    linear-gradient(90deg, transparent 0, transparent calc(var(--sidebar) + 2px), rgba(246, 233, 208, 0.035) calc(var(--sidebar) + 2px));
  z-index: 0;
}

.vestibule {
  position: fixed;
  z-index: 20;
  left: 0;
  top: 0;
  width: var(--sidebar);
  height: 100vh;
  background: linear-gradient(180deg, #070606, #10170D 52%, #070606);
  border-right: 1px solid rgba(184, 135, 70, 0.62);
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.45), inset -1px 0 rgba(246, 233, 208, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vestibule__rail {
  position: absolute;
  inset: 18px 18px;
  border: 1px solid rgba(246, 233, 208, 0.34);
}

.vestibule__rail::before,
.vestibule__rail::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 10px;
  height: 10px;
  border: 1px solid var(--gold);
  transform: translateX(-50%) rotate(45deg);
  background: var(--lampblack);
}

.vestibule__rail::before { top: -6px; }
.vestibule__rail::after { bottom: -6px; }

.vestibule__mark {
  position: absolute;
  top: 9vh;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 2rem);
  letter-spacing: 0.18em;
  color: var(--cream);
}

.vestibule__caption {
  position: absolute;
  bottom: 7vh;
  writing-mode: vertical-rl;
  font-family: var(--accent);
  font-style: italic;
  color: var(--glass-blue);
  letter-spacing: 0.08em;
}

.vestibule__floret,
.rosette {
  position: absolute;
  width: 42px;
  height: 42px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.vestibule__floret { bottom: 24vh; }
.vestibule__floret::before,
.vestibule__floret::after,
.rosette::before,
.rosette::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(246, 233, 208, 0.55);
  border-radius: 50%;
}

.vestibule__floret::after,
.rosette::after {
  inset: 15px;
  background: var(--absinthe);
  border: 0;
  box-shadow: 0 0 18px var(--absinthe);
}

.sigil-nav {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sigil {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(246, 233, 208, 0.45);
  transform: rotate(45deg);
  display: grid;
  place-items: center;
  transition: box-shadow 300ms ease, border-color 300ms ease, background 300ms ease;
}

.sigil span {
  width: 8px;
  height: 8px;
  background: var(--cream);
  border-radius: 50%;
  transition: background 300ms ease, transform 300ms ease;
}

.sigil:hover,
.sigil.is-active {
  border-color: var(--gold);
  background: rgba(184, 135, 70, 0.12);
  box-shadow: 0 0 24px rgba(184, 135, 70, 0.55);
}

.sigil:hover span,
.sigil.is-active span { background: var(--absinthe); transform: scale(1.2); }

.conservatory {
  position: relative;
  z-index: 1;
  margin-left: var(--sidebar);
}

.room {
  position: relative;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 80px);
  overflow: hidden;
  border-bottom: 1px solid rgba(184, 135, 70, 0.36);
}

.room::before {
  content: "";
  position: absolute;
  inset: clamp(18px, 3vw, 40px);
  border: 1px solid rgba(246, 233, 208, 0.24);
  pointer-events: none;
}

.room::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(45deg, rgba(246, 233, 208, 0.07) 1px, transparent 1px),
    linear-gradient(-45deg, rgba(184, 135, 70, 0.06) 1px, transparent 1px);
  background-size: 84px 84px;
  opacity: 0.22;
}

.room--gate { background: var(--lampblack); }
.room--glass { background: linear-gradient(180deg, #070606, #10170D); transform: translateX(1.5vw); }
.room--claret { background: radial-gradient(circle at 65% 40%, rgba(184, 135, 70, 0.12), transparent 34vw), var(--claret); transform: translateX(-1vw); }
.room--meadow { background: linear-gradient(180deg, var(--lampblack) 0%, var(--meadow) 100%); }

.room__offset {
  position: absolute;
  top: 34px;
  right: clamp(28px, 5vw, 88px);
  font-family: var(--accent);
  font-size: clamp(1.1rem, 2vw, 2rem);
  font-style: italic;
  color: var(--glass-blue);
  z-index: 2;
}

.chapter-num {
  position: absolute;
  top: clamp(72px, 10vw, 130px);
  left: clamp(34px, 6vw, 92px);
  font-family: var(--display);
  font-size: clamp(4rem, 16vw, 15rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(246, 233, 208, 0.28);
  letter-spacing: 0.04em;
  z-index: 1;
}

.hero-word,
.tall-title,
.final-title {
  position: absolute;
  z-index: 2;
  font-family: var(--display);
  letter-spacing: 0.04em;
  color: var(--cream);
  line-height: 0.86;
  text-transform: uppercase;
  text-shadow: 0 0 36px rgba(246, 233, 208, 0.12);
}

.hero-word {
  left: clamp(24px, 6vw, 92px);
  bottom: 8vh;
  font-size: clamp(4rem, 13vw, 14rem);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.tall-title {
  left: clamp(38px, 8vw, 140px);
  top: 22vh;
  font-size: clamp(4rem, 13vw, 13rem);
}

.final-title {
  left: clamp(38px, 8vw, 140px);
  top: 12vh;
  font-size: clamp(3.8rem, 11vw, 12rem);
  color: var(--cream);
}

.arch-frame {
  position: absolute;
  inset: 8vh 7vw 5vh 21vw;
  z-index: 1;
}

.arch-svg { width: 100%; height: 100%; overflow: visible; }
.draw-line {
  fill: none;
  stroke: var(--cream);
  stroke-width: 2;
  stroke-dasharray: 2100;
  stroke-dashoffset: 2100;
  animation: drawArch 2600ms ease forwards;
}
.draw-line.delay { stroke: var(--gold); animation-delay: 280ms; }
.draw-line.delay-more { stroke: rgba(191, 215, 234, 0.72); animation-delay: 560ms; }

.hanging-diamond {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  top: 7%;
}
.hanging-diamond::before { content: ""; position: absolute; width: 1px; height: 80px; background: rgba(184, 135, 70, 0.6); left: 50%; bottom: 100%; }
.diamond-one { left: 34%; animation: charm 7s ease-in-out infinite; }
.diamond-two { right: 27%; animation: charm 8s ease-in-out infinite reverse; }

.glass-card {
  position: absolute;
  z-index: 3;
  color: var(--cream);
  padding: clamp(22px, 3vw, 42px);
  border: 1px solid rgba(246, 233, 208, 0.54);
  background:
    radial-gradient(circle at var(--sheen-x, 50%) var(--sheen-y, 50%), rgba(191, 215, 234, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(246, 233, 208, 0.08), rgba(191, 215, 234, 0.12));
  backdrop-filter: blur(18px);
  box-shadow: inset 0 0 0 1px rgba(184, 135, 70, 0.35), 0 30px 80px rgba(0, 0, 0, 0.38);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(184, 135, 70, 0.48);
  pointer-events: none;
}

.glass-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image: radial-gradient(circle, rgba(246, 233, 208, 0.34) 1px, transparent 1px);
  background-size: 19px 23px;
  mask-image: linear-gradient(140deg, transparent, #000 30%, transparent 78%);
}

.glass-card h1,
.glass-card h2 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(2rem, 4.4vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.glass-card h2 { font-size: clamp(1.9rem, 3.5vw, 4rem); }

.glass-card p {
  margin: 0;
  font-size: clamp(0.95rem, 1.15vw, 1.1rem);
  line-height: 1.65;
  max-width: 56ch;
}

.glass-card .eyebrow {
  margin-bottom: 16px;
  color: var(--absinthe);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  font-weight: 700;
}

.quote {
  font-family: var(--accent);
  font-style: italic;
  font-size: clamp(1.35rem, 2.2vw, 2.5rem) !important;
  line-height: 1.25 !important;
  color: var(--glass-blue);
}

.glass-card--large { right: 8vw; top: 18vh; width: min(58vw, 740px); transform: rotate(-1.2deg); }
.glass-card--small { right: 17vw; bottom: 13vh; width: min(36vw, 430px); transform: rotate(2deg); }
.pane--one { right: 10vw; top: 17vh; width: min(50vw, 650px); transform: rotate(1.4deg); }
.pane--two { right: 25vw; bottom: 11vh; width: min(38vw, 500px); transform: rotate(-2deg); }
.pane--three { right: 8vw; top: 22vh; width: min(52vw, 720px); transform: rotate(-1deg); }
.pane--four { left: 13vw; bottom: 9vh; width: min(40vw, 520px); transform: rotate(2.2deg); }
.pane--final { right: 9vw; top: 21vh; width: min(48vw, 680px); transform: rotate(1.2deg); }

.float-card { animation: floatPane 8s ease-in-out infinite; }
.pane--two, .pane--four { animation-duration: 9.5s; }

.greenhouse-lines {
  position: absolute;
  inset: 11vh 10vw 9vh 34vw;
  z-index: 1;
  border: 1px solid rgba(191, 215, 234, 0.32);
}

.greenhouse-lines span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(246, 233, 208, 0.22);
}
.greenhouse-lines span:nth-child(1) { left: 20%; }
.greenhouse-lines span:nth-child(2) { left: 40%; }
.greenhouse-lines span:nth-child(3) { left: 60%; }
.greenhouse-lines span:nth-child(4) { left: 80%; }

.rosette--glass { right: 13vw; bottom: 20vh; z-index: 2; width: 74px; height: 74px; }

.velvet-panel {
  position: absolute;
  inset: 12vh 38vw 12vh 7vw;
  border: 1px solid var(--gold);
  background: rgba(7, 6, 6, 0.28);
  box-shadow: inset 0 0 0 12px rgba(246, 233, 208, 0.035);
  z-index: 1;
}

.octagon {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(246, 233, 208, 0.36);
  clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%);
}

.meadow-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24vh;
  background: var(--meadow);
  border-top: 1px solid rgba(167, 201, 87, 0.55);
  z-index: 1;
}

.meadow-band::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -60px;
  height: 80px;
  background: radial-gradient(ellipse at 20% 100%, var(--meadow) 0 38%, transparent 39%), radial-gradient(ellipse at 58% 100%, var(--meadow) 0 30%, transparent 31%), radial-gradient(ellipse at 87% 100%, var(--meadow) 0 46%, transparent 47%);
}

.meadow-band i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 0 16px var(--cream);
  animation: firefly 4s ease-in-out infinite;
}
.meadow-band i:nth-child(1) { left: 18%; top: 20%; }
.meadow-band i:nth-child(2) { left: 34%; top: 47%; animation-delay: 700ms; }
.meadow-band i:nth-child(3) { left: 52%; top: 31%; animation-delay: 1300ms; }
.meadow-band i:nth-child(4) { left: 69%; top: 52%; animation-delay: 400ms; }
.meadow-band i:nth-child(5) { left: 82%; top: 25%; animation-delay: 1600ms; }
.meadow-band i:nth-child(6) { left: 91%; top: 60%; animation-delay: 2100ms; }

.rosette--final { right: 22vw; bottom: 31vh; z-index: 2; width: 86px; height: 86px; }

.cursor-glow {
  position: fixed;
  width: 260px;
  height: 260px;
  margin: -130px 0 0 -130px;
  pointer-events: none;
  z-index: 30;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 135, 70, 0.18), transparent 62%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 300ms ease;
}

@keyframes drawArch { to { stroke-dashoffset: 0; } }
@keyframes floatPane {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}
@keyframes charm {
  0%, 100% { rotate: 45deg; translate: 0 0; }
  50% { rotate: 51deg; translate: 0 8px; }
}
@keyframes firefly {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-12px); }
}

@media (max-width: 840px) {
  .room { padding: 28px; }
  .hero-word { writing-mode: initial; transform: none; bottom: 8vh; font-size: clamp(3rem, 16vw, 7rem); }
  .arch-frame { inset: 14vh 4vw 18vh 4vw; }
  .glass-card--large, .glass-card--small, .pane--one, .pane--two, .pane--three, .pane--four, .pane--final {
    left: 7vw;
    right: 7vw;
    width: auto;
  }
  .glass-card--small, .pane--two, .pane--four { bottom: 8vh; }
  .tall-title, .final-title { left: 7vw; font-size: clamp(3.2rem, 16vw, 7rem); }
  .velvet-panel { inset: 16vh 7vw 20vh 7vw; }
}
