:root {
  --ivory: #f3efe4;
  --ivory-dim: rgba(243, 239, 228, 0.72);
  --gold: #c6a56a;
  --gold-bright: #e6d3a4;
  --gold-deep: #8d7040;
  --ink: #1c1610;
  --night: #07090e;
  --manuscript: #100e0c;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --nav-h: 72px;
  --atmos: 100vh;
  --cover: 88vh;
  --serif: "Bodoni Moda", Didot, "Bodoni MT", Palatino, serif;
  --sans: Outfit, "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.nav-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--night);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

button, a { -webkit-tap-highlight-color: transparent; }

:focus { outline: none; }

:focus-visible {
  outline: 1px solid var(--gold-bright);
  outline-offset: 4px;
}

::selection {
  background: rgba(198, 165, 106, 0.35);
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--night);
  color: var(--ivory);
  text-decoration: none;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
}

.skip:focus { top: 12px; }

.cat-word { color: #d7c09a; }

/* ---------- cursor ---------- */

.cursor { display: none; }

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 80;
  border-radius: 50%;
}

.cursor-dot {
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  background: var(--gold-bright);
}

.cursor-ring {
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 1px solid rgba(198, 165, 106, 0.55);
}

.cursor { opacity: 0; }
.cursor.is-on { opacity: 1; }

@media (pointer: fine) and (min-width: 900px) {
  html.has-cursor .cursor { display: block; }
  html.has-cursor,
  html.has-cursor body,
  html.has-cursor a,
  html.has-cursor button { cursor: none; }
}

.cursor-spark {
  position: fixed;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: var(--gold-bright);
  pointer-events: none;
  z-index: 79;
  animation: sparkUp 640ms var(--ease) forwards;
}

@keyframes sparkUp {
  to { opacity: 0; transform: translate3d(0, -18px, 0) scale(0.4); }
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  color: var(--ivory);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 400ms var(--ease), border-color 400ms var(--ease);
}

.nav.is-scrolled {
  background: rgba(7, 9, 14, 0.94);
  border-bottom-color: rgba(198, 165, 106, 0.28);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.brand img,
.footer-brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid rgba(198, 165, 106, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a,
.nav-panel a,
.footer-x {
  color: rgba(243, 239, 228, 0.82);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 200ms var(--ease);
}

.nav-links a:hover,
.nav-panel a:hover,
.footer-x:hover { color: var(--gold-bright); }

.nav-enter {
  border: 1px solid rgba(198, 165, 106, 0.55);
  padding: 8px 14px;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
}

.nav-toggle i {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--gold-bright);
}

.nav-panel {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 49;
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 12px 22px 22px;
  background: rgba(7, 9, 14, 0.98);
  border-bottom: 1px solid rgba(198, 165, 106, 0.28);
  opacity: 0;
  transform: translate3d(0, -8px, 0);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 280ms var(--ease), transform 280ms var(--ease), visibility 280ms;
}

.nav-panel a {
  display: block;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(243, 239, 228, 0.06);
}

.nav-panel.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
}

/* ---------- buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(198, 165, 106, 0.55);
  border-radius: 1px;
  background: transparent;
  color: var(--ivory);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  overflow: hidden;
  transition: transform 220ms var(--ease), background 220ms var(--ease), border-color 220ms var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 36%;
  background: linear-gradient(90deg, transparent, rgba(255, 244, 220, 0.4), transparent);
  transform: translate3d(-160%, 0, 0);
  pointer-events: none;
}

.btn:hover {
  transform: translate3d(0, -2px, 0);
  background: rgba(198, 165, 106, 0.08);
  border-color: rgba(230, 211, 164, 0.8);
}

.btn:hover::before { animation: btnSweep 720ms var(--ease); }

@keyframes btnSweep {
  to { transform: translate3d(420%, 0, 0); }
}

.btn.ink {
  color: var(--ink);
  border-color: rgba(90, 68, 32, 0.45);
}

.btn.ink:hover { background: rgba(90, 68, 32, 0.06); }

.text-btn {
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px solid rgba(198, 165, 106, 0.55);
  background: none;
  color: var(--gold-bright);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
}

.text-btn.ink {
  color: var(--ink);
  border-bottom-color: rgba(90, 68, 32, 0.45);
}

.btn-spark {
  position: absolute;
  right: -2px;
  top: -2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-bright);
  animation: sparkUp 640ms var(--ease) forwards;
  pointer-events: none;
}

/* ---------- hero ---------- */

.opening { position: relative; z-index: 1; }

.opening-sticky {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--night);
}

.hero-bg {
  position: absolute;
  inset: -8%;
  background: url("assets/bg.png") center center / cover no-repeat;
  transform: scale(1.06);
  z-index: 0;
}

.hero-horizon {
  position: absolute;
  left: 8%;
  right: 18%;
  bottom: 16%;
  height: 34%;
  z-index: 1;
  background: radial-gradient(ellipse at center, rgba(255, 186, 110, 0.28), transparent 68%);
  opacity: 0;
  pointer-events: none;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #07090e;
  opacity: 0.78;
  pointer-events: none;
}

.hero-haze {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 28% 78%, rgba(255, 214, 170, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(12, 16, 28, 0.18), transparent 28%, transparent 70%, rgba(8, 10, 16, 0.18));
  opacity: 0;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 9, 14, 0) 0%, rgba(7, 9, 14, 0.05) 34%, rgba(7, 9, 14, 0.58) 50%, rgba(7, 9, 14, 0.8) 66%, rgba(7, 9, 14, 0.88) 100%),
    linear-gradient(180deg, rgba(7, 9, 14, 0.55), transparent 16%);
}

.hero-figure {
  position: absolute;
  left: -1vw;
  bottom: 0;
  z-index: 2;
  pointer-events: auto;
}

.hero-emerge { position: relative; }

.hero-figure img {
  width: auto;
  height: auto;
  max-width: min(54vw, 1080px);
  max-height: 96svh;
}

.sword-magic {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sword-aura {
  position: absolute;
  left: 58%;
  top: 24%;
  width: 16%;
  height: 50%;
  background: radial-gradient(ellipse at center, rgba(198, 220, 236, 0.9) 0%, rgba(150, 186, 214, 0.28) 40%, transparent 72%);
  opacity: 0;
}

.sword-spark {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #f4f8fc;
  opacity: 0;
}

.sword-spark.s1 { left: 66%; top: 58%; }
.sword-spark.s2 { left: 63%; top: 46%; width: 1px; height: 1px; }
.sword-spark.s3 { left: 68%; top: 68%; }
.sword-spark.s4 { left: 64.5%; top: 52%; width: 1px; height: 1px; background: var(--gold-bright); }

.snow {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.snow span {
  position: absolute;
  left: var(--x);
  top: -4%;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: white;
  opacity: var(--o);
  animation: snowFall var(--d) linear var(--delay) infinite;
}

@keyframes snowFall {
  to { transform: translate3d(var(--drift), 108vh, 0); }
}

.hero-dim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(48, 36, 18, 0.2), transparent 50%),
    #090b10;
  opacity: 0;
  pointer-events: none;
}

.hero-dust { z-index: 4; opacity: 0; }

.bridge-line {
  position: absolute;
  left: 8vw;
  right: 8vw;
  bottom: 16vh;
  height: 1px;
  z-index: 5;
  background: linear-gradient(90deg, transparent, rgba(230, 208, 160, 0.9), transparent);
  transform: scaleX(0);
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  top: 50%;
  right: 6.5vw;
  z-index: 5;
  width: min(640px, 42vw);
  transform: translate3d(0, -50%, 0);
}

.hero-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -20% -4% -22% -30%;
  background: radial-gradient(ellipse at 68% 46%, rgba(7, 9, 14, 0.72) 0%, rgba(7, 9, 14, 0.42) 46%, transparent 74%);
  pointer-events: none;
}

.eyebrow,
.kicker {
  margin: 0;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.hero-copy .eyebrow {
  font-size: 13px;
  letter-spacing: 0.28em;
}

.title {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(76px, 6.4vw, 124px);
  line-height: 0.9;
  letter-spacing: -0.025em;
  font-optical-sizing: auto;
  color: #f7f3ea;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.title-mask {
  display: block;
  position: relative;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.title-rise { display: block; }

.title-mask::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, transparent 40%, rgba(255, 236, 196, 0.55) 50%, transparent 60%);
  transform: translate3d(-130%, 0, 0);
  pointer-events: none;
}

.ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #e4c98a;
}

.ticker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: rgba(230, 211, 164, 0.75);
}

.ticker-sigil {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72em;
  letter-spacing: 0;
  margin-right: 0.06em;
}

.statement {
  margin: 28px 0 0;
  max-width: 18em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 2.3vw, 42px);
  line-height: 1.22;
  letter-spacing: 0.01em;
  color: #f4efe6;
}

.support {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: #f3efe4;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-actions .btn {
  height: 52px;
  padding: 0 26px;
  font-size: 13px;
  letter-spacing: 0.18em;
  background: rgba(7, 9, 14, 0.72);
  border-color: rgba(230, 211, 164, 0.92);
  color: #f7f3ea;
}

.hero-actions .btn:hover {
  background: rgba(20, 16, 10, 0.88);
  border-color: #f0e2c0;
}

.hero-inscription {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(230, 211, 164, 0.55);
  color: #f3efe4;
}

.ins-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.ins-label {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #e6d3a4;
}

.ins-ca {
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: 0.16em;
  color: #f7f3ea;
}

.descend {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 6;
  transform: translate3d(-50%, 0, 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.descend span {
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #1c140c;
  text-shadow: 0 0 10px rgba(255, 244, 220, 0.85), 0 1px 0 rgba(255, 248, 235, 0.6);
}

.descend i {
  display: block;
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--gold-bright), transparent);
  transform-origin: top center;
  animation: descend 2.6s var(--ease) infinite;
}

@keyframes descend {
  0% { transform: scaleY(0.25); opacity: 0; }
  35% { opacity: 1; }
  70% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* entrance — only after .js */

.js .hero-horizon { animation: fadeIn 1.4s var(--ease) 150ms both; }
.js .hero-veil { animation: veilLift 1.7s var(--ease) both; }
.js .hero-haze { animation: fadeIn 1.6s var(--ease) 200ms both; }
.js .hero-emerge { animation: emerge 1.4s var(--ease) 300ms both; }
.js .sword-aura { animation: auraIn 1s var(--ease) 500ms forwards, auraScale 9s ease-in-out 1.4s infinite; }
.js .sword-aura::after {
  content: "";
  position: absolute;
  left: 38%;
  top: 30%;
  width: 24%;
  height: 18%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85), transparent 70%);
  opacity: 0;
  animation: rareGleam 16s ease-in-out infinite;
}
.js .sword-spark { animation: riseSpark 11s ease-in-out infinite; }
.js .sword-spark.s1 { animation-duration: 8s; }
.js .sword-spark.s2 { animation-duration: 14s; animation-delay: -5s; }
.js .sword-spark.s3 { animation-duration: 11s; animation-delay: -8s; }
.js .sword-spark.s4 { animation-duration: 17s; animation-delay: -3s; }

.js .eyebrow { animation: fadeUp 900ms var(--ease) 650ms both; }
.js .title-mask { animation: maskOpen 1000ms var(--ease) 800ms both; }
.js .title-rise { animation: titleRise 1000ms var(--ease) 800ms both; }
.js .title-mask::after { animation: goldPass 1200ms var(--ease) 1850ms both; }
.js .title .cat-word { animation: catWarm 900ms var(--ease) 950ms both; }
.js .ticker { animation: fadeUp 800ms var(--ease) 980ms both; }
.js .statement { animation: fadeUp 900ms var(--ease) 1100ms both; }
.js .support { animation: fadeUp 800ms var(--ease) 1260ms both; }
.js .hero-actions { animation: fadeUp 800ms var(--ease) 1400ms both; }
.js .hero-inscription { animation: fadeUp 800ms var(--ease) 1700ms both; }

@keyframes fadeIn { to { opacity: 1; } }
@keyframes veilLift { to { opacity: 0; } }

@keyframes emerge {
  from { opacity: 0; transform: translate3d(-7%, 10%, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes auraIn { to { opacity: 0.2; } }

@keyframes auraScale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes rareGleam {
  0%, 84%, 100% { opacity: 0; }
  89% { opacity: 0.7; }
  94% { opacity: 0; }
}

@keyframes riseSpark {
  0%, 72% { opacity: 0; transform: translate3d(0, 16px, 0); }
  80% { opacity: 0.9; }
  100% { opacity: 0; transform: translate3d(-6px, -78px, 0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes maskOpen {
  from { clip-path: inset(100% 0 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes titleRise {
  from { transform: translate3d(0, 0.8em, 0); }
  to { transform: none; }
}

@keyframes goldPass {
  from { transform: translate3d(-130%, 0, 0); }
  to { transform: translate3d(130%, 0, 0); }
}

@keyframes catWarm {
  from { color: #c4b59a; }
  to { color: #e0c48a; }
}

/* ---------- legend ---------- */

.legend {
  position: relative;
  z-index: 2;
  background: var(--manuscript);
  color: #eadfce;
  padding: 18vh 8vw 26vh;
}

.legend::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: radial-gradient(rgba(255, 248, 235, 0.45) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
}

.legend-grid {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 6vw;
  align-items: start;
  min-height: 62vh;
}

.legend-index .idx {
  display: block;
  font-family: var(--serif);
  font-size: 72px;
  line-height: 0.8;
  color: var(--gold);
  font-weight: 500;
}

.legend-index h2 {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.vline {
  display: block;
  width: 1px;
  height: 120px;
  margin-top: 22px;
  background: linear-gradient(var(--gold), transparent);
}

.ms {
  margin: 0 0 28px;
  max-width: 16em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1.18;
  color: #f0e6d6;
}

.initial {
  float: left;
  margin: 0.06em 0.12em 0 0;
  padding: 0.06em 0.1em 0.02em;
  font-size: 2.5em;
  line-height: 0.72;
  color: var(--gold);
  border: 1px solid rgba(198, 165, 106, 0.4);
}

.legend .cat-word { color: #e0c48a; }

.legend-quiet {
  margin: 6vh 0 0;
  max-width: 28ch;
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: rgba(234, 223, 206, 0.62);
}

/* ---------- spelling ---------- */

.spelling { position: relative; background: #12100e; }

.spelling-sticky {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(92, 64, 28, 0.2), transparent 46%),
    #12100e;
}

.spelling-kicker {
  position: absolute;
  top: calc(var(--nav-h) + 28px);
  left: 0;
  right: 0;
  text-align: center;
}

.spell-stage {
  position: relative;
  width: min(1100px, 92vw);
  text-align: center;
}

.spell-fallback {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 8vw, 120px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ivory);
}

.spell-letters {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.spell-glow {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 180px;
  height: 220px;
  transform: translate3d(-50%, -50%, 0);
  background: radial-gradient(circle, rgba(226, 196, 130, 0.34), transparent 68%);
  opacity: 0;
  pointer-events: none;
}

.letter {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1em;
  line-height: 1;
  letter-spacing: 0;
  color: #f1eadc;
}

.spell-t { color: #e0c48a; }

.spell-letters.is-gold .is-cat {
  color: #e0c48a;
  transition: color 700ms var(--ease);
}

.spell-note {
  margin: 28px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.35;
  color: rgba(241, 234, 220, 0.78);
}

.spell-dust { opacity: 0; }

/* ---------- knight / prophecy ---------- */

.saga { position: relative; background: #08090d; }

.saga-sticky {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
}

.knight-scene,
.prophecy-scene {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
}

.knight-scene {
  background:
    radial-gradient(ellipse at 28% 60%, rgba(186, 198, 214, 0.07), transparent 46%),
    radial-gradient(ellipse at 78% 42%, rgba(180, 120, 60, 0.07), transparent 40%),
    #08090d;
  overflow: hidden;
}

.knight-num {
  position: absolute;
  left: 8vw;
  top: 12vh;
  z-index: 0;
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 38vw;
  line-height: 0.75;
  color: transparent;
  -webkit-text-stroke: 1px rgba(198, 165, 106, 0.16);
  pointer-events: none;
  user-select: none;
}

.knight-ornament {
  position: absolute;
  right: 10vw;
  top: 22vh;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(198, 165, 106, 0.45);
  transform: rotate(45deg);
  z-index: 1;
  pointer-events: none;
}

.knight-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  align-items: center;
  gap: 4vw;
  padding: calc(var(--nav-h) + 4vh) 6vw 8vh;
}

.knight-reveal { position: relative; justify-self: stretch; }

.knight-frame { position: relative; display: block; }

.knight-frame img {
  width: min(56vw, 76svh);
  height: auto;
  max-width: 100%;
}

.corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(198, 165, 106, 0.75);
  pointer-events: none;
}

.corner.tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.corner.tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.corner.br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

.reveal-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold-bright), transparent);
  opacity: 0;
  pointer-events: none;
}

.knight-shade {
  position: absolute;
  inset: 0;
  background: #05060a;
  opacity: 0;
  pointer-events: none;
}

.knight-copy { max-width: 420px; }

.knight-lead {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 3vw, 52px);
  line-height: 1.05;
  color: var(--ivory);
}

.knight-quiet {
  margin: 28px 0 0;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: rgba(243, 239, 228, 0.66);
}

.prophecy-scene {
  background: #05060a;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.sigil {
  position: absolute;
  left: 50%;
  top: 6%;
  height: 88%;
  width: 80px;
  transform: translate3d(-50%, 0, 0);
  pointer-events: none;
}

.sigil-pommel {
  position: absolute;
  top: 7%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border: 1px solid rgba(198, 165, 106, 0.45);
  border-radius: 50%;
}

.sigil-grip {
  position: absolute;
  top: 10%;
  left: 50%;
  width: 1px;
  height: 7%;
  margin-left: -0.5px;
  background: rgba(198, 165, 106, 0.35);
}

.sigil-guard {
  position: absolute;
  top: 17%;
  left: 50%;
  width: 64px;
  height: 7px;
  margin-left: -32px;
  border: 1px solid rgba(198, 165, 106, 0.4);
}

.sigil-blade {
  position: absolute;
  top: 20%;
  bottom: 4%;
  left: 50%;
  width: 10px;
  margin-left: -5px;
  overflow: hidden;
  clip-path: polygon(35% 0, 65% 0, 58% 92%, 50% 100%, 42% 92%);
}

.sigil-light {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(243, 230, 196, 0.15), rgba(230, 200, 140, 0.7));
  clip-path: inset(0 0 calc((1 - var(--sword, 0)) * 100%) 0);
}

.sigil-tip {
  position: absolute;
  top: 20%;
  left: 50%;
  width: 2px;
  height: 22px;
  margin-left: -1px;
  background: linear-gradient(180deg, transparent, #f6edd8);
  opacity: 0;
}

.prophecy-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 8vw;
}

.prophecy-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 5.4vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ivory);
}

.prophecy-body {
  margin-top: 10vh;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.8;
  color: rgba(232, 224, 208, 0.7);
}

.prophecy-body p { margin: 0; }

.light-gate {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(198, 165, 106, 0.05) 36%,
    rgba(243, 230, 196, 0.55) 50%,
    rgba(198, 165, 106, 0.05) 64%,
    transparent 100%);
  transform: scaleX(0.002);
  opacity: 0;
}

/* ---------- oracle ---------- */

.oracle {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(40, 60, 90, 0.18), transparent 42%),
    #070b12;
  padding: 16vh 6vw 18vh;
}

.oracle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8vw;
  right: 8vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230, 208, 160, 0.65), transparent);
}

.oracle-intro { text-align: center; }

.oracle-intro h2 {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 4.4vw, 68px);
  line-height: 1.02;
  color: var(--ivory);
}

.oracle-well {
  position: relative;
  width: min(820px, 92vw);
  min-height: 46vh;
  margin: 8vh auto 0;
  padding: 10vh 6vw;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  border: 1px solid rgba(158, 182, 204, 0.22);
  background:
    radial-gradient(ellipse at 50% 100%, rgba(36, 58, 88, 0.35), transparent 55%),
    linear-gradient(180deg, #0a0e16, #10151f 48%, #0b1018);
  transition: border-color 280ms var(--ease);
  overflow: hidden;
}

.oracle-well.is-hot { border-color: rgba(198, 165, 106, 0.5); }

.oracle-glow {
  position: absolute;
  left: 0;
  top: 0;
  width: 260px;
  height: 260px;
  margin: -130px 0 0 -130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 186, 120, 0.2), rgba(214, 186, 120, 0.04) 42%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms var(--ease);
}

.oracle-well.is-lit .oracle-glow { opacity: 1; }

.oracle-horizon {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(158, 182, 204, 0.45), transparent);
}

.oracle-horizon span {
  position: absolute;
  top: -2px;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e8d7b0;
  animation: drift 18s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.3; }
  50% { transform: translate3d(46vw, 0, 0); opacity: 0.9; }
}

.oracle-silent {
  position: relative;
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ivory);
}

.oracle-note {
  position: relative;
  margin: 16px 0 0;
  max-width: 36ch;
  color: rgba(213, 222, 234, 0.7);
  font-size: 15px;
}

.oracle-ca {
  position: relative;
  margin: 22px 0 0;
  font-family: var(--serif);
  letter-spacing: 0.22em;
  font-size: 22px;
  color: var(--gold-bright);
}

/* ---------- inscription ---------- */

.inscription {
  background: linear-gradient(180deg, #070b12 0%, #e6dcc6 16vh, #e7dcc8 100%);
  color: var(--ink);
  text-align: center;
  padding: 22vh 6vw 18vh;
}

.kicker.ink { color: var(--gold-deep); }

.ins-title {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(64px, 8vw, 120px);
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.inscription .cat-word { color: #8d6230; }

.ins-ticker {
  margin: 14px 0 0;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 13px;
  color: rgba(28, 22, 16, 0.7);
}

.ins-plate {
  margin: 7vh auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.rule-draw {
  display: block;
  width: 148px;
  height: 1px;
  background: var(--gold-deep);
  transform: scaleX(1);
}

.ca-engrave {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: 0.28em;
}

.ins-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 7vh;
}

/* ---------- final + footer ---------- */

.final {
  min-height: 120vh;
  min-height: 120svh;
  padding: 22vh 6vw 18vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, #e7dcc8 0%, #1a140e 14vh, #07080c 32vh, #07080c 100%);
  color: var(--ivory);
}

.final-line {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 4.4vw, 68px);
  line-height: 1.05;
}

.final .cat-word { color: #d4b483; }

.final-space { height: 12vh; }

.final-ticker {
  margin: 8vh 0 0;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--gold);
}

.final-sword {
  position: relative;
  width: 28px;
  height: 64px;
  margin-top: 28px;
}

.fs-blade {
  position: absolute;
  left: 50%;
  top: 16px;
  width: 1px;
  height: 46px;
  margin-left: -0.5px;
  background: linear-gradient(var(--gold-bright), transparent);
}

.fs-guard {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold);
}

.fs-pommel {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border: 1px solid var(--gold);
  border-radius: 50%;
}

.footer {
  padding: 8vh 6vw 10vh;
  text-align: center;
  background: #07080c;
  color: rgba(243, 239, 228, 0.78);
}

.footer-brand { display: inline-block; }

.footer-name {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--ivory);
}

.footer-tick {
  margin: 4px 0 0;
  letter-spacing: 0.2em;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-line {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: 18px;
  color: rgba(243, 239, 228, 0.7);
}

.footer-x { display: inline-block; margin-top: 18px; }

.footer-meta {
  margin: 22px 0 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(243, 239, 228, 0.4);
}

/* ---------- magic dust ---------- */

.magic-dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.magic-dust span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s, 2px);
  height: var(--s, 2px);
  border-radius: 50%;
  background: var(--c, #e6d3a4);
  opacity: 0;
}

.magic-dust.is-live span {
  animation: dust var(--dur) ease-in-out var(--del) infinite;
}

@keyframes dust {
  0% { opacity: 0; transform: translate3d(0, 8px, 0); }
  25% { opacity: var(--o); }
  100% { opacity: 0; transform: translate3d(var(--dx), var(--dy), 0); }
}

/* ---------- reveals ---------- */

.js [data-reveal="up"] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
}

.js [data-reveal="fade"] { opacity: 0; }

.js [data-reveal="left"] {
  opacity: 0;
  transform: translate3d(-22px, 0, 0);
}

.js [data-reveal="right"] {
  opacity: 0;
  transform: translate3d(22px, 0, 0);
}

.js [data-reveal="mask"] .knight-frame { clip-path: inset(0 100% 0 0); }

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
  transition-delay: var(--d, 0ms);
}

.js [data-reveal="mask"].is-visible .knight-frame {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.3s var(--ease);
}

.js .knight-reveal.is-visible .reveal-edge {
  animation: edgeTravel 1.3s var(--ease) forwards;
}

@keyframes edgeTravel {
  0% { opacity: 1; transform: translate3d(0, 0, 0); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(52vw, 0, 0); }
}

.js .initial { color: #6e5830; }

.js .is-visible .initial {
  color: #c6a56a;
  transition: color 900ms var(--ease);
}

.js .rule-draw { transform: scaleX(0); transform-origin: center; }

.js .ins-plate.is-visible .rule-draw {
  transform: scaleX(1);
  transition: transform 800ms var(--ease);
}

.js .ca-engrave {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
}

.js .ins-plate.is-visible .ca-engrave {
  animation: writeOn 1200ms var(--ease) 280ms forwards;
}

@keyframes writeOn {
  to { clip-path: inset(0 0 0 0); }
}

/* pinned sequences once JS is alive */

.js .opening { height: calc(100svh + var(--atmos) + var(--cover)); }

.js .opening-sticky {
  position: sticky;
  top: 0;
}

.js .legend {
  margin-top: calc(var(--cover) * -1);
  background:
    linear-gradient(180deg, rgba(16, 14, 12, 0) 0%, rgba(16, 14, 12, 0.78) 22vh, #100e0c 40vh);
}

.js .spelling { height: 210vh; }

.js .spelling-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 0;
}

.js .spell-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.js .spell-letters {
  position: relative;
  width: 100%;
  height: 1.05em;
  overflow: visible;
  font-size: clamp(34px, 8.4vw, 124px);
}

.js .spell-letters.is-ready { opacity: 1; }

.js .spell-note {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
}

.js .spell-t { clip-path: inset(0 calc((1 - var(--ink, 0)) * 100%) 0 0); }

.js .saga { height: 260vh; }

.js .saga-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 0;
  overflow: hidden;
}

.js .knight-scene,
.js .prophecy-scene {
  position: absolute;
  inset: 0;
  min-height: 0;
}

.js .prophecy-scene { opacity: 0; }

.js .prophecy-title,
.js .prophecy-body { opacity: 0; }

.js .light-gate { display: block; }

section[id] { scroll-margin-top: 80px; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  :root {
    --atmos: 34vh;
    --cover: 46vh;
    --nav-h: 64px;
  }

  .nav { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-panel { display: flex; }

  .hero-figure {
    left: 50%;
    bottom: 0;
    width: max-content;
    transform: translate3d(-50%, 0, 0);
  }

  .hero-figure img {
    max-width: 100vw;
    max-height: 33svh;
  }

  .hero-copy {
    position: relative;
    top: auto;
    right: auto;
    width: auto;
    padding: calc(var(--nav-h) + 18px) 22px 0;
    transform: none;
    z-index: 5;
  }

  .hero-copy::before { inset: -6% -8% -8% -8%; }

  .title {
    font-size: clamp(58px, 14vw, 86px);
    line-height: 0.92;
    margin-top: 8px;
  }

  .ticker { margin-top: 8px; font-size: 24px; }

  .statement {
    max-width: 14em;
    margin-top: 16px;
    font-size: 26px;
  }

  .support { margin-top: 8px; font-size: 20px; }

  .ins-ca { font-size: 26px; }

  .hero-actions { margin-top: 16px; }

  .hero-inscription {
    margin-top: 14px;
    padding-top: 10px;
  }

  .hero-scrim {
    background:
      linear-gradient(180deg, rgba(7, 9, 14, 0.72) 0%, rgba(7, 9, 14, 0.28) 42%, transparent 62%);
  }

  .descend { bottom: 16px; }

  .legend { padding: 14vh 22px 18vh; }

  .legend-grid {
    grid-template-columns: 1fr;
    gap: 4vh;
    min-height: 0;
  }

  .vline { height: 64px; }

  .ms { font-size: clamp(28px, 8vw, 36px); }

  .js .spelling { height: 190vh; }
  .js .saga { height: 230vh; }

  .knight-layout {
    grid-template-columns: 1fr;
    justify-items: start;
    align-content: center;
    gap: 3vh;
    padding: calc(var(--nav-h) + 3vh) 22px 4vh;
  }

  .knight-frame img { width: min(88vw, 46svh); }
  .knight-num {
    font-size: 46vw;
    top: 20vh;
    left: 10vw;
  }
  .knight-lead { font-size: clamp(28px, 8vw, 40px); }
  .prophecy-body { margin-top: 6vh; }

  .snow span:nth-child(n + 7) { display: none; }
  .magic-dust { display: none; }
  .hero-dust { display: block; }
  .hero-dust span:nth-child(n + 4) { display: none; }

  .oracle { padding: 12vh 22px 14vh; }
  .inscription { padding: 16vh 22px 14vh; }
  .final { padding: 16vh 22px; min-height: 100svh; }
  .final-space { height: 8vh; }
}

@media (max-width: 860px) and (max-height: 700px) {
  .hero-figure img { max-height: 40svh; }
  .support { display: none; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js [data-reveal],
  .js .spell-note,
  .js .prophecy-scene,
  .js .prophecy-title,
  .js .prophecy-body,
  .js .sword-aura,
  .js .hero-haze,
  .js .hero-horizon,
  .js .spell-letters.is-ready {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  .js .hero-veil,
  .js .hero-dim,
  .js .light-gate,
  .snow,
  .magic-dust,
  .sword-spark,
  .reveal-edge { display: none !important; }

  .js [data-reveal="mask"] .knight-frame { clip-path: none !important; }

  .js .opening,
  .js .spelling,
  .js .saga { height: auto !important; }

  .js .opening-sticky,
  .js .spelling-sticky,
  .js .saga-sticky {
    position: relative !important;
    height: auto !important;
    overflow: visible !important;
  }

  .js .legend { margin-top: 0 !important; background: var(--manuscript) !important; }

  .js .knight-scene,
  .js .prophecy-scene {
    position: relative !important;
    inset: auto !important;
    min-height: 80vh !important;
  }

  .js .rule-draw { transform: none !important; }
  .js .ca-engrave { clip-path: none !important; }
  .cursor { display: none !important; }
}

.reduced [data-reveal],
.reduced .spell-note,
.reduced .prophecy-scene,
.reduced .prophecy-title,
.reduced .prophecy-body {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
}
