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

:root {
    --red: #ff3c14;
    --red-dim: #8b1a00;
    --orange: #ff6a00;
    --dark: #0a0a0a;
    --darker: #050505;
    --gray: #1a1a1a;
    --light-gray: #2a2a2a;
    --text: #c0b8b0;
    --text-dim: #5a5550;
}

@font-face {
    font-family: 'System';
    src: local('SF Mono'), local('Consolas'), local('Liberation Mono'), local('monospace');
}

body {
    background: var(--darker);
    color: var(--text);
    font-family: 'Courier New', 'SF Mono', Consolas, monospace;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* ── Canvas Grid Background ─────────────────── */
#grid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ── Scanline Overlay ───────────────────────── */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
}

.scanline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 60, 20, 0.08);
    animation: scanmove 6s linear infinite;
}

@keyframes scanmove {
    0% { top: -4px; }
    100% { top: 100%; }
}

/* ── Corner Brackets ────────────────────────── */
.corner {
    position: fixed;
    width: 40px;
    height: 40px;
    z-index: 3;
    border-color: var(--red-dim);
    border-style: solid;
}

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

/* ── Main Container ─────────────────────────── */
.container {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 700px;
    animation: fadeInUp 1.5s ease-out;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Logo Hexagon ───────────────────────────── */
.logo-mark {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
}

.hex-ring svg {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 0 20px rgba(255, 60, 20, 0.3));
}

.hex {
    fill: none;
    stroke-width: 1.5;
}

.hex-outer {
    stroke: var(--red);
    animation: hexPulse 3s ease-in-out infinite;
}

.hex-inner {
    stroke: var(--red-dim);
    animation: hexPulse 3s ease-in-out infinite 0.5s;
}

.hex-text {
    fill: var(--red);
    font-family: 'Courier New', monospace;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 4px;
}

@keyframes hexPulse {
    0%, 100% { opacity: 0.6; stroke-width: 1.5; }
    50% { opacity: 1; stroke-width: 2.5; }
}

/* ── Glitch Title ───────────────────────────── */
.glitch {
    font-size: clamp(2rem, 8vw, 4.5rem);
    font-weight: 900;
    letter-spacing: 0.3em;
    color: var(--text);
    position: relative;
    text-shadow:
        0 0 10px rgba(255, 60, 20, 0.3),
        0 0 40px rgba(255, 60, 20, 0.1);
    animation: textFlicker 8s infinite;
}

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

.glitch::before {
    color: var(--red);
    z-index: -1;
}

.glitch::after {
    color: var(--orange);
    z-index: -2;
}

.glitch.glitching::before {
    opacity: 0.8;
    animation: glitchShift1 0.2s steps(2) infinite;
}

.glitch.glitching::after {
    opacity: 0.6;
    animation: glitchShift2 0.2s steps(2) infinite;
}

@keyframes glitchShift1 {
    0% { clip-path: inset(20% 0 60% 0); transform: translate(-3px, -2px); }
    25% { clip-path: inset(50% 0 20% 0); transform: translate(3px, 1px); }
    50% { clip-path: inset(10% 0 70% 0); transform: translate(-2px, 3px); }
    75% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
    100% { clip-path: inset(30% 0 40% 0); transform: translate(-1px, 2px); }
}

@keyframes glitchShift2 {
    0% { clip-path: inset(60% 0 10% 0); transform: translate(3px, 2px); }
    25% { clip-path: inset(10% 0 50% 0); transform: translate(-3px, -1px); }
    50% { clip-path: inset(70% 0 10% 0); transform: translate(2px, -3px); }
    75% { clip-path: inset(20% 0 60% 0); transform: translate(-2px, 1px); }
    100% { clip-path: inset(40% 0 30% 0); transform: translate(1px, -2px); }
}

@keyframes textFlicker {
    0%, 95%, 100% { opacity: 1; }
    96% { opacity: 0.8; }
    97% { opacity: 1; }
    98% { opacity: 0.6; }
    99% { opacity: 1; }
}

/* ── Divider ────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 2rem 0;
}

.divider-line {
    display: block;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--red-dim), transparent);
    animation: lineGlow 3s ease-in-out infinite;
}

.divider-diamond {
    width: 8px;
    height: 8px;
    background: var(--red);
    transform: rotate(45deg);
    animation: diamondPulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 60, 20, 0.5);
}

@keyframes lineGlow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes diamondPulse {
    0%, 100% { transform: rotate(45deg) scale(1); opacity: 0.7; }
    50% { transform: rotate(45deg) scale(1.3); opacity: 1; }
}

/* ── Tagline ────────────────────────────────── */
.tagline {
    font-size: clamp(0.8rem, 2.5vw, 1.1rem);
    letter-spacing: 0.5em;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 3rem;
    overflow: hidden;
}

.reveal-text {
    display: inline-block;
    animation: revealSlide 2s ease-out 0.5s both;
    border-right: 2px solid var(--red);
    padding-right: 8px;
    animation: revealSlide 2s ease-out 0.5s both, cursorBlink 1s step-end infinite;
}

@keyframes revealSlide {
    0% {
        max-width: 0;
        opacity: 0;
    }
    100% {
        max-width: 600px;
        opacity: 1;
    }
}

@keyframes cursorBlink {
    0%, 100% { border-color: var(--red); }
    50% { border-color: transparent; }
}

/* ── Status Bar ─────────────────────────────── */
.status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    border: 1px solid var(--light-gray);
    background: rgba(10, 10, 10, 0.8);
    margin-bottom: 2.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    animation: dotBlink 1.5s infinite;
    box-shadow: 0 0 8px rgba(255, 60, 20, 0.6);
}

@keyframes dotBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

.status-text {
    color: var(--red);
    transition: opacity 0.3s;
}

.status-progress {
    width: 60px;
    height: 3px;
    background: var(--gray);
    position: relative;
    overflow: hidden;
}

.status-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60px;
    width: 60px;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    animation: progressSweep 2s linear infinite;
}

@keyframes progressSweep {
    0% { left: -60px; }
    100% { left: 60px; }
}

/* ── Footer Data Blocks ─────────────────────── */
.footer-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.data-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.label {
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    color: var(--text-dim);
}

.value {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--red-dim);
}

.value.blink {
    animation: valueBlink 2s step-end infinite;
}

@keyframes valueBlink {
    0%, 100% { color: var(--red-dim); }
    50% { color: var(--red); }
}

/* ── Ambient Vignette ───────────────────────── */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 30%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 600px) {
    .footer-info {
        flex-direction: column;
        gap: 1.5rem;
    }

    .corner {
        width: 25px;
        height: 25px;
    }

    .corner-tl { top: 10px; left: 10px; }
    .corner-tr { top: 10px; right: 10px; }
    .corner-bl { bottom: 10px; left: 10px; }
    .corner-br { bottom: 10px; right: 10px; }

    .divider-line {
        width: 50px;
    }

    .status-bar {
        padding: 10px 16px;
        flex-wrap: wrap;
    }
}
