:root {
    --frost: #edf5f8;
    --deep-teal: #2a3f4d;
    --ink: #1a2a33;
    --patina: #7eb8c9;
    --chrome: #b8d8e8;
    --amber: #c9a86c;
    --mist: #6b8a96;
    --light-frost: #c8e6f0;
    --bg-blend: 0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Karla', sans-serif;
    font-weight: 300;
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--ink);
    background-color: var(--frost);
    overflow-x: hidden;
}

/* Mycelium Layer */
.mycelium {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.vein-network {
    width: 100%;
    height: 100%;
}

.vein-path {
    fill: none;
    stroke: var(--light-frost);
    stroke-width: 1;
    opacity: 0.08;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.vein-main { stroke-width: 1.2; }
.vein-stem { stroke-width: 1; }
.vein-branch-1, .vein-branch-2, .vein-branch-3 { stroke-width: 0.8; }
.vein-capillary-1, .vein-capillary-2, .vein-capillary-3 { stroke-width: 0.5; opacity: 0.05; }

/* Crown Zone */
.crown {
    position: relative;
    height: 100vh;
    display: grid;
    grid-template-columns: 40% 1fr;
    align-items: center;
    padding: 4rem;
    z-index: 1;
}

.crown-header {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.domain-name {
    font-family: 'Space Mono', monospace;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    letter-spacing: 0.04em;
    line-height: 1.1;
}

.domain-complet {
    font-weight: 300;
    color: var(--ink);
}

.domain-engine {
    font-weight: 700;
    background: linear-gradient(135deg, var(--patina), var(--amber));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.crown-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mist);
}

.crown-visual {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crown-photo {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-treatment {
    width: 100%;
    height: 100%;
    filter: saturate(0.3) brightness(0.9);
    position: relative;
}

.photo-treatment svg {
    width: 100%;
    height: 100%;
}

.photo-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(26,42,51,0.15) 100%);
    pointer-events: none;
}

.crown-fern-mask {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: 400px;
    opacity: 0.6;
}

.fern-silhouette {
    width: 100%;
    height: 100%;
}

.gear-motif {
    animation: gear-rotate 60s linear infinite;
}

@keyframes gear-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Understory Zone */
.understory {
    position: relative;
    min-height: 150vh;
    display: grid;
    grid-template-columns: 40% 1fr;
    padding: 6rem 4rem;
    z-index: 1;
    background: linear-gradient(180deg, var(--frost) 0%, #daeaf0 100%);
}

.understory-content {
    display: flex;
    flex-direction: column;
    gap: 8rem;
    padding-top: 4rem;
}

.text-block {
    max-width: 420px;
}

.text-block-1 { margin-left: 0; }
.text-block-2 { margin-left: 20px; }
.text-block-3 { margin-left: 40px; }

.block-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--patina);
    display: block;
    margin-bottom: 1rem;
}

.block-label.light {
    color: var(--chrome);
}

.text-block h2 {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ink);
    margin-bottom: 1rem;
}

.text-block p {
    color: var(--mist);
    font-weight: 300;
}

.understory-visuals {
    position: relative;
}

.floating-photo {
    position: absolute;
    transition: transform 0.1s ease-out;
}

.photo-botanical {
    top: 10%;
    right: 15%;
    width: 200px;
    height: 200px;
}

.photo-machinery {
    top: 40%;
    right: 5%;
    width: 160px;
    height: 160px;
}

.photo-circuit {
    top: 65%;
    right: 25%;
    width: 140px;
    height: 220px;
}

.floating-photo svg {
    width: 100%;
    height: 100%;
}

/* Chrome separator */
.chrome-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--chrome), var(--frost), var(--chrome));
    margin: 2rem 0;
}

/* Root System Zone */
.root-system {
    position: relative;
    min-height: 100vh;
    background-color: var(--deep-teal);
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 4rem;
}

.root-transition {
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(180deg, transparent, var(--deep-teal));
    pointer-events: none;
}

.root-content {
    max-width: 900px;
}

.root-panoramic {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.root-text-block h2 {
    font-family: 'Space Mono', monospace;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--frost);
    margin-bottom: 1.5rem;
}

.root-text-block p {
    color: var(--chrome);
    font-weight: 300;
    max-width: 600px;
    line-height: 1.85;
}

.root-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.root-link {
    font-family: 'Space Mono', monospace;
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    color: var(--patina);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(126, 184, 201, 0.4);
    transition: text-decoration-color 0.3s ease, color 0.3s ease;
}

.root-link:hover {
    color: var(--chrome);
    text-decoration-color: var(--chrome);
}

.link-separator {
    color: var(--amber);
    opacity: 0.5;
    font-size: 0.75rem;
}

.leaf-marker {
    display: inline-block;
}

.root-footer {
    position: absolute;
    bottom: 2rem;
    left: 4rem;
}

.footer-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mist);
}

/* Shimmer effect on hover */
.floating-photo::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent 30%, rgba(184,216,232,0.2) 50%, transparent 70%);
    transition: left 0.4s ease;
    pointer-events: none;
}

.floating-photo:hover::after {
    left: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .crown {
        grid-template-columns: 1fr;
        padding: 2rem;
        text-align: left;
    }

    .crown-visual {
        display: none;
    }

    .understory {
        grid-template-columns: 1fr;
        padding: 4rem 2rem;
    }

    .understory-visuals {
        display: none;
    }

    .text-block-1, .text-block-2, .text-block-3 {
        margin-left: 0;
    }

    .root-system {
        padding: 4rem 2rem;
    }

    .root-footer {
        left: 2rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .gear-motif {
        animation: none;
    }

    .floating-photo {
        transition: none;
    }

    .vein-path {
        stroke-dashoffset: 0 !important;
    }
}
