:root {
    --font-display: "Fraunces", "Times New Roman", serif;
    --font-ui: "Manrope", "Segoe UI", sans-serif;
    --bg-page: #1f2328;
    --surface: #2b3139;
    --text-strong: #f0e7d8;
    --text-body: #d7cdbf;
    --text-muted: #b8ad9d;
    --label: #d2b06c;
    --border-soft: #8f7446;
    --radius-md: 14px;
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 14px 34px rgba(0, 0, 0, 0.35);
    --motion-med: 320ms;
    --ease-standard: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    font-family: var(--font-ui);
    font-size: 17.5px;
    line-height: 1.72;
    letter-spacing: 0.008em;
    margin: 0;
    background-color: var(--bg-page);
    scroll-snap-type: y mandatory;
    overflow-y: auto;
    background-image:
        radial-gradient(circle at 18% 14%, rgba(240, 225, 196, 0.08) 0%, rgba(240, 225, 196, 0) 48%),
        radial-gradient(circle at 82% 78%, rgba(181, 139, 69, 0.07) 0%, rgba(181, 139, 69, 0) 46%),
        linear-gradient(
            124deg,
            rgba(255, 243, 217, 0.08) 0%,
            rgba(255, 243, 217, 0) 18%,
            rgba(0, 0, 0, 0.05) 25%,
            rgba(255, 243, 217, 0.06) 34%,
            rgba(255, 243, 217, 0) 52%,
            rgba(0, 0, 0, 0.04) 65%,
            rgba(255, 243, 217, 0.04) 78%,
            rgba(255, 243, 217, 0) 100%
        );
    background-attachment: fixed;
    color: var(--text-body);
}

.hero-header {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(196, 157, 88, 0.18) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.7) 100%),
                radial-gradient(ellipse at 60% 20%, rgba(210, 176, 108, 0.12) 0%, transparent 50%),
                var(--bg-page);
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.4);
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 650;
    color: var(--text-strong);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.hero-header p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-muted);
    margin-bottom: 3rem;
    letter-spacing: 0.01em;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    color: var(--label);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    animation: bounceDown 2s infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

.scroll-indicator svg {
    width: 20px;
    height: 20px;
    animation: fadeInOut 2s infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.slides {
    width: 100%;
}

.scroll-section {
    min-height: 112vh;
    height: 112vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: stretch;
    padding: 0 1.5rem;
}

.slide-frame {
    width: min(1200px, 100%);
    margin: 0 auto;
    min-height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
    padding: 3rem 0;
    opacity: 0.12;
    transform: translateY(40px) scale(0.975);
    filter: blur(1px) brightness(0.88);
    transition: opacity 420ms var(--ease-standard), transform 420ms var(--ease-standard), filter 420ms var(--ease-standard);
    will-change: opacity, transform, filter;
}

.scroll-section.active .slide-frame {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0) brightness(1);
}

.scroll-section:first-child .slide-frame {
    padding-top: 14rem;
}

.scroll-section.alternate {
    direction: rtl;
}

.scroll-section.alternate .slide-frame,
.scroll-section.alternate .slide-frame > * {
    direction: ltr;
}

/* Layout Variations */
.scroll-section:nth-child(3) .slide-frame {
    grid-template-columns: 0.6fr 1.4fr;
}

.scroll-section:nth-child(3) .scroll-text {
    order: 2;
}

.scroll-section:nth-child(3) .scroll-visual {
    order: 1;
}

.scroll-section:nth-child(5) .slide-frame {
    grid-template-columns: 1.4fr 0.6fr;
}

/* Era-Specific Color Shifts */
.scroll-section:nth-child(1) --label,
.scroll-section:nth-child(2) --label {
    --label: #c9a86e;
    --border-soft: #9d7940;
}

.scroll-section:nth-child(2) .era-label,
.scroll-section:nth-child(3) .era-label {
    color: #c9a86e;
    border-bottom-color: #c9a86e;
}

.scroll-section:nth-child(3) .visual-content p,
.scroll-section:nth-child(4) .visual-content p {
    color: #e8d5a8;
}

.scroll-section:nth-child(5) .era-label,
.scroll-section:nth-child(6) .era-label {
    color: #d9a855;
    border-bottom-color: #d9a855;
}

.scroll-section:nth-child(5) .visual-content p,
.scroll-section:nth-child(6) .visual-content p {
    color: #d9a855;
    border-top-color: #d9a855;
}

.scroll-section:nth-child(7) .era-label {
    color: #a8d4e8;
    border-bottom-color: #a8d4e8;
}

.scroll-section:nth-child(7) .visual-content p {
    color: #a8d4e8;
    border-top-color: #a8d4e8;
}

.scroll-text {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.scroll-step {
    background: rgba(40, 46, 55, 0.7);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 1.75rem 2rem;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: min(100%, 520px);
    max-height: 74vh;
    overflow: auto;
}

.era-label {
    display: inline-block;
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--label);
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--label);
}

.scroll-step h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 2.8vw, 2.4rem);
    font-weight: 650;
    color: var(--text-strong);
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 1.2rem;
}

.scroll-step p {
    color: var(--text-body);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.scroll-step p:last-child {
    margin-bottom: 0;
}

.scroll-step strong {
    color: var(--text-strong);
    font-weight: 600;
}

.scroll-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 0;
}

.visual-content {
    width: min(100%, 520px);
    height: min(74vh, 520px);
    background: rgba(40, 46, 55, 0.8);
    border: 3px solid var(--border-soft);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 
        0 0 0 12px var(--bg-page),
        0 0 0 14px var(--border-soft),
        var(--shadow-lg),
        inset 0 0 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
}

.visual-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.95);
}

.visual-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.25) 100%);
    pointer-events: none;
}

.visual-content p {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    color: var(--label);
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.6rem 1rem;
    border-top: 1px solid var(--label);
    backdrop-filter: blur(8px);
}

footer {
    background-color: #0d0f12;
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 1.5rem;
    margin-top: 4rem;
    font-family: var(--font-ui);
    font-weight: 500;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    border-top: 1px solid var(--border-soft);
}

/* Responsive Design */
@media (max-width: 900px) {
    .scroll-section {
        min-height: 100vh;
        height: auto;
        padding: 1.5rem 1rem;
    }

    .slide-frame {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem 0;
        min-height: auto;
        opacity: 1;
        transform: none;
    }

    .scroll-step,
    .visual-content {
        width: 100%;
        max-height: none;
    }

    .visual-content {
        height: min(50vh, 420px);
    }

    .scroll-section.alternate {
        direction: ltr;
    }

    .scroll-visual {
        min-height: 320px;
    }

    .hero-header {
        height: 80vh;
    }

    .scroll-step {
        padding: 2rem;
    }
}

@media (max-width: 640px) {
    .hero-header {
        height: 60vh;
        padding: 1rem;
    }

    .hero-header h1 {
        font-size: 2rem;
    }

    .scroll-section {
        min-height: 100vh;
        padding: 1rem;
    }

    .scroll-step {
        padding: 1.5rem;
    }

    .scroll-visual {
        min-height: 260px;
    }

    .visual-content {
        height: min(42vh, 320px);
    }
}
