/* ===========================================================
   xanadu.wiki — The Pleasure Dome of Knowledge
   Honeyed dopamine aesthetic, masonry chambers,
   elastic spring physics, 3D atrium hero.
   =========================================================== */

:root {
    /* Palette (from DESIGN.md) */
    --honeyed-gold: #c9a227;
    --warm-cream: #faf3e0;
    --deep-amber: #8b6914;
    --soft-charcoal: #2d2a26;
    --blush-coral: #e8a87c;
    --muted-sage: #a8b89c;
    --rich-burgundy: #6b2737;
    --pale-honey: #f0d878;

    /* Spring easings */
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --spring-slow: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    /* Type */
    --font-display: "Playfair Display", Georgia, serif;
    --font-body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "Fira Code", "SF Mono", Menlo, monospace;

    /* Misc */
    --radius: 1rem;
    --radius-sm: 0.5rem;
    --shadow-warm: 0 18px 48px -22px rgba(139, 105, 20, 0.45),
                   0 4px 12px -4px rgba(45, 42, 38, 0.18);
    --shadow-warm-strong: 0 28px 64px -18px rgba(139, 105, 20, 0.55),
                          0 8px 18px -6px rgba(45, 42, 38, 0.22);
}

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

html, body {
    background: var(--warm-cream);
    color: var(--soft-charcoal);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

body {
    background:
        radial-gradient(ellipse 60% 40% at 20% 10%, rgba(240, 216, 120, 0.35), transparent 60%),
        radial-gradient(ellipse 50% 50% at 90% 30%, rgba(232, 168, 124, 0.25), transparent 60%),
        radial-gradient(ellipse 70% 50% at 50% 100%, rgba(201, 162, 39, 0.18), transparent 70%),
        var(--warm-cream);
    min-height: 100vh;
}

::selection { background: var(--honeyed-gold); color: var(--warm-cream); }

/* ---------- Particle canvas + circuit svg layers ---------- */
.particle-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: screen;
}

.circuit-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

.circuit-svg path {
    fill: none;
    stroke: var(--honeyed-gold);
    stroke-width: 1;
    opacity: 0.35;
    stroke-dasharray: 4 6;
    animation: circuit-flow 12s linear infinite;
    filter: drop-shadow(0 0 4px var(--honeyed-gold));
}

.circuit-svg circle.trace-dot {
    fill: var(--pale-honey);
    filter: drop-shadow(0 0 6px var(--honeyed-gold));
    opacity: 0.85;
}

@keyframes circuit-flow {
    to { stroke-dashoffset: -200; }
}

/* ---------- The Grand Atrium (Hero) ---------- */
.grand-atrium {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem 6rem;
    overflow: hidden;
    isolation: isolate;
}

.grand-atrium::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at top, rgba(240, 216, 120, 0.5), transparent 65%),
        radial-gradient(circle at 20% 80%, rgba(232, 168, 124, 0.4), transparent 50%);
    z-index: -2;
}

.grand-atrium::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(201, 162, 39, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 162, 39, 0.06) 1px, transparent 1px);
    background-size: 64px 64px;
    z-index: -1;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* Hero 3D shapes */
.hero-shapes {
    position: absolute;
    inset: 0;
    perspective: 1200px;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    transform-style: preserve-3d;
    will-change: transform;
}

.face {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(201, 162, 39, 0.5);
    backdrop-filter: blur(2px);
}

/* Cube */
.shape-cube {
    --size: 180px;
    width: var(--size);
    height: var(--size);
    top: 18%;
    left: 8%;
    animation: rotate-cube 26s linear infinite, float-cube 8s var(--spring) infinite;
}

.shape-cube .face {
    width: var(--size);
    height: var(--size);
    background: linear-gradient(135deg, rgba(240, 216, 120, 0.35), rgba(201, 162, 39, 0.18));
}
.shape-cube .face-front  { transform: translateZ(calc(var(--size) / 2)); }
.shape-cube .face-back   { transform: rotateY(180deg) translateZ(calc(var(--size) / 2)); }
.shape-cube .face-right  { transform: rotateY(90deg)  translateZ(calc(var(--size) / 2)); }
.shape-cube .face-left   { transform: rotateY(-90deg) translateZ(calc(var(--size) / 2)); }
.shape-cube .face-top    { transform: rotateX(90deg)  translateZ(calc(var(--size) / 2)); }
.shape-cube .face-bottom { transform: rotateX(-90deg) translateZ(calc(var(--size) / 2)); }

@keyframes rotate-cube {
    from { transform: rotateX(0) rotateY(0) rotateZ(0); }
    to   { transform: rotateX(360deg) rotateY(360deg) rotateZ(120deg); }
}
@keyframes float-cube {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -22px; }
}

/* Octahedron (8 triangular faces approximated with rotated divs) */
.shape-octa {
    --size: 160px;
    width: var(--size);
    height: var(--size);
    top: 60%;
    right: 9%;
    animation: rotate-octa 22s linear infinite, float-octa 9s var(--spring) infinite;
}
.octa-face {
    width: 0;
    height: 0;
    left: 50%;
    top: 50%;
    border-left: calc(var(--size) / 2) solid transparent;
    border-right: calc(var(--size) / 2) solid transparent;
    border-bottom: calc(var(--size) / 2) solid rgba(232, 168, 124, 0.4);
    background: transparent !important;
    transform-origin: 50% 100%;
}
.octa-1 { transform: translate(-50%, -100%) rotateY(0deg)   rotateX(35deg); }
.octa-2 { transform: translate(-50%, -100%) rotateY(90deg)  rotateX(35deg); }
.octa-3 { transform: translate(-50%, -100%) rotateY(180deg) rotateX(35deg); }
.octa-4 { transform: translate(-50%, -100%) rotateY(270deg) rotateX(35deg); }
.octa-5 { transform: translate(-50%, 0%)    rotateY(0deg)   rotateX(-35deg); }
.octa-6 { transform: translate(-50%, 0%)    rotateY(90deg)  rotateX(-35deg); }
.octa-7 { transform: translate(-50%, 0%)    rotateY(180deg) rotateX(-35deg); }
.octa-8 { transform: translate(-50%, 0%)    rotateY(270deg) rotateX(-35deg); }

@keyframes rotate-octa {
    from { transform: rotateX(0) rotateY(0); }
    to   { transform: rotateX(-360deg) rotateY(360deg); }
}
@keyframes float-octa {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 30px; }
}

/* Tetrahedron */
.shape-tetra {
    --size: 130px;
    width: var(--size);
    height: var(--size);
    top: 12%;
    right: 18%;
    animation: rotate-tetra 18s linear infinite, float-tetra 7s var(--spring) infinite;
}
.tetra-face {
    width: 0;
    height: 0;
    left: 50%;
    top: 50%;
    border-left: calc(var(--size) / 2) solid transparent;
    border-right: calc(var(--size) / 2) solid transparent;
    border-bottom: var(--size) solid rgba(201, 162, 39, 0.32);
    transform-origin: 50% 100%;
    background: transparent !important;
}
.tetra-1 { transform: translate(-50%, -100%) rotateY(0deg); }
.tetra-2 { transform: translate(-50%, -100%) rotateY(120deg); }
.tetra-3 { transform: translate(-50%, -100%) rotateY(240deg); }
.tetra-4 { transform: translate(-50%, -100%) rotateX(180deg); }

@keyframes rotate-tetra {
    from { transform: rotateY(0) rotateX(0); }
    to   { transform: rotateY(360deg) rotateX(180deg); }
}
@keyframes float-tetra {
    0%, 100% { translate: 0 0; }
    50% { translate: 14px -18px; }
}

/* Atrium content */
.atrium-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1100px;
    width: 100%;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--deep-amber);
    margin-bottom: 1.5rem;
    padding: 0.45rem 1rem;
    border: 1px solid rgba(139, 105, 20, 0.3);
    border-radius: 99px;
    background: rgba(250, 243, 224, 0.7);
    backdrop-filter: blur(4px);
}
.kicker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--honeyed-gold);
    box-shadow: 0 0 12px var(--honeyed-gold);
    animation: pulse-dot 2.4s var(--spring) infinite;
}
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
}

.hero-title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 900;
    font-size: clamp(2.8rem, 11vw, 9rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin: 0 0 1.5rem;
    background: linear-gradient(135deg, #c9a227 0%, #f0d878 35%, #e8a87c 65%, #c9a227 100%);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: shimmer 8s ease-in-out infinite;
    text-shadow: 0 0 60px rgba(201, 162, 39, 0.25);
}
.title-dot {
    display: inline-block;
    color: var(--rich-burgundy);
    -webkit-text-fill-color: var(--rich-burgundy);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    transform-origin: center;
    animation: dot-bounce 2.6s var(--spring) infinite;
}
.title-word {
    display: inline-block;
}
@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes dot-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.15); }
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 1.8vw, 1.4rem);
    color: var(--soft-charcoal);
    max-width: 640px;
    margin: 0 auto 2rem;
    opacity: 0.85;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--deep-amber);
}
.meta-divider {
    color: var(--honeyed-gold);
    opacity: 0.6;
}

.atrium-button {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.1rem 2.4rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--warm-cream);
    background: linear-gradient(135deg, var(--rich-burgundy), #8b3a44);
    border-radius: 99px;
    box-shadow:
        0 10px 30px -10px var(--rich-burgundy),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.6s var(--spring), box-shadow 0.6s var(--spring);
    position: relative;
    overflow: hidden;
}
.atrium-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--honeyed-gold), var(--blush-coral));
    opacity: 0;
    transition: opacity 0.5s var(--ease-out);
    z-index: 0;
}
.atrium-button > * {
    position: relative;
    z-index: 1;
}
.atrium-button:hover {
    transform: translateY(-4px) scale(1.06);
    box-shadow:
        0 18px 42px -10px var(--rich-burgundy),
        0 0 24px rgba(232, 168, 124, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.atrium-button:hover::before { opacity: 1; }
.atrium-button:active {
    transform: translateY(-1px) scale(1.02);
}
.button-arrow {
    display: inline-block;
    transition: transform 0.6s var(--spring);
}
.atrium-button:hover .button-arrow {
    transform: translateY(4px);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
}
.scroll-line {
    width: 1px;
    height: 56px;
    background: linear-gradient(to bottom, transparent, var(--deep-amber));
}
.scroll-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--honeyed-gold);
    box-shadow: 0 0 12px var(--honeyed-gold);
    animation: scroll-bounce 2.4s var(--spring) infinite;
}
@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(10px); opacity: 1; }
}

/* ---------- The Knowledge Cascade (Masonry) ---------- */
.knowledge-cascade {
    position: relative;
    padding: 6rem 2rem 8rem;
    max-width: 1400px;
    margin: 0 auto;
    z-index: 2;
}

.cascade-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 3;
}

.section-eyebrow {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.78rem;
    color: var(--deep-amber);
    margin-bottom: 0.8rem;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: var(--soft-charcoal);
    line-height: 1.05;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--soft-charcoal) 0%, var(--deep-amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.section-lede {
    font-size: 1.1rem;
    color: var(--soft-charcoal);
    opacity: 0.78;
    max-width: 520px;
    margin: 0 auto;
}

.masonry {
    column-count: 3;
    column-gap: 1.6rem;
    position: relative;
    z-index: 2;
}

@supports (grid-template-rows: masonry) {
    .masonry {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: masonry;
        gap: 1.6rem;
        column-count: unset;
    }
}

.card {
    position: relative;
    display: block;
    break-inside: avoid;
    page-break-inside: avoid;
    background: rgba(250, 243, 224, 0.85);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    padding: 1.8rem 1.6rem;
    margin-bottom: 1.6rem;
    box-shadow: var(--shadow-warm);
    border: 1px solid rgba(201, 162, 39, 0.18);
    overflow: hidden;
    /* Pre-reveal state */
    opacity: 0;
    transform: scale(0.85) translateY(40px);
    transition:
        opacity 0.7s var(--spring),
        transform 0.7s var(--spring),
        box-shadow 0.6s var(--spring),
        border-color 0.4s var(--ease-out);
}

@supports (grid-template-rows: masonry) {
    .card { margin-bottom: 0; }
}

.card.is-revealed {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.card.is-active {
    transform: scale(1.02) translateY(-4px);
    box-shadow: var(--shadow-warm-strong);
    border-color: rgba(201, 162, 39, 0.45);
}

.card:hover {
    transform: translateY(-6px) scale(1.025);
    box-shadow: var(--shadow-warm-strong);
    border-color: var(--honeyed-gold);
}

.card-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent, var(--honeyed-gold));
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: 0 0 12px var(--accent, var(--honeyed-gold));
}

.card-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--deep-amber);
    background: rgba(201, 162, 39, 0.12);
    padding: 0.25rem 0.7rem;
    border-radius: 99px;
    margin-bottom: 0.9rem;
    margin-top: 0.4rem;
    border: 1px solid rgba(201, 162, 39, 0.28);
}

.card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--soft-charcoal);
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

.card-meta {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--deep-amber);
    margin-bottom: 0.9rem;
    opacity: 0.8;
}
.card-meta code {
    background: rgba(201, 162, 39, 0.12);
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
}

.card-body {
    font-size: 0.95rem;
    color: var(--soft-charcoal);
    margin-bottom: 0.9rem;
    opacity: 0.88;
}

.card-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.9rem;
}
.card-list li {
    font-size: 0.9rem;
    padding: 0.35rem 0 0.35rem 1.2rem;
    border-bottom: 1px dashed rgba(139, 105, 20, 0.22);
    position: relative;
}
.card-list li:last-child { border-bottom: none; }
.card-list li::before {
    content: "\25C6";
    position: absolute;
    left: 0;
    top: 0.35rem;
    color: var(--honeyed-gold);
    font-size: 0.75rem;
}

.card-quote {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--deep-amber);
    border-left: 3px solid var(--honeyed-gold);
    padding: 0.6rem 0 0.6rem 1rem;
    margin: 0.9rem 0;
    background: linear-gradient(90deg, rgba(240, 216, 120, 0.18), transparent);
}

.card-stats {
    display: flex;
    gap: 1.2rem;
    margin: 1rem 0 0;
    flex-wrap: wrap;
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}
.stat strong {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--deep-amber);
    line-height: 1;
}
.stat span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--soft-charcoal);
    opacity: 0.7;
}

.card-pill-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
}
.pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.3rem 0.8rem;
    border-radius: 99px;
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.3), rgba(240, 216, 120, 0.3));
    color: var(--deep-amber);
    border: 1px solid rgba(201, 162, 39, 0.3);
    transition: transform 0.6s var(--spring), background 0.5s var(--ease-out);
}
.pill:hover {
    transform: scale(1.12) translateY(-2px);
    background: linear-gradient(135deg, var(--honeyed-gold), var(--pale-honey));
    color: var(--soft-charcoal);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(139, 105, 20, 0.18);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--deep-amber);
}
.card-spark {
    color: var(--honeyed-gold);
    font-size: 1.1rem;
    transition: transform 0.6s var(--spring), color 0.4s var(--ease-out);
}
.card:hover .card-spark {
    transform: rotate(180deg) scale(1.3);
    color: var(--blush-coral);
}

/* Card size variations help break the masonry rhythm */
.card-tall { min-height: 360px; }
.card-medium { min-height: 240px; }
.card-small { min-height: 160px; }
.card-wide { min-height: 200px; }

/* ---------- Confetti drift layer ---------- */
.confetti-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}
.confetti {
    position: absolute;
    top: -20px;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    opacity: 0;
    animation: confetti-drift linear forwards;
}
@keyframes confetti-drift {
    0% { opacity: 0; transform: translate3d(0, -20px, 0) rotate(0deg); }
    10% { opacity: 0.85; }
    100% { opacity: 0; transform: translate3d(var(--dx, 60px), 110vh, 0) rotate(720deg); }
}

/* ---------- Footer Dome ---------- */
.footer-dome {
    position: relative;
    background: linear-gradient(180deg, var(--rich-burgundy) 0%, #4a1a26 100%);
    color: var(--warm-cream);
    padding: 9rem 2rem 4rem;
    margin-top: 4rem;
    clip-path: ellipse(120% 100% at 50% 100%);
    overflow: hidden;
    isolation: isolate;
}
.footer-dome::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(240, 216, 120, 0.15), transparent 40%),
        radial-gradient(circle at 80% 60%, rgba(232, 168, 124, 0.18), transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(201, 162, 39, 0.25), transparent 60%);
    z-index: -1;
}
.footer-dome::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(240, 216, 120, 0.08) 1px, transparent 1.5px);
    background-size: 20px 20px;
    opacity: 0.5;
    z-index: -1;
}

.dome-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.dome-eyebrow {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.78rem;
    color: var(--pale-honey);
    margin-bottom: 0.8rem;
    opacity: 0.85;
}

.dome-title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 3.6rem);
    color: var(--pale-honey);
    margin-bottom: 4rem;
    background: linear-gradient(135deg, var(--pale-honey), var(--blush-coral), var(--pale-honey));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: shimmer 7s ease-in-out infinite;
}

/* Radial nav */
.radial-nav {
    position: relative;
    width: min(440px, 80vw);
    height: min(440px, 80vw);
    margin: 0 auto 4rem;
    border-radius: 50%;
    border: 1px dashed rgba(240, 216, 120, 0.3);
    background: radial-gradient(circle, rgba(240, 216, 120, 0.05) 30%, transparent 70%);
}
.radial-nav::before {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    border: 1px dashed rgba(232, 168, 124, 0.25);
}

.radial-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--honeyed-gold), var(--deep-amber));
    box-shadow:
        0 0 32px rgba(240, 216, 120, 0.6),
        inset 0 2px 8px rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--rich-burgundy);
    animation: center-pulse 4s var(--spring) infinite;
}
@keyframes center-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.07); }
}
.radial-glyph {
    font-size: 1.4rem;
    line-height: 1;
}
.radial-label {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 900;
    font-size: 0.95rem;
    margin-top: 0.2rem;
}

.radial-link {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--pale-honey);
    padding: 0.55rem 1.1rem;
    border-radius: 99px;
    background: rgba(45, 42, 38, 0.55);
    border: 1px solid rgba(240, 216, 120, 0.3);
    transition: transform 0.6s var(--spring), background 0.4s var(--ease-out), color 0.4s var(--ease-out);
    white-space: nowrap;
    backdrop-filter: blur(4px);
}
.radial-link:hover {
    color: var(--rich-burgundy);
    background: var(--pale-honey);
    /* Note: actual radial position set by JS; hover scale combined inline */
}

.dome-credits {
    font-family: var(--font-body);
    color: rgba(250, 243, 224, 0.7);
    margin-top: 1rem;
    font-size: 0.9rem;
}
.dome-credits code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    opacity: 0.7;
    letter-spacing: 0.05em;
}
.dome-credits p { margin: 0.4rem 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .masonry {
        column-count: 2;
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .shape-cube { --size: 130px; left: 4%; top: 14%; }
    .shape-octa { --size: 110px; right: 5%; }
    .shape-tetra { --size: 90px; right: 12%; top: 8%; }
}

@media (max-width: 640px) {
    .masonry {
        column-count: 1;
        grid-template-columns: 1fr !important;
    }
    .grand-atrium { padding: 3rem 1.2rem 5rem; }
    .knowledge-cascade { padding: 4rem 1.2rem 6rem; }
    .footer-dome { padding: 7rem 1.2rem 3rem; clip-path: ellipse(150% 100% at 50% 100%); }
    .shape-cube { --size: 100px; }
    .shape-octa { --size: 80px; top: 65%; }
    .shape-tetra { --size: 70px; }
    .hero-title { font-size: clamp(2.4rem, 16vw, 4.5rem); }
    .card { padding: 1.4rem 1.2rem; }
    .radial-nav { width: min(320px, 90vw); height: min(320px, 90vw); }
    .radial-link { font-size: 0.85rem; padding: 0.4rem 0.8rem; }
    .radial-center { width: 78px; height: 78px; }
}
