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

:root {
    --bg-deep: #0a0a0f;
    --bg-panel: #16161e;
    --text-primary: #d4cfc7;
    --text-muted: #8a847a;
    --gold: #d4af37;
    --marble-warm: #c9b896;
    --marble-light: #e8e4dd;
    --accent-pink: #ff2d6b;
    --accent-cyan: #00e5ff;
    --font-display: 'Rajdhani', sans-serif;
    --font-body: 'Cormorant Garamond', serif;
    --font-mono: 'Space Mono', monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    cursor: none;
}

/* === HUD OVERLAY === */
.hud-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
}

.hud-border {
    position: absolute;
    background: rgba(212, 175, 55, 0.3);
}

.hud-border--top,
.hud-border--bottom {
    height: 2px;
    left: 40px;
    right: 40px;
}

.hud-border--top { top: 20px; }
.hud-border--bottom { bottom: 20px; }

.hud-border--left,
.hud-border--right {
    width: 2px;
    top: 40px;
    bottom: 40px;
}

.hud-border--left { left: 20px; }
.hud-border--right { right: 20px; }

.hud-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: var(--gold);
    border-style: solid;
    border-width: 0;
}

.hud-corner--tl { top: 15px; left: 15px; border-top-width: 2px; border-left-width: 2px; }
.hud-corner--tr { top: 15px; right: 15px; border-top-width: 2px; border-right-width: 2px; }
.hud-corner--bl { bottom: 15px; left: 15px; border-bottom-width: 2px; border-left-width: 2px; }
.hud-corner--br { bottom: 15px; right: 15px; border-bottom-width: 2px; border-right-width: 2px; }

.hud-telemetry {
    position: fixed;
    bottom: 30px;
    left: 30px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--gold);
    opacity: 0.6;
    display: flex;
    gap: 20px;
    z-index: 1001;
}

/* === CURSOR === */
.cursor-follower {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, border-color 0.2s;
    mix-blend-mode: difference;
}

.cursor-follower.active {
    width: 40px;
    height: 40px;
    border-color: var(--accent-cyan);
}

/* === CHAMBERS === */
.chamber {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.chamber__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px 40px;
    max-width: 900px;
}

/* === MARBLE BACKGROUND === */
.marble-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201, 184, 150, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(232, 228, 221, 0.04) 0%, transparent 40%),
        radial-gradient(ellipse at 60% 80%, rgba(201, 184, 150, 0.05) 0%, transparent 45%),
        radial-gradient(ellipse at 40% 30%, rgba(232, 228, 221, 0.03) 0%, transparent 55%),
        conic-gradient(from 45deg at 30% 60%, rgba(201, 184, 150, 0.04) 0%, transparent 15%),
        conic-gradient(from 200deg at 70% 40%, rgba(232, 228, 221, 0.03) 0%, transparent 10%);
    background-size: 200% 150%, 180% 220%, 160% 180%, 220% 200%, 150% 170%, 190% 210%;
    opacity: 1;
}

.marble-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(212, 175, 55, 0.02) 2px,
        rgba(212, 175, 55, 0.02) 4px
    );
}

/* === TYPOGRAPHY === */
.glitch-text {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 6rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-primary);
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch-text::before {
    color: var(--accent-cyan);
    animation: glitch-1 3s infinite;
}

.glitch-text::after {
    color: var(--accent-pink);
    animation: glitch-2 3s infinite;
}

@keyframes glitch-1 {
    0%, 90%, 100% { opacity: 0; transform: translate(0); }
    91% { opacity: 0.8; transform: translate(-2px, 1px); clip-path: inset(20% 0 60% 0); }
    93% { opacity: 0; }
    95% { opacity: 0.6; transform: translate(1px, -1px); clip-path: inset(50% 0 20% 0); }
    97% { opacity: 0; }
}

@keyframes glitch-2 {
    0%, 88%, 100% { opacity: 0; transform: translate(0); }
    89% { opacity: 0.7; transform: translate(2px, -1px); clip-path: inset(40% 0 30% 0); }
    92% { opacity: 0; }
    94% { opacity: 0.5; transform: translate(-1px, 2px); clip-path: inset(10% 0 70% 0); }
    96% { opacity: 0; }
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    margin-top: 20px;
}

.section-marker {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--gold);
    opacity: 0.5;
    margin-bottom: 30px;
    letter-spacing: 0.2em;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.1;
    color: var(--text-primary);
}

.gold-accent {
    color: var(--gold);
}

.body-text {
    font-family: var(--font-body);
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-top: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* === SCROLL INDICATOR === */
.scroll-indicator {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.scroll-indicator__text {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: var(--gold);
    opacity: 0.6;
}

.scroll-indicator__line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--gold), transparent);
    animation: pulse-line 2s infinite;
}

@keyframes pulse-line {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* === GLITCH STRIP === */
.glitch-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-pink) 20%, var(--accent-cyan) 50%, var(--gold) 80%, transparent 100%);
    opacity: 0.6;
}

/* === COLUMN GRID === */
.column-grid {
    display: flex;
    gap: 60px;
    margin-top: 50px;
    justify-content: center;
}

.column-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.column-icon {
    width: 2px;
    height: 80px;
    background: linear-gradient(to bottom, var(--gold), transparent);
    position: relative;
}

.column-icon::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -3px;
    width: 8px;
    height: 8px;
    border: 1px solid var(--gold);
    transform: rotate(45deg);
}

.column-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

/* === SIGNAL VISUALIZER === */
.signal-visualizer {
    margin: 40px auto;
    width: 100%;
    max-width: 600px;
    height: 120px;
}

#signal-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* === MANIFESTO === */
.manifesto-quote {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quote-line {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-style: italic;
    color: var(--marble-light);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.quote-line.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === TERMINAL === */
.terminal-block {
    margin-top: 40px;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    padding: 30px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(22, 22, 30, 0.8);
}

.terminal-line {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.6;
}

.terminal-prompt {
    color: var(--accent-cyan);
}

.terminal-line--blink .terminal-prompt {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* === END === */
.chamber--end {
    min-height: 60vh;
}

.end-coord {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 20px;
    letter-spacing: 0.15em;
}

/* === REVEAL ANIMATIONS === */
.chamber__content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.chamber.visible .chamber__content {
    opacity: 1;
    transform: translateY(0);
}

/* === SCAN LINES === */
.chamber--signal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 229, 255, 0.015) 2px,
        rgba(0, 229, 255, 0.015) 4px
    );
    pointer-events: none;
    z-index: 1;
}
