:root {
  /* Design typography reference: IBM Plex Mono (compared to purely geometric monospaced fonts) (Google Fonts); terminal status uses `0.7rem`; underlines trigger with Intersection Observer (threshold: 0.3). */
  --midnight: #0A0E1A;
  --parchment: #F2E8D5;
  --teal: #2DE2A7;
  --violet: #7B5EA7;
  --fjord: #1A6B8A;
  --walnut: #3A2E24;
  --cream: #F0E6D0;
  --red: #8B3A3A;
  --slate: #6B7B8D;
  --abyss: #0D0B2E;
  --green: #0B4D3A;
  --polar: #14A085;
  --paper-line: #D4C8B5;
}

* { box-sizing: border-box; }

html { scroll-snap-type: y proximity; background: var(--midnight); }

body {
  margin: 0;
  font-family: "Literata", serif;
  color: var(--cream);
  background: var(--midnight);
  overflow-x: hidden;
}

.diagonal-scroll { position: relative; }

.band {
  min-height: 115vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  scroll-snap-align: center;
  margin-top: -15vh;
  padding: 18vh 7vw;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.3);
}

.band:first-child { margin-top: 0; }

.band-dark {
  color: var(--cream);
  background: linear-gradient(135deg, #0D0B2E 0%, #0B4D3A 40%, #14A085 65%, #7B5EA7 100%);
  background-size: 400% 400%;
  animation: aurora-shift 20s ease infinite;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.band-light {
  color: var(--walnut);
  background-color: var(--parchment);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(58, 46, 36, 0.09) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 40%, rgba(212, 200, 181, 0.55) 0 2px, transparent 5px),
    radial-gradient(circle at 35% 86%, rgba(123, 94, 167, 0.06) 0 90px, transparent 260px),
    radial-gradient(circle at 90% 15%, rgba(45, 226, 167, 0.05) 0 120px, transparent 300px);
  clip-path: polygon(0 15%, 100% 0, 100% 100%, 0 85%);
}

.hero-band { z-index: 5; }
.manuscript-band { z-index: 4; }
.terminal-band { z-index: 3; }
.library-band { z-index: 2; }
.verdict-band { z-index: 1; min-height: 105vh; }

.texture-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image:
    radial-gradient(circle at 12% 18%, #F2E8D5 0 1px, transparent 2px),
    radial-gradient(circle at 52% 48%, #F2E8D5 0 1px, transparent 2px),
    radial-gradient(circle at 88% 72%, #F2E8D5 0 1px, transparent 2px);
  background-size: 37px 41px, 53px 59px, 71px 67px;
}

.folio {
  position: absolute;
  top: 17vh;
  right: 6vw;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: rgba(240, 230, 208, 0.45);
  transform: rotate(-7deg);
  z-index: 4;
}

.folio-light { color: var(--slate); transform: rotate(7deg); }

.station-label, .section-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(45, 226, 167, 0.72);
  margin: 0 0 1.5rem;
}

.hero-content {
  position: relative;
  z-index: 3;
  margin-left: 8vw;
  margin-top: -6vh;
  max-width: 980px;
}

h1, h2 {
  font-family: "Share Tech Mono", monospace;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

h1 {
  font-size: clamp(3.7rem, 12vw, 11rem);
  line-height: 0.85;
  color: var(--teal);
  text-shadow: 0 0 28px rgba(45, 226, 167, 0.22);
}

.korean-title {
  font-family: "Literata", serif;
  font-size: 1.5rem;
  color: var(--cream);
  margin: 1.2rem 0 2.2rem;
  letter-spacing: 0.2em;
}

.tagline {
  position: relative;
  display: inline-block;
  min-height: 2.4rem;
  font-size: clamp(1.25rem, 2.4vw, 2.2rem);
  line-height: 1.4;
  color: var(--cream);
}

.hero-underline {
  position: absolute;
  left: 46%;
  top: 62%;
  width: 34%;
  height: 18px;
}

.underline-wrap, .verdict-underline { display: block; pointer-events: none; }

[data-underline] svg { width: 100%; height: 100%; overflow: visible; }

[data-underline] path, [data-underline] line {
  fill: none;
  stroke: var(--red);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 800ms ease;
  will-change: stroke-dashoffset;
}

.band-dark [data-underline] path, .band-dark [data-underline] line { stroke: var(--teal); }
.hero-band [data-underline] path { stroke: var(--red); }
[data-underline].is-drawn path, [data-underline].is-drawn line, .is-drawn [data-underline] path { stroke-dashoffset: 0; }

.orbital-ring {
  position: absolute;
  border: 1px solid rgba(45, 226, 167, 0.18);
  border-radius: 50%;
  transform: rotate(-18deg);
  pointer-events: none;
}

.ring-one { width: 56vw; height: 18vw; right: -12vw; top: 18vh; }
.ring-two { width: 40vw; height: 12vw; right: 4vw; bottom: 22vh; border-color: rgba(123, 94, 167, 0.22); }

.margin-rule {
  position: absolute;
  left: 80px;
  top: 18vh;
  bottom: 18vh;
  width: 1px;
  background: var(--paper-line);
}

.margin-notes {
  position: absolute;
  right: 9vw;
  top: 25vh;
  width: 180px;
  font-family: "Caveat", cursive;
  font-size: 1.15rem;
  line-height: 1.45;
  transform: rotate(-3deg);
  z-index: 3;
}

.margin-notes p { margin: 0 0 2.4rem; }
.note-red { color: var(--red); }
.note-slate { color: var(--slate); }
.tilted { transform: rotate(5deg); }

.manuscript-page {
  position: relative;
  z-index: 2;
  width: min(640px, 66vw);
  margin-left: 20%;
  padding: 2.5rem 3rem;
  background: rgba(242, 232, 213, 0.52);
  border-left: 1px solid rgba(212, 200, 181, 0.9);
}

.manuscript-page h2, .book-page h2 {
  color: var(--midnight);
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.05;
  margin-bottom: 2rem;
}

.manuscript-page p, .book-page p {
  font-size: 1.05rem;
  font-weight: 350;
  line-height: 1.85;
  letter-spacing: 0.01em;
}

.marked {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.marked::after, .terminal-mark::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.05em;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 800ms ease;
}

.terminal-mark { position: relative; color: var(--teal); }
.terminal-mark::after { background: var(--teal); }
.marked.is-drawn::after, .terminal-mark.is-drawn::after { transform: scaleX(1); }

.citation-line {
  width: 40%;
  height: 1px;
  background: var(--paper-line);
  margin-top: 2rem;
}

.citation {
  font-family: "Caveat", cursive;
  color: var(--slate);
  font-size: 1rem !important;
}

.watercolor {
  position: absolute;
  width: 34vw;
  height: 34vw;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

.band.in-view .watercolor { opacity: 1; }
.wc-one { background: rgba(45, 226, 167, 0.06); left: 3vw; top: 21vh; }
.wc-two { background: rgba(123, 94, 167, 0.08); right: 8vw; bottom: 16vh; }
.wc-three { background: rgba(26, 107, 138, 0.05); left: 39vw; top: 52vh; }
.wc-four { background: rgba(45, 226, 167, 0.06); right: 18vw; top: 16vh; }
.wc-five { background: rgba(123, 94, 167, 0.08); left: 7vw; bottom: 10vh; }
.wc-six { background: rgba(26, 107, 138, 0.05); right: -4vw; bottom: 24vh; }

.terminal-band { background: var(--midnight); }
.terminal-aurora { position: absolute; inset: 0; background: radial-gradient(circle at 12% 30%, rgba(45, 226, 167, 0.18), transparent 36%), radial-gradient(circle at 85% 68%, rgba(123, 94, 167, 0.18), transparent 35%); }
.scanlines { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 3px); z-index: 2; pointer-events: none; }

.terminal-frame {
  position: relative;
  z-index: 3;
  width: min(980px, 84vw);
  margin: 0 auto;
  border: 1px solid var(--teal);
  background: rgba(10, 14, 26, 0.82);
  box-shadow: 0 0 42px rgba(45, 226, 167, 0.12), inset 0 0 28px rgba(45, 226, 167, 0.04);
  font-family: "IBM Plex Mono", monospace;
}

.terminal-header, .status-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  color: rgba(45, 226, 167, 0.58);
  border-bottom: 1px solid rgba(45, 226, 167, 0.35);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.terminal-body { padding: 2.2rem; }

.terminal-line {
  opacity: 0;
  transform: translateY(5px);
  margin: 0 0 1.15rem;
  color: var(--cream);
  font-size: 0.9rem;
  line-height: 1.7;
}

.terminal-line::before { content: "[MAL-07]> "; color: var(--teal); }
.terminal-band.in-view .terminal-line { animation: terminal-line 520ms ease forwards; }
.terminal-band.in-view .terminal-line:nth-child(1) { animation-delay: 0ms; }
.terminal-band.in-view .terminal-line:nth-child(2) { animation-delay: 200ms; }
.terminal-band.in-view .terminal-line:nth-child(3) { animation-delay: 400ms; }
.terminal-band.in-view .terminal-line:nth-child(4) { animation-delay: 600ms; }
.terminal-band.in-view .terminal-line:nth-child(5) { animation-delay: 800ms; }
.cursor { animation: cursor-blink 530ms steps(1) infinite; color: var(--teal); }
.status-bar { border-top: 1px solid rgba(45, 226, 167, 0.25); border-bottom: 0; color: rgba(45, 226, 167, 0.4); }

.book-spread {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(260px, 320px) 40px minmax(260px, 320px);
  margin: 0 auto;
  align-items: stretch;
  padding: 2.5rem;
  background: rgba(242, 232, 213, 0.42);
}

.book-page { width: 320px; }
.spine-shadow { width: 40px; background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.15) 45%, transparent 100%); }
.right-page { padding-top: 6.3rem; }

.verdict-content {
  position: relative;
  z-index: 3;
  width: min(980px, 86vw);
  margin: auto;
  text-align: center;
}

.verdict-content h2 {
  color: var(--teal);
  font-size: clamp(3rem, 10vw, 9rem);
  line-height: 0.9;
  text-shadow: 0 0 34px rgba(45, 226, 167, 0.23);
}

.verdict-underline { width: min(760px, 74vw); height: 42px; margin: 1rem auto 2.5rem; }
.future-citation { font-style: italic; color: rgba(240, 230, 208, 0.78); max-width: 680px; margin: 0 auto; line-height: 1.7; }

@keyframes aurora-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes cursor-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes terminal-line { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
  .band { min-height: 120vh; padding: 18vh 6vw; }
  .band-dark { clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%); }
  .band-light { clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 92%); }
  .hero-content { margin-left: 0; }
  .manuscript-page { width: 100%; margin-left: 0; padding: 2rem 1.4rem; }
  .margin-rule, .margin-notes { display: none; }
  .book-spread { grid-template-columns: 1fr; padding: 1.4rem; }
  .book-page { width: auto; }
  .spine-shadow { display: none; }
  .right-page { padding-top: 0; }
  .terminal-body { padding: 1.2rem; }
  .terminal-header { flex-direction: column; }
}
