/* =========================================
   HHASSL.com - Brutalist Anti-Design
   ========================================= */

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

:root {
    --void-black: #0d0d0d;
    --soot: #1a1a1e;
    --charcoal-rest: #1c1c22;
    --tarnished-copper: #a0724e;
    --rust-signal: #c4553a;
    --industrial-white: #e8e4dc;
    --hot-white: #f0f0f0;
    --bruise-purple: #3d2d4a;
    --pure-white: #ffffff; /* unused intentionally -- warm white #e8e4dc preferred */
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--void-black);
    color: var(--industrial-white);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Noise Overlay --- */
.noise-svg {
    position: absolute;
    width: 0;
    height: 0;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
    filter: url(#noiseFilter);
    background: var(--void-black);
}

/* --- Zones (General) --- */
.zone {
    position: relative;
    width: 100%;
}

/* =========================================
   ZONE 1: The Barrier
   ========================================= */
.zone-barrier {
    height: 100vh;
    background: var(--void-black);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.density-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.density-word {
    position: absolute;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--soot);
    user-select: none;
    white-space: nowrap;
    will-change: transform;
}

.enter-beacon {
    position: relative;
    z-index: 10;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: clamp(1.2rem, 3vw, 2.5rem);
    color: var(--hot-white);
    letter-spacing: 0.15em;
    cursor: pointer;
    animation: beaconPulse 2s ease-in-out infinite;
}

@keyframes beaconPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Magnetic snap class */
.snap-active {
    scroll-snap-type: y mandatory;
}

.snap-target {
    scroll-snap-align: start;
}

/* =========================================
   ZONE 2: The Tangle
   ========================================= */
.zone-tangle {
    min-height: 120vh;
    background: var(--void-black);
    position: relative;
    padding: 10vh 5vw;
}

.cradle-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.cradle-svg line {
    stroke: var(--tarnished-copper);
    stroke-width: 1;
    opacity: 0.4;
}

.cradle-svg circle {
    fill: var(--rust-signal);
}

.tangle-block {
    position: relative;
    z-index: 2;
    background: rgba(13, 13, 13, 0.85);
    border: 1px solid rgba(160, 114, 78, 0.2);
    padding: 3rem 2.5rem;
    max-width: 420px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.7;
    color: var(--industrial-white);
}

.tangle-block em {
    font-weight: 700;
    color: var(--hot-white);
    font-style: normal;
}

.tangle-block-1 {
    margin-left: 8vw;
    margin-top: 5vh;
    transform: rotate(-1.5deg);
}

.tangle-block-2 {
    margin-left: auto;
    margin-right: 6vw;
    margin-top: -8vh;
    transform: rotate(2.5deg);
}

.tangle-block-3 {
    margin-left: 20vw;
    margin-top: 6vh;
    transform: rotate(-0.8deg);
}

.accent-text {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--tarnished-copper);
    margin-bottom: 1rem;
    opacity: 0.7;
}

/* =========================================
   ZONE 3: The Void
   ========================================= */
.zone-void {
    height: 100vh;
    background: var(--void-black);
    display: flex;
    align-items: center;
    justify-content: center;
}

.void-statement {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 6vw, 6rem);
    color: var(--hot-white);
    text-align: center;
    letter-spacing: -0.03em;
    opacity: 0;
    transition: opacity 3s ease;
    padding: 0 5vw;
}

.void-statement.visible {
    opacity: 1;
}

/* =========================================
   ZONE 4: The Grid Breaks
   ========================================= */
.zone-gridbreak {
    min-height: 150vh;
    background: var(--void-black);
    padding: 10vh 4vw;
    position: relative;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    transition: gap 0.1s linear;
}

.grid-item {
    background: rgba(28, 28, 34, 0.6);
    border: 1px solid rgba(160, 114, 78, 0.15);
    padding: 2.5rem 2rem;
    transition: transform 0.1s linear, opacity 0.1s linear;
}

.grid-item h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: -0.03em;
    color: var(--hot-white);
    margin-bottom: 0.75rem;
}

.grid-item p {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1vw, 1rem);
    line-height: 1.7;
    color: var(--industrial-white);
}

.grid-item .accent-text {
    margin-bottom: 0.75rem;
}

/* =========================================
   ZONE 5: The Clearing
   ========================================= */
.zone-clearing {
    min-height: 80vh;
    background: var(--charcoal-rest);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20vw;
}

.clearing-content {
    max-width: 600px;
    text-align: center;
    opacity: 0;
    transition: opacity 2s ease;
}

.clearing-content.visible {
    opacity: 1;
}

.clearing-text {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.9;
    color: var(--industrial-white);
    margin-bottom: 3rem;
}

.payoff-line {
    width: 100%;
    height: 2px;
    display: block;
}

.payoff-line line {
    transition: stroke-dashoffset 4s ease-out;
}

.payoff-line.animate line {
    stroke-dashoffset: 0;
}

.payoff-line.fade {
    animation: lineFade 2s ease-out 1s forwards;
}

@keyframes lineFade {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* =========================================
   Scrollbar Styling
   ========================================= */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--void-black);
}

::-webkit-scrollbar-thumb {
    background: var(--tarnished-copper);
    border-radius: 0;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
    .tangle-block {
        max-width: 90vw;
        margin-left: 5vw !important;
        margin-right: 5vw !important;
    }

    .tangle-block-2 {
        margin-top: 4vh;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .zone-clearing {
        padding: 10vw 8vw;
    }
}
