/* alth.ing -- Opulent Flatness */
/* Translucent Frost Palette */

:root {
    --bg-primary: #f0f4f8;
    --bg-dark: #1a2634;
    --text-primary: #2c3e50;
    --text-secondary: #4a6274;
    --text-tertiary: #7b9ab5;
    --accent-ice: #a8c6df;
    --accent-teal: #6fb3a1;
    --highlight-silver: #c8d6e5;
    --dark-text: #e8f0f7;
    --hero-color: #d0dde8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    line-height: 1.75;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Progress Bar */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--accent-ice);
    z-index: 1000;
    transition: width 50ms linear;
}

/* Navigation */
#top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    z-index: 999;
    background-color: rgba(240, 244, 248, 0.9);
}

.nav-domain {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

/* Frost Grid Background */
#frost-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 47.5px,
            rgba(200, 214, 229, 0.15) 47.5px,
            rgba(200, 214, 229, 0.15) 48px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 47.5px,
            rgba(200, 214, 229, 0.15) 47.5px,
            rgba(200, 214, 229, 0.15) 48px
        );
}

/* Grid illumination cells - JS controlled */
.grid-cell-glow {
    position: fixed;
    width: 48px;
    height: 48px;
    background-color: rgba(168, 198, 223, 0.4);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 2s ease-out;
}

.grid-cell-glow.active {
    opacity: 1;
}

/* General Layout */
.act {
    position: relative;
    z-index: 2;
}

.content-river {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 40px;
}

.text-block {
    max-width: 640px;
    margin: 0 auto;
    padding: 80px 0;
}

.text-block + .text-block {
    padding-top: 0;
}

/* Act 1 -- The Word */
#act-1 {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-word-container {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#hero-word {
    font-family: 'Playfair Display', serif;
    font-size: 280px;
    font-weight: 400;
    letter-spacing: -0.03em;
    color: var(--hero-color);
    opacity: 0.6;
    transition: opacity 0.05s linear;
    user-select: none;
}

/* Section Rules */
.section-rule {
    width: 40%;
    height: 1px;
    background-color: var(--highlight-silver);
    margin: 0 auto;
}

/* Section Gaps */
#act-2,
#act-3,
#act-4,
#act-5 {
    padding-top: 160px;
}

/* Pull Quotes */
.pull-quote {
    font-family: 'Playfair Display', serif;
    font-size: 72px;
    font-weight: 400;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 60px;
    max-width: 640px;
    transition: transform 400ms ease-out;
    transform-origin: center center;
}

.pull-quote:hover {
    transform: scale(1.05);
}

.dark-quote {
    color: var(--dark-text);
}

/* Body Text */
.body-text {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-weight: 400;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* Dark Band Text */
.dark-text .body-text {
    color: var(--dark-text);
    opacity: 0.85;
}

/* Full Width Bands */
.full-width-band {
    width: 100vw;
    position: relative;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
}

/* Botanical Band */
.botanical-band {
    height: 600px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.frost-botanical {
    width: 400px;
    height: 600px;
    transition: transform 600ms ease-out;
    transform-origin: center center;
}

.frost-botanical:hover {
    transform: scale(1.08);
}

.botanical-left {
    position: absolute;
    left: 0;
    top: 0;
}

.botanical-right {
    position: absolute;
    right: 0;
    top: 0;
}

/* Dark Bands */
.dark-band {
    background-color: var(--bg-dark);
    padding: 120px 0;
    position: relative;
}

.dark-band .content-river {
    position: relative;
    z-index: 2;
}

.topo-contours {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Circuit Traces */
.circuit-trace {
    position: relative;
    margin: 0 auto;
}

.vertical-trace {
    width: 1px;
    height: 120px;
    background-color: var(--highlight-silver);
    margin: 40px auto;
    position: relative;
}

.vertical-trace::before,
.vertical-trace::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 0;
    background-color: var(--highlight-silver);
    left: 50%;
    transform: translateX(-50%);
}

.vertical-trace::before {
    top: -4px;
    width: 8px;
    height: 8px;
}

.vertical-trace::after {
    bottom: -4px;
    width: 8px;
    height: 8px;
}

/* Data Streams */
.data-stream {
    width: 100vw;
    height: 4px;
    margin-left: calc(-50vw + 50%);
    position: relative;
    overflow: hidden;
    margin-top: 80px;
    margin-bottom: 80px;
    transition: transform 300ms ease-out;
    transform-origin: center center;
    background: repeating-linear-gradient(
        90deg,
        var(--highlight-silver) 0px,
        var(--highlight-silver) 12px,
        var(--accent-ice) 12px,
        var(--accent-ice) 24px,
        var(--highlight-silver) 24px,
        var(--highlight-silver) 40px,
        transparent 40px,
        transparent 44px
    );
}

.data-stream:hover {
    transform: scaleY(2);
}

/* Cellular Overlay */
.cellular-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.08;
    background-image:
        radial-gradient(circle at 20% 30%, var(--accent-teal) 1px, transparent 1px),
        radial-gradient(circle at 60% 50%, var(--accent-teal) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, var(--accent-teal) 1px, transparent 1px),
        radial-gradient(circle at 40% 70%, var(--accent-teal) 1px, transparent 1px),
        radial-gradient(circle at 10% 80%, var(--accent-teal) 1px, transparent 1px),
        radial-gradient(circle at 90% 60%, var(--accent-teal) 1px, transparent 1px);
    background-size: 200px 200px;
}

/* Convergence Band */
.convergence-band {
    padding: 80px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.convergence-tree {
    width: 100%;
    max-width: 1200px;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* Act 5 -- The Silence */
.final-statement {
    padding-top: 160px;
    padding-bottom: 80px;
}

.final-quote {
    font-size: 48px;
}

.void-space {
    height: 200vh;
    position: relative;
}

.void-space::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-primary) 100%);
    pointer-events: none;
}

/* Scroll-triggered fade-in */
.text-block {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.text-block.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Signal Waveform backgrounds */
.waveform-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.05;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #hero-word {
        font-size: 120px;
    }

    .pull-quote {
        font-size: 42px;
    }

    .final-quote {
        font-size: 32px;
    }

    .content-river {
        padding: 0 24px;
    }

    .text-block {
        padding: 60px 0;
    }

    #act-2,
    #act-3,
    #act-4,
    #act-5 {
        padding-top: 100px;
    }

    .botanical-band {
        height: 300px;
    }

    .frost-botanical {
        width: 200px;
        height: 300px;
    }

    .dark-band {
        padding: 80px 0;
    }
}

@media (max-width: 480px) {
    #hero-word {
        font-size: 80px;
    }

    .pull-quote {
        font-size: 32px;
    }

    .final-quote {
        font-size: 24px;
    }

    body {
        font-size: 16px;
    }
}
