/* rational.quest -- isometric technical atlas
   palette : #0D1B2A #1B2838 #243B53 #2D4F6C #6EC6FF #E8F4FD #A8D8EA #FFB800 #D0D0D0 #A8D8EA #E8F4FD
   fonts   : Rajdhani, Nunito, Overpass Mono
*/

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

:root {
    --c-sky-deep: #0D1B2A;
    --c-sky-mid: #1B2838;
    --c-steel-front: #243B53;
    --c-steel-side: #2D4F6C;
    --c-cyan-bright: #6EC6FF;
    --c-ice: #E8F4FD;
    --c-cyan-soft: #A8D8EA;
    --c-gold: #FFB800;
    --c-body: #D0D0D0;

    --f-display: 'Rajdhani', 'Space Grotesk', system-ui, sans-serif;
    --f-body: 'Nunito', 'Inter', system-ui, sans-serif;
    --f-mono: 'Overpass Mono', 'JetBrains Mono', ui-monospace, monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--c-sky-deep);
    color: var(--c-body);
    font-family: var(--f-body);
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ---- atmospheric sky gradient ---- */
.sky-gradient {
    position: fixed;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(ellipse at 20% 12%, rgba(110, 198, 255, 0.10), transparent 55%),
        radial-gradient(ellipse at 80% 88%, rgba(45, 79, 108, 0.55), transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(27, 40, 56, 0.4), transparent 70%),
        linear-gradient(180deg, #0D1B2A 0%, #0a1622 60%, #0D1B2A 100%);
    pointer-events: none;
}

/* ---- particle canvas ---- */
#particle-canvas {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
}

/* ---- HUD ---- */
.hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 36px;
    background: linear-gradient(180deg, rgba(13, 27, 42, 0.92) 0%, rgba(13, 27, 42, 0.55) 70%, transparent 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(110, 198, 255, 0.12);
}

.hud-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hud-glyph {
    width: 22px;
    height: 22px;
    position: relative;
    transform: rotate(45deg) skewX(-30deg);
    background: linear-gradient(135deg, var(--c-cyan-bright), var(--c-cyan-soft));
    box-shadow: 0 0 14px rgba(110, 198, 255, 0.55);
}

.hud-glyph::after {
    content: "";
    position: absolute;
    inset: 4px;
    background: var(--c-sky-deep);
}

.hud-title {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    color: var(--c-ice);
}

.hud-nav {
    display: flex;
    gap: 28px;
}

.hud-nav a {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--c-cyan-soft);
    text-decoration: none;
    text-transform: uppercase;
    position: relative;
    padding: 4px 0;
    transition: color 240ms ease;
}

.hud-nav a::before {
    content: attr(data-coord);
    position: absolute;
    top: -10px;
    left: 0;
    font-size: 8px;
    color: var(--c-cyan-bright);
    opacity: 0.7;
    letter-spacing: 0.18em;
}

.hud-nav a:hover {
    color: var(--c-ice);
}

.hud-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--c-cyan-bright);
    transition: width 240ms ease;
}

.hud-nav a:hover::after {
    width: 100%;
}

.hud-coord {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-family: var(--f-mono);
}

.hud-coord-label {
    font-size: 9px;
    letter-spacing: 0.18em;
    color: var(--c-cyan-bright);
    opacity: 0.7;
}

.hud-coord-value {
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--c-ice);
}

/* ---- depth meter ---- */
.depth-meter {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.depth-meter-track {
    width: 2px;
    height: 280px;
    background: rgba(168, 216, 234, 0.14);
    position: relative;
    overflow: hidden;
}

.depth-meter-fill {
    position: absolute;
    top: 0;
    left: -3px;
    width: 8px;
    height: 0%;
    background: linear-gradient(180deg, var(--c-cyan-bright), var(--c-gold));
    box-shadow: 0 0 12px rgba(110, 198, 255, 0.65);
    transition: height 120ms linear;
}

.depth-meter-marks {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-140px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 280px;
    font-family: var(--f-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    color: var(--c-cyan-soft);
    opacity: 0.6;
}

.depth-mark {
    transform: translateY(-50%);
}

.depth-meter-caption {
    font-family: var(--f-mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-cyan-bright);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin-top: 4px;
    opacity: 0.7;
}

/* ---- world ---- */
.world {
    position: relative;
    padding: 140px 0 120px;
    perspective: 2000px;
}

.world-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(60deg, rgba(27, 40, 56, 0.42) 1px, transparent 1px),
        linear-gradient(-60deg, rgba(27, 40, 56, 0.42) 1px, transparent 1px);
    background-size: 80px 138px, 80px 138px;
    background-position: 0 0, 0 0;
    transform: translate3d(0, 0, 0);
    opacity: 0.55;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 75%);
}

/* ---- pathway SVG ---- */
.path-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    overflow: visible;
}

.path-canvas .pathway {
    fill: none;
    stroke: var(--c-cyan-bright);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.55;
    filter: url(#path-glow);
    stroke-dasharray: var(--len, 1200);
    stroke-dashoffset: var(--len, 1200);
    transition: stroke-dashoffset 600ms ease, opacity 400ms ease;
}

.path-canvas .pathway.drawn {
    stroke-dashoffset: 0;
    opacity: 0.7;
}

.path-canvas .pathway-shadow {
    stroke: rgba(45, 79, 108, 0.6);
    stroke-width: 6;
    stroke-linecap: round;
    fill: none;
    opacity: 0.4;
    transform: translateY(4px);
}

/* ---- scene ---- */
.scene {
    position: relative;
    min-height: 92vh;
    padding: 90px 6vw 120px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

.scene-coord {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-cyan-bright);
    margin-bottom: 28px;
    padding-left: 4px;
    border-left: 2px solid var(--c-cyan-bright);
    padding: 4px 0 4px 14px;
    align-self: flex-start;
}

.iso-stage {
    position: relative;
    width: 100%;
    min-height: 720px;
    transform-style: preserve-3d;
}

/* scene floor: faint isometric plate */
.scene-floor {
    position: absolute;
    left: 50%;
    bottom: 40px;
    width: min(92vw, 1300px);
    height: 380px;
    transform: translateX(-50%) rotateX(60deg) rotateZ(-45deg);
    background:
        linear-gradient(0deg, rgba(110, 198, 255, 0.06), rgba(110, 198, 255, 0.02)),
        repeating-linear-gradient(0deg, rgba(168, 216, 234, 0.10) 0 1px, transparent 1px 60px),
        repeating-linear-gradient(90deg, rgba(168, 216, 234, 0.10) 0 1px, transparent 1px 60px);
    border: 1px solid rgba(110, 198, 255, 0.18);
    box-shadow: 0 60px 120px rgba(110, 198, 255, 0.06);
    z-index: 1;
    opacity: 0.65;
    pointer-events: none;
}

.scene-floor-summit {
    background:
        linear-gradient(0deg, rgba(255, 184, 0, 0.10), rgba(110, 198, 255, 0.04)),
        repeating-linear-gradient(0deg, rgba(255, 184, 0, 0.10) 0 1px, transparent 1px 60px),
        repeating-linear-gradient(90deg, rgba(255, 184, 0, 0.10) 0 1px, transparent 1px 60px);
    border-color: rgba(255, 184, 0, 0.30);
}

/* ---- iso tower (the structure) ---- */
.iso-tower {
    position: relative;
    width: min(46%, 540px);
    margin: 0 0 80px auto;
    z-index: 10;
    transform-style: preserve-3d;
    transition: transform 340ms cubic-bezier(.2,.7,.3,1), filter 340ms ease;
    will-change: transform;
}

.iso-tower:nth-child(odd) {
    margin-left: 0;
    margin-right: auto;
}

.iso-tower[style*="--tx"] {
    position: absolute;
    left: var(--tx, 10%);
    top: var(--ty, 20%);
    width: min(40%, 480px);
    margin: 0;
}

.iso-tower-hero {
    position: relative;
    width: min(70%, 760px);
    margin: 30px auto 60px;
}

.iso-tower-tall {
    width: min(38%, 460px);
}

.iso-tower-summit {
    width: min(60%, 660px);
    margin: 0 auto;
}

.iso-tower-paradox .iso-face-front {
    background:
        linear-gradient(135deg, rgba(255, 184, 0, 0.04), rgba(36, 59, 83, 0.85)),
        var(--c-steel-front);
}

.iso-base {
    position: absolute;
    left: -22px;
    right: -22px;
    bottom: -10px;
    height: 60px;
    background: linear-gradient(180deg, rgba(45, 79, 108, 0.55), rgba(13, 27, 42, 0));
    transform: rotateX(60deg) rotateZ(-45deg) translateZ(-1px);
    transform-origin: top center;
    z-index: 0;
    border: 1px solid rgba(110, 198, 255, 0.18);
    pointer-events: none;
    opacity: 0.55;
}

.iso-face {
    position: relative;
    transition: filter 300ms ease, transform 300ms ease;
}

.iso-face-side {
    position: absolute;
    top: 0;
    right: -28px;
    width: 28px;
    height: 100%;
    background: linear-gradient(180deg, var(--c-steel-side), #1f3a52);
    transform: skewY(-30deg);
    transform-origin: top left;
    border-right: 1px solid rgba(110, 198, 255, 0.20);
    z-index: 2;
}

.iso-face-side::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(180deg, rgba(168, 216, 234, 0.06) 0 1px, transparent 1px 38px);
    opacity: 0.7;
}

.iso-face-front {
    position: relative;
    background:
        linear-gradient(180deg, rgba(110, 198, 255, 0.04) 0%, transparent 60%),
        var(--c-steel-front);
    border: 1px solid rgba(110, 198, 255, 0.22);
    border-bottom: 1px solid rgba(110, 198, 255, 0.32);
    box-shadow:
        inset 0 0 0 1px rgba(13, 27, 42, 0.6),
        0 24px 60px rgba(13, 27, 42, 0.55);
    z-index: 3;
    overflow: hidden;
}

.iso-face-front::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(0deg, rgba(168, 216, 234, 0.04) 0 1px, transparent 1px 80px),
        linear-gradient(135deg, rgba(110, 198, 255, 0.05), transparent 50%);
}

.iso-face-top {
    position: absolute;
    top: -28px;
    left: 0;
    right: -28px;
    height: 28px;
    background: linear-gradient(120deg, var(--c-sky-mid), #20354a);
    transform: skewX(-60deg);
    transform-origin: bottom left;
    border-top: 1px solid rgba(110, 198, 255, 0.30);
    z-index: 4;
    overflow: hidden;
}

.iso-face-top::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, rgba(168, 216, 234, 0.10) 0 1px, transparent 1px 38px);
    opacity: 0.7;
}

.iso-top-glyph {
    position: absolute;
    right: 18px;
    top: 50%;
    width: 10px;
    height: 10px;
    transform: translateY(-50%) rotate(45deg);
    background: var(--c-cyan-bright);
    box-shadow: 0 0 10px rgba(110, 198, 255, 0.65);
}

.iso-top-glyph-gold {
    background: var(--c-gold);
    box-shadow: 0 0 14px rgba(255, 184, 0, 0.65);
}

.iso-tower:hover {
    transform: translateY(-8px);
}

.iso-tower:hover .iso-face-front {
    border-color: var(--c-cyan-bright);
    box-shadow:
        inset 0 0 0 1px rgba(110, 198, 255, 0.35),
        0 28px 80px rgba(110, 198, 255, 0.18);
}

.iso-tower:hover .iso-face-top,
.iso-tower:hover .iso-face-side {
    filter: brightness(1.18);
}

/* ---- tower content ---- */
.iso-front-content {
    position: relative;
    padding: 30px 32px 34px;
    z-index: 2;
}

.tower-label {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-cyan-bright);
    margin-bottom: 18px;
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid rgba(110, 198, 255, 0.32);
    background: rgba(110, 198, 255, 0.06);
}

.tower-title {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: clamp(28px, 3.4vw, 52px);
    line-height: 1.05;
    letter-spacing: 0.04em;
    color: var(--c-ice);
    margin-bottom: 16px;
    text-transform: lowercase;
}

.tower-subtitle {
    font-family: var(--f-display);
    font-weight: 500;
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1.15;
    letter-spacing: 0.04em;
    color: var(--c-cyan-soft);
    margin-bottom: 14px;
    text-transform: lowercase;
}

.tower-lede {
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--c-ice);
    margin-bottom: 20px;
    max-width: 56ch;
}

.tower-body {
    font-family: var(--f-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--c-body);
    margin-bottom: 14px;
    max-width: 60ch;
}

.tower-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.meta-pill {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--c-cyan-soft);
    padding: 5px 11px;
    border: 1px solid rgba(168, 216, 234, 0.28);
    background: rgba(168, 216, 234, 0.04);
    text-transform: uppercase;
}

.tower-list {
    list-style: none;
    margin: 14px 0 6px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tower-list li {
    font-family: var(--f-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--c-body);
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    align-items: baseline;
    padding-left: 0;
}

.list-marker {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--c-gold);
    border: 1px solid rgba(255, 184, 0, 0.4);
    padding: 2px 0;
    text-align: center;
    background: rgba(255, 184, 0, 0.05);
}

.tower-steps {
    list-style: none;
    counter-reset: step;
    margin: 14px 0 6px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tower-steps li {
    counter-increment: step;
    font-family: var(--f-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--c-body);
    position: relative;
    padding-left: 36px;
}

.tower-steps li::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 1px;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--c-cyan-bright);
    width: 26px;
    text-align: right;
}

.tower-code {
    font-family: var(--f-mono);
    font-size: 12px;
    line-height: 1.7;
    color: var(--c-cyan-soft);
    background: rgba(13, 27, 42, 0.7);
    border: 1px solid rgba(110, 198, 255, 0.22);
    border-left: 2px solid var(--c-cyan-bright);
    padding: 14px 16px;
    margin: 14px 0;
    white-space: pre;
    overflow-x: auto;
    letter-spacing: 0.04em;
}

.def-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.def-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 6px 0;
    border-top: 1px solid rgba(168, 216, 234, 0.10);
}

.def-term {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-cyan-bright);
}

.def-meaning {
    font-family: var(--f-body);
    font-size: 13px;
    color: var(--c-body);
    line-height: 1.55;
}

.paradox-frame {
    margin: 14px 0;
    padding: 18px 18px;
    border: 1px solid rgba(255, 184, 0, 0.35);
    background:
        linear-gradient(135deg, rgba(255, 184, 0, 0.06), rgba(36, 59, 83, 0.4));
    position: relative;
}

.paradox-frame::before {
    content: "";
    position: absolute;
    top: -6px;
    left: -6px;
    width: 14px;
    height: 14px;
    border-top: 1px solid var(--c-gold);
    border-left: 1px solid var(--c-gold);
}

.paradox-frame::after {
    content: "";
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 14px;
    height: 14px;
    border-bottom: 1px solid var(--c-gold);
    border-right: 1px solid var(--c-gold);
}

.paradox-line {
    font-family: var(--f-display);
    font-weight: 500;
    font-size: 18px;
    letter-spacing: 0.02em;
    color: var(--c-ice);
    margin-bottom: 8px;
    line-height: 1.4;
}

.paradox-attribution {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--c-gold);
    text-transform: uppercase;
}

.corpus-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.corpus-card {
    border: 1px solid rgba(110, 198, 255, 0.20);
    background: rgba(13, 27, 42, 0.55);
    padding: 12px 14px;
    transition: border-color 240ms ease, background 240ms ease;
    position: relative;
}

.corpus-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-top: 1px solid var(--c-cyan-bright);
    border-left: 1px solid var(--c-cyan-bright);
}

.corpus-card:hover {
    border-color: var(--c-cyan-bright);
    background: rgba(110, 198, 255, 0.06);
}

.corpus-card-id {
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--c-gold);
    margin-bottom: 4px;
}

.corpus-card-title {
    font-family: var(--f-display);
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.02em;
    color: var(--c-ice);
    line-height: 1.2;
    margin-bottom: 6px;
    text-transform: lowercase;
}

.corpus-card-meta {
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    color: var(--c-cyan-soft);
    text-transform: uppercase;
}

.build-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.build-row {
    display: grid;
    grid-template-columns: 64px 1fr 80px;
    gap: 12px;
    align-items: center;
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--c-body);
}

.build-id {
    color: var(--c-cyan-bright);
    letter-spacing: 0.06em;
}

.build-name {
    font-family: var(--f-body);
    font-size: 13px;
    color: var(--c-body);
}

.build-progress {
    position: relative;
    height: 6px;
    background: rgba(168, 216, 234, 0.10);
    border: 1px solid rgba(168, 216, 234, 0.18);
    overflow: hidden;
}

.build-progress span {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, var(--c-cyan-bright), var(--c-gold));
    box-shadow: 0 0 6px rgba(110, 198, 255, 0.6);
}

.summit-quote {
    margin: 16px 0 22px;
    padding: 0 0 0 18px;
    border-left: 2px solid var(--c-gold);
}

.summit-line {
    font-family: var(--f-display);
    font-weight: 500;
    font-size: 22px;
    letter-spacing: 0.04em;
    color: var(--c-cyan-soft);
    line-height: 1.35;
    text-transform: lowercase;
}

.summit-line-emphasis {
    color: var(--c-ice);
    font-weight: 700;
}

.summit-credit {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 12px;
    align-items: baseline;
    padding: 8px 0;
    border-top: 1px solid rgba(168, 216, 234, 0.10);
    font-family: var(--f-mono);
    font-size: 11px;
}

.credit-label {
    color: var(--c-cyan-bright);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.credit-value {
    color: var(--c-ice);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---- iso icons (floating cubes) ---- */
.iso-icon {
    position: absolute;
    left: var(--ix, 50%);
    top: var(--iy, 50%);
    width: 56px;
    height: 56px;
    z-index: 8;
    pointer-events: none;
    animation: iso-float 6s ease-in-out infinite;
    animation-delay: var(--idelay, 0s);
}

.cube-face {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--f-display);
    font-weight: 500;
    font-size: 18px;
    color: var(--c-ice);
}

.cube-top {
    top: -14px;
    left: 0;
    right: -14px;
    height: 14px;
    background: linear-gradient(120deg, var(--c-sky-mid), #20354a);
    transform: skewX(-60deg);
    transform-origin: bottom left;
    border-top: 1px solid var(--c-cyan-bright);
}

.cube-front {
    width: 100%;
    height: 100%;
    background: var(--c-steel-front);
    border: 1px solid rgba(110, 198, 255, 0.32);
}

.cube-side {
    top: 0;
    right: -14px;
    width: 14px;
    height: 100%;
    background: var(--c-steel-side);
    transform: skewY(-30deg);
    transform-origin: top left;
    border-right: 1px solid rgba(110, 198, 255, 0.20);
}

.cube-top-gold {
    background: linear-gradient(120deg, #5a4400, #856600);
    border-top-color: var(--c-gold);
}

.cube-front-gold {
    background: linear-gradient(180deg, #392a00, #1f1500);
    border-color: var(--c-gold);
    color: var(--c-gold);
    text-shadow: 0 0 8px rgba(255, 184, 0, 0.7);
}

@keyframes iso-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ---- nodes (golden markers) ---- */
.iso-node {
    position: absolute;
    left: var(--nx, 50%);
    top: var(--ny, 50%);
    width: 16px;
    height: 16px;
    z-index: 7;
    pointer-events: none;
    transform: rotate(45deg) skewX(-30deg);
    background: var(--c-cyan-bright);
    box-shadow: 0 0 12px rgba(110, 198, 255, 0.6);
}

.iso-node::after {
    content: "";
    position: absolute;
    inset: 3px;
    background: var(--c-sky-deep);
}

.node-pulse {
    animation: node-pulse 3s ease-in-out infinite;
}

.node-gold {
    background: var(--c-gold);
    box-shadow: 0 0 14px rgba(255, 184, 0, 0.65);
}

@keyframes node-pulse {
    0%, 100% { opacity: 0.6; transform: rotate(45deg) skewX(-30deg) scale(1); }
    50% { opacity: 1; transform: rotate(45deg) skewX(-30deg) scale(1.15); }
}

/* ---- materialization (build) animation states ---- */
.iso-tower {
    opacity: 0;
}

.iso-tower .iso-base {
    opacity: 0;
    transform: rotateX(60deg) rotateZ(-45deg) translateZ(-1px) scale(0.4);
    transform-origin: center;
    transition: opacity 400ms ease, transform 500ms ease;
}

.iso-tower .iso-face-front {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 480ms ease 200ms, transform 480ms cubic-bezier(.2,.7,.3,1) 200ms;
}

.iso-tower .iso-face-side {
    opacity: 0;
    transform: skewY(-30deg) translateX(40px);
    transition: opacity 480ms ease 240ms, transform 480ms cubic-bezier(.2,.7,.3,1) 240ms;
}

.iso-tower .iso-face-top {
    opacity: 0;
    transform: skewX(-60deg) translateY(-30px);
    transition: opacity 480ms ease 400ms, transform 480ms cubic-bezier(.2,.7,.3,1) 400ms;
}

.iso-tower.materialized {
    opacity: 1;
    transition: opacity 200ms ease;
}

.iso-tower.materialized .iso-base {
    opacity: 0.55;
    transform: rotateX(60deg) rotateZ(-45deg) translateZ(-1px) scale(1);
}

.iso-tower.materialized .iso-face-front {
    opacity: 1;
    transform: translateY(0);
}

.iso-tower.materialized .iso-face-side {
    opacity: 1;
    transform: skewY(-30deg) translateX(0);
}

.iso-tower.materialized .iso-face-top {
    opacity: 1;
    transform: skewX(-60deg) translateY(0);
}

/* ---- footer ---- */
.atlas-footer {
    position: relative;
    z-index: 6;
    padding: 60px 6vw 60px;
    border-top: 1px solid rgba(110, 198, 255, 0.16);
    background: linear-gradient(180deg, rgba(13, 27, 42, 0) 0%, rgba(13, 27, 42, 0.9) 100%);
    text-align: center;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--c-cyan-soft);
    text-transform: uppercase;
}

.footer-tag {
    color: var(--c-ice);
}

.footer-sep {
    color: var(--c-cyan-bright);
    opacity: 0.6;
}

.footer-row-meta {
    margin-top: 12px;
    font-size: 10px;
    color: var(--c-cyan-soft);
    opacity: 0.6;
    letter-spacing: 0.16em;
}

/* ---- depth fog: sections further in scroll get faint blue tint ---- */
.scene[data-depth="far"] .iso-face-front {
    box-shadow:
        inset 0 0 0 1px rgba(13, 27, 42, 0.6),
        0 24px 60px rgba(13, 27, 42, 0.6);
}

/* ---- responsive ---- */
@media (max-width: 1100px) {
    .hud-nav {
        gap: 18px;
    }
    .iso-tower-hero {
        width: 92%;
    }
    .iso-tower {
        width: 92%;
        margin: 0 auto 60px;
    }
    .iso-tower[style*="--tx"] {
        position: relative;
        left: auto;
        top: auto;
        width: 92%;
        margin: 0 auto 60px;
    }
    .iso-stage {
        min-height: auto;
    }
    .iso-icon, .iso-node {
        display: none;
    }
    .scene-floor {
        display: none;
    }
    .depth-meter {
        display: none;
    }
}

@media (max-width: 720px) {
    .hud {
        padding: 14px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .hud-nav {
        flex-wrap: wrap;
        gap: 12px;
    }
    .hud-coord {
        align-items: flex-start;
    }
    .scene {
        padding: 60px 4vw 80px;
    }
    .iso-front-content {
        padding: 22px 22px 26px;
    }
    .corpus-grid {
        grid-template-columns: 1fr;
    }
    .tower-code {
        font-size: 11px;
    }
}
