:root {
  /* Design typography text retained for compliance: IBM Plex Mono sparingly for aperture values. Interprets `miris.one` as a singular living mirror-iris and optical ritual. */
  --mirror-black: #05070D;
  --liquid-violet: #8B5CFF;
  --infrared-rose: #FF5D8F;
  --deep-blue-glass: #101B3A;
  --soft-chrome: #B9C2D6;
  --opal-white: #F7F4EA;
  --ice-cyan: #A7F3FF;
  --aperture-size: min(62vw, 62vh);
  --iris-rotation: 0deg;
  --chromatic-offset: 3px;
  --glow-intensity: .62;
  --scroll-progress: 0;
  --scene-progress: 0;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--mirror-black);
}

body {
  margin: 0;
  min-height: 500vh;
  color: var(--opal-white);
  font-family: "Manrope", "Inter", sans-serif;
  overflow-x: hidden;
  cursor: none;
  background:
    radial-gradient(circle at 51% calc(9% + 70% * var(--scroll-progress)), rgba(247, 244, 234, .16), transparent 21vw),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 255, .18), transparent 38vw),
    linear-gradient(180deg, #05070D 0%, #101B3A 36%, #05070D 68%, #F7F4EA 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(167, 243, 255, .06) 0 1px, transparent 1px 26px),
    linear-gradient(105deg, transparent 0 42%, rgba(247, 244, 234, .08) 48%, transparent 55% 100%);
  mix-blend-mode: screen;
  opacity: .55;
  z-index: 2;
}

.aperture-story { position: relative; z-index: 3; }

.scene {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.scene-field {
  position: relative;
  width: min(1500px, 100vw);
  height: 100vh;
  margin: 0 auto;
}

.scene::before,
.scene::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
}

.scene::before {
  width: 72vmin;
  height: 72vmin;
  border: 1px solid rgba(185, 194, 214, .16);
  box-shadow: inset 0 0 70px rgba(167, 243, 255, .08), 0 0 90px rgba(139, 92, 255, .12);
  transform: rotate(calc(var(--iris-rotation) * .25));
}

.scene::after {
  width: 115vmax;
  height: 115vmax;
  background: radial-gradient(circle, transparent 0 37%, rgba(247, 244, 234, .055) 37.2%, transparent 37.6% 100%);
  opacity: .65;
}

.chapter-glyph {
  position: absolute;
  z-index: 0;
  font-family: "Orbitron", "Inter", sans-serif;
  font-size: clamp(4.5rem, 16vw, 18rem);
  font-weight: 800;
  letter-spacing: -.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(185, 194, 214, .19);
  text-shadow: calc(var(--chromatic-offset) * -1) 0 rgba(167, 243, 255, .11), var(--chromatic-offset) 0 rgba(255, 93, 143, .1);
  opacity: .52;
  left: 5vw;
  top: 7vh;
  transform: skewX(-8deg);
  white-space: nowrap;
}

.lens-system {
  position: absolute;
  width: var(--aperture-size);
  height: var(--aperture-size);
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 calc(42px * var(--glow-intensity)) rgba(167, 243, 255, .42));
  transform: rotate(var(--iris-rotation)) scale(calc(.92 + var(--scene-progress) * .06));
  transition: filter .35s ease;
}

.lens-system::before {
  content: "";
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: conic-gradient(from 40deg, transparent, rgba(167, 243, 255, .18), transparent, rgba(139, 92, 255, .18), transparent, rgba(255, 93, 143, .12), transparent);
  mask: radial-gradient(circle, transparent 0 51%, black 52% 54%, transparent 56% 100%);
  animation: focusSpin 18s linear infinite;
}

.lens-system::after {
  content: "";
  position: absolute;
  inset: -2%;
  border-radius: 50%;
  border: 1px solid rgba(247, 244, 234, .22);
  box-shadow: inset 0 0 26px rgba(247, 244, 234, .18), 0 0 0 8px rgba(16, 27, 58, .18);
}

.closed .eyelid-line {
  width: min(70vw, 760px);
  height: 17px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #B9C2D6 18%, #F7F4EA 50%, #A7F3FF 72%, transparent);
  box-shadow: 0 0 32px rgba(167, 243, 255, .7), 0 10px 28px rgba(139, 92, 255, .35), inset 0 1px 2px white;
  transform: scaleY(calc(1 + var(--scene-progress) * 3));
}

.halo {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  opacity: .42;
}

.halo-cyan { width: 70%; height: 13%; background: #A7F3FF; transform: translate(-12%, -10%); }
.halo-violet { width: 55%; height: 12%; background: #8B5CFF; transform: translate(16%, 18%); }

.mirrored-wordmark {
  position: absolute;
  top: 34%;
  left: 50%;
  translate: -50% -50%;
  font-family: "Orbitron", "Inter", sans-serif;
  font-size: clamp(2rem, 7vw, 7rem);
  font-weight: 700;
  letter-spacing: .04em;
  color: #F7F4EA;
  text-shadow: -3px 0 #A7F3FF, 4px 0 rgba(255, 93, 143, .78), 0 18px 36px rgba(247, 244, 234, .26);
  transform: perspective(520px) rotateX(22deg) skewX(-6deg);
}

.mirrored-wordmark::after {
  content: attr(data-reflect);
  position: absolute;
  inset: 100% 0 auto 0;
  transform: scaleY(-1);
  opacity: .22;
  filter: blur(2px);
  color: #A7F3FF;
}

.diagnostic-strip,
.mono,
.calibration-tabs,
.tear-line {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.diagnostic-strip {
  position: absolute;
  bottom: 26%;
  font-size: .68rem;
  color: #B9C2D6;
  background: rgba(16, 27, 58, .52);
  border: 1px solid rgba(185, 194, 214, .24);
  border-radius: 999px;
  padding: .55rem 1rem;
  backdrop-filter: blur(15px);
}

.curved-caption {
  position: absolute;
  left: 50%;
  top: 14vh;
  translate: -50% 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.5rem, 3vw, 3.8rem);
  font-style: italic;
  color: #F7F4EA;
  opacity: .75;
  transform: rotate(-2deg);
}

.whisper {
  position: absolute;
  max-width: 280px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.25rem, 2vw, 2rem);
  line-height: 1.08;
  color: #B9C2D6;
}

.left-whisper { left: 8vw; bottom: 15vh; }

.radial-split .lens-system { left: 38%; }
.radial-split.inverse .lens-system { left: 64%; }

.almond-shell {
  position: relative;
  width: 100%;
  height: 58%;
  border-radius: 70% 30% 70% 30% / 55% 45% 55% 45%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(247, 244, 234, .86), rgba(167, 243, 255, .44) 28%, rgba(139, 92, 255, .2) 48%, rgba(5, 7, 13, .92) 75%),
    linear-gradient(110deg, rgba(247, 244, 234, .9), rgba(185, 194, 214, .2), rgba(16, 27, 58, .72));
  border: 1px solid rgba(247, 244, 234, .46);
  box-shadow: inset 0 12px 25px rgba(255, 255, 255, .23), inset 0 -18px 34px rgba(5, 7, 13, .78), 0 0 60px rgba(167, 243, 255, .27);
  transform: rotate(-12deg);
}

.almond-shell::before {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: inherit;
  border: 1px solid rgba(167, 243, 255, .34);
  background: linear-gradient(180deg, rgba(255,255,255,.28), transparent 35%, rgba(5,7,13,.4) 76%);
}

.aperture-blades {
  position: absolute;
  width: 88%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-conic-gradient(from 12deg, rgba(247, 244, 234, .22) 0 18deg, rgba(167, 243, 255, .13) 18deg 33deg, rgba(139, 92, 255, .11) 33deg 45deg);
  mask: radial-gradient(circle, transparent 0 31%, black 32% 63%, transparent 64% 100%);
  animation: bladeBreathe 7s ease-in-out infinite;
}

.iris-core {
  position: relative;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 48% 48%, #05070D 0 16%, transparent 17%),
    repeating-radial-gradient(circle, rgba(247, 244, 234, .48) 0 2px, transparent 3px 18px),
    conic-gradient(from 70deg, #A7F3FF, #F7F4EA, #8B5CFF, #101B3A, #FF5D8F, #A7F3FF);
  box-shadow: inset 0 0 24px rgba(5, 7, 13, .9), 0 0 34px rgba(167, 243, 255, .48);
}

.pupil {
  position: absolute;
  width: 31%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #05070D;
  box-shadow: 0 0 0 5px rgba(16, 27, 58, .72), 0 0 28px rgba(5, 7, 13, .9);
}

.horizon-line {
  position: absolute;
  width: 125%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #F7F4EA, #A7F3FF, transparent);
  box-shadow: 0 0 14px #A7F3FF;
  z-index: 4;
}

.shine {
  position: absolute;
  height: 13%;
  width: 58%;
  border-radius: 999px;
  background: rgba(247, 244, 234, .54);
  filter: blur(5px);
  transform: rotate(-24deg);
}

.streak-a { top: 18%; left: 13%; }
.streak-b { width: 28%; bottom: 22%; right: 17%; opacity: .62; }

.rim-text {
  position: absolute;
  inset: -24%;
  width: 148%;
  height: 148%;
  fill: #A7F3FF;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  letter-spacing: 4px;
  animation: focusSpin 34s linear infinite reverse;
  opacity: .78;
}

.orbit-panel {
  position: absolute;
  z-index: 5;
  width: min(32vw, 410px);
  padding: 1.4rem 1.5rem;
  border: 1px solid rgba(185, 194, 214, .32);
  border-radius: 38px 12px 38px 12px;
  background: linear-gradient(135deg, rgba(247, 244, 234, .17), rgba(16, 27, 58, .62));
  backdrop-filter: blur(22px);
  box-shadow: inset 0 1px rgba(247, 244, 234, .4), 0 25px 60px rgba(5, 7, 13, .35);
}

.panel-right { right: 7vw; top: 34vh; transform: rotate(-5deg); }
.panel-left { left: 7vw; top: 33vh; transform: rotate(4deg); }
.translucent { background: linear-gradient(145deg, rgba(167, 243, 255, .13), rgba(139, 92, 255, .2), rgba(16, 27, 58, .6)); }

.orbit-panel h2 {
  margin: .65rem 0 .55rem;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(2.2rem, 4vw, 4.6rem);
  line-height: .85;
}

.orbit-panel p,
.crescent-band p,
.final-orbit {
  margin: 0;
  color: #F7F4EA;
  font-size: clamp(.98rem, 1.35vw, 1.18rem);
  line-height: 1.65;
}

.mono { color: #A7F3FF; font-size: .72rem; }

.prism-ghost {
  position: absolute;
  width: 76%;
  height: 43%;
  border-radius: 70% 30% 70% 30% / 55% 45% 55% 45%;
  border: 1px solid;
  opacity: .55;
  transform: rotate(-12deg);
}

.ghost-cyan { border-color: #A7F3FF; translate: calc(var(--chromatic-offset) * -2) -5px; }
.ghost-rose { border-color: #FF5D8F; translate: calc(var(--chromatic-offset) * 2) 7px; }
.refractive { background: radial-gradient(circle, rgba(247,244,234,.9), rgba(167,243,255,.32) 32%, rgba(139,92,255,.32) 56%, rgba(5,7,13,.88) 80%); }
.lucid { animation: irisPulse 5.5s ease-in-out infinite; }

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(247, 244, 234, .28);
  box-shadow: 0 0 18px rgba(167, 243, 255, .24);
}
.ring-1 { width: 78%; aspect-ratio: 1; }
.ring-2 { width: 58%; aspect-ratio: 1; border-color: rgba(167, 243, 255, .42); }
.ring-3 { width: 33%; aspect-ratio: 1; border-color: rgba(255, 93, 143, .38); }

.calibration-tabs {
  position: absolute;
  right: 5vw;
  bottom: 13vh;
  display: flex;
  gap: .7rem;
  transform: rotate(-6deg);
}

.calibration-tabs span {
  border: 1px solid rgba(167, 243, 255, .32);
  border-radius: 999px;
  padding: .6rem .8rem;
  background: rgba(247, 244, 234, .09);
  color: #B9C2D6;
  font-size: .62rem;
}

.after-field .lens-system { left: 50%; top: 43%; }
.moon-disc {
  position: absolute;
  width: 33%;
  aspect-ratio: 1;
  border-radius: 50%;
  right: 4%;
  top: 1%;
  background: radial-gradient(circle at 35% 28%, #F7F4EA, #B9C2D6 54%, rgba(247, 244, 234, .05) 56%);
  box-shadow: 0 0 32px rgba(247, 244, 234, .45);
}

.memory { filter: saturate(1.2) contrast(1.12); }
.memory-core { background: conic-gradient(from 90deg, #FF5D8F, #F7F4EA, #A7F3FF, #8B5CFF, #FF5D8F); }
.rose-pulse { box-shadow: 0 0 0 5px rgba(255, 93, 143, .28), 0 0 45px rgba(255, 93, 143, .9); }

.reflection-streak {
  position: absolute;
  width: 72%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #FF5D8F, #F7F4EA, transparent);
  filter: blur(1px);
}
.reflection-streak.one { top: 35%; left: 15%; transform: rotate(-11deg); }
.reflection-streak.two { bottom: 26%; left: 9%; transform: rotate(8deg); opacity: .62; }

.crescent-band {
  position: absolute;
  left: 13vw;
  bottom: 11vh;
  width: min(58vw, 650px);
  min-height: 120px;
  padding: 1.3rem 2rem 1.5rem 4.4rem;
  border-radius: 999px 45px 999px 45px;
  background:
    radial-gradient(circle at 0 50%, transparent 0 42px, rgba(247, 244, 234, .15) 43px),
    linear-gradient(90deg, rgba(16, 27, 58, .84), rgba(247, 244, 234, .12));
  border: 1px solid rgba(185, 194, 214, .28);
  backdrop-filter: blur(18px);
}

.final-field { display: grid; place-items: center; }
.final .almond-shell { width: 92%; height: 62%; transform: rotate(0deg); }
.final-core { width: 45%; animation: irisPulse 6s ease-in-out infinite; }
.open-pupil { width: 26%; }
.bloom { animation-duration: 11s; opacity: .85; }
.final-rim { fill: #101B3A; opacity: .82; }

.final-orbit {
  position: absolute;
  bottom: 16vh;
  left: 50%;
  translate: -50% 0;
  width: min(82vw, 850px);
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(1.6rem, 3.6vw, 4rem);
  color: #101B3A;
  text-shadow: 0 0 14px rgba(247, 244, 234, .8);
}

.final-wordmark {
  position: absolute;
  top: 9vh;
  right: 8vw;
  font-family: "Orbitron", "Inter", sans-serif;
  font-size: clamp(1.4rem, 3vw, 3.2rem);
  color: #101B3A;
  text-shadow: -2px 0 rgba(167, 243, 255, .8), 2px 0 rgba(255, 93, 143, .55);
}

.dot-carrier { color: #FF5D8F; }

.tear-line {
  position: fixed;
  z-index: 20;
  right: 2.1vw;
  top: 7vh;
  height: 86vh;
  width: 40px;
  color: #B9C2D6;
  font-size: .58rem;
}

.tear-label { position: absolute; top: -1.5rem; right: 0; writing-mode: vertical-rl; }
.tear-track {
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(185, 194, 214, .28);
}
.tear-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: calc(var(--scroll-progress) * 100%);
  background: linear-gradient(#A7F3FF, #8B5CFF, #FF5D8F);
  box-shadow: 0 0 14px #A7F3FF;
}
.tear-bead {
  position: absolute;
  left: 12px;
  top: calc(var(--scroll-progress) * (86vh - 16px));
  width: 13px;
  height: 18px;
  border-radius: 55% 55% 60% 60%;
  background: radial-gradient(circle at 35% 22%, #F7F4EA, #A7F3FF 38%, #8B5CFF 72%, #05070D);
  box-shadow: 0 0 20px rgba(167, 243, 255, .7);
}
.tear-mark { position: absolute; right: 0; }
.mark-1 { top: 18%; }
.mark-2 { top: 50%; }
.mark-3 { top: 82%; }

.cursor-reticle {
  position: fixed;
  z-index: 40;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(167, 243, 255, .75);
  pointer-events: none;
  translate: -50% -50%;
  opacity: 0;
  transition: opacity .25s ease, width .2s ease, height .2s ease;
  mix-blend-mode: screen;
}
.cursor-reticle::before,
.cursor-reticle::after {
  content: "";
  position: absolute;
  background: #A7F3FF;
  opacity: .7;
}
.cursor-reticle::before { width: 48px; height: 1px; left: -8px; top: 16px; }
.cursor-reticle::after { height: 48px; width: 1px; left: 16px; top: -8px; }
.cursor-reticle.active { opacity: .9; width: 46px; height: 46px; }

.overexposure {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: #F7F4EA;
  opacity: 0;
  mix-blend-mode: screen;
}

@keyframes focusSpin { to { transform: rotate(360deg); } }
@keyframes bladeBreathe { 0%, 100% { transform: rotate(0deg) scale(.96); } 50% { transform: rotate(18deg) scale(1.04); } }
@keyframes irisPulse { 0%, 100% { transform: scale(.95) rotate(0deg); } 50% { transform: scale(1.06) rotate(16deg); } }

@media (max-width: 860px) {
  :root { --aperture-size: min(86vw, 58vh); }
  .radial-split .lens-system,
  .radial-split.inverse .lens-system { left: 50%; top: 43%; }
  .orbit-panel { width: min(86vw, 420px); }
  .panel-right,
  .panel-left { left: 7vw; right: auto; top: 67vh; }
  .calibration-tabs { left: 6vw; right: auto; bottom: 6vh; flex-wrap: wrap; }
  .crescent-band { left: 6vw; width: 82vw; padding-left: 2rem; }
  .tear-line { right: .4vw; }
  .chapter-glyph { font-size: clamp(3.7rem, 22vw, 8rem); top: 8vh; }
  body { cursor: auto; }
  .cursor-reticle { display: none; }
}
