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

:root {
    --deep-void: #0a0a14;
    --aurora-green: #00e676;
    --aurora-cyan: #18ffff;
    --aurora-violet: #b388ff;
    --aurora-magenta: #f50057;
    --concrete-gray: #2a2a3a;
    --fog-white: #e0e0f0;
    --spray-mist: #4a4a6a;
    --hex-width: clamp(120px, 15vw, 180px);
    --hex-gap: 4px;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--deep-void);
    color: var(--fog-white);
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    overflow-x: hidden;
}

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

.aurora-layer {
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(100px);
    will-change: transform;
}

.aurora-green {
    background: radial-gradient(circle, rgba(0,230,118,0.15) 0%, transparent 70%);
    top: -20%;
    left: 20%;
    animation: auroraGreen 20s ease-in-out infinite;
}

.aurora-cyan {
    background: radial-gradient(circle, rgba(24,255,255,0.10) 0%, transparent 70%);
    top: 10%;
    right: 10%;
    animation: auroraCyan 15s ease-in-out infinite;
}

.aurora-violet {
    background: radial-gradient(circle, rgba(179,136,255,0.12) 0%, transparent 70%);
    bottom: -10%;
    left: 30%;
    animation: auroraViolet 12s ease-in-out infinite;
}

@keyframes auroraGreen {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(10vw, 5vh) scale(1.1); }
    50% { transform: translate(-5vw, 10vh) scale(0.9); }
    75% { transform: translate(8vw, -5vh) scale(1.05); }
}

@keyframes auroraCyan {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(15vh) scale(1.15); }
}

@keyframes auroraViolet {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* === LENS FLARES === */
#lens-flares {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
}

.flare {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.flare-1 {
    width: 240px;
    height: 240px;
    top: 20%;
    left: 40%;
    background: radial-gradient(circle,
        rgba(245,0,87,0.9) 0%,
        rgba(245,0,87,0) 3%,
        rgba(24,255,255,0.3) 15%,
        rgba(24,255,255,0) 30%,
        rgba(0,230,118,0.1) 50%,
        transparent 70%
    );
}

.flare-2 {
    width: 180px;
    height: 180px;
    top: 50%;
    left: 60%;
    background: radial-gradient(circle,
        rgba(24,255,255,0.7) 0%,
        rgba(24,255,255,0) 4%,
        rgba(179,136,255,0.2) 20%,
        transparent 60%
    );
}

.flare-3 {
    width: 300px;
    height: 300px;
    top: 80%;
    left: 30%;
    background: radial-gradient(circle,
        rgba(0,230,118,0.8) 0%,
        rgba(0,230,118,0) 3%,
        rgba(245,0,87,0.15) 25%,
        transparent 55%
    );
}

.flare::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(24,255,255,0.5), transparent);
    animation: flareStreak 3s ease-in-out infinite alternate;
}

@keyframes flareStreak {
    0% { opacity: 0.3; width: 150px; }
    100% { opacity: 0.8; width: 250px; }
}

/* === HERO SECTION === */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(0,230,118,0.15) 0%, rgba(24,255,255,0.08) 40%, transparent 70%),
        linear-gradient(180deg, var(--concrete-gray) 0%, var(--deep-void) 100%);
}

.hero-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#noise);
    background: var(--fog-white);
    opacity: 0.04;
    pointer-events: none;
}

.hero-cracks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.crack-hex {
    position: absolute;
    left: var(--cx);
    top: var(--cy);
    width: 80px;
    height: 92px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(135deg, #00e676 0%, #18ffff 35%, #b388ff 70%, #f50057 100%);
    opacity: 0.3;
    animation: crackPulse 4s ease-in-out infinite;
}

.crack-hex:nth-child(2) { animation-delay: -0.8s; width: 60px; height: 69px; }
.crack-hex:nth-child(3) { animation-delay: -1.6s; width: 100px; height: 115px; }
.crack-hex:nth-child(4) { animation-delay: -2.4s; width: 50px; height: 58px; }
.crack-hex:nth-child(5) { animation-delay: -3.2s; width: 70px; height: 81px; }

@keyframes crackPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.45; }
}

.hero-title-wrap {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(8rem, 20vw, 18rem);
    letter-spacing: 0.15em;
    color: transparent;
    -webkit-text-stroke: 2px var(--fog-white);
    text-transform: uppercase;
    line-height: 1;
    position: relative;
    text-shadow:
        0 0 40px rgba(24,255,255,0.3),
        0 0 80px rgba(0,230,118,0.15);
}

.paint-drips {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 70px;
    pointer-events: none;
}

.drip {
    position: absolute;
    left: var(--dx);
    top: 0;
    width: 4px;
    height: var(--dh);
    background: linear-gradient(180deg, var(--dc), transparent);
    border-radius: 0 0 50% 50%;
    opacity: 0.7;
}

.drip:nth-child(2) { width: 3px; }
.drip:nth-child(4) { width: 5px; }
.drip:nth-child(6) { width: 6px; }

/* === HONEYCOMB GRID === */
#honeycomb {
    position: relative;
    min-height: 120vh;
    padding: 80px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hex-grid {
    max-width: 1100px;
    width: 100%;
}

.hex-row {
    display: flex;
    gap: var(--hex-gap);
    margin-bottom: calc(var(--hex-gap) - var(--hex-width) * 0.13);
    justify-content: center;
}

.hex-row:nth-child(odd) {
    margin-left: calc(var(--hex-width) / 2);
}

.hex {
    width: var(--hex-width);
    aspect-ratio: 1 / 1.1547;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.8) rotate(-5deg);
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        opacity 0.6s ease;
    transition-delay: calc(var(--row, 0) * 80ms + var(--col, 0) * 40ms);
}

.hex.visible {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.hex:hover {
    transform: scale(1.05);
}

.hex-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15%;
    text-align: center;
}

.hex-content {
    background: var(--concrete-gray);
}

.hex-content:hover {
    box-shadow: 0 0 20px rgba(0,230,118,0.3);
    background: linear-gradient(180deg, rgba(0,230,118,0.12) 0%, rgba(179,136,255,0.08) 100%),
                var(--concrete-gray);
}

.hex-circuit {
    background: var(--concrete-gray);
}

.hex-gradient {
    background: linear-gradient(135deg, #00e676 0%, #18ffff 35%, #b388ff 70%, #f50057 100%);
    opacity: 0;
}

.hex-gradient.visible {
    opacity: 0.6;
}

.hex-empty {
    background: transparent;
    border: 1px solid var(--spray-mist);
    clip-path: none;
    -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.hex-empty::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    box-shadow: inset 0 0 8px rgba(0,230,118,0.2);
    animation: hexPulse 3s ease-in-out infinite;
}

@keyframes hexPulse {
    0%, 100% { box-shadow: inset 0 0 8px rgba(0,230,118,0.1); }
    50% { box-shadow: inset 0 0 12px rgba(24,255,255,0.25); }
}

.hex-tag {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(0.65rem, 1vw, 0.85rem);
    color: var(--aurora-cyan);
    transform: rotate(-2deg);
    margin-bottom: 6px;
}

.hex-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.6rem, 0.9vw, 0.8rem);
    line-height: 1.5;
    color: var(--fog-white);
}

/* Circuit SVGs in hexagons */
.circuit-svg {
    width: 70%;
    height: 70%;
}

.circuit-svg .node {
    fill: none;
    stroke: var(--aurora-cyan);
    stroke-width: 1.5;
    animation: nodePulse 2s ease-in-out infinite;
}

.circuit-svg .node:nth-child(2) { animation-delay: 0.3s; }
.circuit-svg .node:nth-child(4) { animation-delay: 0.6s; }
.circuit-svg .node:nth-child(6) { animation-delay: 0.9s; }

.circuit-svg .trace {
    stroke: var(--aurora-cyan);
    stroke-width: 1;
    fill: none;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1.5s ease;
}

.hex.visible .circuit-svg .trace {
    stroke-dashoffset: 0;
}

@keyframes nodePulse {
    0%, 100% { transform-origin: center; r: 4; }
    50% { r: 5.2; }
}

/* === CIRCUIT LAYER === */
#circuit-layer {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.circuit-main {
    width: 90%;
    max-width: 1200px;
    height: auto;
}

.circuit-main .node-main {
    fill: none;
    stroke: var(--aurora-cyan);
    stroke-width: 1.5;
    animation: nodePulseMain 2s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 0.15s);
}

.circuit-main .trace-main {
    stroke: var(--aurora-cyan);
    stroke-width: 1.2;
    fill: none;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    opacity: 0.8;
}

.circuit-main.visible .trace-main {
    transition: stroke-dashoffset 1.5s ease;
    transition-delay: calc(var(--i, 0) * 0.12s);
    stroke-dashoffset: 0;
}

@keyframes nodePulseMain {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* === MESSAGE WALL === */
#message-wall {
    position: relative;
    min-height: 120vh;
    padding: 100px 40px;
    background:
        linear-gradient(180deg, var(--deep-void) 0%, var(--concrete-gray) 30%, var(--concrete-gray) 70%, var(--deep-void) 100%);
}

.wall-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#noise);
    background: var(--fog-white);
    opacity: 0.04;
    pointer-events: none;
}

.wall-block {
    position: absolute;
    left: var(--x);
    top: var(--y);
    transform: rotate(var(--angle));
    max-width: 380px;
    padding: 24px 28px;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.wall-block.visible {
    opacity: 1;
}

.wall-block::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 4px;
    box-shadow:
        0 0 30px rgba(0,230,118,0.08),
        0 0 60px rgba(179,136,255,0.05);
    z-index: -1;
}

.wall-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fog-white);
    margin-bottom: 12px;
}

.wall-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.75;
    color: var(--fog-white);
}

.wall-marker {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: var(--aurora-green);
    transform: rotate(-2deg);
}

/* === AURORA FINALE === */
#aurora-finale {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.finale-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00e676 0%, #18ffff 35%, #b388ff 70%, #f50057 100%);
    opacity: 0;
    transition: opacity 1.5s ease;
    animation: finaleShift 8s ease-in-out infinite;
}

.finale-glow.visible {
    opacity: 0.35;
}

@keyframes finaleShift {
    0%, 100% { filter: hue-rotate(0deg); }
    33% { filter: hue-rotate(20deg); }
    66% { filter: hue-rotate(-20deg); }
}

.finale-whisper {
    position: relative;
    z-index: 2;
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    letter-spacing: 0.3em;
    color: var(--fog-white);
    opacity: 0;
    transition: opacity 2s ease;
}

.finale-whisper.visible {
    opacity: 0.6;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    :root {
        --hex-width: 100px;
    }

    .hex-row:nth-child(odd) {
        margin-left: calc(var(--hex-width) / 2);
    }

    .wall-block {
        position: relative;
        left: auto;
        top: auto;
        margin: 30px auto;
        transform: rotate(var(--angle));
    }

    #message-wall {
        padding: 60px 20px;
        min-height: auto;
    }
}
