/* ============================================
   ringworld.quest — Street-Style Terracotta Expedition
   ============================================ */

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

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

body {
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.85;
    color: #5A3818;
    background-color: #FFF4E8;
    overflow-x: hidden;
}

/* --- Parallax Container --- */
.parallax-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.parallax-bg {
    z-index: 1;
}

.parallax-mid {
    z-index: 2;
}

.parallax-fg {
    z-index: 3;
}

.terrain-mountains {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50vh;
}

.terrain-hills {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35vh;
}

.vegetation-left {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 15vw;
    max-width: 200px;
    height: 60vh;
}

.vegetation-right {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 15vw;
    max-width: 200px;
    height: 60vh;
}

/* --- Nature Elements --- */
.nature-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.nature-cloud {
    position: absolute;
    opacity: 0.7;
}

.nature-cloud-1 {
    top: 8vh;
    left: 10vw;
    width: 120px;
    animation: cloud-drift-1 60s ease-in-out infinite;
}

.nature-cloud-2 {
    top: 15vh;
    right: 15vw;
    width: 100px;
    animation: cloud-drift-2 80s ease-in-out infinite;
}

.nature-rock {
    position: absolute;
    opacity: 0.6;
}

.nature-rock-1 {
    bottom: 10vh;
    left: 5vw;
    width: 80px;
}

.nature-rock-2 {
    bottom: 15vh;
    right: 8vw;
    width: 60px;
}

@keyframes cloud-drift-1 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(40px); }
}

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

/* --- Hero Section --- */
.hero {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #FFF4E8 0%, #FFE8D0 100%);
    text-align: center;
    padding: clamp(24px, 5vw, 80px);
}

.hero-content {
    max-width: 880px;
    animation: hero-fade-in 1.5s ease-out forwards;
    opacity: 0;
}

@keyframes hero-fade-in {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    color: #2A1408;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5em;
    line-height: 1.1;
}

.hero-title-dot {
    color: #C08850;
}

.hero-subtitle {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: #8A5A38;
    letter-spacing: 0.15em;
    text-transform: lowercase;
    margin-bottom: 2em;
}

.hero-coordinates {
    display: inline-block;
    text-align: left;
    padding: 1em 1.5em;
    background: rgba(42, 20, 8, 0.04);
    border-left: 3px solid #C08850;
    border-radius: 0 4px 4px 0;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: scroll-indicator-appear 1s ease-out 2s forwards;
}

@keyframes scroll-indicator-appear {
    to { opacity: 0.6; }
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #C08850);
    animation: scroll-line-pulse 2s ease-in-out infinite;
}

@keyframes scroll-line-pulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.3); }
}

.scroll-text {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: #8A5A38;
    letter-spacing: 0.2em;
    text-transform: lowercase;
}

/* --- Botanical Borders --- */
.botanical-border {
    position: relative;
    z-index: 10;
    width: 100%;
    overflow: hidden;
    background: #FFF4E8;
}

.botanical-border svg {
    display: block;
    width: 100%;
    height: auto;
}

/* --- Expedition Sections --- */
.expedition-section {
    position: relative;
    z-index: 10;
    padding: clamp(48px, 10vh, 100px) clamp(24px, 5vw, 80px);
    background: #FFF4E8;
}

.section-content {
    max-width: 880px;
    margin: 0 auto;
}

.section-heading {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    color: #2A1408;
    margin-bottom: 0.8em;
    letter-spacing: 0.02em;
}

.section-body {
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.85;
    color: #5A3818;
    margin-bottom: 1.5em;
}

/* --- Field Notes --- */
.field-note {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 0.85em;
    color: #8A5A38;
    line-height: 1.7;
}

.field-note-block {
    padding: 1.5em 2em;
    background: rgba(42, 20, 8, 0.03);
    border-left: 3px solid #C08850;
    border-radius: 0 4px 4px 0;
    margin-bottom: 1.5em;
}

.field-note-label {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 0.75em;
    color: #C08850;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 0.5em;
}

/* --- Terrain Grid --- */
.terrain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.terrain-card {
    background: rgba(42, 20, 8, 0.02);
    border: 1px solid rgba(138, 90, 56, 0.08);
    border-radius: 8px;
    padding: 2em;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.terrain-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(42, 20, 8, 0.08);
    border-color: rgba(192, 136, 80, 0.2);
}

.terrain-card-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1em;
}

.terrain-card-icon svg {
    width: 100%;
    height: 100%;
}

.terrain-card-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #2A1408;
    margin-bottom: 0.5em;
}

.terrain-card-desc {
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    color: #5A3818;
    line-height: 1.7;
    margin-bottom: 1em;
}

.terrain-card-coord {
    display: block;
    font-size: 0.8em;
}

/* --- Flora Catalog --- */

.flora-specimens {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.flora-card {
    text-align: center;
    padding: 2em 1.5em;
    background: rgba(80, 128, 64, 0.02);
    border: 1px solid rgba(80, 128, 64, 0.08);
    border-radius: 8px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.flora-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(80, 128, 64, 0.08);
    border-color: #508040;
}

.flora-illustration {
    width: 120px;
    height: 160px;
    margin: 0 auto 1em;
}

.flora-illustration svg {
    width: 100%;
    height: 100%;
}

.flora-name {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #2A1408;
    margin-bottom: 0.3em;
}

.flora-card .field-note {
    display: block;
    font-size: 0.75em;
    margin-bottom: 0.8em;
}

.flora-desc {
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: #5A3818;
    line-height: 1.7;
}

/* --- Expedition Quote --- */
.expedition-quote {
    padding: 2em 2.5em;
    margin: 2em 0;
    background: rgba(42, 20, 8, 0.03);
    border-left: 4px solid #C08850;
    border-radius: 0 8px 8px 0;
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    color: #5A3818;
    line-height: 1.8;
}

.expedition-quote cite {
    display: block;
    margin-top: 1em;
    font-style: normal;
    font-weight: 400;
    font-size: 0.85em;
    color: #8A5A38;
}

/* --- Footer --- */
.site-footer {
    position: relative;
    z-index: 10;
    padding: clamp(48px, 8vh, 80px) clamp(24px, 5vw, 80px);
    background: linear-gradient(180deg, #FFF4E8 0%, #FFE8D0 100%);
    text-align: center;
}

.footer-content {
    max-width: 880px;
    margin: 0 auto;
}

.footer-ring-illustration {
    width: 200px;
    margin: 0 auto 2em;
}

.footer-ring-illustration svg {
    width: 100%;
    height: auto;
}

.footer-text {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #2A1408;
    letter-spacing: 0.08em;
    margin-bottom: 0.5em;
}

.footer-note {
    font-size: 0.8em;
    opacity: 0.7;
}

/* --- Scroll Reveal Animation --- */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered reveal delays for children */
.reveal-element.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-element.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-element.reveal-delay-3 { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .terrain-grid {
        grid-template-columns: 1fr;
    }

    .flora-specimens {
        grid-template-columns: 1fr;
    }

    .nature-cloud,
    .nature-rock {
        display: none;
    }

    .vegetation-left,
    .vegetation-right {
        opacity: 0.5;
    }

    .hero-coordinates {
        font-size: 0.75em;
    }
}

@media (max-width: 480px) {
    .hero-title {
        letter-spacing: 0.04em;
    }

    .expedition-quote {
        padding: 1.5em;
    }

    .field-note-block {
        padding: 1em 1.2em;
    }
}
