:root {
    /* Compliance notes: Interaction System:** Interactive elements IntersectionObserver IntersectionObserver` scroll-triggered animations instead listeners (Google */
    --loam: #2B1D0E;
    --amber-resin: #C4883A;
    --moss-teal: #3A7D6E;
    --lichen: #A8D5BA;
    --parchment: #F5ECD7;
    --midnight-soil: #1A1611;
    --bio: #D4F07E;
    --spore-gold: #E8B84B;
    --bark: #3D2E1F;
    --sage: #6B7F5E;
    --aged-paper: #EDE2C8;
    --display: "Cormorant Garamond", Georgia, serif;
    --body: "Lora", Georgia, serif;
    --accent: "Space Grotesk", Inter, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    margin: 0;
    background: linear-gradient(180deg, var(--parchment) 0%, var(--aged-paper) 42%, var(--parchment) 100%);
    color: var(--bark);
    font-family: var(--body);
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    overflow-x: hidden;
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0.28;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.11'/%3E%3C/svg%3E");
}

.section {
    position: relative;
    padding: 7rem 20px;
}

.snap-section {
    min-height: 100vh;
    scroll-snap-align: start;
}

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

.threshold {
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 22%, rgba(212, 240, 126, 0.12), transparent 20rem),
        radial-gradient(circle at 82% 72%, rgba(232, 184, 75, 0.14), transparent 24rem),
        radial-gradient(circle at 50% 52%, rgba(58, 125, 110, 0.26), transparent 34rem),
        var(--midnight-soil);
}

.threshold-content,
.clearing-content,
.section-intro,
.collection,
.plate-wrap,
.trail-map {
    width: min(680px, calc(100vw - 40px));
    margin-inline: auto;
}

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

.eyebrow,
.label {
    margin: 0 0 0.8rem;
    color: var(--sage);
    font-family: var(--accent);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.threshold .eyebrow,
.clearing .eyebrow {
    color: var(--bio);
}

.domain-title,
.final-title,
.section-title {
    margin: 0;
    font-family: var(--display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.01em;
}

.domain-title {
    color: var(--parchment);
    font-size: clamp(4rem, 10vw, 8rem);
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    animation: title-materialize 0.6s ease 1.5s forwards;
    text-shadow: 0 0 28px rgba(212, 240, 126, 0.22);
}

.threshold-note {
    max-width: 35rem;
    margin: 1.2rem auto 0;
    color: rgba(245, 236, 215, 0.82);
}

@keyframes title-materialize {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.threshold-spores .spore,
.spore {
    position: absolute;
    border-radius: 30% 70% 50% 50% / 60% 40% 70% 30%;
    background: radial-gradient(ellipse at 30% 40%, rgba(212, 240, 126, 0.2), rgba(58, 125, 110, 0.13));
    filter: blur(1px);
    animation: spore-drift 20s ease-in-out infinite alternate;
}

.s-one { width: 160px; height: 130px; left: 8%; top: 18%; }
.s-two { width: 220px; height: 190px; right: -3%; top: 12%; animation-delay: -5s; }
.s-three { width: 90px; height: 110px; left: 21%; bottom: 15%; animation-delay: -8s; }
.s-four { width: 180px; height: 145px; right: 20%; bottom: 9%; animation-delay: -12s; }

@keyframes spore-drift {
    0% { transform: translate3d(-8px, 10px, 0) rotate(-8deg); }
    100% { transform: translate3d(18px, -18px, 0) rotate(12deg); }
}

.collection {
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 6vw, 4.5rem);
}

.section-intro {
    margin-bottom: 0.5rem;
}

.section-title {
    color: var(--loam);
    font-size: clamp(2.8rem, 7vw, 5.5rem);
}

.specimen-card {
    position: relative;
    min-height: 40vh;
    padding: clamp(2rem, 5vw, 3.5rem);
    background:
        radial-gradient(circle at 85% 20%, rgba(168, 213, 186, 0.5), transparent 11rem),
        rgba(245, 236, 215, 0.82);
    border: 1.5px solid var(--amber-resin);
    box-shadow: 4px 6px 20px rgba(43, 29, 14, 0.12);
    clip-path: polygon(1% 3%, 98% 0%, 100% 96%, 2% 100%);
    opacity: 0;
    transform: translateY(30px) rotate(var(--start-rotation));
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.7s ease, box-shadow 0.35s ease;
}

.specimen-card.visible {
    opacity: 1;
    transform: translateY(0) rotate(var(--final-rotation));
}

.specimen-card:hover {
    box-shadow: 10px 18px 40px rgba(43, 29, 14, 0.18);
}

.rotate-left { --start-rotation: -3deg; --final-rotation: -1.2deg; }
.rotate-right { --start-rotation: 3deg; --final-rotation: 1.15deg; }
.escape-right { margin-right: -42px; }
.escape-left { margin-left: -36px; }

.specimen-card h3 {
    margin: 0 0 1rem;
    color: var(--loam);
    font-family: var(--display);
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.05;
}

.specimen-card p:last-child {
    position: relative;
    z-index: 2;
    max-width: 32rem;
    margin: 0;
}

.card-glow {
    position: absolute;
    width: 150px;
    height: 130px;
    right: 2rem;
    bottom: 1.5rem;
    border-radius: 30% 70% 50% 50% / 60% 40% 70% 30%;
    opacity: 0.55;
    animation: spore-drift 13s ease-in-out infinite alternate;
}

.blob-a { background: radial-gradient(circle at 28% 38%, var(--bio), var(--spore-gold), transparent 72%); }
.blob-b { background: radial-gradient(circle at 30% 40%, var(--lichen), var(--moss-teal), transparent 72%); }
.blob-c { background: radial-gradient(circle at 30% 40%, var(--bio), var(--sage), transparent 72%); }
.blob-d { background: radial-gradient(circle at 30% 40%, var(--spore-gold), var(--moss-teal), transparent 72%); }

.specimen-plate {
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 50%, rgba(212, 240, 126, 0.11), transparent 24rem),
        linear-gradient(180deg, var(--parchment), var(--aged-paper));
}

.plate-wrap {
    position: relative;
    min-height: 70vh;
}

.large-specimen {
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(62vw, 430px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
}

.core,
.ring {
    position: absolute;
    inset: 0;
    border-radius: 37% 63% 49% 51% / 62% 38% 68% 32%;
}

.core {
    background: radial-gradient(circle at 32% 35%, var(--bio), var(--spore-gold) 28%, var(--amber-resin) 48%, var(--moss-teal) 72%);
    box-shadow: inset 24px -28px 60px rgba(43, 29, 14, 0.18), 0 20px 50px rgba(58, 125, 110, 0.22);
    animation: specimen-breathe 7s ease-in-out infinite;
}

.ring-one { inset: 11%; border: 1px solid rgba(245, 236, 215, 0.55); transform: rotate(16deg); }
.ring-two { inset: 24%; border: 1px solid rgba(43, 29, 14, 0.2); transform: rotate(-20deg); }

@keyframes specimen-breathe {
    50% { border-radius: 52% 48% 61% 39% / 40% 54% 46% 60%; transform: rotate(4deg) scale(1.02); }
}

.annotation {
    position: absolute;
    max-width: 12rem;
    margin: 0;
    color: var(--sage);
    font-family: var(--display);
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.25;
}

.anno-one { left: 1%; top: 22%; }
.anno-two { right: 0; top: 35%; }
.anno-three { left: 8%; bottom: 18%; }

.leader {
    position: absolute;
    height: 0.5px;
    background: var(--sage);
    transform-origin: left center;
}

.leader-one { width: 150px; left: 19%; top: 30%; transform: rotate(14deg); }
.leader-two { width: 110px; right: 16%; top: 41%; transform: rotate(164deg); }
.leader-three { width: 132px; left: 25%; bottom: 28%; transform: rotate(-19deg); }

.trail {
    padding-top: 8rem;
}

.trail-map {
    position: relative;
    min-height: 900px;
    margin-top: 3rem;
}

.mycelium {
    position: absolute;
    inset: 0 0 0 50%;
    width: 240px;
    height: 100%;
    transform: translateX(-50%);
    overflow: visible;
}

.mycelium path {
    fill: none;
    stroke: var(--amber-resin);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 11 8;
    filter: drop-shadow(0 0 8px rgba(232, 184, 75, 0.24));
}

.waypoint {
    position: absolute;
    width: min(44%, 18rem);
    padding: 1rem 1.15rem;
    background: rgba(168, 213, 186, 0.28);
    border: 1px solid rgba(196, 136, 58, 0.5);
    clip-path: polygon(2% 4%, 100% 0, 98% 96%, 0 100%);
    opacity: 0;
    transform: translateY(16px);
    transition: 0.6s ease;
}

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

.waypoint p { margin: 0; }
.waypoint-one { left: 0; top: 7%; }
.waypoint-two { right: 0; top: 30%; }
.waypoint-three { left: 3%; top: 56%; }
.waypoint-four { right: 4%; top: 76%; }

.clearing {
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(212, 240, 126, 0.18), transparent 24rem),
        radial-gradient(circle at 50% 50%, rgba(232, 184, 75, 0.08), transparent 34rem),
        var(--midnight-soil);
}

.clearing-content {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.clearing.in-view .clearing-content {
    opacity: 1;
    transform: scale(1);
}

.final-title {
    color: var(--parchment);
    font-size: clamp(4rem, 10vw, 8rem);
    text-shadow: 0 0 34px rgba(212, 240, 126, 0.26);
}

.clearing p:last-child {
    max-width: 36rem;
    margin: 1rem auto 0;
    color: rgba(245, 236, 215, 0.82);
}

.wayfinder {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 80;
    width: 52px;
    height: 52px;
}

.nav-dot {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: var(--moss-teal);
    box-shadow: 0 0 0 8px rgba(212, 240, 126, 0.13), 0 0 22px rgba(212, 240, 126, 0.6);
    cursor: pointer;
    animation: pulse-dot 2.8s ease-in-out infinite;
}

@keyframes pulse-dot {
    50% { transform: scale(1.16); box-shadow: 0 0 0 13px rgba(212, 240, 126, 0.08), 0 0 30px rgba(212, 240, 126, 0.75); }
}

.nav-panel {
    position: absolute;
    right: 4px;
    bottom: 34px;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.8rem 0.9rem;
    background: rgba(26, 22, 17, 0.88);
    border: 1px solid rgba(168, 213, 186, 0.35);
    border-radius: 28px;
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    pointer-events: none;
    transition: 0.25s ease;
}

.wayfinder:hover .nav-panel,
.wayfinder.open .nav-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.nav-panel::before {
    content: "";
    position: absolute;
    left: 1.18rem;
    top: 1.2rem;
    bottom: 1.2rem;
    width: 1px;
    background: var(--sage);
}

.nav-panel a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--parchment);
    font-family: var(--accent);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-panel span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bio);
    z-index: 1;
}

.magnetic {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@media (max-width: 720px) {
    .escape-right,
    .escape-left { margin-inline: 0; }
    .annotation { max-width: 9rem; font-size: 0.78rem; }
    .leader { display: none; }
    .waypoint { width: 48%; }
}

@media (max-width: 520px) {
    .section { padding-inline: 20px; }
    .specimen-card { min-height: 34vh; }
    .trail-map { min-height: 760px; }
    .waypoint { position: relative; inset: auto; width: 82%; margin: 2.5rem 0; }
    .waypoint:nth-of-type(odd) { margin-left: auto; }
}
