/* ============================================
   lupine.day - Frutiger Aero Alpine Field Guide
   ============================================ */

/* --- Design Palette Reference ---
   #0A1628 - Midnight Alpine (Background Sky)
   #1B3A5C - Deep Ridgeline (Mountain Base)
   #2A4B6E - Mountain Mid
   #00E5FF - Electric Cyan (Primary Accent)
   #7B2FFF - Lupine Violet (Secondary Accent)
   #FF6B35 - Sunset Ember (Warm Highlight)
   #00FF94 - Alpine Meadow (Success/Growth)
   #E8F0FA - Snow White (Text Primary)
   #8BAFC8 - Mist Blue (Text Secondary)
   #FF3CAC - Wild Lupine (Lupine Pink)
*/

/* --- 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.8vw, 1.15rem);
    line-height: 1.72;
    color: #E8F0FA;
    background: #0A1628;
    overflow-x: hidden;
}

/* --- Mountain Background --- */
#mountain-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(180deg, #0A1628 0%, #1B3A5C 60%, #2A4B6E 100%);
}

.ridge {
    position: absolute;
    bottom: 0;
    left: -10%;
    width: 120%;
    height: 50%;
    will-change: transform;
}

.ridge-1 {
    height: 30%;
    background: linear-gradient(180deg, transparent 0%, #0A1628 100%);
    clip-path: polygon(0% 80%, 5% 60%, 12% 70%, 20% 45%, 30% 55%, 38% 30%, 48% 50%, 55% 25%, 65% 40%, 72% 20%, 80% 35%, 88% 15%, 95% 30%, 100% 50%, 100% 100%, 0% 100%);
    opacity: 0.8;
    z-index: 5;
}

.ridge-2 {
    height: 35%;
    background: linear-gradient(180deg, transparent 0%, #1B3A5C 100%);
    clip-path: polygon(0% 70%, 8% 50%, 15% 62%, 25% 38%, 35% 48%, 45% 28%, 52% 42%, 62% 22%, 70% 38%, 78% 18%, 85% 32%, 92% 12%, 100% 35%, 100% 100%, 0% 100%);
    opacity: 0.6;
    z-index: 4;
}

.ridge-3 {
    height: 42%;
    background: linear-gradient(180deg, transparent 0%, #2A4B6E80 100%);
    clip-path: polygon(0% 65%, 10% 45%, 18% 55%, 28% 35%, 40% 42%, 50% 22%, 58% 36%, 68% 18%, 75% 30%, 85% 15%, 92% 28%, 100% 40%, 100% 100%, 0% 100%);
    opacity: 0.4;
    z-index: 3;
}

.ridge-4 {
    height: 50%;
    background: linear-gradient(180deg, transparent 0%, #1B3A5C40 100%);
    clip-path: polygon(0% 60%, 8% 42%, 20% 52%, 32% 30%, 42% 40%, 55% 20%, 65% 35%, 75% 15%, 82% 28%, 90% 10%, 100% 30%, 100% 100%, 0% 100%);
    opacity: 0.25;
    z-index: 2;
}

.ridge-5 {
    height: 55%;
    background: linear-gradient(180deg, transparent 0%, #0A162840 100%);
    clip-path: polygon(0% 55%, 12% 38%, 22% 48%, 35% 25%, 48% 38%, 60% 18%, 70% 30%, 80% 12%, 90% 22%, 100% 35%, 100% 100%, 0% 100%);
    opacity: 0.15;
    z-index: 1;
}

/* Clouds */
.cloud {
    position: absolute;
    width: 300px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    z-index: 6;
    animation: cloudDrift 120s linear infinite;
}

.cloud-1 {
    top: 25%;
    left: -300px;
    width: 350px;
    animation-duration: 100s;
}

.cloud-2 {
    top: 40%;
    left: -200px;
    width: 250px;
    animation-duration: 140s;
    animation-delay: -40s;
}

.cloud-3 {
    top: 15%;
    left: -400px;
    width: 400px;
    opacity: 0.5;
    animation-duration: 160s;
    animation-delay: -80s;
}

@keyframes cloudDrift {
    from { transform: translateX(0); }
    to { transform: translateX(calc(100vw + 600px)); }
}

/* Altitude Markers */
.altitude-marker {
    position: absolute;
    left: 0;
    width: 100%;
    border-top: 1px dashed rgba(139, 175, 200, 0.15);
    z-index: 1;
}

.altitude-marker span {
    position: absolute;
    right: 20px;
    top: -8px;
    font-family: 'Source Code Pro', monospace;
    font-size: 11px;
    color: rgba(139, 175, 200, 0.3);
    letter-spacing: 0.04em;
}

/* --- Navigation --- */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 12px 0;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    background: rgba(10, 22, 40, 0.65);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-inner {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
}

.nav-pill {
    font-family: 'Commissioner', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: #8BAFC8;
    text-decoration: none;
    padding: 6px 20px;
    border-radius: 100px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    letter-spacing: 0.02em;
}

.nav-pill:hover {
    color: #E8F0FA;
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.3);
}

.nav-pill.active {
    color: #0A1628;
    background: #00E5FF;
    border-color: #00E5FF;
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.4);
}

/* --- Sections --- */
.section {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#hero {
    min-height: 100vh;
    padding: 0 40px;
}

#meadow {
    min-height: 120vh;
    padding-top: 100px;
}

#anatomy {
    min-height: 120vh;
}

#ecology {
    min-height: 110vh;
    padding-top: 100px;
}

#summit {
    min-height: 80vh;
    padding-bottom: 120px;
}

.section-heading {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    letter-spacing: 0.01em;
    color: #E8F0FA;
    margin-bottom: 50px;
    text-align: center;
}

/* --- Glass Block --- */
.glass-block {
    position: relative;
    background: rgba(180, 210, 240, 0.15);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 40, 80, 0.12);
    overflow: hidden;
}

.reflective-strip {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 30%, rgba(255, 255, 255, 0.4) 70%, transparent 100%);
    z-index: 2;
}

/* --- Hero Section --- */
.hero-block {
    max-width: 700px;
    width: 90%;
    padding: 60px 50px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 1.2s ease-out 0.3s forwards;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    position: relative;
}

.hero-lupine-vector {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.lupine-stalk-hero {
    width: 50px;
    height: 130px;
    animation: lupineGrow 1.2s ease-out 0.5s both;
}

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

.hero-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 800;
    font-size: clamp(2.8rem, 7vw, 4.8rem);
    letter-spacing: 0.01em;
    color: #E8F0FA;
    margin-bottom: 12px;
    text-shadow: 0 0 40px rgba(0, 229, 255, 0.2);
}

.hero-subtitle {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: #8BAFC8;
    letter-spacing: 0.02em;
    margin-bottom: 40px;
}

.scroll-chevron {
    animation: chevronPulse 2s ease-in-out infinite;
    cursor: pointer;
    display: inline-block;
}

@keyframes chevronPulse {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.5; }
}

/* --- Zoom Focus Animation --- */
.zoom-focus {
    opacity: 0;
    transform: scale(0.85);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.zoom-focus.in-view {
    opacity: 1;
    transform: scale(1);
}

/* --- Meadow Grid --- */
.modular-grid {
    display: grid;
    gap: 24px;
    width: 100%;
    max-width: 1200px;
}

.meadow-grid {
    grid-template-columns: repeat(3, 1fr);
}

.species-card {
    padding: 30px 24px 24px;
    text-align: center;
}

.species-illustration {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.species-svg {
    width: 80px;
    height: 120px;
}

.species-name {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #E8F0FA;
    font-style: italic;
    margin-bottom: 4px;
    text-shadow: 0 0 20px rgba(123, 47, 255, 0.3);
}

.species-card:nth-child(1) .species-name { color: #7B2FFF; }
.species-card:nth-child(2) .species-name { color: #FF3CAC; }
.species-card:nth-child(3) .species-name { color: #00FF94; }

.species-common {
    font-weight: 300;
    font-size: 0.9rem;
    color: #8BAFC8;
    margin-bottom: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.species-desc {
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.65;
    color: #E8F0FA;
    margin-bottom: 18px;
}

.species-data {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.data-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 40, 80, 0.06);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.data-label {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8BAFC8;
}

.data-value {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    color: #00E5FF;
    background: rgba(0, 40, 80, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

/* --- Anatomy Section --- */
.anatomy-block {
    max-width: 1100px;
    width: 95%;
    padding: 40px;
}

.anatomy-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.anatomy-diagram {
    display: flex;
    justify-content: center;
}

#anatomy-svg {
    width: 100%;
    max-width: 450px;
    height: auto;
}

.callout-label {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.callout line {
    transition: stroke-dashoffset 0.8s ease;
}

.callout text,
.callout circle {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.callout.revealed line {
    stroke-dashoffset: 0 !important;
}

.callout.revealed text,
.callout.revealed circle {
    opacity: 1;
}

.anatomy-info h3 {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 14px;
    color: #E8F0FA;
}

.anatomy-info > p {
    font-weight: 400;
    font-size: 0.95rem;
    color: #8BAFC8;
    margin-bottom: 24px;
    line-height: 1.7;
}

.anatomy-detail {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.anatomy-detail strong {
    font-weight: 700;
    font-size: 0.95rem;
    color: #00E5FF;
    display: block;
    margin-bottom: 4px;
}

.anatomy-detail p {
    font-weight: 400;
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(232, 240, 250, 0.8);
}

/* --- Glossy Orbs --- */
.glossy-orb {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.6), #00E5FF 40%, #007A99 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 229, 255, 0.3);
    animation: orbPulse 2s ease-in-out infinite;
}

.orb-small {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 0.75rem;
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* --- Ecology Grid --- */
.ecology-grid {
    grid-template-columns: repeat(2, 1fr);
}

.eco-card {
    overflow: hidden;
}

.eco-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
}

.eco-header h3 {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #0A1628;
}

.eco-card:nth-child(1) .glossy-orb { background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.6), #FF6B35 40%, #CC5528 100%); }
.eco-card:nth-child(3) .glossy-orb { background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.6), #00FF94 40%, #009960 100%); }

.eco-body {
    padding: 20px;
}

.eco-note {
    font-weight: 400;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #8BAFC8;
    margin-top: 14px;
}

/* Bar Chart */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bar-row {
    display: grid;
    grid-template-columns: 140px 1fr 60px;
    gap: 10px;
    align-items: center;
}

.bar-label {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.8);
}

.bar-track {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 5px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.bar-fill.animated {
    width: var(--target-width);
}

.bar-value {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.75rem;
    color: #00E5FF;
    text-align: right;
}

/* Pollinator Visual */
.pollinator-visual,
.topo-visual,
.cycle-visual {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.bee-svg,
.topo-svg,
.cycle-svg {
    width: 100%;
    max-width: 260px;
    height: auto;
}

.bee-path {
    animation: beeFlight 3s ease-in-out infinite alternate;
}

@keyframes beeFlight {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 20; }
}

/* --- Summit Section --- */
.summit-block {
    max-width: 1000px;
    width: 95%;
    padding: 50px 40px;
    text-align: center;
}

.summit-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin-bottom: 20px;
    color: #E8F0FA;
}

.summit-text {
    font-weight: 400;
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    line-height: 1.75;
    color: #8BAFC8;
    max-width: 700px;
    margin: 0 auto 40px;
}

.summit-field {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
    height: 140px;
    margin-bottom: 40px;
}

.summit-lupine {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: sway 4s ease-in-out infinite alternate;
    transform-origin: bottom center;
}

@keyframes sway {
    from { transform: rotate(-1deg); }
    to { transform: rotate(1deg); }
}

.summit-lupine svg {
    display: block;
}

.return-button {
    font-family: 'Commissioner', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #00E5FF;
    background: transparent;
    border: 2px solid #00E5FF;
    border-radius: 100px;
    padding: 14px 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.return-button:hover {
    color: #0A1628;
    background: #00E5FF;
    box-shadow: 0 0 24px rgba(0, 229, 255, 0.4);
}

/* --- Water Droplets --- */
.water-drops {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 20;
}

.droplet {
    position: absolute;
    width: 8px;
    height: 12px;
    background: radial-gradient(ellipse at 40% 30%, rgba(255,255,255,0.6), rgba(0,229,255,0.2) 60%, transparent);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0.6;
}

.droplet::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .meadow-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .ecology-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .anatomy-content {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 60px 20px;
    }

    .hero-block {
        padding: 40px 24px;
    }

    .summit-block {
        padding: 30px 20px;
    }

    .anatomy-block {
        padding: 24px;
    }

    .bar-row {
        grid-template-columns: 100px 1fr 50px;
    }

    .nav-pill {
        padding: 5px 12px;
        font-size: 0.78rem;
    }
}

@media (max-width: 480px) {
    .nav-inner {
        gap: 4px;
    }

    .nav-pill {
        padding: 4px 10px;
        font-size: 0.72rem;
    }

    .bar-row {
        grid-template-columns: 80px 1fr 45px;
    }

    .bar-label {
        font-size: 0.7rem;
    }
}
