/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #0a0812;
    color: #e0d6f0;
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    line-height: 1.75;
    overflow-x: hidden;
}

/* === TYPOGRAPHY === */
.brand-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3.5rem, 10vw, 9rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    line-height: 1.1;
}

.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    margin-bottom: 1.2rem;
}

.body-text {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.75;
    font-weight: 400;
    color: #e0d6f0;
    letter-spacing: 0.01em;
    max-width: 38ch;
    margin-bottom: 1.2rem;
}

.label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 1rem;
}

.subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 500;
    color: #6a6080;
    letter-spacing: 0.04em;
    transform: rotate(-1.2deg);
    margin-top: 1.5rem;
}

/* === NEON GLOW === */
.neon-magenta {
    color: #ff00ff;
    text-shadow: 0 0 7px #ff00ff80, 0 0 20px #ff00ff40, 0 0 42px #ff00ff20, 0 0 82px #ff00ff10;
}

.neon-cyan {
    color: #00ffff;
    text-shadow: 0 0 7px #00ffff80, 0 0 20px #00ffff40, 0 0 42px #00ffff20, 0 0 82px #00ffff10;
}

/* === SECTIONS === */
.section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Engraving hatching background on alternating sections */
#frame-a, #frame-c {
    background: #12101e;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 3px, #d4a85308 3px, #d4a85308 4px);
}

/* === 12-COLUMN GRID === */
.grid-12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    z-index: 2;
}

/* === ORNAMENTAL FRAMES === */
.ornamental-frame-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ornamental-frame {
    width: 100%;
    max-width: 600px;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ornamental-frame-wrap .brand-title {
    position: relative;
    z-index: 2;
    padding: 2.5rem 1rem;
    text-align: center;
}

/* SVG frame draw animation */
.frame-victorian, .frame-circuit {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2.4s ease-in-out;
}

.frame-circuit {
    transition-delay: 0.8s;
}

.frame-drawn .frame-victorian,
.frame-drawn .frame-circuit {
    stroke-dashoffset: 0;
}

/* Side ornaments */
.side-ornament {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* === NEON PULSE LINES === */
.neon-pulse-line {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.pulse-v {
    width: 1px;
    height: 100%;
    top: 0;
    background: #ff00ff;
    box-shadow: 0 0 6px #ff00ff80, 0 0 18px #ff00ff40;
    animation: pulseOpacity 2.5s ease-in-out infinite;
}

.pulse-h {
    height: 1px;
    background: #ff00ff;
    box-shadow: 0 0 6px #ff00ff80, 0 0 18px #ff00ff40;
    animation: pulseOpacity 2.5s ease-in-out infinite;
}

@keyframes pulseOpacity {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* === PROGRESSIVE DISCLOSURE === */
.reveal-group > * {
    opacity: 0;
    transform: translateY(24px);
}

.reveal-group > .revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* === CIRCUIT BACKGROUND === */
#circuit-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* === ENTANGLEMENT === */
#entanglement .grid-12 {
    position: relative;
}

.entangle-col {
    position: relative;
    transition: opacity 0.4s ease;
    padding: 2rem;
}

.entangle-cyan {
    opacity: 0.6;
    z-index: 2;
}

.entangle-magenta {
    opacity: 0.6;
    mix-blend-mode: screen;
    transform: rotate(-3deg);
    z-index: 3;
    margin-top: -4rem;
}

.entangle-col.active,
.entangle-col:hover {
    opacity: 1;
}

.entangle-col.dimmed {
    opacity: 0.15;
}

/* === CONSTELLATION === */
.constellation {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 150px;
    z-index: 1;
    pointer-events: none;
}

.constellation svg {
    width: 100%;
    height: 100%;
}

/* === OBSERVATION DECK === */
#observation {
    flex-direction: column;
    justify-content: center;
}

.observation-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.final-frame .ornamental-frame {
    max-width: 700px;
}

.closing-message {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    font-weight: 500;
    color: #6a6080;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    margin-top: 1rem;
}

/* Data field - drifting points */
.data-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.data-node {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c8ff00;
    box-shadow: 0 0 4px #c8ff0080;
}

.data-line {
    position: absolute;
    height: 1px;
    background: #c8ff0030;
    transform-origin: left center;
}

/* === ORRERY SECTION === */
#orrery .grid-12 {
    align-items: center;
    min-height: 100vh;
}

.orrery-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .grid-12 {
        grid-template-columns: 1fr;
    }

    .grid-12 > * {
        grid-column: 1 / -1 !important;
    }

    #frame-a .frame-content { padding-left: 2rem; padding-right: 8vw; }
    #frame-b .frame-content { padding-left: 8vw; padding-right: 2rem; }
    #frame-c .frame-content:first-child { padding-left: 2rem; padding-right: 8vw; }
    #frame-c .frame-content:last-child { padding-left: 8vw; padding-right: 2rem; }

    .ornamental-side { display: none; }

    .entangle-magenta {
        margin-top: 0;
        transform: rotate(0deg);
    }

    .brand-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .neon-pulse-line { display: none; }
}
