:root {
  /* DESIGN FONT/NOTE TOKENS: Interprets domain bridal sparingly timecodes */
  --mourning-silk: #09070B;
  --pearl-vow: #F6EFE3;
  --blush-static: #E7A6B8;
  --oxide-red: #8F2638;
  --vellum-gold: #C7A45D;
  --projection-blue: #8DB6C9;
  --ash-lavender: #766A86;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --jp: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --ui: Archivo, Inter, system-ui, sans-serif;
  --mono: "Space Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--mourning-silk);
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--pearl-vow);
  background:
    radial-gradient(circle at 68% 12%, rgba(141, 182, 201, 0.14), transparent 28rem),
    radial-gradient(circle at 22% 75%, rgba(143, 38, 56, 0.18), transparent 32rem),
    var(--mourning-silk);
  font-family: var(--ui);
}

body.static-bloom .blush-static {
  opacity: 1;
  transform: scale(1.08);
}

.grain,
.scanlines,
.dust-field,
.blush-static {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

.grain {
  opacity: 0.26;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(246, 239, 227, 0.11) 0 1px, transparent 1.8px),
    radial-gradient(circle at 80% 70%, rgba(231, 166, 184, 0.09) 0 1px, transparent 1.7px);
  background-size: 4px 4px, 6px 6px;
  mix-blend-mode: screen;
}

.scanlines {
  z-index: 19;
  opacity: 0.18;
  background: repeating-linear-gradient(180deg, transparent 0 6px, rgba(141, 182, 201, 0.13) 7px, transparent 9px);
  animation: scanShimmer 7s linear infinite;
}

.dust-field { z-index: 18; overflow: hidden; }

.dust {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(246, 239, 227, 0.72);
  box-shadow: 0 0 13px rgba(246, 239, 227, 0.45);
  animation: dustDrift var(--speed) linear infinite;
}

.blush-static {
  z-index: 30;
  opacity: 0;
  transition: opacity 700ms ease, transform 900ms ease;
  background:
    repeating-linear-gradient(90deg, rgba(231, 166, 184, 0.08) 0 3px, rgba(143, 38, 56, 0.13) 4px 7px, transparent 8px 12px),
    radial-gradient(circle at 52% 48%, rgba(231, 166, 184, 0.46), transparent 31rem);
  mix-blend-mode: screen;
}

.aisle-axis {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 34vw;
  z-index: 25;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(246, 239, 227, 0.58), rgba(199, 164, 93, 0.52), transparent);
}

.aisle-axis::before {
  content: "";
  position: absolute;
  top: 12vh;
  left: -5px;
  width: 11px;
  height: 76vh;
  border-left: 1px solid rgba(231, 166, 184, 0.18);
  border-right: 1px solid rgba(141, 182, 201, 0.18);
}

.axis-caption {
  position: absolute;
  top: 16vh;
  left: -3rem;
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  color: rgba(246, 239, 227, 0.58);
}

.ring-nav {
  position: absolute;
  top: 49%;
  left: -13px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  transform: translateY(-50%);
}

.ring-dot {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(199, 164, 93, 0.74);
  border-radius: 50%;
  background: rgba(9, 7, 11, 0.82);
  box-shadow: inset 0 0 0 6px rgba(9, 7, 11, 0.92), 0 0 16px rgba(199, 164, 93, 0.22);
  transition: border-color 300ms ease, transform 300ms ease, box-shadow 300ms ease;
}

.ring-dot span {
  position: absolute;
  top: 50%;
  left: 2.15rem;
  white-space: nowrap;
  transform: translateY(-50%);
  opacity: 0;
  color: var(--pearl-vow);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  transition: opacity 300ms ease;
}

.ring-dot.active,
.ring-dot:hover {
  transform: rotate(35deg) scale(1.15);
  border-color: var(--blush-static);
  box-shadow: inset 0 0 0 5px rgba(143, 38, 56, 0.38), 0 0 28px rgba(231, 166, 184, 0.36);
}

.ring-dot.active span,
.ring-dot:hover span { opacity: 1; }

.scene {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
  padding: 11vh 8vw 9vh 8vw;
}

.scene::before {
  content: attr(data-chapter);
  position: absolute;
  top: 8vh;
  left: calc(34vw - 5.5rem);
  font-family: var(--mono);
  color: rgba(141, 182, 201, 0.44);
  letter-spacing: 0.32em;
  font-size: 0.72rem;
}

.scene-aperture {
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 65% 52%, rgba(246, 239, 227, 0.09), transparent 34rem);
}

.tube-body.diagonal {
  position: absolute;
  width: 84vw;
  height: 18vh;
  right: -10vw;
  top: 42vh;
  transform: rotate(-17deg);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(246, 239, 227, 0.1), transparent 24%, rgba(9, 7, 11, 0.9) 50%, rgba(141, 182, 201, 0.12) 76%, rgba(246, 239, 227, 0.08)),
    radial-gradient(ellipse at 50% 50%, rgba(246, 239, 227, 0.18), rgba(9, 7, 11, 0.95) 64%);
  box-shadow: 0 0 70px rgba(141, 182, 201, 0.12), inset 0 0 44px rgba(246, 239, 227, 0.14);
  clip-path: ellipse(50% 34% at 50% 50%);
  animation: slitBreathe 8s ease-in-out infinite;
}

.tube-glow {
  position: absolute;
  inset: 37% 5%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(246, 239, 227, 0.92), rgba(231, 166, 184, 0.68), transparent);
  filter: blur(8px);
  animation: glowPass 5.8s ease-in-out infinite;
}

.tube-mouth {
  position: absolute;
  right: 4%;
  top: 50%;
  width: 17vh;
  height: 17vh;
  transform: translateY(-50%);
  border: 1px solid rgba(246, 239, 227, 0.36);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 239, 227, 0.18), rgba(143, 38, 56, 0.16) 38%, rgba(9, 7, 11, 0.94) 68%);
}

.iris-title {
  position: relative;
  left: -14vw;
  max-width: 42rem;
  clip-path: circle(0% at 62% 52%);
  animation: irisReveal 2.6s 800ms cubic-bezier(.2,.9,.2,1) forwards;
}

.jp {
  display: block;
  color: var(--vellum-gold);
  font-family: var(--jp);
  letter-spacing: 0.18em;
  font-size: clamp(1rem, 1.4vw, 1.35rem);
}

h1,
h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.88;
}

h1 {
  font-size: clamp(5rem, 15vw, 15rem);
  letter-spacing: -0.075em;
  text-shadow: 0 0 35px rgba(246, 239, 227, 0.16);
}

h2 {
  font-size: clamp(3.4rem, 8vw, 9rem);
  letter-spacing: -0.055em;
}

p {
  max-width: 31rem;
  color: rgba(246, 239, 227, 0.74);
  font-family: var(--jp);
  font-size: clamp(1rem, 1.5vw, 1.28rem);
  line-height: 1.8;
}

.timecode {
  position: absolute;
  right: 8vw;
  bottom: 8vh;
  color: rgba(141, 182, 201, 0.7);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.annotation {
  position: relative;
  z-index: 2;
  width: min(40vw, 34rem);
  margin-left: 2vw;
  padding-top: 6vh;
}

.tag {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--blush-static);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
}

.scene-veil {
  display: flex;
  align-items: center;
  background: radial-gradient(ellipse at 75% 52%, rgba(118, 106, 134, 0.24), transparent 34rem);
}

.veil-stage {
  position: absolute;
  right: 3vw;
  top: 7vh;
  width: 58vw;
  height: 86vh;
  perspective: 900px;
}

.oval-aperture {
  position: absolute;
  right: 12%;
  top: 6%;
  width: 56%;
  height: 80%;
  border: 1px solid rgba(246, 239, 227, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(ellipse, transparent 35%, rgba(9, 7, 11, 0.85) 62%),
    linear-gradient(120deg, rgba(141, 182, 201, 0.18), rgba(231, 166, 184, 0.12));
  box-shadow: inset 0 0 80px rgba(9, 7, 11, 0.8), 0 0 44px rgba(141, 182, 201, 0.16);
  animation: apertureMorph 10s ease-in-out infinite;
}

.veil {
  position: absolute;
  inset: 0;
  transform-origin: 50% 0;
  background:
    repeating-linear-gradient(112deg, rgba(246, 239, 227, 0.04) 0 8px, transparent 9px 19px),
    linear-gradient(115deg, transparent, rgba(246, 239, 227, 0.18), rgba(231, 166, 184, 0.1), transparent);
  border-radius: 4rem 22rem 18rem 4rem;
  filter: blur(0.2px);
  mix-blend-mode: screen;
  transition: transform 120ms ease-out;
}

.cloth-one {
  clip-path: polygon(35% 0, 88% 6%, 73% 100%, 12% 82%);
  animation: veilUnfurl 9s ease-in-out infinite;
}

.cloth-two {
  opacity: 0.62;
  clip-path: polygon(52% 3%, 100% 28%, 69% 91%, 0 100%, 18% 22%);
  animation: veilUnfurl 11s -3s ease-in-out infinite reverse;
}

.subtitle-strip {
  position: absolute;
  padding: 0.75rem 1rem;
  color: rgba(246, 239, 227, 0.72);
  background: rgba(9, 7, 11, 0.48);
  border: 1px solid rgba(246, 239, 227, 0.16);
  font-family: var(--jp);
  letter-spacing: 0.08em;
  backdrop-filter: blur(4px);
  animation: subtitleFlicker 2.2s steps(2) infinite;
}

.strip-a { right: 9%; bottom: 23%; transform: rotate(-2deg); }
.strip-b { right: 29%; top: 26%; transform: rotate(4deg); font-family: var(--mono); font-size: 0.75rem; }

.scene-ghost {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: linear-gradient(112deg, rgba(246, 239, 227, 0.02), rgba(118, 106, 134, 0.12), transparent);
}

.paper-stack {
  position: absolute;
  left: 42vw;
  top: 12vh;
  width: 42vw;
  height: 72vh;
}

.paper {
  position: absolute;
  width: 64%;
  height: 66%;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(199, 164, 93, 0.22) 49% 51%, transparent 52%),
    linear-gradient(160deg, rgba(246, 239, 227, 0.88), rgba(246, 239, 227, 0.18));
  border: 1px solid rgba(246, 239, 227, 0.32);
  clip-path: polygon(0 0, 100% 0, 88% 100%, 10% 92%);
  box-shadow: 0 30px 60px rgba(0,0,0,0.45);
}

.panel-one { left: 8%; top: 8%; transform: rotate(-10deg); }
.panel-two { left: 23%; top: 17%; transform: rotate(6deg); background-color: rgba(141, 182, 201, 0.1); }
.panel-three { left: 2%; top: 28%; transform: rotate(-2deg); opacity: 0.72; }

.seal {
  position: absolute;
  left: 37%;
  top: 43%;
  width: 6.2rem;
  height: 6.2rem;
  border: 0;
  border-radius: 50%;
  color: var(--pearl-vow);
  background: radial-gradient(circle, var(--oxide-red), #5e1422 70%);
  box-shadow: 0 0 0 8px rgba(143, 38, 56, 0.18), 0 18px 30px rgba(0,0,0,0.4);
  font-family: var(--jp);
  font-size: 2rem;
  cursor: pointer;
  transition: transform 250ms ease, filter 250ms ease;
}

.seal:hover { transform: rotate(-8deg) scale(1.05); filter: saturate(1.4); }
.right-note { margin-right: 3vw; }

.scene-signal {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 56% 48%, rgba(199, 164, 93, 0.09), transparent 30rem);
}

.ring-reel {
  position: absolute;
  left: 42vw;
  top: 15vh;
  width: min(50vw, 42rem);
  aspect-ratio: 1;
  transform: rotate(var(--scroll-rotation, 0deg));
}

.ring {
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  border: 1.35rem solid rgba(199, 164, 93, 0.78);
  box-shadow: inset 0 0 42px rgba(246, 239, 227, 0.12), 0 0 52px rgba(199, 164, 93, 0.18);
}

.ring.inner {
  inset: 25%;
  border-width: 0.65rem;
  border-color: rgba(143, 38, 56, 0.72);
  animation: reelCounter 7s linear infinite;
}

.pearl {
  position: absolute;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--pearl-vow);
  box-shadow: 0 0 18px rgba(246, 239, 227, 0.55);
}

.p1 { left: 50%; top: 4%; }
.p2 { right: 11%; bottom: 19%; }
.p3 { left: 13%; bottom: 18%; }

.tube-front {
  position: absolute;
  left: 37vw;
  top: 25vh;
  width: min(54vw, 46rem);
  aspect-ratio: 1.55;
  border-radius: 50%;
  background: radial-gradient(ellipse, transparent 38%, rgba(9,7,11,0.94) 63%), radial-gradient(ellipse, rgba(141,182,201,0.34), rgba(9,7,11,0.98) 70%);
  border: 1px solid rgba(141, 182, 201, 0.38);
  box-shadow: inset 0 0 88px rgba(9,7,11,0.88), 0 0 50px rgba(141,182,201,0.12);
}

.tube-core {
  position: absolute;
  inset: 36% 14%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(246,239,227,0.54), rgba(231,166,184,0.24) 35%, transparent 65%);
  filter: blur(14px);
}

.signal-copy {
  position: absolute;
  left: 7vw;
  bottom: 12vh;
}

.scene-bouquet {
  display: grid;
  place-items: center;
  min-height: 112vh;
  background: radial-gradient(ellipse at 57% 42%, rgba(246,239,227,0.16), rgba(231,166,184,0.06) 30%, transparent 57%);
}

.bouquet-silhouette {
  position: absolute;
  right: 12vw;
  bottom: 9vh;
  width: 26vw;
  height: 48vh;
  background:
    radial-gradient(ellipse at 30% 28%, rgba(246,239,227,0.72) 0 10%, transparent 11%),
    radial-gradient(ellipse at 54% 20%, rgba(231,166,184,0.55) 0 9%, transparent 10%),
    radial-gradient(ellipse at 67% 37%, rgba(246,239,227,0.56) 0 11%, transparent 12%),
    linear-gradient(82deg, transparent 47%, rgba(199,164,93,0.58) 49% 51%, transparent 53%);
  filter: blur(0.3px);
  opacity: 0.65;
}

.petal-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.petal {
  position: absolute;
  width: 1.15rem;
  height: 0.55rem;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(90deg, var(--blush-static), var(--pearl-vow));
  opacity: 0.72;
  animation: petalDrift var(--fall) linear infinite;
}

.final-card {
  position: relative;
  left: -12vw;
  padding: 3rem;
  border: 1px solid rgba(246,239,227,0.14);
  background: rgba(9,7,11,0.42);
  backdrop-filter: blur(8px);
  clip-path: polygon(0 0, 96% 6%, 100% 94%, 7% 100%);
}

@keyframes irisReveal { to { clip-path: circle(120% at 62% 52%); } }
@keyframes scanShimmer { to { background-position-y: 90px; } }
@keyframes slitBreathe { 0%, 100% { clip-path: ellipse(50% 26% at 50% 50%); } 50% { clip-path: ellipse(50% 39% at 50% 50%); } }
@keyframes glowPass { 0%, 100% { transform: translateX(-45%) scaleX(0.4); opacity: 0.25; } 45% { transform: translateX(18%) scaleX(1.2); opacity: 0.95; } }
@keyframes dustDrift { from { transform: translate3d(0, 105vh, 0); } to { transform: translate3d(var(--drift), -10vh, 0); } }
@keyframes apertureMorph { 0%, 100% { border-radius: 52% 48% 49% 51%; transform: rotate(-2deg); } 50% { border-radius: 44% 56% 55% 45%; transform: rotate(3deg); } }
@keyframes veilUnfurl { 0%, 100% { transform: rotateY(-8deg) translateX(0); } 50% { transform: rotateY(12deg) translateX(-2rem); } }
@keyframes subtitleFlicker { 0%, 100% { opacity: 0.72; } 50% { opacity: 0.42; transform: translateX(3px); } }
@keyframes reelCounter { to { transform: rotate(-360deg); } }
@keyframes petalDrift { from { transform: translateY(-12vh) rotate(0deg); } to { transform: translateY(118vh) translateX(var(--sway)) rotate(520deg); } }

@media (max-width: 760px) {
  .aisle-axis { left: 18vw; }
  .scene { padding-left: 23vw; padding-right: 5vw; }
  .scene::before { left: 6vw; }
  .iris-title { left: 0; }
  .annotation { width: 68vw; margin-left: 0; }
  .veil-stage, .paper-stack, .ring-reel, .tube-front { opacity: 0.74; left: 20vw; right: auto; width: 76vw; }
  .right-note, .signal-copy { margin: 0; left: 23vw; right: auto; width: 68vw; }
  h1 { font-size: 23vw; }
}
