/* =============================================================
   mybadge.id — skeuomorphic credential workshop
   Palette: deep indigo, brass, copper patina, wax vermilion,
            iridescent violet, holographic teal.
   Typography: Libre Baskerville (display + body + italic),
               Lato (utility, all-caps tags).
   ============================================================= */

:root {
    /* Material palette */
    --indigo:      #0F0A1A;   /* Deep Indigo - velvet lining */
    --black:       #000000;
    --parchment:   #F0E6D2;   /* Aged parchment */
    --buff:        #D4C5A9;   /* Warm buff secondary text */
    --umber:       #2C1E12;   /* Rich Umber - walnut leather */
    --brass:       #B8860B;   /* Brushed brass */
    --brass-light: #D4A84B;
    --brass-dark:  #8B6914;
    --copper:      #B87333;   /* Warm copper glow */
    --patina:      #7B6A4E;   /* Copper patina */
    --vermilion:   #C1440E;   /* Wax sealing vermilion */
    --vermilion-d: #8B2500;
    --violet:      #6A4C93;   /* Iridescent violet */
    --teal:        #2A9D8F;   /* Holographic teal */
    --thread:      #C19A6B;   /* Stitch thread */

    /* Type */
    --display: 'Libre Baskerville', 'Playfair Display', Georgia, serif;
    --body:    'Libre Baskerville', Georgia, serif;
    --ui:      'Lato', 'Inter', system-ui, sans-serif;

    /* Rhythm */
    --section-pad-y: 80px;
    --block-gap: 48px;
    --para-gap: 24px;
    --col-max: 720px;

    /* Skeuomorphic shadows */
    --raised-shadow:
        0 2px 4px rgba(0,0,0,0.30),
        0 6px 12px rgba(0,0,0,0.20),
        inset 0 1px 0 rgba(240,230,210,0.15);
    --pressed-shadow:
        0 0 0 rgba(0,0,0,0),
        inset 0 2px 6px rgba(0,0,0,0.55),
        inset 0 1px 0 rgba(240,230,210,0.06);
    --emboss-light: rgba(240,230,210,0.30);
    --emboss-dark:  rgba(0,0,0,0.40);
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body);
    font-size: 18px;
    line-height: 1.65;
    color: var(--buff);
    background: var(--indigo);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.svg-defs { position: absolute; }

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

a { color: inherit; text-decoration: none; }

em, i { font-style: italic; }

/* ---------- folio scroll container ---------- */
.folio {
    /* viewport-locked vertical narrative */
    scroll-snap-type: y proximity;
}

/* ---------- TOPBAR ---------- */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 44px;
    z-index: 50;
    background:
        linear-gradient(180deg, rgba(15,10,26,0.92) 0%, rgba(15,10,26,0.78) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(184,134,11,0.18);
    box-shadow: 0 1px 0 rgba(0,0,0,0.4), inset 0 -1px 0 rgba(184,134,11,0.08);
}
.topbar__inner {
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.topbar__mark {
    font-family: var(--display);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.04em;
    color: var(--brass-light);
    text-shadow: 0 1px 0 var(--emboss-dark), 0 -1px 0 var(--emboss-light);
}
.topbar__divider {
    width: 1px;
    height: 18px;
    background: linear-gradient(180deg, transparent, var(--brass), transparent);
}
.topbar__title {
    font-family: var(--ui);
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--buff);
}
.topbar__spacer { flex: 1; }
.topbar__nav {
    display: flex;
    gap: 22px;
}
.topbar__link {
    font-family: var(--ui);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--patina);
    transition: color 220ms ease;
    position: relative;
    padding: 4px 0;
}
.topbar__link:hover {
    color: var(--brass-light);
}
.topbar__link:hover::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brass), transparent);
}

/* ---------- SECTION SHARED ---------- */
.section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: var(--section-pad-y) 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    overflow: hidden;
}

.section__header {
    width: 100%;
    max-width: var(--col-max);
    margin: 0 auto var(--block-gap);
    text-align: center;
}

.section__title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--parchment);
    text-shadow:
        -1px -1px 0 var(--emboss-light),
         1px  1px 0 var(--emboss-dark);
    margin-bottom: 24px;
}

.eyebrow {
    display: inline-block;
    font-family: var(--ui);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 18px;
    padding: 4px 10px;
    border: 1px solid rgba(184,134,11,0.4);
    border-radius: 1px;
    background: rgba(15,10,26,0.4);
}

.prose {
    font-family: var(--body);
    font-size: 18px;
    line-height: 1.65;
    color: var(--buff);
    margin-bottom: var(--para-gap);
}
.prose--lead {
    font-size: 20px;
    color: var(--parchment);
    text-align: center;
}

.annotation {
    font-family: var(--body);
    font-style: italic;
    font-size: 14px;
    line-height: 1.55;
    color: var(--patina);
    margin-top: var(--para-gap);
    padding-top: 18px;
    border-top: 1px dashed rgba(123,106,78,0.35);
}

/* ---------- BRASS RULE (decorative divider within sections) ---------- */
.brass-rule {
    display: flex;
    justify-content: center;
    margin: 22px auto 28px;
    width: 100%;
}
.brass-rule__bar {
    display: block;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--brass-dark), var(--brass-light), var(--brass), var(--brass-light), var(--brass-dark));
    border-radius: 2px;
    box-shadow:
        0 1px 1px rgba(0,0,0,0.4),
        0 0 6px rgba(184,134,11,0.25);
    transition: width 1400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.brass-rule.in-view .brass-rule__bar {
    width: 220px;
}

/* ---------- DIVIDER ELEMENTS ---------- */
.divider {
    position: absolute;
    left: 0; right: 0;
    bottom: 0;
    width: 100%;
    pointer-events: none;
    z-index: 5;
}
.divider--stitch svg { width: 100%; height: 12px; display: block; }
.divider--stitch::before {
    content: '';
    position: absolute;
    top: -3px; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.5));
}
.divider--brass {
    height: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.divider--brass .divider__brass-bar {
    display: block;
    width: 60%;
    height: 2px;
    background:
        radial-gradient(ellipse at center, var(--brass-light) 0%, var(--brass) 30%, var(--brass-dark) 70%, transparent 100%);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.5),
        0 0 8px rgba(184,134,11,0.35);
    border-radius: 2px;
}

/* =============================================================
   SECTION 1: TITLE CARTOUCHE
   ============================================================= */
.section--cartouche {
    background: var(--indigo);
    background-image:
        radial-gradient(circle at 50% 50%, rgba(184,115,51,0.12) 0%, transparent 55%),
        radial-gradient(circle at 80% 20%, rgba(106,76,147,0.08) 0%, transparent 50%);
}
.section--cartouche::before {
    /* very subtle parchment-like noise on the indigo to give the velvet depth */
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.45) 100%);
    pointer-events: none;
    z-index: 1;
}
.cartouche__glow {
    position: absolute;
    width: 720px;
    height: 720px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at center, rgba(184,115,51,0.18) 0%, rgba(106,76,147,0.06) 35%, transparent 65%);
    filter: blur(20px);
    z-index: 1;
    pointer-events: none;
}

.ginkgo {
    position: absolute;
    width: 180px;
    height: 180px;
    opacity: 0.55;
    z-index: 2;
    pointer-events: none;
}
.ginkgo--top {
    top: 70px;
    right: 40px;
    transform: rotate(18deg);
}

/* The badge -- skeuomorphic morphing centerpiece */
.cartouche__stage {
    position: relative;
    z-index: 3;
    margin-top: 20px;
}
.badge {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;

    /* morph: circle / rounded rect / shield via clip-path animation */
    --badge-clip: circle(50% at 50% 50%);
    -webkit-clip-path: var(--badge-clip);
    clip-path: var(--badge-clip);
    animation: badgeMorph 12s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes badgeMorph {
    0%, 25% {
        clip-path: circle(50% at 50% 50%);
    }
    33%, 58% {
        /* rounded rectangle, drawn as polygon approximation */
        clip-path: polygon(
            10% 5%, 90% 5%, 95% 10%, 95% 90%,
            90% 95%, 10% 95%, 5% 90%, 5% 10%
        );
    }
    66%, 91% {
        /* shield */
        clip-path: polygon(
            50% 0%, 95% 12%, 95% 55%, 80% 80%, 50% 100%,
            20% 80%, 5% 55%, 5% 12%
        );
    }
    100% {
        clip-path: circle(50% at 50% 50%);
    }
}

.badge__rim {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--brass-light) 0%, var(--brass) 35%, var(--brass-dark) 70%, var(--brass) 100%);
    box-shadow:
        inset 0 2px 0 rgba(255,235,180,0.5),
        inset 0 -2px 0 rgba(0,0,0,0.3),
        0 4px 14px rgba(0,0,0,0.5),
        0 14px 30px rgba(0,0,0,0.35);
}
.badge__face {
    position: absolute;
    inset: 14px;
    background:
        radial-gradient(ellipse at 30% 25%, rgba(255,235,180,0.18) 0%, transparent 40%),
        linear-gradient(160deg, var(--vermilion) 0%, var(--vermilion-d) 60%, #5C1800 100%);
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.5),
        inset 0 -2px 4px rgba(255,235,180,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px;
}
.badge__inner-rim {
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(212,168,75,0.45);
    pointer-events: none;
}
.badge__crest {
    width: 56px;
    height: 56px;
    margin-bottom: 8px;
    opacity: 0.85;
    filter: drop-shadow(0 1px 0 rgba(255,235,180,0.35)) drop-shadow(0 -1px 0 rgba(0,0,0,0.3));
}
.badge__name {
    font-family: var(--display);
    font-weight: 700;
    font-size: 22px;
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--parchment);
    text-shadow:
        -1px -1px 0 var(--emboss-dark),
         1px  1px 0 var(--emboss-light),
         0 0 12px rgba(240,230,210,0.2);
}
.badge__line {
    margin-top: 6px;
    font-family: var(--ui);
    font-size: 9px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--buff);
    opacity: 0.75;
}
.badge__shadow {
    position: absolute;
    left: 50%;
    bottom: -28px;
    transform: translateX(-50%);
    width: 240px;
    height: 30px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.55) 0%, transparent 70%);
    filter: blur(6px);
    z-index: -1;
}
.badge__sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,235,180,0.25) 50%, transparent 70%);
    mix-blend-mode: screen;
    pointer-events: none;
    animation: badgeSheen 8s linear infinite;
}
@keyframes badgeSheen {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

/* iridescent violet glow behind the badge */
.cartouche__stage::before {
    content: '';
    position: absolute;
    width: 360px;
    height: 360px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(106,76,147,0.22) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
    filter: blur(8px);
}

.cartouche__caption {
    text-align: center;
    margin-top: 64px;
    z-index: 3;
    max-width: var(--col-max);
}
.cartouche__descriptor {
    font-family: var(--display);
    font-weight: 400;
    font-size: 22px;
    line-height: 1.4;
    color: var(--parchment);
    text-shadow: -1px -1px 0 var(--emboss-light), 1px 1px 0 var(--emboss-dark);
    margin-bottom: 10px;
}
.cartouche__sub {
    font-family: var(--body);
    font-size: 15px;
    color: var(--patina);
}

/* =============================================================
   SECTION 2: BOTANICAL SPECIMEN PANEL
   ============================================================= */
.section--botanical {
    background:
        linear-gradient(180deg, var(--indigo) 0%, #14102A 100%);
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    min-height: 100vh;
}
.section--botanical::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="180" height="180"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2" seed="3"/><feColorMatrix values="0 0 0 0 0.95 0 0 0 0 0.90 0 0 0 0 0.82 0 0 0 0.06 0"/></filter><rect width="100%" height="100%" filter="url(%23n)"/></svg>');
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}
.botanical__bleed {
    position: relative;
    flex: 0 0 40%;
    max-width: 40%;
    padding: var(--section-pad-y) 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(180deg, transparent, rgba(184,134,11,0.04));
    border-right: 1px solid rgba(184,134,11,0.12);
    z-index: 2;
}
.botanical__leaf {
    width: 100%;
    max-width: 480px;
    height: auto;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.4));
}
.botanical__column {
    flex: 1;
    padding: var(--section-pad-y) 64px;
    max-width: 720px;
    align-self: center;
    z-index: 2;
}

/* progressive layer reveal driven by section.in-view */
.botanical__layer--outline path,
.botanical__layer--outline line {
    stroke-dasharray: 2400;
    stroke-dashoffset: 2400;
    transition: stroke-dashoffset 1800ms cubic-bezier(0.4, 0, 0.2, 1);
}
.section--botanical.in-view .botanical__layer--outline path,
.section--botanical.in-view .botanical__layer--outline line {
    stroke-dashoffset: 0;
}
.botanical__layer--veins {
    transition: opacity 1500ms ease 800ms;
}
.section--botanical.in-view .botanical__layer--veins {
    opacity: 0.85;
}
.botanical__layer--stipple {
    transition: opacity 1500ms ease 1500ms;
}
.section--botanical.in-view .botanical__layer--stipple {
    opacity: 0.9;
}

@media (max-width: 860px) {
    .section--botanical { flex-direction: column; }
    .botanical__bleed { flex: 0 0 auto; max-width: 100%; padding: 60px 24px 0; border-right: none; }
    .botanical__column { padding: 40px 24px 60px; }
}

/* =============================================================
   SECTION 3: CREDENTIAL WORKSHOP
   ============================================================= */
.section--workshop {
    background:
        linear-gradient(180deg, #14102A 0%, var(--indigo) 60%, #14102A 100%);
    padding-top: calc(var(--section-pad-y) + 20px);
    padding-bottom: calc(var(--section-pad-y) + 30px);
    align-items: center;
    justify-content: flex-start;
}
.monstera-watermark {
    position: absolute;
    right: -120px;
    top: 50%;
    transform: translateY(-50%);
    width: 720px;
    height: 720px;
    z-index: 1;
    opacity: 0.6;
    pointer-events: none;
}

.workshop__panels {
    width: 100%;
    max-width: 980px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    z-index: 2;
}

.panel {
    position: relative;
    display: grid;
    grid-template-columns: 60px 1.2fr 1fr;
    grid-template-areas: "index title visual" "index desc visual";
    gap: 8px 32px;
    align-items: center;
    padding: 28px 32px;
    background:
        linear-gradient(180deg, rgba(31,22,50,0.95) 0%, rgba(20,14,38,0.95) 100%);
    border: 1px solid rgba(184,134,11,0.22);
    box-shadow:
        var(--raised-shadow),
        inset 0 0 40px rgba(0,0,0,0.35);
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 800ms cubic-bezier(0.4, 0, 0.2, 1), transform 800ms cubic-bezier(0.4, 0, 0.2, 1);
}
.section--workshop.in-view .panel {
    opacity: 1;
    transform: translateY(0);
}
.section--workshop.in-view .panel:nth-child(1) { transition-delay: 100ms; }
.section--workshop.in-view .panel:nth-child(2) { transition-delay: 280ms; }
.section--workshop.in-view .panel:nth-child(3) { transition-delay: 460ms; }

.panel__index {
    grid-area: index;
    font-family: var(--display);
    font-style: italic;
    font-weight: 400;
    font-size: 36px;
    color: var(--brass);
    text-align: center;
    text-shadow: -1px -1px 0 var(--emboss-light), 1px 1px 0 var(--emboss-dark);
    border-right: 1px solid rgba(184,134,11,0.25);
    padding-right: 28px;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
}
.panel__title {
    grid-area: title;
    font-family: var(--display);
    font-weight: 700;
    font-size: 26px;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--parchment);
    text-shadow: -1px -1px 0 var(--emboss-light), 1px 1px 0 var(--emboss-dark);
    margin-bottom: 4px;
}
.panel__desc {
    grid-area: desc;
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--buff);
}
.panel__visual {
    grid-area: visual;
    position: relative;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.55));
    box-shadow: inset 0 0 18px rgba(0,0,0,0.55), inset 0 1px 0 rgba(184,134,11,0.12);
    border: 1px solid rgba(184,134,11,0.15);
}

/* DESIGN — engraving lines drawing in */
.panel--design.activated .engrave-lines path,
.panel--design.activated .engrave-lines circle {
    stroke-dashoffset: 0 !important;
}
.engrave-lines path,
.engrave-lines circle {
    stroke-dasharray: 360;
    stroke-dashoffset: 360;
    transition: stroke-dashoffset 1600ms cubic-bezier(0.4, 0, 0.2, 1);
}
.engrave-lines path:nth-child(1) { transition-delay: 0ms; }
.engrave-lines path:nth-child(2) { transition-delay: 200ms; }
.engrave-lines circle:nth-child(3) { transition-delay: 400ms; }
.engrave-lines circle:nth-child(4) { transition-delay: 600ms; }
.engrave-lines path:nth-child(5),
.engrave-lines path:nth-child(6) { transition-delay: 800ms; }
.engrave-lines path:nth-child(7) { transition-delay: 1000ms; }

/* FORGE — brass plate with sheen sweep */
.forge-plate {
    position: relative;
    width: 200px;
    height: 90px;
    background: linear-gradient(180deg, var(--brass-light) 0%, var(--brass) 50%, var(--brass-dark) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,235,180,0.5),
        inset 0 -1px 0 rgba(0,0,0,0.3),
        0 4px 10px rgba(0,0,0,0.45);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* hairline brushed-grain */
.forge-plate::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(90deg,
            rgba(255,235,180,0.10) 0px,
            rgba(255,235,180,0.10) 1px,
            transparent 1px,
            transparent 3px);
    pointer-events: none;
}
.forge-plate__device {
    position: relative;
    z-index: 2;
    font-family: var(--display);
    font-weight: 700;
    font-size: 26px;
    color: var(--umber);
    letter-spacing: 0.02em;
    text-shadow:
        -1px -1px 0 rgba(255,235,180,0.3),
         1px  1px 1px rgba(0,0,0,0.5),
         inset 0 1px 0 rgba(0,0,0,0.5);
}
.forge-plate__sheen {
    position: absolute;
    top: 0; left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(105deg,
        transparent 0%,
        rgba(255,255,255,0.05) 20%,
        rgba(255,250,210,0.6) 50%,
        rgba(255,255,255,0.05) 80%,
        transparent 100%);
    pointer-events: none;
    transition: left 2200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.panel--forge.activated .forge-plate__sheen {
    left: 100%;
}

/* VERIFY — wax seal + fern frond */
.panel__visual--verify {
    gap: 20px;
}
.wax-seal {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, #E25A1F 0%, var(--vermilion) 55%, var(--vermilion-d) 100%);
    box-shadow:
        0 1px 1px rgba(0,0,0,0.3),
        0 4px 8px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(1.1) translateY(-12px);
    transition:
        box-shadow 800ms cubic-bezier(0.4, 0, 0.2, 1),
        transform 800ms cubic-bezier(0.4, 0, 0.2, 1);
}
.wax-seal::before {
    /* irregular wax bleed */
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--vermilion-d) 0%, transparent 70%);
    opacity: 0.4;
    z-index: -1;
    filter: blur(2px);
}
.wax-seal__monogram {
    font-family: var(--display);
    font-weight: 700;
    font-size: 28px;
    color: #5C1800;
    text-shadow:
        -1px -1px 0 rgba(255,180,140,0.4),
         1px  1px 1px rgba(0,0,0,0.6);
}
.panel--verify.activated .wax-seal {
    transform: scale(1) translateY(0);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.45),
        0 6px 12px rgba(0,0,0,0.30),
        inset 0 -2px 4px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,180,140,0.2);
}

.fern-frond {
    width: 130px;
    height: 90px;
}
.fern-frond__group path {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 1400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.fern-frond__group path:nth-child(1) { transition-delay: 100ms; }
.fern-frond__group path:nth-child(2) { transition-delay: 250ms; }
.fern-frond__group path:nth-child(3) { transition-delay: 350ms; }
.fern-frond__group path:nth-child(4) { transition-delay: 450ms; }
.fern-frond__group path:nth-child(5) { transition-delay: 550ms; }
.fern-frond__group path:nth-child(6) { transition-delay: 650ms; }
.fern-frond__group path:nth-child(7) { transition-delay: 750ms; }
.fern-frond__group path:nth-child(8) { transition-delay: 850ms; }
.fern-frond__group path:nth-child(9) { transition-delay: 950ms; }
.fern-frond__group path:nth-child(10) { transition-delay: 1050ms; }
.fern-frond__group path:nth-child(11) { transition-delay: 1150ms; }

.panel--verify.activated .fern-frond__group path {
    stroke-dashoffset: 0;
}

@media (max-width: 760px) {
    .panel {
        grid-template-columns: 1fr;
        grid-template-areas: "index" "title" "desc" "visual";
        gap: 16px;
        padding: 24px;
    }
    .panel__index {
        border-right: none;
        border-bottom: 1px solid rgba(184,134,11,0.25);
        padding: 0 0 12px 0;
    }
    .panel__visual { width: 100%; }
}

/* =============================================================
   SECTION 4: MATERIAL GALLERY
   ============================================================= */
.section--materials {
    background: var(--indigo);
    padding-top: calc(var(--section-pad-y) + 20px);
    padding-bottom: calc(var(--section-pad-y) + 30px);
    align-items: center;
    justify-content: flex-start;
}

.materials__stack {
    width: 100%;
    max-width: 1080px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    z-index: 2;
}

.swatch {
    position: relative;
    overflow: hidden;
    padding: 48px 56px;
    box-shadow: var(--raised-shadow);
    transition: transform 380ms ease, box-shadow 380ms ease;
}
.swatch:hover {
    transform: translateY(-2px);
    box-shadow:
        0 4px 8px rgba(0,0,0,0.35),
        0 14px 28px rgba(0,0,0,0.28),
        inset 0 1px 0 rgba(240,230,210,0.18);
}

.swatch__inner {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
}
.swatch__label {
    display: inline-block;
    font-family: var(--ui);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    margin-bottom: 14px;
    padding: 4px 10px;
    border: 1px solid currentColor;
}
.swatch__title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
    text-shadow: -1px -1px 0 var(--emboss-light), 1px 1px 0 var(--emboss-dark);
}
.swatch__desc {
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.65;
    margin-bottom: 18px;
}
.swatch__hex {
    font-family: var(--ui);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.7;
}

/* LEATHER swatch */
.swatch--leather {
    background:
        radial-gradient(ellipse at 30% 30%, rgba(199,154,107,0.10) 0%, transparent 60%),
        linear-gradient(135deg, #3A2818 0%, var(--umber) 50%, #1F1409 100%);
    color: var(--parchment);
}
.swatch--leather::before {
    /* leather grain texture */
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 12% 20%, rgba(255,235,180,0.04) 1px, transparent 1.5px),
        radial-gradient(circle at 50% 70%, rgba(255,235,180,0.04) 1px, transparent 1.5px),
        radial-gradient(circle at 80% 30%, rgba(0,0,0,0.10) 1px, transparent 1.5px),
        radial-gradient(circle at 40% 50%, rgba(0,0,0,0.10) 1px, transparent 1.5px),
        radial-gradient(circle at 70% 80%, rgba(255,235,180,0.04) 1px, transparent 1.5px);
    background-size: 32px 32px, 28px 28px, 36px 36px, 24px 24px, 30px 30px;
    pointer-events: none;
    opacity: 0.7;
}
.swatch--leather::after {
    /* saddle stitch border */
    content: '';
    position: absolute;
    inset: 14px;
    border: 1px dashed rgba(193,154,107,0.55);
    pointer-events: none;
}

/* BRASS swatch */
.swatch--brass {
    background:
        repeating-linear-gradient(90deg,
            rgba(255,235,180,0.06) 0px,
            rgba(255,235,180,0.06) 1px,
            transparent 1px,
            transparent 4px),
        linear-gradient(160deg, var(--brass-light) 0%, var(--brass) 35%, var(--brass-dark) 70%, var(--brass) 100%);
    color: var(--umber);
    box-shadow:
        inset 0 1px 0 rgba(255,235,180,0.5),
        inset 0 -2px 0 rgba(0,0,0,0.25),
        var(--raised-shadow);
}
.swatch--brass .swatch__title,
.swatch--brass .swatch__desc {
    text-shadow: 1px 1px 0 rgba(255,235,180,0.30), -1px -1px 0 rgba(0,0,0,0.18);
}
.swatch--brass::after {
    /* engraved hairline border */
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(0,0,0,0.20);
    box-shadow: inset 1px 1px 0 rgba(255,235,180,0.30);
    pointer-events: none;
}

/* ENAMEL / Holographic swatch */
.swatch--enamel {
    background:
        linear-gradient(135deg, var(--violet) 0%, #483178 35%, #2D2050 70%, var(--violet) 100%),
        linear-gradient(45deg, var(--teal), var(--violet));
    background-blend-mode: overlay;
    color: var(--parchment);
}
.swatch--enamel::before {
    /* iridescent foil sweep */
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg,
            transparent 0%,
            rgba(42,157,143,0.15) 25%,
            rgba(212,168,75,0.15) 50%,
            rgba(106,76,147,0.15) 75%,
            transparent 100%);
    pointer-events: none;
    mix-blend-mode: screen;
}
.swatch--enamel::after {
    /* milled cell hint */
    content: '';
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(212,168,75,0.45);
    box-shadow:
        inset 0 0 0 3px rgba(15,10,26,0.4),
        inset 0 0 0 4px rgba(212,168,75,0.25);
    pointer-events: none;
}

/* Oak corner ornaments */
.swatch__corners {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.oak {
    position: absolute;
    width: 22px;
    height: 22px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.55;
}
.swatch--brass .oak { opacity: 0.4; filter: invert(0.1); }
.oak {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><g fill="none" stroke="%23B8860B" stroke-width="1.1" stroke-linecap="round" stroke-linejoin="round"><path d="M16 4 Q14 8 12 9 Q8 9 6 12 Q5 16 8 18 Q5 20 6 24 Q9 27 13 26 Q14 28 16 30 Q18 28 19 26 Q23 27 26 24 Q27 20 24 18 Q27 16 26 12 Q24 9 20 9 Q18 8 16 4 Z"/><path d="M16 8 L16 28"/></g></svg>');
}
.oak--tl { top: 8px; left: 8px; }
.oak--tr { top: 8px; right: 8px; transform: rotate(90deg); }
.oak--br { bottom: 8px; right: 8px; transform: rotate(180deg); }
.oak--bl { bottom: 8px; left: 8px; transform: rotate(270deg); }

@media (max-width: 760px) {
    .swatch { padding: 32px 28px; }
    .swatch__title { font-size: 24px; }
}

/* =============================================================
   SECTION 5: FOLIO CLOSE
   ============================================================= */
.section--folio-close {
    background:
        radial-gradient(ellipse at center, #2A1810 0%, var(--umber) 40%, #1A0F08 100%);
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
}
.folio-close__cover {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--section-pad-y) 32px;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(199,154,107,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(199,154,107,0.04) 0%, transparent 60%);
}
.folio-close__cover::before {
    /* leather grain */
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255,235,180,0.04) 1px, transparent 1.5px),
        radial-gradient(circle at 50% 60%, rgba(0,0,0,0.10) 1px, transparent 1.5px),
        radial-gradient(circle at 80% 30%, rgba(255,235,180,0.04) 1px, transparent 1.5px),
        radial-gradient(circle at 35% 80%, rgba(0,0,0,0.12) 1px, transparent 1.5px);
    background-size: 30px 30px, 26px 26px, 38px 38px, 28px 28px;
    opacity: 0.7;
    pointer-events: none;
}
.folio-close__cover::after {
    /* saddle stitch frame */
    content: '';
    position: absolute;
    inset: 36px;
    border: 1px dashed rgba(193,154,107,0.45);
    pointer-events: none;
}

.folio-close__monogram {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 36px;
    color: var(--brass-light);
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(72px, 10vw, 132px);
    line-height: 1;
    letter-spacing: -0.04em;
    text-shadow:
        -2px -2px 0 var(--emboss-light),
         2px  2px 0 var(--emboss-dark),
         0 0 20px rgba(184,134,11,0.18);
    filter:
        drop-shadow(0 1px 0 rgba(255,235,180,0.25))
        drop-shadow(0 -1px 0 rgba(0,0,0,0.5));
}
.folio-close__amp {
    font-size: 0.45em;
    transform: translateY(-0.4em);
    opacity: 0.7;
}
.folio-close__line {
    position: relative;
    z-index: 2;
    font-family: var(--body);
    font-style: italic;
    font-size: 22px;
    line-height: 1.4;
    color: var(--parchment);
    max-width: 560px;
    margin-bottom: 28px;
}
.folio-close__rule {
    position: relative;
    z-index: 2;
    display: block;
    width: 200px;
    height: 2px;
    margin: 0 0 28px;
    background: radial-gradient(ellipse at center, var(--brass-light), var(--brass), transparent);
    box-shadow: 0 1px 1px rgba(0,0,0,0.4);
    border-radius: 2px;
}
.folio-close__colophon {
    position: relative;
    z-index: 2;
    font-family: var(--ui);
    font-size: 11px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--patina);
}

.folio-close__sprig {
    position: absolute;
    bottom: 56px;
    right: 56px;
    width: 100px;
    height: 100px;
    z-index: 2;
}

@media (max-width: 760px) {
    .folio-close__cover::after { inset: 18px; }
    .folio-close__sprig { bottom: 30px; right: 30px; width: 70px; height: 70px; }
    .topbar__nav { gap: 12px; }
    .topbar__link { font-size: 10px; letter-spacing: 0.10em; }
    .section { padding: 60px 20px; }
    .botanical__column { padding: 30px 20px 50px; }
}

/* =============================================================
   ENTRY ANIMATION FOR SECTIONS — material reveal (clip-path wipe)
   Sections start hidden until in view
   ============================================================= */
.section {
    opacity: 1;
}
.section--has-reveal {
    -webkit-clip-path: inset(0 100% 0 0);
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1100ms cubic-bezier(0.4, 0, 0.2, 1);
}
.section--has-reveal.in-view {
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
}

/* =============================================================
   PRESSED INTERACTION (links/buttons)
   ============================================================= */
.topbar__link:active {
    color: var(--brass);
}
