/* =========================================
   martial.quest — Styles
   ========================================= */

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

:root {
    --kiln-fire: #c1582a;
    --aged-clay: #a0714f;
    --temple-shadow: #1e1410;
    --parchment-light: #f2e8d5;
    --mountain-indigo: #2a2040;
    --ember-glow: #e8934a;
    --weathered-stone: #8b7d6b;
    --fired-bronze: #d4a03c;
    --burnt-umber: #3d2b1f;
    --mid-clay: #6b4c3a;
}

html {
    scroll-behavior: auto;
}

body {
    background: var(--temple-shadow);
    color: var(--parchment-light);
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    line-height: 1.7;
    overflow: hidden;
}

/* Scroll Container */
#scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

/* Sections */
.section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    scroll-snap-align: start;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.section.section-exiting {
    transform: scale(0.92);
    opacity: 0.6;
}

.section.section-entering {
    animation: sectionEnter 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes sectionEnter {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: none;
        opacity: 1;
    }
}

/* =========================================
   THE GATE (Section 1)
   ========================================= */
#the-gate {
    background: var(--temple-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gate-posts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.gate-post {
    position: absolute;
    top: 5%;
    width: 28px;
    height: 90%;
    border-radius: 6px;
    background: linear-gradient(180deg, #5a3a24 0%, #3d2b1f 40%, #2a1a10 100%);
    box-shadow: inset -3px 0 6px rgba(0,0,0,0.3), inset 3px 0 6px rgba(255,255,255,0.05), 4px 0 16px rgba(30,20,16,0.5);
}

.gate-post-left {
    left: 6%;
}

.gate-post-right {
    right: 6%;
    box-shadow: inset 3px 0 6px rgba(0,0,0,0.3), inset -3px 0 6px rgba(255,255,255,0.05), -4px 0 16px rgba(30,20,16,0.5);
}

.mountain-landscape {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    z-index: 1;
}

.mountain-layer {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.mountain-layer.visible {
    opacity: 1;
}

.gate-content {
    position: relative;
    z-index: 3;
    text-align: center;
    margin-top: 5vh;
}

.site-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: clamp(3.5rem, 9vw, 8rem);
    color: var(--parchment-light);
    letter-spacing: -0.02em;
    line-height: 0.95;
    font-feature-settings: 'liga' 1, 'kern' 1;
    text-shadow: 0 4px 20px rgba(30, 20, 16, 0.8), 0 2px 4px rgba(30, 20, 16, 0.9);
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.site-title.visible {
    opacity: 1;
}

.site-subtitle {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--weathered-stone);
    margin-top: 1rem;
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.site-subtitle.visible {
    opacity: 1;
}

.scroll-arrow {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: pulseArrow 2s ease-in-out infinite;
    cursor: pointer;
}

@keyframes pulseArrow {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
}

/* =========================================
   THE TRAINING HALL (Section 2)
   ========================================= */
#the-training-hall {
    background: var(--aged-clay);
    display: flex;
    flex-direction: column;
}

.training-hall-top {
    position: relative;
    flex: 0 0 60%;
    background: var(--temple-shadow);
    overflow: hidden;
}

#brushstroke-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ridgeline-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 2;
}

.training-hall-bottom {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.section-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4.5rem);
    letter-spacing: -0.02em;
    line-height: 0.95;
    font-feature-settings: 'liga' 1, 'kern' 1;
    color: var(--temple-shadow);
    margin-bottom: 1.5rem;
}

.philosophy-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.7;
    max-width: 42ch;
    color: var(--temple-shadow);
    text-align: center;
}

/* =========================================
   THE ARMORY (Section 3)
   ========================================= */
#the-armory {
    background: var(--temple-shadow);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 5%;
}

.armory-heading {
    color: var(--parchment-light);
    margin-bottom: 2rem;
    margin-left: 10%;
}

.armory-cards {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.clay-card {
    max-width: 480px;
    padding: 2.5rem;
    border-radius: 24px;
    background: var(--aged-clay);
    background-image: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 50%, rgba(0,0,0,0.08) 100%);
    box-shadow:
        inset 0 -4px 8px rgba(0,0,0,0.15),
        inset 0 4px 8px rgba(255,255,255,0.08),
        0 8px 24px rgba(30,20,16,0.4);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
    opacity: 0;
    transform: translateX(-40px);
}

.clay-card:hover {
    transform: scale(1.04);
    box-shadow:
        inset 0 -4px 8px rgba(0,0,0,0.2),
        inset 0 4px 8px rgba(255,255,255,0.1),
        0 12px 32px rgba(30,20,16,0.5);
}

.clay-card.visible {
    opacity: 1;
    transform: translateX(0);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.6s ease-out,
                box-shadow 0.3s ease;
}

.card-1 { margin-left: 10%; }
.card-2 { margin-left: 25%; }
.card-3 { margin-left: 15%; }

.card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    color: var(--parchment-light);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.card-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
    line-height: 1.7;
    color: var(--parchment-light);
    opacity: 0.85;
}

/* =========================================
   THE SUMMIT (Section 4)
   ========================================= */
#the-summit {
    background: var(--mountain-indigo);
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.star {
    position: absolute;
    border-radius: 50%;
    background: var(--fired-bronze);
}

.summit-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.summit-label {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--weathered-stone);
    margin-bottom: 1rem;
}

.counter-display {
    overflow: hidden;
    position: relative;
    height: clamp(5rem, 15vw, 12rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

#counter {
    font-family: 'Bodoni Moda', Georgia, serif;
    font-weight: 900;
    font-size: clamp(5rem, 15vw, 12rem);
    color: var(--ember-glow);
    line-height: 1;
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.summit-infinity {
    font-family: 'Bodoni Moda', Georgia, serif;
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--fired-bronze);
    margin-top: 1rem;
    opacity: 0.6;
}

/* =========================================
   NAVIGATION DOTS
   ========================================= */
.nav-dots {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    z-index: 100;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: var(--weathered-stone);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.3s ease;
    box-shadow:
        inset 0 -2px 4px rgba(0,0,0,0.15),
        inset 0 2px 4px rgba(255,255,255,0.08),
        0 2px 8px rgba(30,20,16,0.3);
}

.nav-dot.active {
    transform: scale(2);
    background: var(--kiln-fire);
}

.nav-dot:hover {
    background: var(--ember-glow);
}

/* =========================================
   Star pulse animation (generated per star)
   ========================================= */
@keyframes starPulse {
    0%, 100% { opacity: var(--star-opacity); }
    50% { opacity: 0.1; }
}
