/* ================================================================
   LLITTL.com — Field Manual of the Abyssal Memphis
   Memphis ornament at abyssal depth, styled as a tutorial.
   Compliance vocabulary: (Google Interaction Guidance —** Interactive elements Internal uses 12-column 3–10 zone IntersectionObserver trigger animations. element receives `transition-delay` incrementing 150ms.
   ================================================================ */

:root {
    /* Palette — from DESIGN.md */
    --abyssal-navy:    #0a1628;
    --trench-blue:     #0f2847;
    --bio-teal:        #00e5c7;
    --coral-memphis:   #ff6b6b;
    --kelp-yellow:     #ffd93d;
    --sea-foam:        #e8f4f0;
    --marble-cream:    #f5f0e8;
    --deep-current:    #162d50;
    --anemone:         #ff8fab;
    --ink-black:       #060d18;

    /* Typography stacks */
    --font-head:  "Nunito", "Inter", system-ui, sans-serif;
    --font-body:  "Varela Round", "Lora", system-ui, sans-serif;
    --font-mono:  "IBM Plex Mono", "Space Mono", monospace;
    --font-disp:  "Baloo 2", "Nunito", system-ui, sans-serif;

    /* Layout */
    --side-gutter: 8vw;
    --side-gutter-right: 12vw;
    --panel-min-h: 100vh;

    /* Gradients */
    --grad-abyss: linear-gradient(170deg, #0a1628 0%, #0f2847 45%, #162d50 100%);
    --grad-marble: radial-gradient(ellipse at 30% 40%, #f5f0e8 0%, #e8e0d0 40%, #d8cfc0 100%);
    --grad-marble-hover: radial-gradient(ellipse at 65% 55%, #ffffff 0%, #f5f0e8 40%, #e0d6c6 100%);
    --halo-teal: radial-gradient(circle, rgba(0,229,199,0.30) 0%, transparent 70%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--abyssal-navy);
    color: var(--sea-foam);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; }
img, svg { display: block; max-width: 100%; }

/* ================================================================
   Panels (full-bleed, stacked vertical tutorial)
   ================================================================ */
.panel {
    position: relative;
    width: 100vw;
    min-height: var(--panel-min-h);
    padding: 10vh var(--side-gutter-right) 10vh var(--side-gutter);
    overflow: hidden;
    isolation: isolate;
}

.panel__inner {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    z-index: 2;
}

.panel--cover        { background: var(--grad-abyss); }
.panel--architecture { background: var(--trench-blue); }
.panel--taxonomy     { background: var(--abyssal-navy); }
.panel--steps        { background: var(--deep-current); }
.panel--gallery      { background: var(--trench-blue); }
.panel--colophon     { background: var(--grad-abyss); }

/* faint bioluminescent halo per panel */
.panel::before {
    content: "";
    position: absolute;
    inset: auto;
    top: 20%; left: 50%;
    width: 60vw; height: 60vw;
    background: var(--halo-teal);
    filter: blur(20px);
    opacity: 0.35;
    transform: translate(-50%, -20%);
    z-index: 0;
    pointer-events: none;
}

.panel--taxonomy::before { top: 40%; left: 70%; opacity: 0.22; }
.panel--steps::before    { top: 60%; left: 15%; opacity: 0.25; }
.panel--gallery::before  { top: 10%; left: 85%; opacity: 0.28; }

/* ================================================================
   Giant Memphis numeral (per-panel)
   ================================================================ */
.giant-number {
    position: absolute;
    top: 4vh;
    right: 4vw;
    font-family: var(--font-disp);
    font-weight: 800;
    font-size: clamp(120px, 16vw, 240px);
    line-height: 0.9;
    letter-spacing: -0.03em;
    color: transparent;
    -webkit-text-stroke: 2px rgba(0, 229, 199, 0.35);
    text-stroke: 2px rgba(0, 229, 199, 0.35);
    pointer-events: none;
    z-index: 1;
    user-select: none;
}

.panel--architecture .giant-number { -webkit-text-stroke-color: rgba(255, 143, 171, 0.30); }
.panel--steps        .giant-number { -webkit-text-stroke-color: rgba(255, 217, 61, 0.35); }
.panel--gallery      .giant-number { -webkit-text-stroke-color: rgba(255, 107, 107, 0.30); }

/* ================================================================
   Typography
   ================================================================ */
.cover-title,
.lesson-title {
    font-family: var(--font-head);
    font-weight: 800;
    color: var(--sea-foam);
    letter-spacing: -0.02em;
    line-height: 0.98;
    margin: 0;
}

.cover-title {
    font-size: clamp(52px, 8vw, 112px);
    margin: 0.3em 0 0.4em;
}

.cover-title__pre {
    display: block;
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: clamp(12px, 1vw, 15px);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--bio-teal);
    margin-bottom: 1.1em;
}

.cover-title__main {
    display: block;
    color: var(--sea-foam);
}

.cover-title__main::after {
    content: ".";
    color: var(--coral-memphis);
}

.lesson-title {
    font-size: clamp(44px, 6.4vw, 92px);
    margin-top: 0.2em;
}

.lesson-title::after {
    content: ".";
    color: var(--kelp-yellow);
    display: inline;
}

.lesson-sub {
    margin: 1.1em 0 0;
    max-width: 60ch;
    font-size: 19px;
    color: rgba(232, 244, 240, 0.78);
}

/* annotation / mono label */
.annotation--mono {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--kelp-yellow);
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid rgba(255, 217, 61, 0.45);
    border-radius: 2px;
    background: rgba(255, 217, 61, 0.05);
}

.annotation--teal {
    color: var(--bio-teal);
    border-color: rgba(0, 229, 199, 0.45);
    background: rgba(0, 229, 199, 0.06);
}

/* ================================================================
   SECTION 00 — COVER
   ================================================================ */
.cover-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 5vw 6vw;
    align-items: start;
}

.cover-meta {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 0;
}

.cover-lede {
    font-size: clamp(17px, 1.5vw, 21px);
    max-width: 46ch;
    line-height: 1.6;
    color: rgba(232, 244, 240, 0.85);
    margin: 0;
}

.cover-lede em {
    color: var(--bio-teal);
    font-style: italic;
}

.cover-figure {
    grid-column: 2 / 3;
    grid-row: 2 / span 2;
    position: relative;
    padding: 26px 26px 20px;
    border: 1px dashed rgba(0, 229, 199, 0.35);
    border-radius: 4px;
    background: rgba(6, 13, 24, 0.35);
}

.cover-figure::before {
    content: "FIG. 0";
    position: absolute;
    top: -10px;
    left: 16px;
    background: var(--abyssal-navy);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--kelp-yellow);
    padding: 2px 10px;
}

.figure-caption {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: rgba(232, 244, 240, 0.55);
    margin: 16px 0 0;
    text-transform: uppercase;
}

.figure-caption span {
    color: var(--anemone);
    font-style: italic;
    text-transform: none;
    letter-spacing: 0.05em;
}

.figure-caption--wide {
    max-width: 70ch;
    margin-top: 32px;
}

.cover-scroll {
    grid-column: 1 / 2;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    margin-top: 40px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--bio-teal);
}

.cover-scroll__chevron {
    display: inline-block;
    width: 34px;
    height: 34px;
    line-height: 32px;
    text-align: center;
    border: 1px solid var(--bio-teal);
    border-radius: 50%;
    animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

/* ================================================================
   SECTION 01 — ARCHITECTURE / PEDESTALS
   ================================================================ */
.lesson-head {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 56px;
    max-width: 1000px;
}

.lesson-head--split { max-width: none; }

.lesson-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.6fr);
    gap: 5vw;
    align-items: start;
}

.lesson-prose p {
    font-size: 18px;
    margin: 0 0 1.1em;
    color: rgba(232, 244, 240, 0.82);
}

.lesson-prose em {
    color: var(--bio-teal);
    font-style: italic;
}

.pedestal-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

/* Marble pedestal — CSS marble texture, elevated card */
.pedestal {
    position: relative;
    padding: 28px 22px 24px;
    background: var(--grad-marble);
    background-size: 140% 140%;
    background-position: 30% 40%;
    color: var(--abyssal-navy);
    border-radius: 8px;
    box-shadow:
        0 8px 32px rgba(6, 13, 24, 0.4),
        inset 0 0 0 1px rgba(10, 22, 40, 0.08);
    transition: transform 400ms ease, box-shadow 400ms ease, background-position 400ms ease, background-image 400ms ease;
    overflow: hidden;
}

/* Marble vein pattern + noise overlay */
.pedestal::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            112deg,
            rgba(120, 100, 80, 0.00) 0,
            rgba(120, 100, 80, 0.00) 40px,
            rgba(120, 100, 80, 0.10) 40px,
            rgba(120, 100, 80, 0.10) 41px,
            rgba(120, 100, 80, 0.00) 41px,
            rgba(120, 100, 80, 0.00) 90px
        ),
        repeating-linear-gradient(
            28deg,
            rgba(80, 60, 40, 0.00) 0,
            rgba(80, 60, 40, 0.00) 70px,
            rgba(80, 60, 40, 0.06) 70px,
            rgba(80, 60, 40, 0.06) 71px,
            rgba(80, 60, 40, 0.00) 71px,
            rgba(80, 60, 40, 0.00) 150px
        );
    pointer-events: none;
}

.pedestal::after {
    content: "";
    position: absolute;
    inset: 0;
    /* subtle noise via tiny radial dots */
    background-image:
        radial-gradient(rgba(10,22,40,0.07) 1px, transparent 1px),
        radial-gradient(rgba(10,22,40,0.04) 1px, transparent 1px);
    background-size: 3px 3px, 5px 5px;
    background-position: 0 0, 1px 2px;
    opacity: 0.5;
    pointer-events: none;
    mix-blend-mode: multiply;
}

.pedestal:hover {
    transform: translateY(-4px);
    background-image: var(--grad-marble-hover);
    box-shadow:
        0 14px 40px rgba(6, 13, 24, 0.55),
        0 0 40px rgba(0, 229, 199, 0.15),
        inset 0 0 0 1px rgba(10, 22, 40, 0.12);
}

.pedestal__index {
    position: relative;
    z-index: 2;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--coral-memphis);
    font-weight: 500;
}

.pedestal__figure {
    position: relative;
    z-index: 2;
    margin: 14px 0 20px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 22, 40, 0.04);
    border-radius: 4px;
    padding: 10px;
}

.pedestal__figure svg { width: 100%; height: 100%; }

.pedestal__title {
    position: relative;
    z-index: 2;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 22px;
    margin: 0 0 10px;
    color: var(--abyssal-navy);
    letter-spacing: -0.015em;
}

.pedestal__body {
    position: relative;
    z-index: 2;
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 18px;
    color: rgba(10, 22, 40, 0.78);
}

.pedestal__cap {
    position: relative;
    z-index: 2;
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: rgba(10, 22, 40, 0.55);
    border-top: 1px solid rgba(10, 22, 40, 0.18);
    padding-top: 10px;
}

/* ================================================================
   SECTION 02 — TAXONOMIC PLATE
   ================================================================ */
.plate {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
    gap: 4vw;
    align-items: start;
}

.plate__illustration {
    position: relative;
    padding: 40px;
    border: 1px solid rgba(0, 229, 199, 0.25);
    border-radius: 4px;
    background: rgba(6, 13, 24, 0.4);
}

.plate__illustration::before {
    content: "PL. II";
    position: absolute;
    top: -10px;
    left: 24px;
    background: var(--abyssal-navy);
    padding: 2px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.25em;
    color: var(--kelp-yellow);
}

.plate__illustration::after {
    content: "SCALE 1 : 2";
    position: absolute;
    bottom: 14px;
    right: 20px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.25em;
    color: rgba(232, 244, 240, 0.45);
}

.botanical { width: 100%; height: auto; }
.botanical--large { max-height: 60vh; }

.plate__annotations {
    padding: 24px 26px 30px;
    border-left: 4px solid var(--coral-memphis);
    background: rgba(6, 13, 24, 0.5);
    position: relative;
}

.plate__annotations::before {
    /* zigzag accent at top */
    content: "";
    position: absolute;
    top: -12px;
    right: 20px;
    width: 60px;
    height: 12px;
    background:
        linear-gradient(45deg, transparent 46%, var(--kelp-yellow) 46%, var(--kelp-yellow) 54%, transparent 54%) 0 0/12px 12px repeat-x;
}

.annotations__title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 24px;
    margin: 0 0 8px;
    color: var(--sea-foam);
    letter-spacing: -0.01em;
}

.annotations__intro {
    font-size: 15px;
    margin: 0 0 18px;
    color: rgba(232, 244, 240, 0.7);
}

.annotations__intro em { color: var(--anemone); font-style: italic; }

.annotations__list {
    margin: 0 0 18px;
    padding: 0;
    display: grid;
    gap: 6px;
}

.annotations__row {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 10px;
    font-size: 14px;
    padding: 6px 0;
    border-bottom: 1px dotted rgba(0, 229, 199, 0.2);
}

.annotations__row dt {
    font-family: var(--font-mono);
    color: var(--kelp-yellow);
    font-size: 13px;
    letter-spacing: 0.1em;
}

.annotations__row dd {
    margin: 0;
    color: rgba(232, 244, 240, 0.82);
}

.annotations__stamp {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--bio-teal);
    border: 1px solid rgba(0, 229, 199, 0.4);
    padding: 4px 10px;
    border-radius: 2px;
}

/* ================================================================
   SECTION 03 — NUMBERED STEPS
   ================================================================ */
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 30px;
    max-width: 1040px;
}

.steps__item {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 28px;
    align-items: start;
    padding: 26px 26px 24px;
    border: 1px solid rgba(0, 229, 199, 0.15);
    border-left: 3px solid var(--bio-teal);
    background: rgba(6, 13, 24, 0.4);
    border-radius: 4px;
    position: relative;
}

.steps__item::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--coral-memphis);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.18);
}

.steps__disc {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bio-teal);
    color: var(--abyssal-navy);
    font-family: var(--font-disp);
    font-weight: 800;
    font-size: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.02em;
    animation: step-pulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 6px rgba(0, 229, 199, 0.12);
}

@keyframes step-pulse {
    0%, 100% { transform: scale(1.0); }
    50%      { transform: scale(1.05); }
}

.steps__item:nth-child(2) .steps__disc { animation-delay: 0.5s; }
.steps__item:nth-child(3) .steps__disc { animation-delay: 1.0s; }
.steps__item:nth-child(4) .steps__disc { animation-delay: 1.5s; }

.steps__heading {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(20px, 2vw, 28px);
    margin: 4px 0 10px;
    color: var(--sea-foam);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.steps__body p {
    font-size: 17px;
    margin: 0 0 14px;
    color: rgba(232, 244, 240, 0.8);
    line-height: 1.6;
    max-width: 62ch;
}

.steps__body em { color: var(--anemone); font-style: italic; }

.steps__aside {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--kelp-yellow);
    padding: 4px 10px;
    border: 1px solid rgba(255, 217, 61, 0.3);
    border-radius: 2px;
}

/* ================================================================
   SECTION 04 — GALLERY / PLINTHS
   ================================================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 26px;
    margin-top: 30px;
}

.plinth {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.plinth__marble {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--grad-marble);
    background-size: 140% 140%;
    background-position: 30% 40%;
    border-radius: 8px;
    box-shadow:
        0 12px 36px rgba(6, 13, 24, 0.55),
        inset 0 0 0 1px rgba(10, 22, 40, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 400ms ease, background-position 400ms ease, background-image 400ms ease, box-shadow 400ms ease;
}

.plinth__marble::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            118deg,
            transparent 0 55px,
            rgba(120, 100, 80, 0.12) 55px 56px,
            transparent 56px 100px
        ),
        repeating-linear-gradient(
            34deg,
            transparent 0 80px,
            rgba(80, 60, 40, 0.08) 80px 81px,
            transparent 81px 150px
        );
    pointer-events: none;
}

.plinth__marble::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(10,22,40,0.06) 1px, transparent 1px);
    background-size: 4px 4px;
    mix-blend-mode: multiply;
    opacity: 0.5;
    pointer-events: none;
}

.plinth__marble:hover {
    transform: translateY(-4px);
    background-image: var(--grad-marble-hover);
    box-shadow:
        0 18px 44px rgba(6, 13, 24, 0.65),
        0 0 50px rgba(0, 229, 199, 0.18),
        inset 0 0 0 1px rgba(10, 22, 40, 0.14);
}

.plinth__label {
    position: absolute;
    top: 10px;
    left: 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--coral-memphis);
    padding: 2px 6px;
    background: rgba(245, 240, 232, 0.7);
    border-radius: 2px;
}

.plinth__svg {
    position: relative;
    z-index: 1;
    width: 72%;
    height: 72%;
}

.plinth__title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 20px;
    margin: 0;
    color: var(--sea-foam);
    letter-spacing: -0.015em;
}

.plinth__caption {
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
    color: rgba(232, 244, 240, 0.7);
}

/* ================================================================
   SECTION 05 — COLOPHON
   ================================================================ */
.colophon-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr);
    gap: 4vw;
    align-items: start;
}

.colophon-note p {
    font-size: clamp(18px, 1.6vw, 22px);
    line-height: 1.6;
    max-width: 50ch;
    color: rgba(232, 244, 240, 0.85);
    margin: 0 0 1em;
}

.colophon-meta {
    padding: 28px 28px 24px;
    background: rgba(6, 13, 24, 0.55);
    border: 1px solid rgba(0, 229, 199, 0.22);
    border-radius: 4px;
    position: relative;
}

.colophon-meta::before {
    content: "";
    position: absolute;
    top: -10px;
    right: 24px;
    width: 22px; height: 22px;
    background: var(--coral-memphis);
    border-radius: 50%;
    box-shadow: -34px 0 0 var(--kelp-yellow), -68px 0 0 var(--anemone);
}

.colophon-meta__title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 22px;
    margin: 0 0 18px;
    color: var(--sea-foam);
    letter-spacing: -0.01em;
}

.colophon-meta__list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    gap: 10px;
}

.colophon-meta__list li {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dotted rgba(0, 229, 199, 0.22);
    font-size: 14px;
    align-items: baseline;
}

.colophon-meta__list span {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--kelp-yellow);
}

.colophon-meta__list em {
    font-style: normal;
    color: rgba(232, 244, 240, 0.85);
    font-size: 14px;
}

.colophon-meta__stamp {
    display: inline-block;
    font-family: var(--font-disp);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.2em;
    color: var(--bio-teal);
    padding: 6px 14px;
    border: 2px solid var(--bio-teal);
    border-radius: 4px;
    transform: rotate(-2deg);
}

/* ================================================================
   JUNCTIONS (between panels — Memphis bars + growing line)
   ================================================================ */
.junction {
    position: relative;
    width: 100vw;
    padding: 26px var(--side-gutter-right) 26px var(--side-gutter);
    background: var(--ink-black);
    display: flex;
    align-items: center;
    gap: 14px;
    overflow: hidden;
}

.bar {
    display: inline-block;
    height: 10px;
    border-radius: 2px;
}

.bar--coral  { width: 18vw; background: var(--coral-memphis); }
.bar--teal   { width: 12vw; background: var(--bio-teal); }
.bar--yellow { width: 8vw;  background: var(--kelp-yellow); }

.junction__line {
    position: absolute;
    left: 50%;
    bottom: 12px;
    height: 2px;
    width: 0%;
    background: var(--bio-teal);
    transform: translateX(-50%);
    transition: width 800ms ease-out;
}

.junction.in-view .junction__line { width: 90%; }

/* ================================================================
   MARGIN ART — Fixed column decorations (left + right)
   ================================================================ */
.margin-art {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 64px;
    pointer-events: none;
    z-index: 3;
    opacity: 0.9;
}

.margin-art--left  { left: 0; }
.margin-art--right { right: 0; }

.margin-zigzag,
.margin-arc {
    position: absolute;
    top: 0;
    left: 8px;
    width: 40px;
    height: 100vh;
    opacity: 0.8;
}

.margin-art--right .margin-arc { left: auto; right: 8px; }

/* Memphis shapes scattered in the margin columns */
.shape {
    position: absolute;
    display: block;
}

/* triangles — Kelp Yellow */
.shape-tri {
    width: 0; height: 0;
    border-style: solid;
    border-width: 0 11px 18px 11px;
    border-color: transparent transparent var(--kelp-yellow) transparent;
}

/* circles / dots — Bioluminescent Teal */
.shape-dot {
    width: 12px; height: 12px;
    background: var(--bio-teal);
    border-radius: 50%;
}

/* semicircles — Anemone */
.shape-semi {
    width: 32px; height: 16px;
    background: var(--anemone);
    border-radius: 32px 32px 0 0;
}

/* squiggles — small pink squiggle via SVG mask replaced by CSS */
.shape-squig {
    width: 34px; height: 12px;
    background:
        radial-gradient(circle at 8px 6px, var(--anemone) 3px, transparent 4px),
        radial-gradient(circle at 26px 6px, var(--anemone) 3px, transparent 4px);
}

/* position — left */
.margin-art--left  .shape-tri--1  { top: 12vh; left: 30px; transform: rotate(-12deg); }
.margin-art--left  .shape-dot--1  { top: 28vh; left: 26px; }
.margin-art--left  .shape-semi--1 { top: 46vh; left: 14px; transform: rotate(20deg); }
.margin-art--left  .shape-tri--2  { top: 64vh; left: 34px; transform: rotate(14deg); }
.margin-art--left  .shape-squig--1 { top: 82vh; left: 12px; }

/* position — right */
.margin-art--right .shape-semi--2 { top: 10vh; right: 16px; transform: rotate(-24deg); }
.margin-art--right .shape-tri--3  { top: 32vh; right: 28px; transform: rotate(8deg); }
.margin-art--right .shape-dot--2  { top: 52vh; right: 22px; }
.margin-art--right .shape-squig--2 { top: 70vh; right: 10px; }
.margin-art--right .shape-tri--4  { top: 88vh; right: 30px; transform: rotate(-6deg); }

/* drift animation: translateY 8px + rotate 3deg, 6s, offset per instance */
@keyframes drift {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    50%      { transform: translate(0, -8px) rotate(3deg); }
}

@keyframes drift-slow {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    50%      { transform: translate(0, 6px) rotate(-2deg); }
}

.drift      { animation: drift 6s ease-in-out infinite; }
.drift-slow { animation: drift-slow 9s ease-in-out infinite; }

/* stagger the drift start times so shapes move out of sync */
.margin-art--left  .shape-tri--1,
.margin-art--right .shape-semi--2  { animation-delay: -0.4s; }
.margin-art--left  .shape-dot--1   { animation-delay: -1.2s; }
.margin-art--left  .shape-semi--1,
.margin-art--right .shape-tri--3   { animation-delay: -2.1s; }
.margin-art--left  .shape-tri--2   { animation-delay: -3.0s; }
.margin-art--right .shape-dot--2   { animation-delay: -3.6s; }
.margin-art--left  .shape-squig--1 { animation-delay: -4.4s; }
.margin-art--right .shape-squig--2 { animation-delay: -5.0s; }
.margin-art--right .shape-tri--4   { animation-delay: -5.6s; }

/* ================================================================
   STAGGER-ENTRY ANIMATIONS
   ================================================================ */
.stagger {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 600ms ease-out,
        transform 600ms ease-out;
    transition-delay: var(--stagger-delay, 0ms);
    will-change: opacity, transform;
}

.stagger.is-in {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================================
   BOTANICAL SVG PATH-DRAW
   ================================================================ */
.botanical--draw .draw-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 1.5s ease-out;
    transition-delay: var(--draw-delay, 0ms);
}

.botanical--draw.is-in .draw-path {
    stroke-dashoffset: 0;
}

/* ================================================================
   TUTORIAL PROGRESS INDICATOR (bottom-right)
   ================================================================ */
.progress {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.progress__ring {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background:
        conic-gradient(var(--bio-teal) 0deg, rgba(0, 229, 199, 0.12) 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ring-pulse 2s ease-in-out infinite;
    transition: background 400ms ease-out;
}

.progress__ring::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: var(--abyssal-navy);
    border: 1px solid rgba(0, 229, 199, 0.3);
}

@keyframes ring-pulse {
    0%, 100% { transform: scale(1.0); }
    50%      { transform: scale(1.05); }
}

.progress__num {
    position: relative;
    z-index: 2;
    font-family: var(--font-disp);
    font-weight: 800;
    font-size: 22px;
    color: var(--bio-teal);
    line-height: 1;
}

.progress__total {
    position: relative;
    z-index: 2;
    font-family: var(--font-mono);
    font-size: 9px;
    color: rgba(0, 229, 199, 0.65);
    letter-spacing: 0.1em;
    margin-left: 2px;
    margin-top: 8px;
}

.progress__label {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.22em;
    color: rgba(232, 244, 240, 0.6);
    text-transform: uppercase;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
    :root {
        --side-gutter: 6vw;
        --side-gutter-right: 6vw;
    }

    .cover-grid {
        grid-template-columns: 1fr;
    }

    .cover-figure {
        grid-column: 1 / -1;
        grid-row: auto;
        max-width: 520px;
    }

    .lesson-grid {
        grid-template-columns: 1fr;
    }

    .plate {
        grid-template-columns: 1fr;
    }

    .colophon-grid {
        grid-template-columns: 1fr;
    }

    .pedestal-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    body { font-size: 17px; }

    .panel {
        padding: 8vh 7vw;
    }

    .giant-number {
        font-size: clamp(90px, 22vw, 160px);
        opacity: 0.8;
    }

    .margin-art { width: 36px; opacity: 0.7; }
    .margin-zigzag, .margin-art--right .margin-arc { width: 22px; left: 6px; }
    .margin-art--right .margin-arc { right: 6px; left: auto; }

    .shape-tri--1, .shape-tri--2, .shape-tri--3, .shape-tri--4 {
        border-width: 0 7px 12px 7px;
    }

    .shape-dot--1, .shape-dot--2 { width: 8px; height: 8px; }
    .shape-semi--1, .shape-semi--2 { width: 22px; height: 11px; }

    .pedestal-row {
        grid-template-columns: 1fr;
    }

    .steps__item {
        grid-template-columns: 60px 1fr;
        gap: 18px;
        padding: 20px;
    }

    .steps__disc {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .junction {
        padding: 18px 7vw;
    }

    .bar--coral  { width: 34vw; }
    .bar--teal   { width: 22vw; }
    .bar--yellow { width: 14vw; }

    .progress {
        bottom: 16px;
        right: 16px;
    }

    .progress__ring { width: 54px; height: 54px; }
    .progress__num { font-size: 18px; }
}

@media (max-width: 480px) {
    :root {
        --side-gutter: 5vw;
        --side-gutter-right: 5vw;
    }

    .cover-title { font-size: clamp(40px, 11vw, 64px); }
    .lesson-title { font-size: clamp(32px, 9vw, 54px); }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* collapse margin art to decorative bands — hide fixed art, rely on junctions */
    .margin-art { display: none; }
}
