/* ————— GLASS CATHEDRAL ————— */
/* palette: nave #060714 · abyss #0a0c1a · gold #c9a24b · violet #7c6cff · ice #a8c4ff · bone #efe9ff */

:root {
  --nave: #060714;
  --abyss: #0a0c1a;
  --gold: #c9a24b;
  --violet: #7c6cff;
  --ice: #a8c4ff;
  --bone: #efe9ff;
  --serif-display: 'Cinzel', serif;
  --serif-body: 'Cormorant Garamond', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  background: var(--nave);
  color: var(--bone);
  font-family: var(--serif-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(124, 108, 255, 0.35); color: var(--bone); }

/* ————— loader ————— */
#loader {
  position: fixed; inset: 0; z-index: 60;
  background: var(--nave);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.6rem;
  transition: opacity 1.2s ease;
}
#loader.done { opacity: 0; pointer-events: none; }
.loader-mark { width: 52px; color: var(--gold); opacity: 0.9; }
.loader-word {
  font-family: var(--serif-display);
  font-size: 0.72rem; letter-spacing: 0.55em; text-indent: 0.55em;
  color: var(--bone); opacity: 0.8;
}
.loader-line { width: 140px; height: 1px; background: rgba(239,233,255,0.12); overflow: hidden; }
.loader-line span {
  display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: sweep 1.4s ease-in-out infinite;
}
@keyframes sweep { 0% { transform: translateX(-100%);} 100% { transform: translateX(350%);} }

/* ————— canvas + atmosphere ————— */
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }

.vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 42%, transparent 55%, rgba(3,3,10,0.55) 100%),
    linear-gradient(to bottom, rgba(3,3,10,0.35), transparent 18%, transparent 82%, rgba(3,3,10,0.5));
}
.grain {
  position: fixed; inset: -50%; z-index: 3; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 1.1s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0,0); } 25% { transform: translate(-2%,3%); }
  50% { transform: translate(3%,-2%); } 75% { transform: translate(-3%,-3%); } 100% { transform: translate(0,0); }
}

/* ————— HUD ————— */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.6rem 2.2rem;
  font-family: var(--serif-display);
  font-size: 0.66rem; letter-spacing: 0.34em;
  mix-blend-mode: normal;
}
.hud-home { display: flex; align-items: center; gap: 0.9rem; color: var(--bone); text-decoration: none; }
.hud-right { display: flex; align-items: center; gap: 1.7rem; }
.hud-link.active { opacity: 1; border-color: var(--gold); }
.hud-link-guide { color: var(--gold); opacity: 0.85; }
/* scrim so scrolling verse headings dissolve under the HUD instead of colliding with it */
.hud::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0;
  height: 150px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(6,7,20,0.96) 20%, rgba(6,7,20,0.6) 55%, transparent);
}
.hud-left { display: flex; align-items: center; gap: 0.9rem; color: var(--bone); }
.hud-sigil { color: var(--gold); font-size: 0.8rem; }
.hud-title { opacity: 0.85; }
.hud-link {
  color: var(--bone); text-decoration: none; opacity: 0.6;
  padding-bottom: 3px; border-bottom: 1px solid transparent;
  transition: opacity 0.4s ease, border-color 0.4s ease;
}
.hud-link:hover { opacity: 1; border-color: var(--gold); }

/* ————— sound toggle ————— */
.sound-toggle {
  position: fixed; right: 2.2rem; bottom: 2rem; z-index: 20;
  display: flex; align-items: center; gap: 0.7rem;
  background: rgba(10, 12, 26, 0.4); border: 1px solid rgba(239,233,255,0.14);
  border-radius: 999px; padding: 0.6rem 1.1rem;
  color: var(--bone); cursor: pointer;
  font-family: var(--serif-display); font-size: 0.58rem; letter-spacing: 0.3em; text-indent: 0.3em;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.4s ease, background 0.4s ease;
}
.sound-toggle:hover { border-color: rgba(201,162,75,0.6); }
.sound-toggle .bars { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.sound-toggle .bars i {
  width: 2px; height: 4px; background: var(--gold); border-radius: 1px;
  transition: height 0.3s ease;
}
.sound-toggle.on .bars i { animation: bar-dance 1.2s ease-in-out infinite; }
.sound-toggle.on .bars i:nth-child(2) { animation-delay: 0.15s; }
.sound-toggle.on .bars i:nth-child(3) { animation-delay: 0.3s; }
.sound-toggle.on .bars i:nth-child(4) { animation-delay: 0.45s; }
@keyframes bar-dance { 0%,100% { height: 4px; } 50% { height: 12px; } }

/* ————— scroll panels ————— */
#scroll-space { position: relative; z-index: 10; }

.panel {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 8vw;
  pointer-events: none;
}
.panel a, .panel button { pointer-events: auto; }

.hero { min-height: 100vh; align-items: center; text-align: center; }

.kicker {
  font-family: var(--serif-display);
  font-size: 0.72rem; letter-spacing: 0.6em; text-indent: 0.6em;
  color: var(--gold); margin-bottom: 2.2rem;
}
.display {
  font-family: var(--serif-display); font-weight: 500;
  font-size: clamp(3rem, 9.5vw, 8.4rem);
  line-height: 0.98; letter-spacing: 0.08em;
  color: var(--bone);
  text-shadow: 0 0 60px rgba(124,108,255,0.35), 0 0 130px rgba(124,108,255,0.2);
}
.lede {
  margin-top: 2.4rem;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.7; color: rgba(239,233,255,0.72);
  font-weight: 300;
}
.scroll-hint {
  margin-top: 5rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
  font-family: var(--serif-display); font-size: 0.56rem; letter-spacing: 0.42em; text-indent: 0.42em;
  color: rgba(239,233,255,0.5);
}
.hint-line {
  width: 1px; height: 56px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: hint-drop 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes hint-drop { 0% { transform: scaleY(0); opacity: 0; } 35% { opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* verses */
.verse { max-width: 100%; }
.verse[data-side="left"]  { align-items: flex-start; text-align: left; }
.verse[data-side="right"] { align-items: flex-end; text-align: right; }
.verse[data-side="center"] { align-items: center; text-align: center; }

.numeral {
  font-family: var(--serif-display);
  font-size: 0.66rem; letter-spacing: 0.5em;
  color: var(--gold); margin-bottom: 1.6rem;
}
.verse h2 {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 4.2rem);
  line-height: 1.12; letter-spacing: 0.04em;
  color: var(--bone);
  text-shadow: 0 0 40px rgba(6,7,20,0.9), 0 0 90px rgba(124,108,255,0.25);
}
.verse-text {
  margin-top: 1.8rem;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.75; color: rgba(239,233,255,0.7);
  font-weight: 300;
}

/* the final verse sits over the blazing rose — give it a quiet scrim */
.verse.final { position: relative; }
.verse.final::before {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: min(760px, 92vw); height: 580px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(6,7,20,0.82), rgba(6,7,20,0.5) 55%, transparent 78%);
  pointer-events: none;
}
.verse.final > * { position: relative; }
.verse.final h2 { text-shadow: 0 0 24px rgba(6,7,20,1), 0 0 60px rgba(6,7,20,0.9); }
.verse.final .numeral {
  color: #f0cd7d;
  text-shadow:
    0 1px 6px rgba(6,7,20,1), 0 0 12px rgba(6,7,20,1),
    0 0 28px rgba(6,7,20,1), 0 0 52px rgba(6,7,20,0.95);
}
.verse.final .verse-text { color: rgba(239,233,255,0.85); text-shadow: 0 0 16px rgba(6,7,20,1), 0 0 40px rgba(6,7,20,0.95); }

.guide-cta {
  margin-top: 3.2rem;
  display: inline-block;
  font-family: var(--serif-display); font-size: 0.68rem;
  letter-spacing: 0.34em; text-indent: 0.34em;
  color: var(--bone); text-decoration: none;
  border: 1px solid rgba(201,162,75,0.5); border-radius: 999px;
  padding: 1.1rem 2.4rem;
  background: rgba(10,12,26,0.35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.4s ease, box-shadow 0.5s ease, color 0.4s ease;
}
.guide-cta:hover {
  border-color: var(--gold); color: #fff;
  box-shadow: 0 0 40px rgba(201,162,75,0.25), inset 0 0 20px rgba(201,162,75,0.08);
}

/* JS-driven reveals: hidden only when JS is present */
.js .reveal, .js .verse > * { opacity: 0; }

/* ————— the crypt: chapters beneath the journey ————— */
.below {
  position: relative; z-index: 10;
  background:
    radial-gradient(ellipse 80% 34% at 50% 0%, rgba(124,108,255,0.10), transparent 62%),
    radial-gradient(ellipse 55% 30% at 18% 46%, rgba(201,162,75,0.05), transparent 60%),
    radial-gradient(ellipse 55% 30% at 84% 78%, rgba(124,108,255,0.06), transparent 60%),
    var(--nave);
}
.below::before {
  content: '';
  position: absolute; left: 0; right: 0; top: -120px; height: 120px;
  background: linear-gradient(to bottom, transparent, var(--nave));
  pointer-events: none;
}

.threshold {
  display: flex; align-items: center; justify-content: center; gap: 1.4rem;
  padding: 5.5rem 8vw 0;
}
.th-line {
  height: 1px; flex: 0 1 220px;
  background: linear-gradient(90deg, transparent, rgba(201,162,75,0.55));
}
.th-line:last-child { background: linear-gradient(90deg, rgba(201,162,75,0.55), transparent); }
.th-star { color: var(--gold); font-size: 0.9rem; }

.chapter { padding: 7.5rem 6vw 4rem; }
.chapter-inner { max-width: 1080px; margin: 0 auto; }
.chapter-title {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1.14; letter-spacing: 0.05em;
  color: var(--bone);
  margin-bottom: 2.6rem;
  text-shadow: 0 0 60px rgba(124,108,255,0.22);
}
.chapter .numeral { margin-bottom: 1.3rem; }
.chapter-lede {
  max-width: 620px; margin: -1rem 0 2.8rem;
  font-size: clamp(1.05rem, 1.5vw, 1.28rem); line-height: 1.75;
  color: rgba(239,233,255,0.7); font-weight: 300;
}
.chapter-cols {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 3.6rem; align-items: start;
}
.chapter-copy p {
  font-size: clamp(1.05rem, 1.45vw, 1.26rem); line-height: 1.8;
  color: rgba(239,233,255,0.72); font-weight: 300;
  margin-bottom: 1.4rem;
}
.chapter-copy p strong { color: var(--bone); font-weight: 400; }
.chapter-copy p em { color: rgba(239,233,255,0.9); }
.chapter-copy-wide { max-width: 720px; }
.glsl {
  font-family: 'Courier New', monospace; font-size: 0.85em;
  color: var(--ice); background: rgba(124,108,255,0.12);
  border-radius: 4px; padding: 0.08em 0.45em; white-space: nowrap;
}

.rites { list-style: none; margin-top: 2.4rem; display: grid; gap: 1rem; }
.rites li {
  display: flex; align-items: baseline; gap: 1.2rem;
  border-left: 1px solid rgba(201,162,75,0.4);
  padding-left: 1.2rem;
}
.rites b {
  font-family: var(--serif-display); font-weight: 500;
  font-size: 0.78rem; letter-spacing: 0.3em; color: var(--gold);
  min-width: 4.2em;
}
.rites span { color: rgba(239,233,255,0.66); font-size: 1.02rem; font-weight: 300; }

/* live shader demo panel */
.demo-panel {
  border: 1px solid rgba(124,108,255,0.22);
  border-radius: 14px;
  background: rgba(10,12,26,0.6);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45), inset 0 0 60px rgba(124,108,255,0.05);
  padding: 1.1rem;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.demo-stage {
  aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden;
  background: radial-gradient(ellipse 70% 70% at 50% 45%, #0b0d20, var(--nave));
  border: 1px solid rgba(239,233,255,0.07);
}
.demo-stage canvas { width: 100%; height: 100%; display: block; }
.demo-panel figcaption {
  font-family: var(--serif-display); font-size: 0.56rem;
  letter-spacing: 0.34em; text-indent: 0.34em; text-align: center;
  color: rgba(239,233,255,0.5); padding: 0.9rem 0 0.3rem;
}
.demo-controls { display: grid; gap: 0.55rem; padding: 0.6rem 0.4rem 0.3rem; }
.demo-controls label {
  display: grid; grid-template-columns: 7.5em 1fr; align-items: center; gap: 0.9rem;
}
.demo-controls span {
  font-family: var(--serif-display); font-size: 0.52rem; letter-spacing: 0.24em;
  color: rgba(239,233,255,0.55);
}
.demo-controls input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(201,162,75,0.65), rgba(124,108,255,0.5));
  outline: none; cursor: pointer;
}
.demo-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--nave); border: 1.5px solid var(--gold);
  box-shadow: 0 0 12px rgba(201,162,75,0.55);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.demo-controls input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.2); box-shadow: 0 0 20px rgba(201,162,75,0.8); }
.demo-controls input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--nave); border: 1.5px solid var(--gold);
  box-shadow: 0 0 12px rgba(201,162,75,0.55);
}

/* organ console */
.organ-console {
  margin-top: 2.6rem;
  border: 1px solid rgba(201,162,75,0.28);
  border-radius: 16px;
  background: linear-gradient(to bottom, rgba(13,16,34,0.85), rgba(8,9,22,0.9));
  box-shadow: 0 30px 90px rgba(0,0,0,0.5), inset 0 1px 0 rgba(239,233,255,0.05);
  padding: 2rem 2.2rem 1.6rem;
}
.console-top { display: flex; align-items: center; gap: 2.2rem; }
.organ-btn {
  position: relative; flex: 0 0 auto;
  width: 118px; height: 118px; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, rgba(124,108,255,0.16), rgba(10,12,26,0.9) 70%);
  border: 1px solid rgba(201,162,75,0.5);
  color: var(--bone); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.45rem;
  font-family: var(--serif-display);
  transition: border-color 0.4s ease, box-shadow 0.5s ease, transform 0.25s ease;
}
.organ-btn:hover { border-color: var(--gold); box-shadow: 0 0 45px rgba(201,162,75,0.28); }
.organ-btn:active { transform: scale(0.96); }
.organ-ring {
  position: absolute; inset: -9px; border-radius: 50%;
  border: 1px solid rgba(201,162,75,0.25);
  transition: opacity 0.4s ease;
}
.organ-btn.on .organ-ring { animation: organ-pulse 3.2s ease-in-out infinite; }
@keyframes organ-pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.09); opacity: 0.3; }
}
.organ-glyph { font-size: 1rem; color: var(--gold); letter-spacing: 0; }
.organ-btn.on .organ-glyph { color: var(--ice); }
.organ-label { font-size: 0.46rem; letter-spacing: 0.24em; text-indent: 0.24em; color: rgba(239,233,255,0.7); max-width: 80px; line-height: 1.7; }
#organ-viz { flex: 1 1 auto; min-width: 0; width: 100%; height: 130px; display: block; }
.stops {
  list-style: none;
  margin: 1.8rem 0 0; padding-top: 1.5rem;
  border-top: 1px solid rgba(239,233,255,0.08);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem 2rem;
}
.stops li { display: flex; flex-direction: column; gap: 0.15rem; }
.stops b {
  font-family: var(--serif-display); font-weight: 500; font-size: 0.8rem;
  letter-spacing: 0.14em; color: var(--gold);
}
.stops span { font-size: 0.92rem; font-weight: 300; color: rgba(239,233,255,0.55); font-style: italic; }

/* windows gallery */
.windows-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem;
}
.window-card {
  position: relative; text-align: left;
  background: rgba(10,12,26,0.6);
  border: 1px solid rgba(239,233,255,0.12);
  border-radius: 14px; overflow: hidden;
  cursor: pointer; color: var(--bone);
  font-family: var(--serif-body);
  padding: 0; display: block; width: 100%;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease, box-shadow 0.5s ease;
}
.window-card:hover, .window-card:focus-visible {
  transform: translateY(-7px);
  border-color: rgba(201,162,75,0.6);
  box-shadow: 0 30px 70px rgba(0,0,0,0.55), 0 0 50px rgba(124,108,255,0.12);
  outline: none;
}
.card-thumb {
  display: block; aspect-ratio: 16 / 9;
  background:
    radial-gradient(ellipse 60% 55% at 50% 40%, rgba(124,108,255,0.22), transparent 70%),
    radial-gradient(ellipse 40% 40% at 50% 55%, rgba(201,162,75,0.14), transparent 70%),
    #090b1c;
  background-size: cover; background-position: center;
  filter: saturate(1.05) brightness(0.92);
  transition: filter 0.6s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.window-card:hover .card-thumb { filter: saturate(1.2) brightness(1.08); transform: scale(1.04); }
.card-meta {
  position: relative; z-index: 1;
  display: block; padding: 1.3rem 1.5rem 1.5rem;
  background: linear-gradient(to bottom, rgba(6,7,20,0.4), rgba(6,7,20,0.85));
}
.card-num {
  display: block;
  font-family: var(--serif-display); font-size: 0.62rem; letter-spacing: 0.4em;
  color: var(--gold); margin-bottom: 0.5rem;
}
.card-name {
  display: block;
  font-family: var(--serif-display); font-weight: 400;
  font-size: 1.15rem; letter-spacing: 0.16em;
  margin-bottom: 0.5rem;
}
.card-line { display: block; font-style: italic; font-weight: 300; color: rgba(239,233,255,0.62); font-size: 1.02rem; line-height: 1.6; }
.card-cta {
  display: inline-block; margin-top: 1rem;
  font-family: var(--serif-display); font-size: 0.56rem; letter-spacing: 0.3em; text-indent: 0.3em;
  color: rgba(201,162,75,0.85);
  opacity: 0.65; transform: translateX(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.window-card:hover .card-cta { opacity: 1; transform: translateX(5px); }

/* footer */
.rite-footer {
  margin-top: 4rem;
  border-top: 1px solid rgba(201,162,75,0.22);
  background: linear-gradient(to bottom, transparent, rgba(4,5,14,0.9));
  padding: 5rem 6vw 3.5rem;
  text-align: center;
}
.footer-inner { max-width: 780px; margin: 0 auto; }
.footer-sigil { color: var(--gold); font-size: 1.1rem; margin-bottom: 1.4rem; }
.footer-word {
  font-family: var(--serif-display); font-weight: 500;
  font-size: 1rem; letter-spacing: 0.55em; text-indent: 0.55em;
  color: var(--bone); margin-bottom: 1rem;
}
.footer-lede { color: rgba(239,233,255,0.6); font-weight: 300; font-size: 1.08rem; margin-bottom: 2.4rem; }
.footer-nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6rem 2.2rem;
  font-family: var(--serif-display); font-size: 0.6rem; letter-spacing: 0.3em;
  margin-bottom: 2.6rem;
}
.footer-nav a {
  color: rgba(239,233,255,0.65); text-decoration: none;
  padding-bottom: 3px; border-bottom: 1px solid transparent;
  transition: color 0.4s ease, border-color 0.4s ease;
}
.footer-nav a:hover { color: var(--bone); border-color: var(--gold); }
.footer-nav a:last-child { color: var(--gold); }
.footer-meta {
  font-family: var(--serif-display); font-size: 0.52rem; letter-spacing: 0.22em;
  color: rgba(239,233,255,0.35); margin-bottom: 0.9rem; line-height: 2;
}
.footer-small { font-style: italic; font-weight: 300; font-size: 0.95rem; color: rgba(239,233,255,0.4); }

/* viewing mode (camera flights) */
body.is-viewing { overflow: hidden; }
body.is-viewing .below { opacity: 0; pointer-events: none; }
.below { transition: opacity 0.9s ease; }
body.is-viewing .sound-toggle { opacity: 0; pointer-events: none; }
.sound-toggle { transition: opacity 0.6s ease, border-color 0.4s ease, background 0.4s ease; }
.viewing {
  position: fixed; inset: 0; z-index: 15;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 4.5vh;
  pointer-events: none;
  opacity: 0; transition: opacity 0.9s ease;
}
.viewing.on { opacity: 1; }
.viewing-caption {
  text-align: center; max-width: 640px; padding: 0 6vw;
}
.viewing-caption .numeral { margin-bottom: 0.8rem; text-shadow: 0 0 20px rgba(6,7,20,1); }
.viewing-caption h3 {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem); letter-spacing: 0.14em;
  color: var(--bone);
  text-shadow: 0 0 30px rgba(6,7,20,1), 0 0 80px rgba(124,108,255,0.3);
  margin-bottom: 0.7rem;
}
.viewing-text {
  font-style: italic; font-weight: 300; color: rgba(239,233,255,0.78);
  font-size: 1.1rem; text-shadow: 0 0 18px rgba(6,7,20,1);
}
.viewing-return {
  pointer-events: auto;
  margin-top: 2rem;
  font-family: var(--serif-display); font-size: 0.6rem;
  letter-spacing: 0.3em; text-indent: 0.3em;
  color: var(--bone); cursor: pointer;
  border: 1px solid rgba(201,162,75,0.5); border-radius: 999px;
  padding: 0.95rem 2rem;
  background: rgba(10,12,26,0.5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.4s ease, box-shadow 0.5s ease;
}
.viewing-return:hover { border-color: var(--gold); box-shadow: 0 0 40px rgba(201,162,75,0.25); }

/* ————— mobile ————— */
@media (max-width: 900px) {
  .chapter-cols { grid-template-columns: 1fr; gap: 2.6rem; }
  .windows-grid { grid-template-columns: 1fr; }
  .console-top { flex-direction: column; gap: 1.6rem; }
  .stops { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .hud { padding: 1.2rem 1.1rem; font-size: 0.5rem; letter-spacing: 0.18em; }
  .hud-right { gap: 0.9rem; }
  .hud-home .hud-title { display: none; }
  .hud-link { display: inline-block; }
  .panel { padding: 0 9vw; }
  .verse[data-side="right"] { align-items: flex-start; text-align: left; }
  .sound-toggle { right: 1.2rem; bottom: 1.4rem; padding: 0.55rem 0.95rem; }
  .display { letter-spacing: 0.06em; }
  .scroll-hint { margin-top: 3.4rem; }
  .chapter { padding: 5rem 8vw 2.5rem; }
  .threshold { padding-top: 4rem; }
  .organ-console { padding: 1.5rem 1.2rem 1.2rem; }
  .stops { grid-template-columns: 1fr; gap: 0.8rem; }
  .demo-controls label { grid-template-columns: 6.4em 1fr; }
  .rites b { min-width: 3.6em; }
  .footer-nav { gap: 1.1rem 1.4rem; }
  .viewing-caption h3 { letter-spacing: 0.1em; }
}

/* ————— reduced motion ————— */
@media (prefers-reduced-motion: reduce) {
  .loader-line span, .hint-line, .grain, .sound-toggle.on .bars i, .organ-btn.on .organ-ring { animation: none; }
  #loader { transition: none; }
  .window-card, .card-thumb, .card-cta { transition: none; }
  .window-card:hover { transform: none; }
  .window-card:hover .card-thumb { transform: none; }
}
