/* ============================================================
   TORON.DAY - Flat-Design Naturalism Aurora Aesthetic
   ============================================================ */

/* GLOBAL RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0F1A12;
    color: #C8D4CA;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

/* Display Font: Dela Gothic One */
h1, h2, .panel-heading, .closing-statement {
    font-family: 'Dela Gothic One', cursive;
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 0.95;
}

/* Hero Title */
.hero-title {
    font-size: clamp(4rem, 12vw, 10rem);
    color: #F0F7F2;
    text-align: center;
    animation: heroTitleFadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 2500ms both;
    opacity: 0;
    transform: scale(1.3);
}

@keyframes heroTitleFadeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Panel Headings */
.panel-heading {
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: #1B2A1E;
    margin-bottom: 1.5rem;
}

/* Closing Statement */
.closing-statement {
    font-size: clamp(3rem, 10vw, 8rem);
    color: #F0F7F2;
    text-align: center;
    max-width: 90%;
    margin: 0 auto;
    line-height: 1.1;
}

/* Body Font: Commissioner */
body, .body-text, p {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    line-height: 1.65;
    letter-spacing: 0.01em;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.body-text {
    color: #2E4A33;
}

/* Accent/Caption Font: Caveat */
.accent-text {
    font-family: 'Caveat', cursive;
    font-weight: 500;
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    color: #4EEDBE;
}

/* ============================================================
   SCROLL TERRAIN & PANELS
   ============================================================ */

.scroll-terrain {
    display: flex;
    width: 500vw;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.panel {
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-content {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 4rem;
}

/* ============================================================
   PANEL 1: THE THRESHOLD
   ============================================================ */

.panel-1 {
    background: #0F1A12;
}

.treeline-silhouette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.treeline-background {
    animation: treeTrunkFadeIn 0.6s ease-out 200ms both;
    opacity: 0;
}

.treeline-midground {
    animation: treeTrunkFadeIn 0.6s ease-out 500ms both;
    opacity: 0;
}

.treeline-foreground {
    animation: treeTrunkFadeIn 0.6s ease-out 800ms both;
    opacity: 0;
}

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

.sky-gradient {
    animation: skyGradientReveal 1s ease-out 1200ms both;
    mask-image: linear-gradient(90deg, transparent 0%, black 100%);
    mask-position: 100% 0;
    animation: skyGradientReveal 1s ease-out 1200ms forwards;
}

@keyframes skyGradientReveal {
    from {
        mask-position: 100% 0;
        opacity: 0;
    }
    to {
        mask-position: 0% 0;
        opacity: 1;
    }
}

.drifting-leaf {
    position: absolute;
    bottom: 20%;
    right: 5%;
    opacity: 0;
    animation: leafDrift 12s linear 2500ms infinite;
}

@keyframes leafDrift {
    0% {
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        transform: translateX(300px) rotate(360deg);
        opacity: 1;
    }
}

.scroll-hint {
    position: absolute;
    right: 3rem;
    bottom: 3rem;
    color: #C8D4CA;
    opacity: 0.6;
    animation: pulseFade 2s ease-in-out 3000ms infinite;
}

@keyframes pulseFade {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 0.8; transform: translateY(-8px); }
}

/* ============================================================
   PANEL 2: THE FIRST CLEARING
   ============================================================ */

.panel-2 {
    background: #E8F0EA;
}

/* ============================================================
   PANEL 3: THE CANOPY VIEW
   ============================================================ */

.panel-3 {
    background: #E8F0EA;
}

/* ============================================================
   COLLAGE COMPOSITION
   ============================================================ */

.collage-group {
    position: relative;
    width: 80vw;
    height: 70vh;
    margin: 0 auto;
}

.collage-piece {
    position: absolute;
    padding: 2rem;
    border-radius: 0;
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    transform: rotate(var(--rotation, 0deg));
}

.collage-piece:hover {
    transform: translateY(-8px) rotate(var(--rotation, 0deg));
}

.collage-piece p {
    margin: 0;
}

.collage-leaf {
    position: absolute;
    cursor: pointer;
    transform: rotate(var(--rotation, 0deg));
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.collage-leaf:hover {
    transform: translateY(-8px) rotate(var(--rotation, 0deg));
}

.collage-piece.elevated {
    box-shadow: none;
}

.collage-piece.elevated:hover {
    transform: translateY(-8px) rotate(var(--rotation, 0deg));
}

/* ============================================================
   PANEL 4: THE ROOT SYSTEM
   ============================================================ */

.panel-4 {
    background: #0F1A12;
    flex-direction: column;
}

.tree-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    z-index: 5;
}

.radial-content {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 10;
}

.root-text {
    position: absolute;
    width: 200px;
    text-align: center;
    color: #C8D4CA;
    top: 50%;
    left: 50%;
    transform: rotate(var(--angle)) translateX(200px) rotate(calc(var(--angle) * -1));
}

.root-text p {
    font-size: 0.95rem;
    margin: 0;
}

/* ============================================================
   PANEL 5: THE HORIZON
   ============================================================ */

.panel-5 {
    background: #0F1A12;
}

.treeline-mirror {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    transform: scaleX(-1);
}

.sky-gradient-intense {
    animation: skyGradientReveal 1s ease-out 0ms forwards;
    opacity: 1;
}

/* ============================================================
   PROGRESS BAR & NAVIGATION
   ============================================================ */

.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 4px;
    background: #1B2A1E;
    z-index: 100;
    overflow: hidden;
}

.progress-fill {
    position: relative;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00E5A0, #4EEDBE, #7B68EE, #9B7BF7, #E040FB);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.1s linear;
}

.progress-overlay {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background: #1B2A1E;
    transition: width 0.1s linear;
}

.panel-markers {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 101;
}

.marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 300ms ease-out;
    padding: 0;
}

.marker:hover {
    background: rgba(255, 255, 255, 0.6);
}

.marker.active {
    transform: scale(1.5);
    background: rgba(255, 255, 255, 0.9);
}

/* ============================================================
   HOVER-LIFT INTERACTION PATTERN
   ============================================================ */

.collage-piece,
.collage-leaf {
    cursor: pointer;
}

.collage-piece:active,
.collage-leaf:active {
    transform: translateY(-8px) rotate(var(--rotation, 0deg));
}

/* ============================================================
   COLOR PALETTE REFERENCE
   ============================================================ */

/* Midnight Loam: #0F1A12 */
/* Dawn Clearing: #E8F0EA */
/* Deep Spruce: #1B2A1E */
/* Silver Birch: #F0F7F2 */
/* Forest Floor: #2E4A33 */
/* Canopy Mid: #3A5A3C */
/* Lichen Gray: #C8D4CA */
/* Spectral Green: #00E5A0 */
/* Phantom Violet: #7B68EE */
/* Borealis Pink: #E040FB */
/* Aqua Mist: #4EEDBE */
/* Moss Gold: #A8943D */
/* Sage Veil: #6B8F71 */

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */

@media (max-width: 768px) {
    .collage-group {
        width: 90vw;
        height: 60vh;
    }

    .panel-heading {
        font-size: clamp(1.5rem, 5vw, 3rem);
    }

    .closing-statement {
        font-size: clamp(2rem, 8vw, 4rem);
    }

    .tree-rings {
        width: 120px !important;
        height: 120px !important;
    }

    .root-text {
        font-size: 0.8rem;
        width: 150px;
        transform: rotate(var(--angle)) translateX(120px) rotate(calc(var(--angle) * -1));
    }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
