/* =========================================================================
   luminous.quest — A Cosmic Journey Through Light
   Holographic / parallax-sections / star-celestial / path-draw-svg
   ========================================================================= */

:root {
    /* Palette */
    --deep-space: #050510;
    --midnight-indigo: #0A0A2A;
    --deep-indigo: #15153A;
    --nebula-purple: #3A1A5E;
    --star-white: #FFFFFF;
    --lavender-mist: #C8C8E0;
    --holo-pink: #FF6B9D;
    --holo-cyan: #4DFFF3;
    --holo-gold: #FFD700;

    /* Type */
    --font-display: "Cormorant", "Times New Roman", serif;
    --font-body: "Nunito Sans", system-ui, sans-serif;
    --font-mono: "Space Mono", "Courier New", monospace;

    /* Section index drives background colour interpolation */
    --section-index: 0;

    /* Scroll position relayed from JS */
    --scroll: 0;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--deep-space);
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(15px, 1.1vw, 18px);
    line-height: 1.8;
    color: var(--lavender-mist);
    overflow-x: hidden;
    min-height: 100vh;
    background:
        linear-gradient(
            180deg,
            var(--deep-space) 0%,
            var(--deep-space) 14%,
            var(--midnight-indigo) 33%,
            var(--midnight-indigo) 50%,
            var(--deep-indigo) 67%,
            var(--nebula-purple) 86%,
            var(--deep-space) 100%
        );
    background-attachment: fixed;
    transition: background-color 0.6s ease;
}

/* =========================================================================
   PARALLAX STAR FIELDS
   ========================================================================= */

.star-layer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.star-pixel {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 1px;
    background: var(--star-white);
    border-radius: 50%;
}

/* Far layer: small dim stars, slow scroll */
.star-layer--far .star-pixel {
    box-shadow:
        -740px -420px 0 0 rgba(255,255,255,0.55),
        -610px -260px 0 0 rgba(255,255,255,0.4),
        -540px -100px 0 0 rgba(200,200,224,0.5),
        -430px 110px 0 0 rgba(255,255,255,0.3),
        -370px 280px 0 0 rgba(255,255,255,0.6),
        -290px -380px 0 0 rgba(200,200,224,0.45),
        -210px -190px 0 0 rgba(255,255,255,0.5),
        -150px 60px 0 0 rgba(255,255,255,0.3),
        -90px 240px 0 0 rgba(255,255,255,0.4),
        -40px -310px 0 0 rgba(200,200,224,0.55),
        50px -150px 0 0 rgba(255,255,255,0.4),
        110px 80px 0 0 rgba(255,255,255,0.6),
        180px -360px 0 0 rgba(255,255,255,0.4),
        250px -110px 0 0 rgba(200,200,224,0.5),
        330px 180px 0 0 rgba(255,255,255,0.4),
        400px -240px 0 0 rgba(255,255,255,0.55),
        470px 30px 0 0 rgba(255,255,255,0.3),
        540px 250px 0 0 rgba(200,200,224,0.45),
        610px -170px 0 0 rgba(255,255,255,0.5),
        690px 110px 0 0 rgba(255,255,255,0.4),
        750px -30px 0 0 rgba(255,255,255,0.3),
        -700px 350px 0 0 rgba(255,255,255,0.5),
        -480px 420px 0 0 rgba(200,200,224,0.4),
        -120px 470px 0 0 rgba(255,255,255,0.5),
        220px 410px 0 0 rgba(255,255,255,0.4),
        540px 480px 0 0 rgba(255,255,255,0.5),
        720px 360px 0 0 rgba(200,200,224,0.45),
        -640px -490px 0 0 rgba(255,255,255,0.4),
        -300px -520px 0 0 rgba(255,255,255,0.5),
        80px -480px 0 0 rgba(200,200,224,0.4),
        420px -460px 0 0 rgba(255,255,255,0.55),
        660px -440px 0 0 rgba(255,255,255,0.4);
}

/* Mid layer: medium stars */
.star-layer--mid .star-pixel {
    width: 2px;
    height: 2px;
    box-shadow:
        -680px -340px 0 0 rgba(255,255,255,0.7),
        -510px -180px 0 0 rgba(255,215,0,0.5),
        -360px 0 0 0 rgba(255,255,255,0.85),
        -200px 200px 0 0 rgba(77,255,243,0.45),
        -50px -260px 0 0 rgba(255,255,255,0.7),
        120px -80px 0 0 rgba(255,255,255,0.9),
        280px 130px 0 0 rgba(255,107,157,0.45),
        420px -210px 0 0 rgba(255,255,255,0.7),
        570px 50px 0 0 rgba(255,255,255,0.8),
        710px -120px 0 0 rgba(255,215,0,0.45),
        -750px 230px 0 0 rgba(255,255,255,0.7),
        -380px 350px 0 0 rgba(77,255,243,0.5),
        -10px 420px 0 0 rgba(255,255,255,0.75),
        330px 380px 0 0 rgba(255,255,255,0.85),
        650px 290px 0 0 rgba(255,107,157,0.5),
        -560px -440px 0 0 rgba(255,255,255,0.7),
        -180px -460px 0 0 rgba(255,255,255,0.8),
        180px -380px 0 0 rgba(255,255,255,0.7),
        500px -380px 0 0 rgba(255,215,0,0.5),
        720px -300px 0 0 rgba(255,255,255,0.7);
}

/* Near layer: brighter, larger stars */
.star-layer--near .star-pixel {
    width: 3px;
    height: 3px;
    box-shadow:
        -640px -290px 0 0 rgba(255,255,255,1),
        -300px -120px 0 0 rgba(255,215,0,0.85),
        80px 90px 0 0 rgba(255,255,255,1),
        380px -190px 0 0 rgba(77,255,243,0.85),
        660px 60px 0 0 rgba(255,255,255,0.95),
        -480px 280px 0 0 rgba(255,107,157,0.75),
        -130px 360px 0 0 rgba(255,255,255,1),
        260px 320px 0 0 rgba(255,255,255,0.9),
        540px 240px 0 0 rgba(255,215,0,0.75),
        -700px 100px 0 0 rgba(255,255,255,0.95),
        720px -250px 0 0 rgba(77,255,243,0.7),
        -200px -400px 0 0 rgba(255,255,255,1),
        420px -420px 0 0 rgba(255,107,157,0.7);
}

/* Twinkling animation on the brightest layer */
.star-layer--near {
    animation: twinkleSubtle 6s ease-in-out infinite;
}

@keyframes twinkleSubtle {
    0%, 100% { opacity: 0.95; }
    50% { opacity: 0.6; }
}

/* =========================================================================
   NEBULA HAZE
   ========================================================================= */

.nebula-haze {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background:
        radial-gradient(ellipse 60% 40% at 20% 30%, rgba(58,26,94,0.35), transparent 60%),
        radial-gradient(ellipse 70% 50% at 80% 70%, rgba(77,255,243,0.07), transparent 60%),
        radial-gradient(ellipse 50% 35% at 50% 90%, rgba(255,107,157,0.08), transparent 60%);
    mix-blend-mode: screen;
}

/* =========================================================================
   COORDINATE READOUT
   ========================================================================= */

.coordinate-readout {
    position: fixed;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: rgba(200,200,224,0.6);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: rgba(5,5,16,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(200,200,224,0.12);
    border-radius: 2px;
    text-transform: uppercase;
}

.coord-label {
    color: rgba(255,215,0,0.7);
    font-size: 10px;
}

.coord-value {
    color: var(--lavender-mist);
}

.coord-divider {
    color: rgba(200,200,224,0.25);
}

/* =========================================================================
   SCROLL COMPASS
   ========================================================================= */

.scroll-compass {
    position: fixed;
    top: 50%;
    right: 28px;
    transform: translateY(-50%);
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 14px 8px;
    background: rgba(5,5,16,0.4);
    border: 1px solid rgba(200,200,224,0.1);
    border-radius: 14px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.compass-track {
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: relative;
}

.compass-tick {
    width: 8px;
    height: 8px;
    border: 1px solid rgba(200,200,224,0.4);
    border-radius: 50%;
    transition: background 0.4s, transform 0.4s, box-shadow 0.4s;
}

.compass-tick.is-active {
    background: var(--holo-cyan);
    border-color: var(--holo-cyan);
    transform: scale(1.4);
    box-shadow: 0 0 12px rgba(77,255,243,0.7);
}

.compass-cursor {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--holo-gold), transparent);
    height: 0;
    pointer-events: none;
}

/* =========================================================================
   COSMOS LAYOUT
   ========================================================================= */

.cosmos {
    position: relative;
    z-index: 5;
}

.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 6vw 140px;
    z-index: 5;
    overflow: hidden;
}

.section__inner {
    position: relative;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    text-align: center;
}

.section__numerals {
    font-family: var(--font-display);
    font-weight: 500;
    font-style: italic;
    font-size: clamp(14px, 1.1vw, 18px);
    letter-spacing: 0.4em;
    color: rgba(255,215,0,0.7);
    margin-bottom: 26px;
}

.section__heading {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(28px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.005em;
    color: var(--star-white);
    margin-bottom: 32px;
    background: linear-gradient(135deg, var(--star-white) 0%, var(--lavender-mist) 60%, var(--holo-cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section__lead {
    max-width: 720px;
    margin: 0 auto 60px;
    font-size: clamp(16px, 1.2vw, 19px);
    color: var(--lavender-mist);
    line-height: 1.85;
}

.section__pair {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    max-width: 880px;
    margin: 0 auto 70px;
    text-align: left;
}

.section__column p {
    font-size: 15px;
    color: rgba(200,200,224,0.85);
}

.section__label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--holo-gold);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,215,0,0.25);
}

.section__motif {
    width: 220px;
    height: 220px;
    margin: 40px auto 0;
    opacity: 0.5;
    overflow: visible;
}

.section__motif polygon,
.section__motif line,
.section__motif circle:not(.section__motif circle:first-of-type) {
    fill: none;
    stroke: var(--star-white);
    stroke-width: 1;
    opacity: 0.7;
}

.section__motif circle {
    fill: var(--holo-gold);
    stroke: none;
    filter: drop-shadow(0 0 4px rgba(255,215,0,0.6));
}

.section__motif--triangle {
    animation: rotateSlow 80s linear infinite;
}

.section__motif--hex {
    animation: rotateSlow 100s linear infinite reverse;
}

.section__motif--diamond {
    animation: rotateSlow 60s linear infinite;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =========================================================================
   SECTION 0 — OPENING
   ========================================================================= */

.section--opening {
    background-color: var(--deep-space);
    min-height: 100vh;
    align-items: center;
}

.opening-frame {
    position: relative;
    text-align: center;
    z-index: 5;
}

.opening-star {
    width: clamp(280px, 38vw, 540px);
    height: clamp(280px, 38vw, 540px);
    margin: 0 auto 30px;
    overflow: visible;
    animation: openingStarSpin 120s linear infinite;
}

.opening-star__shape {
    fill: url(#holoGrad);
    fill-opacity: 0.18;
    stroke: url(#holoGrad);
    stroke-width: 1;
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    animation: drawStarPath 2.6s ease-out 0.3s forwards;
    filter: drop-shadow(0 0 18px rgba(255,107,157,0.35));
}

.opening-star__inner {
    fill: none;
    stroke: var(--star-white);
    stroke-width: 0.8;
    opacity: 0;
    animation: fadeIn 1.4s ease 1.6s forwards;
}

.opening-star__core {
    fill: var(--star-white);
    opacity: 0;
    animation: fadeIn 0.9s ease 2.0s forwards;
    filter: drop-shadow(0 0 16px rgba(255,255,255,0.95));
}

.opening-star__halo {
    opacity: 0;
    animation: fadeIn 1.6s ease 1.8s forwards;
}

.opening-star__ring circle {
    fill: var(--holo-cyan);
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
    filter: drop-shadow(0 0 6px rgba(77,255,243,0.9));
}

.opening-star__ring circle:nth-child(1) { animation-delay: 1.8s; }
.opening-star__ring circle:nth-child(2) { animation-delay: 1.95s; }
.opening-star__ring circle:nth-child(3) { animation-delay: 2.1s; }
.opening-star__ring circle:nth-child(4) { animation-delay: 2.25s; }
.opening-star__ring circle:nth-child(5) { animation-delay: 2.4s; }
.opening-star__ring circle:nth-child(6) { animation-delay: 2.55s; }

@keyframes drawStarPath {
    to { stroke-dashoffset: 0; }
}

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

@keyframes openingStarSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logotype {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(40px, 7vw, 96px);
    line-height: 1.0;
    letter-spacing: -0.01em;
    margin-bottom: 22px;
    opacity: 0;
    animation: fadeIn 1.6s ease 1.4s forwards;
}

.logotype__main {
    display: block;
    background: linear-gradient(135deg, #FF6B9D, #4DFFF3, #FFD700, #FF6B9D);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: holographicShift 4s ease infinite;
    filter: drop-shadow(0 0 24px rgba(255,107,157,0.18));
}

.logotype__dot {
    color: var(--star-white);
    -webkit-text-fill-color: var(--star-white);
}

.logotype__sub {
    display: block;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(14px, 1.4vw, 20px);
    color: var(--lavender-mist);
    margin-top: 14px;
    letter-spacing: 0.06em;
    opacity: 0.75;
}

@keyframes holographicShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.opening-meta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(200,200,224,0.6);
    margin-top: 18px;
    opacity: 0;
    animation: fadeIn 1.4s ease 2.4s forwards;
}

.opening-meta__label {
    color: rgba(255,215,0,0.7);
}

.opening-meta__value {
    color: var(--lavender-mist);
}

.opening-meta__sep {
    color: rgba(200,200,224,0.3);
}

.scroll-cue {
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeIn 1.4s ease 3.0s forwards;
}

.scroll-cue__line {
    width: 1px;
    height: 50px;
    background: linear-gradient(180deg, transparent, var(--lavender-mist), transparent);
    animation: scrollPulse 2.4s ease-in-out infinite;
}

.scroll-cue__text {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(200,200,224,0.5);
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* =========================================================================
   CONSTELLATION TRANSITIONS
   ========================================================================= */

.constellation-transition {
    position: relative;
    width: 100%;
    height: 220px;
    margin: 0 auto;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.constellation-transition svg {
    width: min(100%, 1000px);
    height: 100%;
    overflow: visible;
}

.constellation-line {
    fill: none;
    stroke: var(--star-white);
    stroke-width: 0.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.55;
    stroke-dasharray: 1600;
    stroke-dashoffset: 1600;
    transition: stroke-dashoffset 2.2s ease-in-out;
}

.constellation-line--accent {
    stroke: var(--holo-cyan);
    stroke-width: 0.6;
    opacity: 0.4;
}

.constellation-transition.is-visible .constellation-line {
    stroke-dashoffset: 0;
}

.constellation-stars circle {
    fill: var(--star-white);
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.8));
    opacity: 0;
    transition: opacity 0.6s ease;
}

.constellation-transition.is-visible .constellation-stars circle {
    opacity: 1;
    animation: constellationTwinkle 3.5s ease-in-out infinite;
}

.constellation-transition.is-visible .constellation-stars circle:nth-child(odd) {
    animation-delay: 1s;
}

@keyframes constellationTwinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.constellation-label {
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.22em;
    fill: rgba(255,215,0,0.5);
    opacity: 0;
    transition: opacity 1s ease 1.2s;
}

.constellation-transition.is-visible .constellation-label {
    opacity: 1;
}

/* =========================================================================
   SECTION 1 — PREFACE / triangular
   ========================================================================= */

.section--preface {
    background-color: rgba(10,10,42,0.4);
}

.triangular-arrangement {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* =========================================================================
   SECTION 2 — HEXAGONAL CLUSTER
   ========================================================================= */

.section--cluster {
    background-color: rgba(10,10,42,0.6);
}

.hex-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    max-width: 1080px;
    margin: 0 auto 50px;
}

.hex-card {
    position: relative;
    padding: 36px 28px 32px;
    background: rgba(5,5,16,0.45);
    border: 1px solid rgba(200,200,224,0.12);
    text-align: left;
    transition: border-color 0.5s, transform 0.5s, box-shadow 0.5s;
    overflow: hidden;
    clip-path: polygon(
        12% 0%, 88% 0%,
        100% 50%, 88% 100%,
        12% 100%, 0% 50%
    );
}

.hex-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,107,157,0.0), rgba(77,255,243,0.0), rgba(255,215,0,0.0));
    opacity: 0;
    transition: opacity 0.6s;
    pointer-events: none;
}

.hex-card:hover {
    border-color: rgba(77,255,243,0.5);
    transform: translateY(-4px);
}

.hex-card:hover::before {
    background: linear-gradient(135deg, rgba(255,107,157,0.08), rgba(77,255,243,0.08), rgba(255,215,0,0.08));
    opacity: 1;
}

.hex-card__index {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--holo-gold);
    margin-bottom: 14px;
}

.hex-card__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 28px;
    color: var(--star-white);
    margin-bottom: 16px;
    letter-spacing: -0.005em;
}

.hex-card__body {
    font-size: 14px;
    color: rgba(200,200,224,0.85);
    line-height: 1.75;
}

/* =========================================================================
   SECTION 3 — CIRCULAR ARC / orbit
   ========================================================================= */

.section--arc {
    background-color: rgba(21,21,58,0.5);
}

.orbit {
    position: relative;
    width: clamp(320px, 50vw, 580px);
    height: clamp(320px, 50vw, 580px);
    margin: 30px auto 70px;
}

.orbit__center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,215,0,0.18), rgba(255,107,157,0.06) 60%, transparent 100%);
    border: 1px solid rgba(255,215,0,0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 30px rgba(255,215,0,0.25),
        0 0 80px rgba(255,107,157,0.12),
        inset 0 0 20px rgba(255,255,255,0.08);
}

.orbit__center-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: rgba(255,215,0,0.8);
    margin-bottom: 4px;
}

.orbit__center-value {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: 26px;
    color: var(--star-white);
}

.orbit__ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px dashed rgba(200,200,224,0.18);
    transform: translate(-50%, -50%);
}

.orbit__ring--inner {
    width: 65%;
    height: 65%;
    animation: orbitSpin 60s linear infinite;
}

.orbit__ring--outer {
    width: 100%;
    height: 100%;
    border-style: solid;
    border-color: rgba(200,200,224,0.1);
    animation: orbitSpin 100s linear infinite reverse;
}

@keyframes orbitSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.orbit__satellite {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform: translate(-50%, -50%) rotate(var(--angle));
}

.orbit__satellite span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateX(50%) translateY(-50%);
}

.orbit__ring--inner .orbit__satellite span {
    transform: translateX(calc(0px - 50%)) translateY(-50%);
    left: 50%;
    top: 0;
}

.orbit__ring--outer .orbit__satellite span {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
}

.orbit__satellite span {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 6px 12px;
    background: rgba(5,5,16,0.85);
    border: 1px solid rgba(77,255,243,0.35);
    color: var(--lavender-mist);
    white-space: nowrap;
    border-radius: 1px;
    box-shadow: 0 0 8px rgba(77,255,243,0.15);
}

.orbit__ring--inner .orbit__satellite {
    --r: 50%;
}

/* Place satellites on the ring perimeter */
.orbit__ring--inner .orbit__satellite span {
    --offset-y: -50%;
    transform-origin: center;
    top: 0;
    left: 50%;
    transform: translate(-50%, -100%);
}

.orbit__ring--outer .orbit__satellite span {
    top: 0;
    left: 50%;
    transform: translate(-50%, -100%);
}

/* Counter-rotate text so it stays upright while ring spins */
.orbit__ring--inner {
    --counter: -1;
}

.orbit__ring--outer {
    --counter: 1;
}

.quote-card {
    position: relative;
    max-width: 820px;
    margin: 60px auto 0;
    padding: 48px 56px 40px;
    background: rgba(5,5,16,0.55);
    border: 1px solid rgba(200,200,224,0.16);
    border-left: 2px solid var(--holo-cyan);
    text-align: left;
}

.quote-mark {
    position: absolute;
    top: -6px;
    left: 26px;
    font-family: var(--font-display);
    font-size: 90px;
    line-height: 1;
    color: var(--holo-cyan);
    opacity: 0.4;
    pointer-events: none;
}

.quote-text {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(18px, 1.6vw, 24px);
    line-height: 1.6;
    color: var(--star-white);
    margin-bottom: 18px;
}

.quote-attr {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,215,0,0.7);
}

/* =========================================================================
   SECTION 4 — DIAMOND LATTICE
   ========================================================================= */

.section--lattice {
    background-color: rgba(21,21,58,0.7);
}

.lattice {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px 80px;
    max-width: 1000px;
    margin: 30px auto 60px;
    text-align: left;
    position: relative;
}

.lattice::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70%;
    height: 70%;
    transform: translate(-50%, -50%) rotate(45deg);
    border: 1px dashed rgba(200,200,224,0.18);
    pointer-events: none;
}

.lattice__node {
    position: relative;
    padding: 24px 28px 26px;
    background: rgba(5,5,16,0.45);
    border-top: 1px solid rgba(255,215,0,0.4);
    border-bottom: 1px solid rgba(255,215,0,0.15);
    border-left: 1px solid rgba(255,215,0,0.25);
    border-right: 1px solid rgba(255,215,0,0.25);
    transition: transform 0.5s ease, border-color 0.5s;
}

.lattice__node:hover {
    transform: translateY(-3px);
    border-top-color: var(--holo-cyan);
}

.lattice__node--1 { transform: translateY(-30px); }
.lattice__node--2 { transform: translateY(30px); }
.lattice__node--3 { transform: translateY(30px); }
.lattice__node--4 { transform: translateY(-30px); }

.lattice__node--1:hover { transform: translateY(-34px); }
.lattice__node--2:hover { transform: translateY(26px); }
.lattice__node--3:hover { transform: translateY(26px); }
.lattice__node--4:hover { transform: translateY(-34px); }

.lattice__index {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--holo-gold);
    margin-bottom: 10px;
}

.lattice__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 26px;
    color: var(--star-white);
    margin-bottom: 12px;
}

.lattice__body {
    font-size: 14px;
    line-height: 1.75;
    color: rgba(200,200,224,0.85);
    margin-bottom: 14px;
}

.lattice__coords {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    color: rgba(77,255,243,0.7);
}

/* =========================================================================
   SECTION 5 — MANDALA
   ========================================================================= */

.section--mandala {
    background-color: rgba(58,26,94,0.45);
}

.mandala {
    width: clamp(320px, 48vw, 540px);
    height: clamp(320px, 48vw, 540px);
    margin: 30px auto;
    overflow: visible;
    animation: mandalaRotate 240s linear infinite;
}

.mandala circle {
    fill: none;
    stroke: var(--star-white);
    stroke-width: 0.6;
    opacity: 0.35;
}

.mandala__spokes line {
    stroke: rgba(255,215,0,0.3);
    stroke-width: 0.5;
}

.mandala__nodes circle {
    fill: var(--holo-gold);
    stroke: none;
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(255,215,0,0.7));
}

.mandala__core {
    fill: var(--star-white);
    stroke: none;
    opacity: 1;
    filter: drop-shadow(0 0 14px rgba(255,255,255,1));
}

@keyframes mandalaRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.precession-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 880px;
    margin: 30px auto 0;
}

.precession-cell {
    padding: 18px 12px;
    background: rgba(5,5,16,0.4);
    border: 1px solid rgba(200,200,224,0.12);
    text-align: center;
}

.precession-cell__label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,215,0,0.7);
    margin-bottom: 8px;
}

.precession-cell__value {
    display: block;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 22px;
    color: var(--star-white);
    letter-spacing: -0.005em;
}

/* =========================================================================
   SECTION 6 — DESTINATION
   ========================================================================= */

.section--destination {
    background: radial-gradient(ellipse at center, rgba(58,26,94,0.4) 0%, var(--deep-space) 70%);
    align-items: center;
    justify-content: center;
    padding: 160px 6vw 200px;
}

.destination-frame {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: clamp(560px, 70vh, 760px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.destination-light {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    pointer-events: none;
}

.destination-light__core {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, var(--star-white) 0%, rgba(255,255,255,0.6) 35%, transparent 70%);
    box-shadow:
        0 0 20px rgba(255,255,255,0.9),
        0 0 50px rgba(255,255,255,0.6),
        0 0 100px rgba(255,255,255,0.4);
    animation: destinationPulse 4s ease-in-out infinite;
}

.destination-light__bloom {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.destination-light__bloom--1 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,107,157,0.18) 0%, transparent 65%);
    animation: destinationBloom 6s ease-in-out infinite;
}

.destination-light__bloom--2 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(77,255,243,0.12) 0%, transparent 65%);
    animation: destinationBloom 8s ease-in-out infinite reverse;
}

.destination-light__bloom--3 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,215,0,0.08) 0%, transparent 65%);
    animation: destinationBloom 10s ease-in-out infinite;
}

@keyframes destinationPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.85; }
}

@keyframes destinationBloom {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
    50% { transform: translate(-50%, -50%) scale(1.18); opacity: 0.55; }
}

.destination-arc {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 480px;
    height: 480px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: arcSpin 90s linear infinite;
}

.destination-arc__char {
    position: absolute;
    top: 0;
    left: 50%;
    height: 50%;
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(calc((var(--i) - 14) * 12deg));
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: 20px;
    color: var(--lavender-mist);
    letter-spacing: 0.04em;
}

@keyframes arcSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(-360deg); }
}

.destination-caption {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 540px;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(15px, 1.2vw, 18px);
    line-height: 1.7;
    color: rgba(200,200,224,0.85);
}

.cosmic-footer {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(200,200,224,0.45);
    white-space: nowrap;
}

.cosmic-footer__sigil {
    font-size: 14px;
    color: var(--holo-gold);
    filter: drop-shadow(0 0 4px rgba(255,215,0,0.6));
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 900px) {
    .scroll-compass { right: 12px; padding: 10px 6px; }
    .compass-track { gap: 16px; }
    .hex-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .lattice { grid-template-columns: 1fr; gap: 22px; }
    .lattice__node--1, .lattice__node--2,
    .lattice__node--3, .lattice__node--4 { transform: none; }
    .lattice__node--1:hover, .lattice__node--2:hover,
    .lattice__node--3:hover, .lattice__node--4:hover { transform: translateY(-4px); }
    .precession-row { grid-template-columns: repeat(2, 1fr); }
    .section__pair { grid-template-columns: 1fr; gap: 32px; }
    .destination-arc { width: 360px; height: 360px; }
    .destination-arc__char { font-size: 16px; }
    .quote-card { padding: 32px 28px; }
    .quote-mark { font-size: 60px; }
    .coordinate-readout { font-size: 9px; gap: 6px; padding: 6px 10px; }
}

@media (max-width: 600px) {
    .section { padding: 100px 5vw 110px; }
    .hex-grid { grid-template-columns: 1fr; }
    .destination-arc { width: 280px; height: 280px; }
    .destination-arc__char { font-size: 13px; }
    .scroll-compass { display: none; }
    .opening-meta { font-size: 9px; gap: 8px; }
    .coordinate-readout { display: none; }
}
