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

:root {
    --color-bg: #f4f7fb;
    --color-deep: #0d1b2a;
    --color-blue: #3ea8ff;
    --color-blue-mid: #5b9bd5;
    --color-blue-light: #d6e8f7;
    --color-leather: #a67c5b;
    --color-slate: #3a4a5c;
    --color-muted: #8a9ab5;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-deep);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* === Canvas === */
.canvas {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* === Hero === */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 4rem 2rem;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 8rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: var(--color-deep);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.hero-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-top: 2rem;
    opacity: 0;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Atmospheric Break Panels === */
.atmo-panel {
    width: 100%;
    height: 40vh;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='8' height='8' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
        linear-gradient(180deg, var(--color-blue-light) 0%, var(--color-bg) 100%);
    position: relative;
}

.atmo-panel--warm {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='8' height='8' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"),
        linear-gradient(180deg, var(--color-bg) 0%, #f0ebe4 50%, var(--color-bg) 100%);
}

.atmo-panel--deep {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='8' height='8' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E"),
        linear-gradient(180deg, var(--color-bg) 0%, var(--color-blue-light) 100%);
}

/* === Editorial Column === */
.editorial-column {
    max-width: 680px;
    margin: 0 auto;
    padding: 8rem 2rem;
}

.section-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 4rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: var(--color-deep);
    margin-bottom: 2.5rem;
}

.body-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.1vw, 1.125rem);
    line-height: 1.8;
    color: var(--color-slate);
    margin-bottom: 1.5rem;
}

.body-text em {
    font-style: italic;
    color: var(--color-deep);
}

/* === Hex Counter === */
.hex-counter-section {
    display: flex;
    justify-content: center;
    padding: 6rem 2rem;
}

.hex-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.hex-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.hex-value {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1.5rem, 3vw, 3rem);
    font-weight: 700;
    color: var(--color-blue);
    transition: color 0.4s ease;
}

/* === Margin Notes === */
.margin-note {
    position: absolute;
    left: 2rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.margin-note.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.margin-note-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* === Footer === */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4rem 2rem;
    max-width: 680px;
    margin: 0 auto;
    border-top: 1px solid var(--color-blue-light);
}

.footer-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-deep);
}

.footer-mono {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--color-muted);
}

/* === Scroll Reveal === */
.editorial-column {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.editorial-column.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 768px) {
    .margin-note {
        display: none;
    }

    .atmo-panel {
        height: 25vh;
    }

    .editorial-column {
        padding: 5rem 1.5rem;
    }
}
