/* === COLOR REFERENCE: #3a5a8a #8b6914 #f0a830 === */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: #0a0a12;
    color: #a8b4c4;
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.75;
    overflow-x: hidden;
}

/* === SCROLL PROGRESS === */
.scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    width: 2px;
    height: 0%;
    background: #d4910a;
    z-index: 100;
    transition: height 0.1s linear;
}

/* === SOOT CANVAS === */
#sootCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* === HERO === */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0a0a12;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    background: radial-gradient(circle at 50% 40%, rgba(212, 145, 10, 0.12) 0%, transparent 60%);
    animation: glow-pulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.08; }
    50% { opacity: 0.18; }
}

.hero-flame {
    width: 80px;
    height: 160px;
    position: relative;
    z-index: 2;
}

.flame-group {
    transform-origin: center bottom;
    animation: flame-sway 2.5s ease-in-out infinite;
}

@keyframes flame-sway {
    0%, 100% { transform: scaleX(1) scaleY(1); }
    25% { transform: scaleX(0.97) scaleY(1.04); }
    50% { transform: scaleX(1.03) scaleY(0.96); }
    75% { transform: scaleX(0.98) scaleY(1.02); }
}

.flame-inner {
    animation: flame-inner-flicker 1.7s ease-in-out infinite;
}

@keyframes flame-inner-flicker {
    0%, 100% { transform: scaleX(1) scaleY(1); opacity: 1; }
    50% { transform: scaleX(0.95) scaleY(1.05); opacity: 0.85; }
}

.hero-title {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 6rem);
    color: #e8dcc8;
    letter-spacing: 0.04em;
    line-height: 1.1;
    margin-top: 1.5rem;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(12px);
    animation: fade-in-up 1.2s 0.5s ease forwards;
}

.hero-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #5a7094;
    margin-top: 0.8rem;
    position: relative;
    z-index: 2;
}

@keyframes fade-in-up {
    to { opacity: 1; transform: translateY(0); }
}

/* === WOBBLY DIVIDERS === */
.wobbly-divider {
    display: block;
    width: 100%;
    height: 30px;
    position: relative;
    z-index: 2;
}

/* === STRATUM SECTIONS === */
.stratum {
    position: relative;
    padding: 8rem 2rem;
    margin-top: -4rem;
    transform: skewY(-8deg);
    z-index: 1;
}

.stratum-inner {
    transform: skewY(8deg);
}

.stratum-odd {
    background: linear-gradient(135deg, #0b1528, #162a4a);
}

.stratum-even {
    background: linear-gradient(135deg, #162a4a, #1a3356);
}

.stratum-content {
    max-width: 520px;
}

.stratum-left {
    margin-left: 33%;
}

.stratum-right {
    margin-left: 50%;
}

.stratum-content p {
    margin-top: 1rem;
    color: #a8b4c4;
}

.stratum-content .italic {
    font-style: italic;
    color: #c8d0dc;
}

/* Stratum reveal animation */
.stratum-odd {
    opacity: 0;
    transform: skewY(-8deg) translateX(-80px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stratum-even {
    opacity: 0;
    transform: skewY(-8deg) translateX(80px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stratum.visible {
    opacity: 1;
    transform: skewY(-8deg) translateX(0);
}

/* === LABELS === */
.label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #5a7094;
    display: block;
    margin-bottom: 0.5rem;
}

/* === SECTION HEADINGS === */
.section-heading {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #e8dcc8;
    letter-spacing: 0.04em;
    line-height: 1.1;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stratum.visible .section-heading {
    opacity: 1;
    transform: translateY(0);
}

/* === CARBON GRID === */
.carbon-grid {
    position: relative;
    padding: 4rem 2rem;
    background: #0b1528;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    overflow: hidden;
    /* Subtle hex background pattern */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='69.28' viewBox='0 0 80 69.28'%3E%3Cpath d='M40,0 L80,23.09 L80,69.28 L40,69.28 L0,69.28 L0,23.09Z' fill='none' stroke='%23162a4a' stroke-width='0.5'/%3E%3C/svg%3E");
}

.carbon-grid-svg {
    width: 100%;
    max-width: 1200px;
    height: auto;
}

.grid-shape {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.5s ease, fill 0.6s ease, stroke 0.6s ease;
}

.grid-shape.drawn {
    stroke-dashoffset: 0;
}

.grid-hexagon.drawn.filled {
    fill: rgba(212, 145, 10, 0.08);
    stroke: #d4910a;
}

/* === CLOSING === */
.closing {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0a0a12;
    overflow: hidden;
}

.closing-c {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(15rem, 30vw, 40rem);
    color: rgba(22, 42, 74, 0.6);
    line-height: 1;
    user-select: none;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.closing-c.visible {
    opacity: 1;
}

.closing-word {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #e8dcc8;
    letter-spacing: 0.04em;
    margin-top: -2rem;
    opacity: 0;
    transition: opacity 1.5s ease 0.5s;
}

.closing-c.visible ~ .closing-word {
    opacity: 1;
}

/* === BAUHAUS ICONS === */
.bauhaus-icons {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.bh-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    pointer-events: auto;
    cursor: default;
    opacity: 0.5;
    transition: opacity 0.6s ease;
}

.bh-icon:hover {
    opacity: 1;
}

.bh-icon circle,
.bh-icon rect,
.bh-icon polygon,
.bh-icon line,
.bh-icon path {
    transition: stroke 0.6s ease, fill 0.6s ease;
}

.bh-icon:hover circle,
.bh-icon:hover rect,
.bh-icon:hover polygon,
.bh-icon:hover line,
.bh-icon:hover path {
    stroke: #d4910a;
    fill: rgba(212, 145, 10, 0.08);
}

.bh-icon:hover line {
    fill: none;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .stratum-left,
    .stratum-right {
        margin-left: 5%;
        margin-right: 5%;
        max-width: 90%;
    }

    .stratum {
        padding: 6rem 1.5rem;
    }

    .bh-icon {
        display: none;
    }
}
