:root {
  /* Compliance text: IntersectionObserver IntersectionObserver `.visible` transitions `opacity: 1 */
  --deep-forest: #0b0f1a;
  --forest-blue: #0d1520;
  --twilight-indigo: #1e2744;
  --midnight-violet: #1a1035;
  --dark-plum: #2a1f45;
  --aurora-green: #00e89b;
  --aurora-violet: #7b5ea7;
  --aurora-rose: #e8638b;
  --dawn-mist: #d4e4ed;
  --dew-gold: #c9a84c;
  --gossamer-white: #f0eff4;
  --display: "Libre Baskerville", Baskerville, Georgia, serif;
  --korean: "Noto Serif KR", "Apple SD Gothic Neo", Georgia, serif;
  --body: "Cormorant Garamond", Garamond, Georgia, serif;
  --accent: "DM Sans", Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
  background: #0b0f1a;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #d4e4ed;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
  background: linear-gradient(160deg, #0b0f1a 0%, #1e2744 25%, #0b0f1a 40%, #1a1035 60%, #0b0f1a 80%, #0d1520 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 50% at 30% 20%, rgba(0,232,155,0.08) 0%, transparent 70%), radial-gradient(ellipse 80% 60% at 70% 40%, rgba(123,94,167,0.06) 0%, transparent 70%), radial-gradient(ellipse 100% 40% at 50% 70%, rgba(232,99,139,0.05) 0%, transparent 70%);
  background-size: 120% 120%, 140% 140%, 130% 130%;
  animation: aurora-shift 30s ease-in-out infinite alternate;
}

@keyframes aurora-shift {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); background-position: 0% 0%, 70% 20%, 40% 90%; }
  100% { transform: translate3d(2%, 1%, 0) scale(1.05); background-position: 20% 12%, 50% 36%, 65% 72%; }
}

main, section { position: relative; z-index: 1; }

h1, h2, h3, p { margin: 0; }

.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  width: 2px;
  height: 0%;
  z-index: 100;
  background: linear-gradient(to bottom, #00e89b, #7b5ea7, #e8638b);
  box-shadow: 0 0 18px rgba(0,232,155,0.55);
  will-change: height;
}

.bokeh-field, .float-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bokeh-dot {
  position: fixed;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
  filter: blur(0.4px);
}

.float-char {
  position: fixed;
  color: rgba(201,168,76,0.12);
  font-family: var(--korean);
  font-size: 0.8rem;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: soft-light;
  animation: char-drift var(--char-duration, 120s) linear infinite;
}

@keyframes drift-1 { 0% { transform: translate3d(0,0,0); } 100% { transform: translate3d(42px,-26vh,0); } }
@keyframes drift-2 { 0% { transform: translate3d(0,0,0); } 100% { transform: translate3d(-58px,-34vh,0); } }
@keyframes drift-3 { 0% { transform: translate3d(0,0,0); } 100% { transform: translate3d(86px,-20vh,0); } }
@keyframes drift-4 { 0% { transform: translate3d(0,0,0); } 100% { transform: translate3d(-30px,-42vh,0); } }
@keyframes drift-5 { 0% { transform: translate3d(0,0,0); } 100% { transform: translate3d(18px,-30vh,0); } }
@keyframes drift-6 { 0% { transform: translate3d(0,0,0); } 100% { transform: translate3d(-92px,-24vh,0); } }
@keyframes char-drift { 0% { transform: translate3d(0,0,0) rotate(0deg); } 100% { transform: translate3d(15vw,-18vh,0) rotate(360deg); } }

.canopy {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 8vh 12vw 8vh 18vw;
  overflow: hidden;
}

.canopy::after {
  content: "";
  position: absolute;
  width: 70vw;
  height: 70vw;
  left: 42%;
  top: 8%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.08), rgba(0,232,155,0.035) 36%, transparent 68%);
  filter: blur(8px);
}

.canopy-content {
  width: min(68rem, 100%);
  min-height: 60vh;
  position: relative;
}

.hero-sigil {
  position: absolute;
  left: 60%;
  top: 40%;
  transform: translate(-50%, -50%);
  font-family: var(--korean);
  font-weight: 700;
  font-size: clamp(5rem, 15vw, 12rem);
  line-height: 1;
  letter-spacing: 0.03em;
  color: #c9a84c;
  text-shadow: 0 0 34px rgba(201,168,76,0.26), 0 0 100px rgba(232,99,139,0.14);
  animation: sigil-breathe 8s ease-in-out infinite;
}

@keyframes sigil-breathe { 0%,100% { filter: brightness(0.95); } 50% { filter: brightness(1.18); } }

.hero-line {
  position: absolute;
  left: 15vw;
  top: calc(40% + clamp(4rem, 8vw, 7rem));
  font-family: var(--display);
  font-size: 1.2rem;
  font-style: italic;
  color: #f0eff4;
  letter-spacing: 0.03em;
}

.canopy h1 {
  position: absolute;
  left: 3vw;
  bottom: 1vh;
  font-family: var(--display);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  letter-spacing: 0.35em;
  color: rgba(212,228,237,0.42);
}

.path {
  min-height: 160vh;
  padding: 20vh 0 8vh;
}

.watermark-sigil {
  position: absolute;
  top: 12vh;
  right: -7vw;
  font-family: var(--korean);
  font-size: 40rem;
  line-height: 0.8;
  color: rgba(201,168,76,0.03);
  pointer-events: none;
}

.passage {
  --indent: 18vw;
  max-width: 38ch;
  margin-left: var(--indent);
  margin-bottom: 26vh;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.passage.visible { opacity: 1; transform: translateY(0); }
.passage-wide { --indent: 35vw; max-width: 55ch; }
.passage-third { --indent: 10vw; }

.section-mark, .card-label {
  display: block;
  margin-bottom: 1rem;
  color: rgba(0,232,155,0.62);
  font-family: var(--accent);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.passage h2 {
  margin-bottom: 1.4rem;
  font-family: var(--display);
  font-size: clamp(2.1rem, 4.8vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0.03em;
  color: #f0eff4;
}

.passage p {
  margin-top: 1.1rem;
  color: #d4e4ed;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
}

.inline-sigil { color: #c9a84c; font-family: var(--korean); }

.thread {
  position: absolute;
  left: 0;
  width: 100%;
  height: 38rem;
  overflow: visible;
  pointer-events: none;
}

.thread-one { top: 8vh; }
.thread-two { top: 92vh; }
.thread-three { top: 5vh; }
.thread path {
  fill: none;
  stroke: #00e89b;
  stroke-width: 0.5;
  opacity: 0.2;
}

.clearings {
  padding: 10vh 0 20vh;
}

.clearing {
  width: 70vw;
  height: 50vh;
  min-height: 25rem;
  margin: 0 auto 30vh;
  perspective: 1200px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.clearing.visible { opacity: 1; transform: translateY(0); }
.clearing-offset { margin-left: 18vw; }

.clearing-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.clearing-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 2.2rem;
  border: 1px solid rgba(0,232,155,0.0);
  pointer-events: none;
  transition: transform 0.4s ease, border-color 0.4s ease;
}

.clearing.pulsing .clearing-card::after { transform: scale(1.03); border-color: rgba(0,232,155,0.26); }
.clearing.flipped .clearing-card { transform: rotateY(180deg) scale(1); }

.card-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  padding: clamp(2rem, 5vw, 5rem);
  border-radius: 2.2rem;
  overflow: hidden;
  backface-visibility: hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(240,239,244,0.08);
}

.card-front {
  background: linear-gradient(135deg, #1e2744, #2a1f45);
}

.card-front::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: 50% 42% 56% 44%;
}

.card-back {
  transform: rotateY(180deg);
  background: #0b0f1a;
  text-align: center;
}

.card-face h3 {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0.03em;
  color: #f0eff4;
}

.card-back h3 { color: #c9a84c; font-style: italic; font-weight: 400; }
.card-face p {
  position: relative;
  z-index: 1;
  max-width: 50ch;
  margin-top: 1.4rem;
  color: #d4e4ed;
}

.motif {
  position: absolute;
  width: min(30vw, 16rem);
  height: min(30vw, 16rem);
  right: 8%;
  bottom: 8%;
  opacity: 0.25;
}

.motif path {
  fill: none;
  stroke: #00e89b;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reflection-pool {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 12vh 10vw;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(11,15,26,0) 0%, rgba(11,15,26,0.88) 56%, #0b0f1a 100%);
}

.reflected-sigil {
  position: absolute;
  top: 18vh;
  font-family: var(--korean);
  font-size: clamp(6rem, 18vw, 14rem);
  color: #c9a84c;
  opacity: 0.3;
  transform: scaleY(-1);
  filter: blur(0.8px);
}

.pool-content {
  margin-top: 18vh;
  max-width: 42ch;
  text-align: center;
}

.domain-name {
  margin-bottom: 1.3rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 5rem);
  color: #f0eff4;
  letter-spacing: 0.03em;
}

.pool-content p:last-child {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  color: #d4e4ed;
}

@media (max-width: 760px) {
  .canopy { padding: 8vh 7vw; }
  .hero-sigil { left: 52%; }
  .hero-line { left: 3vw; }
  .passage, .passage-wide, .passage-third { --indent: 8vw; max-width: 82vw; }
  .clearing, .clearing-offset { width: 86vw; height: 56vh; margin-left: auto; margin-right: auto; }
  .watermark-sigil { font-size: 22rem; }
}
