/* ==============================================
   simidiot.com - Y2K-Futurism Idiot Laboratory
   Dopamine Neon Palette | Sci-fi HUD Motifs
   ============================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0A0A18;
    color: #FFFFFF;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
    overflow-x: hidden;
}

/* --- Scan Lines Overlay (global) --- */
.scan-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 2px,
        rgba(0, 255, 200, 0.03) 2px,
        rgba(0, 255, 200, 0.03) 4px
    );
}

/* --- HUD Corner Brackets --- */
.hud-bracket {
    position: absolute;
    width: 30px;
    height: 30px;
    z-index: 10;
}

.hud-bracket-tl {
    top: 20px;
    left: 20px;
    border-top: 2px solid rgba(0, 255, 200, 0.4);
    border-left: 2px solid rgba(0, 255, 200, 0.4);
}

.hud-bracket-tr {
    top: 20px;
    right: 20px;
    border-top: 2px solid rgba(0, 255, 200, 0.4);
    border-right: 2px solid rgba(0, 255, 200, 0.4);
}

.hud-bracket-bl {
    bottom: 20px;
    left: 20px;
    border-bottom: 2px solid rgba(0, 255, 200, 0.4);
    border-left: 2px solid rgba(0, 255, 200, 0.4);
}

.hud-bracket-br {
    bottom: 20px;
    right: 20px;
    border-bottom: 2px solid rgba(0, 255, 200, 0.4);
    border-right: 2px solid rgba(0, 255, 200, 0.4);
}

/* --- Targeting Reticle --- */
.targeting-reticle {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 1px dashed rgba(0, 255, 200, 0.25);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
    animation: reticle-spin 20s linear infinite;
}

.targeting-reticle-sm {
    width: 30px;
    height: 30px;
    border-color: rgba(255, 45, 138, 0.2);
    animation-direction: reverse;
    animation-duration: 15s;
}

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

/* ==============================
   HERO SECTION
   ============================== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: grid;
    place-items: center;
    background-color: #0A0A18;
    overflow: hidden;
}

.hero-brain-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    max-width: 600px;
    height: auto;
    opacity: 0.2;
    z-index: 1;
}

/* Hot magenta accent lines */
.magenta-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #FF2D8A, transparent);
    z-index: 3;
    opacity: 0.6;
}

.magenta-line-top {
    top: 15%;
}

.magenta-line-bottom {
    bottom: 15%;
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(4rem, 10vw, 7rem);
    color: #FFFFFF;
    text-shadow:
        0 0 30px rgba(0, 255, 200, 0.3),
        0 0 60px rgba(0, 255, 200, 0.1);
    letter-spacing: 0.02em;
    margin-bottom: 0.3em;
    line-height: 1.1;
}

.hero-subtitle {
    font-family: 'Lato', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 2.5rem;
}

/* --- Counters --- */
.counters {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.counter-item {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.75rem, 1.5vw, 0.95rem);
    color: #00FFC8;
    display: flex;
    align-items: center;
    gap: 0.4em;
}

.counter-bracket {
    color: rgba(0, 255, 200, 0.5);
    font-weight: 700;
}

.counter-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8em;
}

.counter-value {
    color: #00FFC8;
    min-width: 5ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.counter-value-magenta {
    color: #FF2D8A;
}

.counter-value-yellow {
    color: #FFE02D;
}

/* ==============================
   SECTION 2: RESTRAINED
   ============================== */
.section-restrained {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.hud-frame {
    position: relative;
    border: 1px solid rgba(0, 255, 200, 0.15);
    padding: 3rem 2.5rem;
}

.hud-frame .hud-bracket {
    width: 20px;
    height: 20px;
}

.hud-frame .hud-bracket-tl { top: -1px; left: -1px; }
.hud-frame .hud-bracket-tr { top: -1px; right: -1px; }
.hud-frame .hud-bracket-bl { bottom: -1px; left: -1px; }
.hud-frame .hud-bracket-br { bottom: -1px; right: -1px; }

.neural-network-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto 2rem;
    opacity: 0.7;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: #FFFFFF;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(0, 255, 200, 0.15);
}

.section-body {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.2rem;
}

/* Simulation progress bar */
.sim-progress {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
}

.sim-progress-label {
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.sim-progress-bar {
    flex: 1;
    height: 4px;
    background-color: #1A1A30;
    border: 1px solid rgba(0, 255, 200, 0.2);
    overflow: hidden;
}

.sim-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00FFC8, #2D5AFF);
    transition: width 0.1s linear;
}

.sim-progress-pct {
    color: #00FFC8;
    min-width: 3ch;
    text-align: right;
}

/* ==============================
   SECTION 3: WIDE ILLUSTRATION
   ============================== */
.section-wide {
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
}

.idiot-cap-svg {
    display: block;
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 0 auto 3rem;
}

/* Pulse dots on the SVG base */
.pulse-dot {
    animation: neon-pulse 3s ease-in-out infinite;
}

.pulse-dot-delay1 {
    animation-delay: 1s;
}

.pulse-dot-delay2 {
    animation-delay: 2s;
}

@keyframes neon-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.section-restrained-inner {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* More prominent scan lines for section 3 */
.section-wide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 2px,
        rgba(0, 255, 200, 0.04) 2px,
        rgba(0, 255, 200, 0.04) 4px
    );
    z-index: 2;
}

/* ==============================
   SECTION 4: CLOSING
   ============================== */
.section-closing {
    position: relative;
    padding: 6rem 2rem;
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.hud-frame-closing {
    padding: 4rem 2.5rem;
}

.closing-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 2rem;
    color: #FFFFFF;
    text-shadow:
        0 0 30px rgba(0, 255, 200, 0.3),
        0 0 60px rgba(0, 255, 200, 0.1);
    margin-bottom: 0.5em;
}

.closing-tagline {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    margin-bottom: 2.5rem;
}

.counters-final {
    justify-content: center;
}

/* Electric yellow flash */
.yellow-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255, 224, 45, 0.08) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.yellow-flash.flash-active {
    opacity: 1;
    animation: yellow-flash-anim 2s ease-out forwards;
}

@keyframes yellow-flash-anim {
    0% { opacity: 0; }
    10% { opacity: 1; }
    100% { opacity: 0; }
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
    .counters {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .hud-frame {
        padding: 2rem 1.5rem;
    }

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

    .sim-progress {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .sim-progress-bar {
        width: 100%;
    }

    .hud-bracket {
        width: 20px;
        height: 20px;
    }

    .section-restrained {
        padding: 4rem 1.5rem;
    }

    .section-closing {
        padding: 4rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-subtitle {
        letter-spacing: 0.15em;
        font-size: 0.8rem;
    }

    .counter-item {
        font-size: 0.7rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* ==============================
   COUNTER ANIMATIONS (CSS-driven)
   ============================== */

/* Keyframe animation for counter tick effect */
@keyframes counter-tick {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.counter-value {
    animation: counter-tick 0.5s steps(1) infinite;
}

/* HUD element glow animation */
@keyframes hud-glow {
    0%, 100% { border-color: rgba(0, 255, 200, 0.15); }
    50% { border-color: rgba(0, 255, 200, 0.25); }
}

.hud-frame {
    animation: hud-glow 4s ease-in-out infinite;
}

/* Bracket pulse */
@keyframes bracket-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

.hud-bracket-tl, .hud-bracket-tr, .hud-bracket-bl, .hud-bracket-br {
    animation: bracket-pulse 3s ease-in-out infinite;
}
