:root {
    --parchment-cream: #F5E6D3;
    --warm-sandstone: #E8D5B8;
    --dark-loam: #2C1810;
    --dark-umber: #3D2B1F;
    --terracotta-sun: #C4622D;
    --moss-verdant: #5B7C4E;
    --gravel-tan: #A89279;
    --aged-brass: #8B7355;
    --golden-hour: #D4A843;
    --mycorrhizal-ochre: #9A6B35;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--parchment-cream);
    color: var(--dark-umber);
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    overflow-x: hidden;
}

/* Depth Indicator */
#depth-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#depth-indicator:hover {
    opacity: 1;
}

.depth-svg {
    width: 60px;
    height: 200px;
}

.depth-label {
    font-family: 'Inconsolata', monospace;
    font-size: 5px;
    fill: var(--aged-brass);
    text-anchor: middle;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.depth-label.dark-label {
    fill: var(--parchment-cream);
}

.depth-label.light-label {
    fill: var(--warm-sandstone);
}

.surface-link {
    font-family: 'Inconsolata', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--aged-brass);
    text-decoration: none;
    transition: color 0.3s ease;
}

.surface-link:hover {
    color: var(--terracotta-sun);
}

/* Sections */
.section {
    position: relative;
    min-height: 100vh;
}

/* Canopy Section */
.canopy-section {
    background: var(--parchment-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Scale texture */
    background-image:
        radial-gradient(circle at 20% 30%, rgba(139, 115, 85, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 60% 70%, rgba(139, 115, 85, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(139, 115, 85, 0.04) 1px, transparent 1px);
}

#leaf-shadows {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

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

.leaf {
    fill: rgba(44, 24, 16, 0.08);
    transition: transform 0.3s ease-out;
}

.canopy-content {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.canopy-content.visible {
    opacity: 1;
}

.specimen-label-pin {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--terracotta-sun);
    margin: 0 auto 20px;
}

.domain-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.02em;
    color: var(--dark-loam);
    margin-bottom: 16px;
}

.specimen-tag {
    font-family: 'Inconsolata', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--aged-brass);
}

/* Darting Lizard */
.lizard-svg {
    position: absolute;
    width: 80px;
    height: auto;
    z-index: 3;
    bottom: 25%;
    right: 20%;
    transition: none;
    opacity: 0;
}

.lizard-svg.visible {
    opacity: 1;
}

.lizard-svg.darting {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                left 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.lizard-ghost {
    position: absolute;
    width: 80px;
    height: 30px;
    z-index: 2;
    opacity: 0;
    background: radial-gradient(ellipse, rgba(44, 24, 16, 0.15), transparent);
    transition: opacity 0.8s ease;
    pointer-events: none;
}

/* Basking Section */
.basking-section {
    background: var(--warm-sandstone);
    padding: 80px 40px;
    min-height: 100vh;
}

.basking-grid {
    display: grid;
    grid-template-columns: 60% 40%;
    max-width: 1100px;
    margin: 0 auto;
    gap: 40px;
    align-items: start;
}

.basking-illustration {
    position: relative;
    display: flex;
    justify-content: center;
}

.gecko-illustration {
    width: 100%;
    max-width: 400px;
    height: auto;
}

.glass-edge {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(139, 115, 85, 0.2) 20%,
        rgba(139, 115, 85, 0.3) 50%,
        rgba(139, 115, 85, 0.2) 80%,
        transparent
    );
}

.specimen-name {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 14px;
    fill: var(--aged-brass);
    text-anchor: middle;
}

.basking-text {
    max-width: 38rem;
    padding-top: 40px;
}

/* Botanical Label */
.botanical-label {
    display: inline-block;
    border: 1px solid var(--aged-brass);
    border-radius: 3px;
    padding: 8px 20px 8px 28px;
    position: relative;
    background: linear-gradient(to bottom, var(--parchment-cream), #EDD9C0);
    margin-bottom: 24px;
}

.pin-dot {
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--terracotta-sun);
}

.section-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    letter-spacing: 0.02em;
    color: var(--dark-loam);
}

.light-heading {
    color: var(--parchment-cream);
}

.body-text {
    color: var(--dark-umber);
    margin-bottom: 16px;
    max-width: 38rem;
}

.light-text {
    color: var(--warm-sandstone);
}

.specimen-caption {
    font-family: 'Inconsolata', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--aged-brass);
    margin-top: 20px;
    display: block;
}

/* Substrate Section */
.substrate-section {
    padding: 80px 40px;
    position: relative;
    min-height: 100vh;
    background: var(--gravel-tan);
}

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

.substrate-gravel {
    height: 33%;
    background:
        radial-gradient(circle at 10% 50%, #B8A48E 1px, transparent 1px),
        radial-gradient(circle at 30% 30%, #B8A48E 1.5px, transparent 1.5px),
        radial-gradient(circle at 50% 70%, #B8A48E 1px, transparent 1px),
        radial-gradient(circle at 70% 40%, #B8A48E 1.5px, transparent 1.5px),
        radial-gradient(circle at 90% 60%, #B8A48E 1px, transparent 1px);
    background-color: var(--gravel-tan);
    background-size: 20px 20px;
}

.substrate-charcoal {
    height: 33%;
    background: #1E1518;
}

.substrate-soil {
    height: 34%;
    background: linear-gradient(to bottom, #3A2518, var(--dark-loam));
}

.substrate-label {
    position: relative;
    z-index: 2;
    margin-bottom: 30px;
}

.specimen-tray {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto;
}

.specimen-card {
    background: var(--parchment-cream);
    border-radius: 8px;
    padding: 24px;
    box-shadow: inset 0 2px 6px rgba(44, 24, 16, 0.15);
    transition: box-shadow 0.3s ease;
}

.specimen-card:hover {
    box-shadow: inset 0 1px 3px rgba(44, 24, 16, 0.08), 0 0 20px rgba(212, 168, 67, 0.12);
}

.card-wide {
    grid-column: span 2;
}

.specimen-tag-small {
    font-family: 'Inconsolata', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--aged-brass);
    display: block;
    margin-bottom: 8px;
}

.card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark-loam);
    margin-bottom: 8px;
}

.card-text {
    font-size: 0.95rem;
    color: var(--dark-umber);
    line-height: 1.65;
    margin-bottom: 8px;
}

/* Roots Section */
.roots-section {
    background: var(--dark-loam);
    padding: 80px 40px;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

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

.root-path {
    fill: none;
    stroke: var(--mycorrhizal-ochre);
}

.root-path.main-root {
    opacity: 1;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 2s ease-out;
}

.root-path.sec-root {
    opacity: 0.7;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 1.5s ease-out 0.5s;
}

.root-path.tert-root {
    opacity: 0.4;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1s ease-out 1s;
}

.root-path.drawn {
    stroke-dashoffset: 0;
}

.root-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.root-label .botanical-label,
.root-label {
    background: linear-gradient(to bottom, rgba(44, 24, 16, 0.8), rgba(44, 24, 16, 0.9));
    border-color: var(--mycorrhizal-ochre);
}

.root-text-block {
    margin: 40px 0;
}

.belly-svg {
    width: 100%;
    max-width: 300px;
    margin: 40px auto;
    display: block;
}

.ventral-label {
    font-family: 'Inconsolata', monospace;
    font-size: 8px;
    fill: var(--aged-brass);
    text-anchor: middle;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

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

    .specimen-tray {
        grid-template-columns: 1fr;
    }

    .card-wide {
        grid-column: span 1;
    }

    #depth-indicator {
        display: none;
    }

    .domain-title {
        font-size: 2.5rem;
    }
}
