/* ==========================================================
   rational.today -- Terracotta Cyberpunk / Organic-Flow
   ========================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --terracotta-deep: #A0522D;
    --clay-dark: #2A1A10;
    --burnished-copper: #C48B5A;
    --warm-cream: #F5E8D8;
    --nature-olive: #6B7B4A;
    --royal-gold: #D4A040;
    --earth-shadow: #3D2A1A;
}

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

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

body {
    background-color: var(--clay-dark);
    color: var(--warm-cream);
    font-family: 'Raleway', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.75;
    overflow-x: hidden;
}

/* ---------- Ghostly S-Curve Guide Path ---------- */
.guide-path {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.06;
}

/* ---------- Typography ---------- */
h1, h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    color: var(--warm-cream);
    line-height: 1.15;
}

h2 {
    font-size: clamp(32px, 5vw, 72px);
    margin-bottom: 1.5rem;
}

em {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
}

p {
    margin-bottom: 1.25rem;
}

a {
    color: var(--burnished-copper);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-shadow: 0 0 8px rgba(196, 139, 90, 0.3);
}

/* ---------- Grand Atrium ---------- */
#grand-atrium {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--terracotta-deep) 0%, var(--clay-dark) 100%);
    overflow: hidden;
    z-index: 1;
}

/* Wave-form backgrounds in atrium */
.wave-bg {
    position: absolute;
    width: 140%;
    height: 100%;
    top: 0;
    left: -20%;
    pointer-events: none;
    z-index: 1;
}

.wave-1 {
    animation: waveShift1 12s ease-in-out infinite;
}

.wave-2 {
    animation: waveShift2 15s ease-in-out infinite;
}

.wave-3 {
    animation: waveShift3 18s ease-in-out infinite;
}

@keyframes waveShift1 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(40px); }
}

@keyframes waveShift2 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-30px); }
}

@keyframes waveShift3 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(25px); }
}

/* Nature branch decorations */
.nature-branch {
    position: absolute;
    height: 70%;
    width: auto;
    top: 15%;
    z-index: 2;
    pointer-events: none;
}

.branch-left {
    left: 2vw;
}

.branch-right {
    right: 2vw;
}

.branch-grow path,
.branch-grow line {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: branchGrow 2s ease-out 0.8s forwards;
}

.branch-grow ellipse {
    opacity: 0;
    animation: leafAppear 1s ease-out 2s forwards;
}

@keyframes branchGrow {
    to { stroke-dashoffset: 0; }
}

@keyframes leafAppear {
    to { opacity: 1; }
}

/* Atrium content */
#atrium-content {
    position: relative;
    z-index: 3;
    text-align: center;
    opacity: 0;
    animation: wordmarkFadeIn 1.5s ease-out 1.2s forwards;
}

#wordmark {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(48px, 8vw, 120px);
    color: var(--warm-cream);
    text-shadow: 0 0 40px rgba(212, 160, 64, 0.25), 0 0 80px rgba(212, 160, 64, 0.1);
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
}

#tagline {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(18px, 2.5vw, 28px);
    color: var(--burnished-copper);
    opacity: 0.85;
}

@keyframes wordmarkFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Wave Dividers ---------- */
.wave-divider {
    width: 100%;
    height: 80px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.wave-divider svg {
    width: 100%;
    height: 100%;
}

/* ---------- Content Sections (Organic Flow) ---------- */
.content-section {
    position: relative;
    z-index: 1;
    max-width: 65vw;
    padding: 4rem 3rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.content-section:hover {
    border-left-color: var(--royal-gold);
}

.flow-left {
    margin-left: 5vw;
    margin-right: auto;
}

.flow-right {
    margin-left: 15vw;
    margin-right: auto;
}

.section-label {
    display: inline-block;
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 12px;
    color: var(--burnished-copper);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.content-section h2 {
    color: var(--warm-cream);
    transition: text-shadow 0.2s ease;
}

.content-section:hover h2 {
    text-shadow: 0 0 12px rgba(212, 160, 64, 0.15);
}

.content-section p {
    color: var(--warm-cream);
    opacity: 0.88;
}

/* Scroll reveal for content sections */
.content-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease, border-left-color 0.2s ease;
}

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

/* ---------- Nature Integration Zones ---------- */
.nature-zone {
    width: 100%;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.nature-illustration {
    width: 100%;
    height: auto;
    max-height: 200px;
}

/* ---------- Throne Room Footer ---------- */
#throne-room {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, var(--clay-dark) 0%, #1A0F08 100%);
    padding: 4rem 2rem;
    margin-top: 4rem;
    text-align: center;
    border-top: 1px solid var(--earth-shadow);
}

.footer-ornament {
    width: 100%;
    height: 40px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.footer-ornament-bottom {
    margin-bottom: 0;
    margin-top: 2rem;
}

.footer-ornament svg {
    width: 100%;
    height: 100%;
}

.footer-content {
    padding: 1rem 0;
}

.footer-wordmark {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(24px, 3vw, 36px);
    color: var(--warm-cream);
    text-shadow: 0 0 20px rgba(212, 160, 64, 0.15);
    margin-bottom: 0.75rem;
}

.footer-date {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 12px;
    color: var(--burnished-copper);
    opacity: 0.6;
    margin-bottom: 1rem;
}

.footer-note {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(14px, 1.5vw, 18px);
    color: var(--burnished-copper);
    opacity: 0.5;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .content-section {
        max-width: 90vw;
        padding: 3rem 1.5rem;
    }

    .flow-left {
        margin-left: 3vw;
    }

    .flow-right {
        margin-left: 5vw;
    }

    .nature-branch {
        display: none;
    }

    #wordmark {
        font-size: clamp(36px, 10vw, 80px);
    }
}

@media (max-width: 480px) {
    .content-section {
        max-width: 95vw;
        padding: 2rem 1rem;
    }

    .flow-left,
    .flow-right {
        margin-left: 2.5vw;
    }

    .wave-divider {
        height: 50px;
    }
}
