:root {
    --midnight-loam: #0d1b12;
    --deep-forest: #1a2e23;
    --frost-dew: #e8f0ec;
    --amber-resin: #c9a84c;
    --verdigris: #5b9e8f;
    --weathered-sage: #7fa693;
    --dried-blood: #8b4a4a;
    --new-growth: #4a8b5e;
    --evening-soil: #1a1710;
    --frost-blur: blur(16px) saturate(1.2);
    --frost-bg: rgba(232, 240, 236, 0.08);
    --frost-border: rgba(232, 240, 236, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--midnight-loam);
    color: var(--frost-dew);
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* ========== HERO ========== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 80%, #1a2e23 0%, #0d1b12 60%, #0d1b12 100%);
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.logotype {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 7vw, 6rem);
    font-variation-settings: 'WONK' 1, 'opsz' 72;
    color: var(--frost-dew);
    opacity: 0;
    transform: translateY(8px);
    animation: logotype-in 1.2s ease-out 0.8s forwards;
    letter-spacing: -0.02em;
}

.tagline {
    font-family: 'Nunito Sans', sans-serif;
    font-style: italic;
    font-weight: 400;
    color: var(--frost-dew);
    opacity: 0;
    font-size: clamp(1rem, 2vw, 1.4rem);
    animation: tagline-in 1s ease-out 2s forwards;
    margin-top: 0.5em;
}

@keyframes logotype-in {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes tagline-in {
    to { opacity: 0.5; transform: translateY(0); }
}

/* Breath pulse */
.breath-pulse {
    position: absolute;
    bottom: 40px;
    z-index: 2;
    animation: breath 4s ease-in-out infinite;
}

@keyframes breath {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* ========== FOG PARTICLES ========== */
.fog-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--frost-dew);
    opacity: 0;
    animation: float-up linear infinite;
}

.particle:nth-child(1)  { width: 3px; height: 3px; left: 8%;  bottom: -10px; animation-duration: 22s; animation-delay: 0s; }
.particle:nth-child(2)  { width: 5px; height: 5px; left: 15%; bottom: -10px; animation-duration: 28s; animation-delay: 2s; }
.particle:nth-child(3)  { width: 2px; height: 2px; left: 25%; bottom: -10px; animation-duration: 18s; animation-delay: 5s; }
.particle:nth-child(4)  { width: 4px; height: 4px; left: 35%; bottom: -10px; animation-duration: 32s; animation-delay: 1s; }
.particle:nth-child(5)  { width: 6px; height: 6px; left: 42%; bottom: -10px; animation-duration: 25s; animation-delay: 8s; }
.particle:nth-child(6)  { width: 3px; height: 3px; left: 50%; bottom: -10px; animation-duration: 20s; animation-delay: 3s; }
.particle:nth-child(7)  { width: 4px; height: 4px; left: 58%; bottom: -10px; animation-duration: 35s; animation-delay: 6s; }
.particle:nth-child(8)  { width: 2px; height: 2px; left: 65%; bottom: -10px; animation-duration: 19s; animation-delay: 4s; }
.particle:nth-child(9)  { width: 5px; height: 5px; left: 72%; bottom: -10px; animation-duration: 27s; animation-delay: 7s; }
.particle:nth-child(10) { width: 3px; height: 3px; left: 80%; bottom: -10px; animation-duration: 23s; animation-delay: 2s; }
.particle:nth-child(11) { width: 4px; height: 4px; left: 88%; bottom: -10px; animation-duration: 30s; animation-delay: 9s; }
.particle:nth-child(12) { width: 2px; height: 2px; left: 95%; bottom: -10px; animation-duration: 16s; animation-delay: 1s; }
.particle:nth-child(13) { width: 5px; height: 5px; left: 5%;  bottom: -10px; animation-duration: 33s; animation-delay: 10s; }
.particle:nth-child(14) { width: 3px; height: 3px; left: 20%; bottom: -10px; animation-duration: 21s; animation-delay: 4s; }
.particle:nth-child(15) { width: 4px; height: 4px; left: 30%; bottom: -10px; animation-duration: 26s; animation-delay: 6s; }
.particle:nth-child(16) { width: 6px; height: 6px; left: 45%; bottom: -10px; animation-duration: 38s; animation-delay: 3s; }
.particle:nth-child(17) { width: 2px; height: 2px; left: 55%; bottom: -10px; animation-duration: 17s; animation-delay: 8s; }
.particle:nth-child(18) { width: 3px; height: 3px; left: 62%; bottom: -10px; animation-duration: 24s; animation-delay: 5s; }
.particle:nth-child(19) { width: 5px; height: 5px; left: 75%; bottom: -10px; animation-duration: 29s; animation-delay: 2s; }
.particle:nth-child(20) { width: 4px; height: 4px; left: 85%; bottom: -10px; animation-duration: 31s; animation-delay: 7s; }
.particle:nth-child(21) { width: 3px; height: 3px; left: 12%; bottom: -10px; animation-duration: 22s; animation-delay: 11s; }
.particle:nth-child(22) { width: 2px; height: 2px; left: 38%; bottom: -10px; animation-duration: 19s; animation-delay: 9s; }
.particle:nth-child(23) { width: 4px; height: 4px; left: 68%; bottom: -10px; animation-duration: 26s; animation-delay: 12s; }
.particle:nth-child(24) { width: 3px; height: 3px; left: 92%; bottom: -10px; animation-duration: 21s; animation-delay: 3s; }

@keyframes float-up {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.25;
    }
    90% {
        opacity: 0.1;
    }
    100% {
        transform: translateY(-100vh) translateX(30px);
        opacity: 0;
    }
}

/* Warm particles for footer */
.fog-particles.warm .particle:nth-child(odd) {
    background: var(--amber-resin);
}

.fog-particles.warm .particle:nth-child(even) {
    background: var(--frost-dew);
}

/* ========== BADGES SECTION ========== */
.badges-section {
    padding: clamp(60px, 8vw, 120px) clamp(20px, 4vw, 80px);
    background: var(--midnight-loam);
}

.section-heading {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-variation-settings: 'WONK' 1, 'opsz' 48;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--frost-dew);
    text-align: center;
    margin-bottom: clamp(40px, 5vw, 80px);
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: minmax(200px, auto);
    gap: clamp(16px, 2.5vw, 32px);
    max-width: 1200px;
    margin: 0 auto;
}

.badge-card {
    background: var(--frost-bg);
    backdrop-filter: var(--frost-blur);
    -webkit-backdrop-filter: var(--frost-blur);
    border: 1px solid var(--frost-border);
    border-radius: 12px;
    padding: clamp(24px, 3vw, 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                backdrop-filter 0.3s ease,
                border-color 0.3s ease;
}

.badge-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.badge-card.tall {
    grid-row: span 2;
}

.badge-card:hover {
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-color: rgba(232, 240, 236, 0.25);
}

.badge-card:hover .badge-svg {
    animation: redraw 1.5s ease forwards;
}

.badge-illustration {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100px;
}

.badge-svg {
    width: 100%;
    max-width: 140px;
    height: auto;
    color: var(--verdigris);
}

.badge-card.tall .badge-svg {
    max-width: 120px;
}

.badge-name {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-variation-settings: 'WONK' 1;
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
    color: var(--frost-dew);
    margin-top: 16px;
}

.badge-desc {
    font-family: 'Nunito Sans', sans-serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    color: var(--weathered-sage);
    margin-top: 8px;
    line-height: 1.6;
}

@keyframes redraw {
    0% { stroke-dashoffset: 1000; }
    100% { stroke-dashoffset: 0; }
}

/* ========== PHILOSOPHY SECTION ========== */
.philosophy-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--midnight-loam);
    overflow: hidden;
    padding: clamp(40px, 6vw, 80px);
}

.mycelium-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.philosophy-text {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.philosophy-text p {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-variation-settings: 'WONK' 1, 'opsz' 48;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    color: var(--frost-dew);
    line-height: 1.5;
}

.philosophy-text .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    margin-right: 0.25em;
}

.philosophy-text .word.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ========== SEEDBED SECTION ========== */
.seedbed-section {
    padding: clamp(60px, 8vw, 120px) clamp(20px, 4vw, 60px);
    background: var(--midnight-loam);
}

.seedbed-panels {
    display: flex;
    justify-content: center;
    gap: clamp(20px, 3vw, 40px);
    max-width: 1100px;
    margin: 0 auto;
    align-items: flex-start;
}

.seedbed-card {
    flex: 1;
    max-width: 340px;
    background: var(--frost-bg);
    backdrop-filter: var(--frost-blur);
    -webkit-backdrop-filter: var(--frost-blur);
    border: 1px solid var(--frost-border);
    border-radius: 12px;
    padding: clamp(24px, 3vw, 48px);
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.seedbed-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.seedbed-card.raised.visible {
    transform: translateY(-40px);
}

.seedbed-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

.seedbed-svg {
    width: 100%;
    max-width: 120px;
    height: auto;
    color: var(--frost-dew);
}

.seedbed-svg .grow-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.seedbed-card.visible .grow-path {
    stroke-dashoffset: 0;
}

.step-label {
    display: block;
    font-family: 'Recursive', monospace;
    font-weight: 450;
    font-variation-settings: 'CASL' 0.5;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--weathered-sage);
    margin-top: 20px;
}

.step-desc {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    color: var(--weathered-sage);
    margin-top: 10px;
    line-height: 1.6;
}

/* Connecting lines between seedbed cards */
.seedbed-panels::before,
.seedbed-panels::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 1px;
    background: rgba(91, 158, 143, 0.3);
}

/* ========== FOOTER ========== */
.footer-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, var(--midnight-loam), var(--evening-soil));
    overflow: hidden;
}

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

.footer-logotype {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-variation-settings: 'WONK' 1, 'opsz' 48;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--frost-dew);
    opacity: 0.6;
    margin-bottom: 40px;
}

.footer-input-wrap {
    position: relative;
    display: inline-block;
}

.footer-input {
    background: rgba(232, 240, 236, 0.06);
    border: 1px solid rgba(232, 240, 236, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px;
    padding: 14px 28px;
    color: var(--frost-dew);
    font-family: 'Nunito Sans', sans-serif;
    font-style: italic;
    font-size: 1rem;
    width: clamp(260px, 40vw, 400px);
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.footer-input::placeholder {
    color: var(--weathered-sage);
    opacity: 0.7;
}

.footer-input:focus {
    border-color: rgba(91, 158, 143, 0.4);
    box-shadow: 0 0 20px rgba(91, 158, 143, 0.15);
}

.input-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(91, 158, 143, 0.3);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
}

.input-ripple.active {
    animation: ripple-out 0.8s ease-out forwards;
}

@keyframes ripple-out {
    0% { width: 0; height: 0; opacity: 0.6; }
    100% { width: 500px; height: 500px; opacity: 0; }
}

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

    .badge-card.tall {
        grid-row: span 1;
    }

    .seedbed-panels {
        flex-direction: column;
        align-items: center;
    }

    .seedbed-card.raised.visible {
        transform: translateY(0);
    }

    .seedbed-card {
        max-width: 100%;
        width: 100%;
    }
}
