/* ==========================================================================
   layer2.quest — watercolor folio
   Palette drawn directly from a watercolorist's mixing tray.
   No solid fills, no drop shadows, no glassmorphism.
   Depth = layered transparency. Motion = slide-reveal.
   ========================================================================== */

:root {
    --paper: #FAF6F0;
    --paper-warm: #F5EDE0;
    --raw-sienna: #C4956A;
    --burnt-umber: #3B2F2F;
    --yellow-ochre: #D4A843;
    --paynes-grey: #4A5568;
    --sepia: #5C4033;
    --naples-yellow: #F5DEB3;
    --alizarin-tint: #C97B7B;
    --deep-indigo: #2C3E50;
    --khaki-earth: #8B7355;
    --dark-walnut: #4A3728;

    --wash-opacity: 0.25;
    --paper-texture-opacity: 0.05;
    --gutter: 32px;
    --cell-radius: 0px;
    --reveal-duration: 720ms;
    --reveal-easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);

    --font-display: "Caveat", "Playfair Display", cursive;
    --font-body: "Nunito Sans", "Inter", "Helvetica Neue", system-ui, sans-serif;
    --font-numeral: "Playfair Display", "Lora", serif;
}

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

html {
    scroll-behavior: smooth;
    background: var(--paper);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--dark-walnut);
    background:
        radial-gradient(ellipse at 18% 22%, rgba(196, 149, 106, 0.10) 0%, rgba(196, 149, 106, 0) 55%),
        radial-gradient(ellipse at 82% 38%, rgba(212, 168, 67, 0.08) 0%, rgba(212, 168, 67, 0) 55%),
        radial-gradient(ellipse at 50% 75%, rgba(74, 85, 104, 0.07) 0%, rgba(74, 85, 104, 0) 55%),
        linear-gradient(180deg, var(--paper) 0%, var(--paper) 70%, var(--paper-warm) 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    line-height: 1.72;
    font-size: 17px;
}

/* Paper texture — repeating-conic-gradient noise + diagonal grain */
.paper-texture {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: var(--paper-texture-opacity);
    background:
        repeating-conic-gradient(
            from 0deg at 0 0,
            rgba(59, 47, 47, 0.6) 0deg 1deg,
            rgba(196, 149, 106, 0.0) 1deg 3deg,
            rgba(74, 55, 40, 0.5) 3deg 4deg,
            rgba(212, 168, 67, 0.0) 4deg 7deg
        ),
        repeating-linear-gradient(
            38deg,
            rgba(92, 64, 51, 0.20) 0px,
            rgba(196, 149, 106, 0.0) 1.5px,
            rgba(59, 47, 47, 0.18) 3px,
            rgba(196, 149, 106, 0.0) 4.5px
        ),
        repeating-linear-gradient(
            -42deg,
            rgba(74, 55, 40, 0.16) 0px,
            rgba(196, 149, 106, 0.0) 2px,
            rgba(74, 55, 40, 0.12) 3.6px,
            rgba(196, 149, 106, 0.0) 5px
        );
    background-size: 220px 220px, 6px 6px, 7px 7px;
    mix-blend-mode: multiply;
}

/* Background flowing-curves watermarks */
.bg-curves {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
}

.bg-curve {
    stroke: var(--yellow-ochre);
    stroke-width: 1.8;
    stroke-linecap: round;
    fill: none;
    opacity: 0.10;
}

.bg-curve-1 { stroke: var(--raw-sienna); opacity: 0.13; }
.bg-curve-2 { stroke: var(--yellow-ochre); opacity: 0.10; }
.bg-curve-3 { stroke: var(--khaki-earth); opacity: 0.12; }
.bg-curve-4 { stroke: var(--alizarin-tint); opacity: 0.11; }
.bg-curve-5 { stroke: var(--paynes-grey); opacity: 0.10; }

/* ==========================================================================
   Top bar
   ========================================================================== */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    padding: 0 clamp(20px, 4vw, 56px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    transition: background 400ms ease, border-color 400ms ease;
    background:
        linear-gradient(180deg, rgba(250, 246, 240, 0.0) 0%, rgba(250, 246, 240, 0.0) 100%);
    border-bottom: 1px solid rgba(139, 115, 85, 0);
}

.topbar.scrolled {
    background:
        linear-gradient(180deg,
            rgba(250, 246, 240, 0.92) 0%,
            rgba(250, 246, 240, 0.86) 70%,
            rgba(250, 246, 240, 0.74) 100%);
    border-bottom: 1px solid rgba(139, 115, 85, 0.18);
}

.brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    color: var(--burnt-umber);
    text-decoration: none;
    letter-spacing: -0.01em;
    line-height: 1;
}

.primary-nav {
    display: flex;
    gap: clamp(16px, 2.5vw, 36px);
    align-items: baseline;
}

.nav-item {
    position: relative;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    color: var(--sepia);
    text-decoration: none;
    padding: 6px 4px 14px;
    transition: color 360ms ease;
}

.nav-item::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 0;
    height: 10px;
    transform: translateX(-50%);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 10' preserveAspectRatio='none'><path d='M2,5 Q20,1 40,6 T78,4' fill='none' stroke='%23C97B7B' stroke-width='1.4' stroke-linecap='round' opacity='0.5'/></svg>");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    transition: width 420ms var(--reveal-easing);
    pointer-events: none;
}

.nav-item:hover,
.nav-item.active {
    color: var(--burnt-umber);
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 78%;
}

@media (max-width: 720px) {
    .topbar { height: 60px; }
    .brand { font-size: 1.6rem; }
    .primary-nav { gap: 14px; }
    .nav-item { font-size: 0.78rem; padding-bottom: 10px; }
}

/* ==========================================================================
   Sheet shell (folio sheets)
   ========================================================================== */
main {
    position: relative;
    z-index: 1;
}

.sheet {
    position: relative;
    min-height: 100vh;
    padding: clamp(96px, 14vh, 160px) clamp(20px, 6vw, 96px) clamp(80px, 12vh, 140px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.sheet + .sheet {
    margin-top: -40px; /* deckle overlap zone */
    padding-top: clamp(120px, 16vh, 180px);
}

.sheet-header {
    max-width: 760px;
    margin: 0 auto clamp(48px, 6vh, 84px);
    text-align: center;
    position: relative;
    z-index: 2;
}

.sheet-num {
    display: inline-block;
    font-family: var(--font-numeral);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 6rem);
    color: rgba(196, 149, 106, 0.5);
    line-height: 1;
    margin-bottom: 4px;
}

.sheet-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 5.4vw, 4.4rem);
    color: var(--burnt-umber);
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin: 0 0 18px;
}

.sheet-lead {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    color: var(--dark-walnut);
    line-height: 1.72;
    max-width: 640px;
    margin: 0 auto;
}

.folio-meta {
    text-align: center;
    margin-bottom: 32px;
    color: var(--khaki-earth);
    font-size: 0.85rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 300;
    position: relative;
    z-index: 2;
}

.folio-num {
    font-family: var(--font-numeral);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--raw-sienna);
    margin-right: 14px;
    text-transform: none;
    letter-spacing: 0;
}

.folio-label {
    text-transform: lowercase;
    letter-spacing: 0.32em;
}

/* Deckle edge between sheets */
.deckle-edge {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 40px;
    color: var(--paper);
    pointer-events: none;
    z-index: 4;
}

.deckle-edge svg {
    width: 100%;
    height: 100%;
    display: block;
}

.curve-divider {
    margin: 60px auto 0;
    width: 100%;
    max-width: 1400px;
    color: var(--raw-sienna);
    opacity: 0.32;
    height: 60px;
}

.curve-divider svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ==========================================================================
   Sheet One — The Wash
   ========================================================================== */
.sheet-one {
    background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 100%);
    text-align: center;
    align-items: center;
}

.wash-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.wash {
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    mix-blend-mode: multiply;
    opacity: 0;
    transform: scale(0.6);
    animation: washBleed 2400ms var(--reveal-easing) forwards;
}

.wash-sienna {
    width: 70vw;
    height: 70vw;
    left: -18vw;
    top: 5vh;
    background: radial-gradient(circle at 30% 40%,
        rgba(196, 149, 106, 0.65) 0%,
        rgba(196, 149, 106, 0.45) 28%,
        rgba(196, 149, 106, 0.18) 60%,
        rgba(196, 149, 106, 0) 100%);
    animation-delay: 200ms;
}

.wash-ochre {
    width: 60vw;
    height: 60vw;
    right: -10vw;
    top: -10vh;
    background: radial-gradient(circle at 60% 40%,
        rgba(212, 168, 67, 0.55) 0%,
        rgba(212, 168, 67, 0.32) 30%,
        rgba(212, 168, 67, 0.14) 60%,
        rgba(212, 168, 67, 0) 100%);
    animation-delay: 500ms;
}

.wash-paynes {
    width: 75vw;
    height: 65vw;
    left: 12vw;
    bottom: -22vh;
    background: radial-gradient(circle at 50% 60%,
        rgba(74, 85, 104, 0.42) 0%,
        rgba(74, 85, 104, 0.24) 32%,
        rgba(74, 85, 104, 0.10) 62%,
        rgba(74, 85, 104, 0) 100%);
    animation-delay: 700ms;
}

.wash-alizarin {
    width: 38vw;
    height: 38vw;
    right: 14vw;
    bottom: 8vh;
    background: radial-gradient(circle at 50% 50%,
        rgba(201, 123, 123, 0.42) 0%,
        rgba(201, 123, 123, 0.22) 36%,
        rgba(201, 123, 123, 0.08) 64%,
        rgba(201, 123, 123, 0) 100%);
    animation-delay: 1100ms;
}

@keyframes washBleed {
    0% {
        opacity: 0;
        transform: scale(0.55);
    }
    60% {
        opacity: 0.85;
    }
    100% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.hero-block {
    position: relative;
    z-index: 2;
    max-width: 880px;
    margin: 0 auto;
    padding: 0 16px;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3.4rem, 9vw, 6.4rem);
    color: var(--burnt-umber);
    letter-spacing: -0.012em;
    line-height: 1.04;
    margin: 0 0 22px;
    text-shadow: 0 0 0 transparent;
}

.hero-sub {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1.05rem, 1.4vw, 1.3rem);
    color: var(--dark-walnut);
    max-width: 620px;
    margin: 0 auto 36px;
    line-height: 1.72;
}

.hero-glyph {
    color: var(--raw-sienna);
    opacity: 0.55;
    width: 200px;
    height: 40px;
    margin: 0 auto;
}

.hero-glyph svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ==========================================================================
   Sheet Two — The Collection (masonry)
   ========================================================================== */
.sheet-two {
    background:
        linear-gradient(180deg,
            rgba(250, 246, 240, 1) 0%,
            rgba(245, 237, 224, 0.7) 100%);
}

.masonry {
    columns: 3;
    column-gap: var(--gutter);
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 4px;
}

@media (max-width: 1024px) {
    .masonry { columns: 2; }
}

@media (max-width: 600px) {
    .masonry { columns: 1; }
}

.cell {
    break-inside: avoid;
    margin-bottom: var(--gutter);
    padding: 26px 26px 24px;
    position: relative;
    z-index: 2;
    isolation: isolate;
}

.cell-tall { padding-bottom: 32px; }
.cell-medium { }
.cell-short { padding-bottom: 22px; }

.cell-wash {
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: var(--cell-radius);
    mix-blend-mode: multiply;
    opacity: 0.95;
}

.wash-style-a {
    background:
        radial-gradient(ellipse at 18% 24%,
            rgba(196, 149, 106, 0.32) 0%,
            rgba(196, 149, 106, 0.18) 38%,
            rgba(196, 149, 106, 0.08) 70%,
            rgba(196, 149, 106, 0) 100%),
        linear-gradient(135deg,
            rgba(212, 168, 67, 0.10) 0%,
            rgba(196, 149, 106, 0.18) 50%,
            rgba(196, 149, 106, 0.04) 100%);
}

.wash-style-b {
    background:
        radial-gradient(ellipse at 80% 30%,
            rgba(74, 85, 104, 0.22) 0%,
            rgba(74, 85, 104, 0.10) 45%,
            rgba(74, 85, 104, 0) 100%),
        linear-gradient(120deg,
            rgba(245, 222, 179, 0.20) 0%,
            rgba(196, 149, 106, 0.14) 60%,
            rgba(196, 149, 106, 0.04) 100%);
}

.wash-style-c {
    background:
        radial-gradient(ellipse at 50% 80%,
            rgba(212, 168, 67, 0.30) 0%,
            rgba(212, 168, 67, 0.12) 50%,
            rgba(212, 168, 67, 0) 100%),
        linear-gradient(160deg,
            rgba(245, 222, 179, 0.22) 0%,
            rgba(212, 168, 67, 0.10) 100%);
}

.wash-style-d {
    background:
        radial-gradient(ellipse at 30% 70%,
            rgba(92, 64, 51, 0.22) 0%,
            rgba(92, 64, 51, 0.10) 50%,
            rgba(92, 64, 51, 0) 100%),
        linear-gradient(135deg,
            rgba(196, 149, 106, 0.14) 0%,
            rgba(74, 85, 104, 0.10) 60%,
            rgba(196, 149, 106, 0.04) 100%);
}

.wash-style-e {
    background:
        radial-gradient(ellipse at 70% 25%,
            rgba(245, 222, 179, 0.42) 0%,
            rgba(245, 222, 179, 0.20) 40%,
            rgba(245, 222, 179, 0) 100%),
        linear-gradient(120deg,
            rgba(196, 149, 106, 0.18) 0%,
            rgba(212, 168, 67, 0.10) 100%);
}

.wash-style-f {
    background:
        radial-gradient(ellipse at 20% 80%,
            rgba(201, 123, 123, 0.30) 0%,
            rgba(201, 123, 123, 0.14) 50%,
            rgba(201, 123, 123, 0) 100%),
        linear-gradient(135deg,
            rgba(245, 222, 179, 0.16) 0%,
            rgba(201, 123, 123, 0.08) 100%);
}

.wash-style-g {
    background:
        radial-gradient(ellipse at 60% 40%,
            rgba(74, 85, 104, 0.24) 0%,
            rgba(74, 85, 104, 0.10) 50%,
            rgba(74, 85, 104, 0) 100%),
        linear-gradient(125deg,
            rgba(196, 149, 106, 0.12) 0%,
            rgba(196, 149, 106, 0.04) 100%);
}

.wash-style-h {
    background:
        radial-gradient(ellipse at 40% 70%,
            rgba(212, 168, 67, 0.28) 0%,
            rgba(212, 168, 67, 0.10) 50%,
            rgba(212, 168, 67, 0) 100%),
        linear-gradient(140deg,
            rgba(196, 149, 106, 0.16) 0%,
            rgba(245, 222, 179, 0.10) 100%);
}

.wash-style-i {
    background:
        radial-gradient(ellipse at 75% 75%,
            rgba(92, 64, 51, 0.22) 0%,
            rgba(92, 64, 51, 0.08) 50%,
            rgba(92, 64, 51, 0) 100%),
        linear-gradient(140deg,
            rgba(245, 222, 179, 0.20) 0%,
            rgba(196, 149, 106, 0.10) 100%);
}

.cell-contour {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    color: var(--khaki-earth);
    opacity: 0.32;
    z-index: 0;
}

.cell-tall { min-height: 460px; }
.cell-medium { min-height: 360px; }
.cell-short { min-height: 240px; }

.cell-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.7rem, 2.3vw, 2.2rem);
    color: var(--burnt-umber);
    margin: 18px 0 10px;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.cell-body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1rem;
    color: var(--dark-walnut);
    line-height: 1.7;
    margin: 0 0 14px;
    max-width: 38ch;
}

.cell-caption {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--khaki-earth);
    display: block;
}

/* Collage figure inside cells */
.collage {
    position: relative;
    width: 100%;
    margin-bottom: 14px;
    isolation: isolate;
}

.collage-portrait { aspect-ratio: 4 / 5; }
.collage-square   { aspect-ratio: 5 / 4; }
.collage-strip    { aspect-ratio: 5 / 2; }
.collage-tall     { aspect-ratio: 3 / 4.5; }

/* Torn-edge clip path simulating hand-torn paper */
.collage-shape {
    position: absolute;
    width: 80%;
    height: 80%;
    clip-path: polygon(
        4% 6%, 12% 2%, 22% 5%, 36% 1%, 50% 4%, 64% 0%, 78% 4%, 90% 1%, 96% 6%,
        99% 18%, 96% 32%, 99% 46%, 95% 60%, 99% 74%, 96% 86%, 98% 96%,
        88% 99%, 74% 96%, 60% 99%, 46% 95%, 32% 99%, 18% 96%, 6% 99%,
        2% 88%, 5% 74%, 1% 60%, 4% 46%, 0% 32%, 4% 18%, 1% 8%
    );
    opacity: 0.72;
    transition: transform 600ms var(--reveal-easing);
}

.collage-shape::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), rgba(255,255,255,0) 60%);
    mix-blend-mode: overlay;
}

.shape-1 {
    background:
        radial-gradient(circle at 30% 30%, rgba(196,149,106,0.85), rgba(196,149,106,0.35) 60%, rgba(196,149,106,0.15)),
        linear-gradient(140deg, rgba(245,222,179,0.7), rgba(196,149,106,0.5));
    top: 8%; left: 6%;
    transform: rotate(-3deg);
}

.shape-2 {
    background:
        radial-gradient(circle at 60% 70%, rgba(74,85,104,0.7), rgba(74,85,104,0.3) 50%, rgba(74,85,104,0.10)),
        linear-gradient(120deg, rgba(196,149,106,0.5), rgba(74,85,104,0.55));
    width: 70%; height: 70%;
    top: 22%; left: 24%;
    transform: rotate(4deg);
}

.shape-3 {
    background:
        radial-gradient(ellipse at 40% 50%, rgba(212,168,67,0.85), rgba(212,168,67,0.4) 60%, rgba(212,168,67,0.1)),
        linear-gradient(160deg, rgba(245,222,179,0.7), rgba(196,149,106,0.45));
    width: 75%; height: 75%;
    top: 12%; left: 14%;
    transform: rotate(-6deg);
}

.shape-4 {
    background:
        radial-gradient(circle at 50% 30%, rgba(201,123,123,0.7), rgba(201,123,123,0.3) 55%, rgba(201,123,123,0.08)),
        linear-gradient(120deg, rgba(245,222,179,0.5), rgba(201,123,123,0.45));
    width: 65%; height: 65%;
    bottom: 6%; right: 6%;
    top: auto; left: auto;
    transform: rotate(5deg);
}

.shape-5 {
    background:
        radial-gradient(ellipse at 60% 60%, rgba(92,64,51,0.7), rgba(92,64,51,0.3) 55%, rgba(92,64,51,0.05)),
        linear-gradient(135deg, rgba(196,149,106,0.4), rgba(92,64,51,0.45));
    width: 70%; height: 70%;
    top: 18%; left: 16%;
    transform: rotate(-2deg);
}

/* Tape strips */
.tape {
    position: absolute;
    width: 38px;
    height: 14px;
    background:
        linear-gradient(90deg,
            rgba(245,222,179,0.0) 0%,
            rgba(245,222,179,0.85) 12%,
            rgba(245,222,179,0.85) 88%,
            rgba(245,222,179,0.0) 100%);
    pointer-events: none;
    z-index: 4;
}

.tape::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        rgba(196,149,106,0.0) 0px,
        rgba(196,149,106,0.18) 2px,
        rgba(196,149,106,0.0) 4px
    );
    opacity: 0.6;
}

.tape-tl { top: -7px; left: 6%; transform: rotate(-12deg); }
.tape-tr { top: -7px; right: 6%; transform: rotate(10deg); }
.tape-bl { bottom: -7px; left: 6%; transform: rotate(8deg); }
.tape-br { bottom: -7px; right: 6%; transform: rotate(-9deg); }

/* ==========================================================================
   Sheet Three — The Study
   ========================================================================== */
.sheet-three {
    background:
        linear-gradient(180deg,
            rgba(245, 237, 224, 0.5) 0%,
            rgba(250, 246, 240, 1) 100%);
}

.study-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 1fr;
    gap: clamp(40px, 6vw, 96px);
    align-items: center;
    max-width: 1320px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .study-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

.study-collage {
    position: relative;
    aspect-ratio: 4 / 5;
    width: 100%;
    isolation: isolate;
}

.study-piece {
    position: absolute;
    clip-path: polygon(
        3% 5%, 10% 1%, 22% 4%, 36% 0%, 52% 3%, 68% 1%, 82% 4%, 94% 2%, 98% 10%,
        96% 24%, 99% 38%, 96% 52%, 99% 66%, 95% 80%, 98% 92%, 92% 98%,
        78% 96%, 64% 99%, 50% 96%, 36% 99%, 22% 95%, 10% 98%, 4% 92%,
        1% 78%, 4% 62%, 0% 46%, 4% 30%, 1% 16%, 4% 8%
    );
}

.study-piece-1 {
    width: 78%;
    height: 78%;
    bottom: 0;
    left: 0;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(196,149,106,0.7), rgba(196,149,106,0.3) 55%, rgba(196,149,106,0.1)),
        linear-gradient(140deg, rgba(245,222,179,0.6) 0%, rgba(196,149,106,0.55) 50%, rgba(74,55,40,0.35) 100%);
}

.study-piece-2 {
    width: 72%;
    height: 72%;
    top: 12%;
    left: 18%;
    background:
        radial-gradient(circle at 60% 50%, rgba(74,85,104,0.65), rgba(74,85,104,0.28) 50%, rgba(74,85,104,0.08)),
        linear-gradient(120deg, rgba(196,149,106,0.45) 0%, rgba(74,85,104,0.55) 100%);
    transform: rotate(3deg);
}

.study-piece-3 {
    width: 60%;
    height: 60%;
    top: 4%;
    right: 0;
    background:
        radial-gradient(circle at 40% 30%, rgba(201,123,123,0.65), rgba(201,123,123,0.25) 55%, rgba(201,123,123,0.08)),
        linear-gradient(140deg, rgba(212,168,67,0.45) 0%, rgba(201,123,123,0.55) 100%);
    transform: rotate(-4deg);
}

.study-pencil {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    color: var(--burnt-umber);
    opacity: 0.18;
    z-index: 5;
}

.study-text {
    max-width: 540px;
    color: var(--dark-walnut);
}

.study-text .sheet-num {
    text-align: left;
    display: block;
}

.study-text .sheet-title {
    text-align: left;
    margin-bottom: 24px;
}

.study-text p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.78;
    color: var(--dark-walnut);
    margin: 0 0 18px;
    max-width: 540px;
}

.study-text .study-lead {
    font-weight: 300;
    font-size: 1.18rem;
    color: var(--sepia);
    border-left: 1px solid rgba(139, 115, 85, 0.4);
    padding-left: 18px;
    margin-bottom: 26px;
}

.study-meta {
    font-size: 0.82rem !important;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--khaki-earth) !important;
    font-weight: 300 !important;
    margin-top: 30px !important;
}

/* ==========================================================================
   Sheet Four — The Palette
   ========================================================================== */
.sheet-four {
    background:
        linear-gradient(180deg,
            rgba(250, 246, 240, 1) 0%,
            rgba(245, 222, 179, 0.18) 100%);
}

.palette-curves {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.palette-scatter {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: clamp(32px, 4vw, 56px);
    padding: 32px 0;
}

.swatch {
    position: relative;
    text-align: center;
    cursor: default;
    transition: transform 540ms var(--reveal-easing);
    padding: 12px;
}

.swatch:nth-child(2n) { transform: translateY(28px); }
.swatch:nth-child(3n) { transform: translateY(-22px); }
.swatch:nth-child(5n) { transform: translateY(14px); }

.swatch-circle {
    display: block;
    width: clamp(110px, 14vw, 160px);
    height: clamp(110px, 14vw, 160px);
    margin: 0 auto 16px;
    position: relative;
    /* Irregular blob clip-path */
    clip-path: polygon(
        50% 0%, 64% 6%, 78% 4%, 88% 16%, 96% 30%, 98% 46%, 96% 62%, 88% 76%, 78% 88%,
        62% 96%, 48% 98%, 32% 94%, 18% 88%, 8% 74%, 2% 60%, 4% 44%, 8% 28%, 18% 14%, 32% 6%
    );
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,0.55), rgba(255,255,255,0) 50%),
        radial-gradient(ellipse at 70% 70%, var(--c) 0%, var(--c) 30%, transparent 80%),
        radial-gradient(circle at 50% 50%, var(--c) 10%, color-mix(in srgb, var(--c) 60%, var(--paper)) 65%, transparent 100%);
    background-color: var(--c);
    opacity: 0.92;
    transition: transform 600ms var(--reveal-easing), opacity 480ms ease, filter 480ms ease;
    filter: saturate(0.9);
}

.swatch-circle::before {
    content: "";
    position: absolute;
    inset: -6px;
    clip-path: inherit;
    background: radial-gradient(circle, var(--c) 0%, transparent 70%);
    opacity: 0.0;
    transform: scale(0.85);
    transition: opacity 700ms var(--reveal-easing), transform 700ms var(--reveal-easing);
    z-index: -1;
}

.swatch:hover .swatch-circle {
    transform: scale(1.18);
    opacity: 1;
    filter: saturate(1.05);
}

.swatch:hover .swatch-circle::before {
    opacity: 0.55;
    transform: scale(1.55);
}

.swatch-name {
    display: block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.96rem;
    color: var(--burnt-umber);
    letter-spacing: 0.01em;
    margin-bottom: 4px;
}

.swatch-pigment {
    display: block;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--khaki-earth);
}

/* ==========================================================================
   Sheet Five — The Layers
   ========================================================================== */
.sheet-five {
    background:
        linear-gradient(180deg,
            rgba(245, 222, 179, 0.10) 0%,
            rgba(250, 246, 240, 1) 100%);
}

.layers-stack {
    position: relative;
    width: min(940px, 92vw);
    aspect-ratio: 5 / 3.4;
    margin: 0 auto;
    z-index: 2;
}

@media (max-width: 720px) {
    .layers-stack {
        aspect-ratio: 4 / 5;
    }
}

.layer-panel {
    position: absolute;
    width: 70%;
    min-height: 70%;
    padding: clamp(28px, 3.4vw, 44px);
    color: var(--burnt-umber);
    mix-blend-mode: multiply;
    transform-origin: center;
    transition: transform 700ms var(--reveal-easing);
}

.layer-a {
    top: 0;
    left: 0;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(196,149,106,0.42), rgba(196,149,106,0.18) 50%, rgba(196,149,106,0.04)),
        linear-gradient(135deg, rgba(196,149,106,0.30) 0%, rgba(196,149,106,0.16) 70%, rgba(196,149,106,0.06) 100%);
}

.layer-b {
    top: 18%;
    left: 15%;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(74,85,104,0.36), rgba(74,85,104,0.14) 55%, rgba(74,85,104,0.04)),
        linear-gradient(150deg, rgba(74,85,104,0.26) 0%, rgba(74,85,104,0.12) 70%, rgba(74,85,104,0.04) 100%);
}

.layer-c {
    top: 36%;
    right: 0;
    left: auto;
    background:
        radial-gradient(ellipse at 70% 70%, rgba(201,123,123,0.36), rgba(201,123,123,0.14) 55%, rgba(201,123,123,0.04)),
        linear-gradient(165deg, rgba(201,123,123,0.26) 0%, rgba(201,123,123,0.12) 70%, rgba(201,123,123,0.04) 100%);
}

.layer-tag {
    display: block;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sepia);
    margin-bottom: 12px;
}

.layer-panel h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 2.4vw, 2.2rem);
    color: var(--burnt-umber);
    margin: 0 0 12px;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.layer-panel p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.96rem;
    color: var(--dark-walnut);
    line-height: 1.7;
    margin: 0;
    max-width: 36ch;
}

@media (max-width: 720px) {
    .layer-panel {
        width: 86%;
        min-height: 50%;
    }
    .layer-a { top: 0; left: 0; }
    .layer-b { top: 22%; left: 8%; }
    .layer-c { top: 44%; right: 0; left: auto; }
}

/* ==========================================================================
   Sheet Six — The Coda
   ========================================================================== */
.sheet-six {
    min-height: 60vh;
    background:
        linear-gradient(180deg,
            rgba(250, 246, 240, 1) 0%,
            rgba(245, 237, 224, 1) 100%);
    text-align: center;
    align-items: center;
    justify-content: center;
}

.coda-curve {
    position: absolute;
    top: 18%;
    left: 0;
    right: 0;
    width: 100%;
    height: 80px;
    z-index: 0;
    pointer-events: none;
}

.coda-block {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
}

.coda-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    color: var(--burnt-umber);
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin: 12px 0 22px;
}

.coda-line {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.06rem;
    color: var(--sepia);
    line-height: 1.72;
    margin: 0 0 18px;
}

.coda-meta {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--khaki-earth);
    margin: 12px 0 0;
}

/* ==========================================================================
   Reveal animation system (slide-reveal only, no parallax/stagger uniformity)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition:
        opacity var(--reveal-duration) var(--reveal-easing),
        transform var(--reveal-duration) var(--reveal-easing);
    will-change: opacity, transform;
}

.reveal[data-direction="left"] {
    transform: translate3d(-32px, 0, 0);
}

.reveal[data-direction="right"] {
    transform: translate3d(32px, 0, 0);
}

.reveal[data-direction="top"] {
    transform: translate3d(0, -28px, 0);
}

.reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Sheet One reveal pieces use animation-delay-driven reveal already */
.sheet-one .reveal {
    opacity: 0;
    animation: heroReveal 900ms var(--reveal-easing) forwards;
    animation-delay: var(--reveal-delay, 1400ms);
}

@keyframes heroReveal {
    from { opacity: 0; transform: translate3d(0, 24px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

.sheet-one .folio-meta { --reveal-delay: 200ms; }
.sheet-one .hero-title { --reveal-delay: 1400ms; }
.sheet-one .hero-sub   { --reveal-delay: 1900ms; }
.sheet-one .hero-glyph { --reveal-delay: 2300ms; }

/* When JS isn't ready, never trap content invisible after a short wait */
.no-js .reveal {
    opacity: 1;
    transform: none;
}
