:root {
    --deep-water: #1b3a4b;
    --tidal-foam: #a3c4bc;
    --sunset-coral: #d4856a;
    --morning-haze: #c8d5e0;
    --kelp-gold: #b8a04e;
    --shell-white: #faf8f5;
    --storm-slate: #4a5c6a;
    --primary-bg: #f0f4f3;
    --deep-bg: #e8eeec;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    color: var(--deep-water);
    background: var(--primary-bg);
}

/* Hero Zone */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #c8d5e0 0%, #f0f4f3 35%, #a3c4bc 70%, #d4856a 100%);
    background-size: 400% 400%;
    animation: coastalShift 60s ease-in-out infinite;
}

@keyframes coastalShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

.hero-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(3.5rem, 10vw, 9rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--deep-water);
    opacity: 0;
    animation: fadeIn 2s ease forwards;
}

.hero-dot {
    color: var(--sunset-coral);
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.1rem, 1.8vw, 1.6rem);
    color: var(--storm-slate);
    letter-spacing: 0.02em;
    opacity: 0;
    animation: fadeIn 1.5s ease 1s forwards;
}

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

.hero-chevron {
    position: absolute;
    bottom: 40px;
    z-index: 2;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Fog overlays */
.fog-overlay {
    position: absolute;
    width: 150%;
    height: 150%;
    pointer-events: none;
    border-radius: 50%;
    z-index: 1;
}

.fog-1 {
    top: -30%;
    left: -20%;
    background: radial-gradient(ellipse at 30% 70%, rgba(200, 213, 224, 0.15), transparent 60%);
    animation: fogDrift 90s linear infinite;
}

.fog-2 {
    bottom: -40%;
    right: -30%;
    background: radial-gradient(ellipse at 70% 30%, rgba(163, 196, 188, 0.12), transparent 60%);
    animation: fogDrift 90s linear infinite reverse;
}

.fog-3 {
    top: -20%;
    left: -10%;
    background: radial-gradient(ellipse at 50% 50%, rgba(200, 213, 224, 0.1), transparent 50%);
    animation: fogDrift 90s linear infinite;
}

@keyframes fogDrift {
    0% { transform: translateX(-5%) translateY(0); }
    50% { transform: translateX(5%) translateY(-2%); }
    100% { transform: translateX(-5%) translateY(0); }
}

/* Specimen Grid */
.specimen-grid, .deep-dive {
    padding: 80px 24px;
}

.deep-dive {
    background: var(--deep-bg);
}

.grid-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.block {
    background: rgba(250, 248, 245, 0.7);
    backdrop-filter: blur(16px) saturate(120%);
    border: 1px solid rgba(163, 196, 188, 0.3);
    border-radius: 12px;
    padding: 32px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.block.visible {
    opacity: 1;
    transform: translateY(0);
}

.block-small {
    grid-column: span 4;
    text-align: center;
    padding: 40px 24px;
}

.block-medium {
    grid-column: span 6;
}

.block-large {
    grid-column: span 6;
}

.block-wide {
    grid-column: span 12;
}

/* Counter numbers */
.counter-number {
    font-family: 'Space Mono', monospace;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    color: var(--sunset-coral);
    font-variant-numeric: tabular-nums;
    display: block;
}

.counter-suffix {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--sunset-coral);
}

.counter-caption {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    color: var(--storm-slate);
    margin-top: 12px;
    line-height: 1.6;
}

/* Block content */
.block-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
    letter-spacing: -0.01em;
    color: var(--deep-water);
    margin-bottom: 12px;
}

.block-body {
    font-family: 'Nunito Sans', sans-serif;
    color: var(--storm-slate);
    line-height: 1.72;
}

.block-caption {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    color: var(--storm-slate);
    line-height: 1.6;
    margin-top: 16px;
}

/* Botanical SVGs */
.botanical-svg {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.botanical-svg svg {
    width: 160px;
    height: 200px;
}

/* Data Bloom Charts */
.data-bloom {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.bloom-chart {
    width: 220px;
    height: 220px;
}

.bloom-center-text {
    font-family: 'Space Mono', monospace;
    font-size: 24px;
    font-weight: 700;
    fill: var(--deep-water);
}

.segment {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    transform-origin: center;
}

.segment:hover {
    transform: scale(1.05);
}

/* Timeline Vine */
.timeline-vine {
    position: relative;
    margin-top: 20px;
}

.vine-svg {
    width: 100%;
    height: 120px;
}

.vine-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease;
}

.vine-path.animated {
    stroke-dashoffset: 0;
}

.vine-labels {
    position: relative;
    height: 30px;
}

.vine-label {
    position: absolute;
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    color: var(--storm-slate);
    transform: translateX(-50%);
}

/* Breather */
.breather {
    height: 40px;
    background: linear-gradient(160deg, #c8d5e0 0%, #f0f4f3 50%, #a3c4bc 100%);
    overflow: hidden;
}

.breather-pattern {
    height: 100%;
}

.breather-svg {
    width: 100%;
    height: 100%;
}

/* Terminal Reflection */
.terminal {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #d4856a 0%, #a3c4bc 35%, #f0f4f3 70%, #c8d5e0 100%);
    background-size: 400% 400%;
    animation: coastalShift 60s ease-in-out infinite;
}

.terminal-bloom {
    position: absolute;
    z-index: 1;
}

.terminal-bloom-svg {
    width: 400px;
    height: 400px;
}

.terminal-text {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    color: var(--deep-water);
    text-align: center;
    max-width: 700px;
    padding: 0 24px;
    line-height: 1.6;
    letter-spacing: 0.02em;
    z-index: 2;
    position: relative;
}

/* Responsive */
@media (max-width: 1023px) {
    .block-small { grid-column: span 4; }
    .block-medium { grid-column: span 6; }
    .block-large { grid-column: span 6; }
    .block-wide { grid-column: span 12; }
}

@media (max-width: 639px) {
    .block-small,
    .block-medium,
    .block-large,
    .block-wide {
        grid-column: span 12;
    }

    .grid-container {
        gap: 16px;
    }

    .specimen-grid, .deep-dive {
        padding: 40px 16px;
    }

    .terminal-bloom-svg {
        width: 280px;
        height: 280px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
