/* ============================================
   ppuzzl.win - Avant-Garde Modular Design
   Colors: #F5F0E8, #6B5B4B, #8B9A6B, #C4919B, #D4C5A0, #2B3A4F, #FAFAF5
   Fonts: DM Serif Display, DM Sans, Inconsolata
   ============================================ */

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

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

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    color: #6B5B4B;
    background-color: #F5F0E8;
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    color: #2B3A4F;
    letter-spacing: -0.02em;
}

/* --- Overture Block --- */
.overture-block {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F5F0E8;
    overflow: hidden;
    z-index: 10;
}

.overture-text-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    will-change: transform;
}

.overture-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(80px, 15vw, 200px);
    font-weight: 400;
    color: #2B3A4F;
    letter-spacing: -0.02em;
    white-space: nowrap;
    user-select: none;
    will-change: transform, opacity;
    transition: none;
}

/* --- Site Header (sticky, revealed on scroll) --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background-color: rgba(245, 240, 232, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(107, 91, 75, 0.15);
    z-index: 100;
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.site-header.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.header-brand {
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    font-weight: 400;
    color: #2B3A4F;
    letter-spacing: -0.02em;
}

.header-nav {
    display: flex;
    gap: 32px;
}

.header-nav-link {
    font-family: 'Inconsolata', monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6B5B4B;
    cursor: pointer;
    transition: color 0.3s ease;
}

.header-nav-link:hover {
    color: #2B3A4F;
}

/* --- Vector Art Interludes --- */
.vector-interlude {
    width: 100%;
    padding: 40px 0;
    background-color: #F5F0E8;
    overflow: hidden;
}

.vector-composition {
    width: 100%;
    height: 200px;
    display: block;
}

#interlude-3 .vector-composition {
    height: 150px;
}

.vector-element {
    will-change: transform;
    transform-origin: center center;
}

/* --- Module Assembly --- */
.module-assembly {
    width: 100%;
    padding: 60px 40px;
    background-color: #F5F0E8;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-auto-rows: minmax(200px, auto);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Module Base --- */
.module {
    padding: 32px;
    border: 1px solid rgba(107, 91, 75, 0.2);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.module.in-view {
    opacity: 1;
    transform: translateY(0);
}

.module:hover {
    border-color: rgba(107, 91, 75, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(107, 91, 75, 0.08);
}

.module.in-view:hover {
    transform: translateY(-2px);
}

/* Module Sizes */
.module-large {
    grid-column: span 2;
    grid-row: span 2;
}

.module-medium {
    grid-column: span 1;
    grid-row: span 2;
}

.module-small {
    grid-column: span 1;
    grid-row: span 1;
}

/* Module Tints */
.module-tint-white {
    background-color: #FAFAF5;
}

.module-tint-rose {
    background-color: rgba(196, 145, 155, 0.05);
}

.module-tint-olive {
    background-color: rgba(139, 154, 107, 0.05);
}

/* Featured Module */
.module-featured {
    border-left: 3px solid #8B9A6B;
}

/* Module Typography */
.module-label {
    font-family: 'Inconsolata', monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8B9A6B;
}

.module-heading {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(28px, 3.5vw, 48px);
    font-weight: 400;
    color: #2B3A4F;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.module-small .module-heading {
    font-size: clamp(22px, 2.5vw, 32px);
}

.module-body {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(16px, 1.5vw, 18px);
    font-weight: 400;
    color: #6B5B4B;
    line-height: 1.7;
}

/* --- Philosophy Section (Candle Zone) --- */
.philosophy-section {
    width: 100%;
    padding: 120px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F5F0E8;
}

.candle-zone {
    background: radial-gradient(circle at 50% 50%, rgba(212, 197, 160, 0.15), transparent 70%);
}

.philosophy-content {
    max-width: 800px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.philosophy-quote {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 400;
    font-style: italic;
    color: #2B3A4F;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.philosophy-attribution {
    font-family: 'Inconsolata', monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8B9A6B;
}

/* --- Candle-Atmospheric Footer --- */
.candle-footer {
    width: 100%;
    padding: 100px 40px 60px;
    background-color: #F5F0E8;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.footer-statement {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 400;
    font-style: italic;
    color: #2B3A4F;
    letter-spacing: -0.02em;
    line-height: 1.3;
    text-align: center;
}

.footer-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-text {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(16px, 1.5vw, 18px);
    font-weight: 400;
    color: #6B5B4B;
    line-height: 1.7;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid rgba(107, 91, 75, 0.2);
}

.footer-brand {
    font-family: 'DM Serif Display', serif;
    font-size: 16px;
    font-weight: 400;
    color: #2B3A4F;
    letter-spacing: -0.02em;
}

.footer-year {
    font-family: 'Inconsolata', monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #6B5B4B;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .module-large {
        grid-column: span 1;
        grid-row: span 2;
    }

    .module-medium {
        grid-column: span 1;
        grid-row: span 1;
    }

    .module-assembly {
        padding: 40px 20px;
    }

    .philosophy-section {
        padding: 80px 20px;
    }

    .candle-footer {
        padding: 60px 20px 40px;
    }

    .footer-details {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .site-header {
        padding: 0 20px;
    }

    .header-nav {
        gap: 16px;
    }

    .overture-title {
        font-size: clamp(60px, 12vw, 150px);
    }

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

@media (max-width: 480px) {
    .header-nav {
        display: none;
    }

    .module-heading {
        font-size: clamp(22px, 6vw, 36px);
    }

    .philosophy-quote,
    .footer-statement {
        font-size: clamp(22px, 6vw, 36px);
    }
}
