:root {
    --bg-dark: #0f0f11;
    --hud-main: #f0f0f0;
    --hud-dim: rgba(255, 255, 255, 0.2);
    --hud-faint: rgba(255, 255, 255, 0.05);
    --hud-accent: #ffbe0b;
    --yellow-warp: #ffbe0b;
    --tech-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --mech-curve: cubic-bezier(0.1, 0.9, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--bg-dark); overflow: hidden; font-family: var(--tech-font); }

.boot-sequence { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; display: flex; justify-content: center; align-items: center; z-index: 9999; }
.yellow-curtain { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--yellow-warp); z-index: 50; transition: opacity 0.4s ease; }
.hud-elements { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; opacity: 0; z-index: 10; transition: opacity 0.1s; }

.hud-grid { position: absolute; width: 100%; height: 100%; background-image: linear-gradient(var(--hud-faint) 1px, transparent 1px), linear-gradient(90deg, var(--hud-faint) 1px, transparent 1px); background-size: 50px 50px; z-index: 1; }
.side-panel { position: absolute; top: 0; height: 100vh; width: 25vw; z-index: 2; pointer-events: none; }
.left-panel { left: 0; border-right: 1px solid var(--hud-faint); }
.right-panel { right: 0; border-left: 1px solid var(--hud-faint); }

.top-bar-thick { position: absolute; top: 0; left: 5vw; width: 15vw; height: 15px; background-color: var(--hud-main); }
.checker-box { position: absolute; top: 80px; left: 40px; width: 60px; height: 60px; background-image: linear-gradient(45deg, var(--hud-main) 25%, transparent 25%, transparent 75%, var(--hud-main) 75%, var(--hud-main)), linear-gradient(45deg, var(--hud-main) 25%, transparent 25%, transparent 75%, var(--hud-main) 75%, var(--hud-main)); background-size: 20px 20px; background-position: 0 0, 10px 10px; }
.vertical-text { position: absolute; top: 200px; left: 40px; writing-mode: vertical-rl; text-orientation: mixed; font-size: 0.75rem; letter-spacing: 4px; color: var(--hud-dim); font-weight: 700; }
.text-glow { color: var(--hud-main); text-shadow: 0 0 8px rgba(255,255,255,0.4); }
.barcode-block { position: absolute; bottom: 150px; left: 40px; width: 120px; height: 30px; background: repeating-linear-gradient(90deg, var(--hud-main), var(--hud-main) 3px, transparent 3px, transparent 6px, var(--hud-main) 6px, var(--hud-main) 10px, transparent 10px, transparent 14px); }
.tech-box { position: absolute; bottom: 60px; left: 40px; font-size: 0.7rem; color: var(--hud-main); font-weight: bold; }
.mini-graph { width: 100px; height: 20px; border: 1px solid var(--hud-dim); margin: 5px 0; background: repeating-linear-gradient(90deg, transparent, transparent 2px, var(--hud-dim) 2px, var(--hud-dim) 4px); }
.chevron-group { position: absolute; top: 50vh; left: 40px; color: var(--hud-dim); font-weight: 900; letter-spacing: -2px; display: flex; flex-direction: column; gap: 10px; }

.diagonal-stripe { position: absolute; top: 60px; right: 40px; width: 150px; height: 20px; background: repeating-linear-gradient(45deg, var(--hud-dim), var(--hud-dim) 8px, transparent 8px, transparent 16px); }
.solid-chunk { position: absolute; top: 30vh; right: 0; background-color: var(--hud-main); color: var(--bg-dark); padding: 8px 16px; font-weight: 900; font-size: 0.75rem; letter-spacing: 2px; }
.data-paragraph { position: absolute; top: 50vh; right: 40px; text-align: right; font-size: 0.65rem; color: #aaaaaa; line-height: 1.6; letter-spacing: 1px; }
.bottom-bar-thick { position: absolute; bottom: 40px; right: 0; width: 20vw; height: 8px; background-color: var(--hud-accent); }
.hollow-square { position: absolute; bottom: 120px; right: 40px; width: 40px; height: 40px; border: 4px solid var(--hud-main); transform: rotate(45deg); }
.vertical-barcode { position: absolute; top: 150px; right: 40px; width: 20px; height: 150px; background: repeating-linear-gradient(0deg, var(--hud-main), var(--hud-main) 2px, transparent 2px, transparent 6px, var(--hud-main) 6px, var(--hud-main) 12px, transparent 12px, transparent 16px); }

.cross-marker { position: absolute; width: 30px; height: 30px; z-index: 2; }
.cross-marker::before { content: ''; position: absolute; top: 14px; left: 0; width: 30px; height: 2px; background: var(--hud-dim); }
.cross-marker::after { content: ''; position: absolute; top: 0; left: 14px; width: 2px; height: 30px; background: var(--hud-dim); }
.cm-1 { top: 20vh; left: 25vw; }
.cm-2 { top: 15vh; right: 25vw; }
.cm-3 { bottom: 25vh; left: 23vw; }
.cm-4 { bottom: 20vh; right: 23vw; }

.rings-wrapper { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 190vmin; height: 190vmin; z-index: 5; pointer-events: none; }
.mechanic-rings { width: 100%; height: 100%; }

.bg-ring-group { transform-origin: 1000px 1000px; animation: bg-spin 80s linear infinite; }
/* Applied zero-offset method to background ring to ensure perfect symmetry */
.ring-bg { fill: none; stroke: var(--hud-main); stroke-width: 250; stroke-dasharray: 0 30 120 60 120 30; stroke-dashoffset: 0; opacity: 0.04; }

.ring-solid { fill: none; stroke: var(--hud-main); stroke-linecap: square; }

.ring-group {
    transform-origin: 1000px 1000px;
    animation: spin-to-zero 2.6s var(--mech-curve) forwards;
}

@keyframes spin-to-zero {
    0% { transform: rotate(var(--start-deg)); }
    100% { transform: rotate(0deg); }
}

@keyframes bg-spin { 100% { transform: rotate(360deg); } }

/* ZERO OFFSET METHOD
   Format: 0 (Solid), Gap_Half (Gap), [... Top Solid/Gap fragments ...], Gap_Full (Left Gap), [... Bottom Solid/Gap fragments ...], Gap_Half (Gap).
   This perfectly centers the right gap at exactly 0 degrees by merging the first and last array elements.
*/
.ring-1-stroke { stroke-width: 4; stroke-dasharray: 0 22 50 16 70 44 30 20 86 22; stroke-dashoffset: 0; }
.ring-2-stroke { stroke-width: 18; stroke-dasharray: 0 18 60 14 70 36 40 24 80 18; stroke-dashoffset: 0; opacity: 0.8; }
.ring-3-stroke { stroke-width: 2; stroke-dasharray: 0 15.5 40 20 40 10 39 31 80 15 54 15.5; stroke-dashoffset: 0; }
.ring-4-stroke { stroke-width: 28; stroke-dasharray: 0 13.5 50 20 83 27 60 13 80 13.5; stroke-dashoffset: 0; opacity: 0.95; }
.ring-5-stroke { stroke-width: 6; stroke-dasharray: 0 12 40 30 86 24 100 16 40 12; stroke-dashoffset: 0; }
.ring-6-stroke { stroke-width: 16; stroke-dasharray: 0 10.5 110 19 30 21 50 10 40 9 50 10.5; stroke-dashoffset: 0; opacity: 0.75; }
.ring-7-stroke { stroke-width: 3; stroke-dasharray: 0 9.5 60 11 90 19 120 11 30 9.5; stroke-dashoffset: 0; }

.text-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 0.14em));
    z-index: 20;
    text-align: center;
    width: 100vw;
    pointer-events: none;
}

.main-title { font-size: clamp(2rem, 5vw, 4.5rem); font-weight: 900; color: var(--hud-main); letter-spacing: 6px; margin: 0; white-space: nowrap; line-height: 0.75; display: inline-block; position: relative; }

/* Beam: pseudo-element on h1, responsive — moves with text-container transform */
.main-title::before {
    content: '';
    position: absolute;
    top: var(--beam-top, -4px); bottom: var(--beam-bottom, -4px);
    left: -8px;
    right: -100vw;
    background-color: var(--bg-dark);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.beam-visible .main-title::before {
    opacity: 1;
}
.char-flash { color: var(--bg-dark); background-color: var(--hud-main); text-shadow: 0 0 10px var(--hud-main); }

@keyframes voltage-drop {
    0% { opacity: 1; filter: invert(0); }
    20% { opacity: 0; }
    40% { opacity: 0.8; filter: invert(1); }
    60% { opacity: 0; }
    80% { opacity: 0.5; filter: invert(0); }
    100% { opacity: 0; display: none; visibility: hidden; }
}

.title-shift { transition: transform 1.2s var(--mech-curve); transform: translate(calc(-50% + 25vw), calc(-50% + 0.14em)) scale(0.85); }

/* ===== Post-Boot: Hero Background ===== */
.hero-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #f4f4f6;
    z-index: 1;
    opacity: 0;
}

/* ===== Post-Boot: Strip Overlay ===== */
.strip-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 3;
    pointer-events: none;
}

.bg-strip {
    position: absolute;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark);
    will-change: transform;
}

/* ===== Post-Boot: Greeting Text ===== */
.greeting-text {
    position: absolute;
    z-index: 1;
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 900;
    color: var(--bg-dark);
    letter-spacing: 6px;
    white-space: nowrap;
    line-height: 0.75;
    opacity: 0;
    transform: translateY(0.35em);
    filter: blur(8px);
    pointer-events: none;
    transition:
        opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.6s cubic-bezier(0.16, 1, 0.3, 1),
        filter 2s ease-out;
}

.greeting-text.reveal {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}