/* ==========================================================
   sbom.wiki - Cottagecore Software Bill of Materials Almanac
   ========================================================== */

:root {
    /* Palette - Ethereal Blue Meadow */
    --bg-primary: #F5F0E8;       /* Warm linen cream */
    --bg-secondary: #EFF4F9;     /* Pale morning-sky blue */
    --bg-card: #FDF6EC;          /* Buttercream recipe card */
    --text-primary: #2B3A4E;     /* Twilight slate */
    --text-secondary: #3D4F5F;   /* Deep pond blue */
    --accent-primary: #7BA7C9;   /* Cornflower haze */
    --accent-secondary: #A8C5D6; /* Frosted periwinkle */
    --accent-warm: #C4956A;      /* Dried-apricot */
    --ink-annotation: #6B8CA8;   /* Washed denim blue */
    --divider-border: #D5CFC3;   /* Aged linen edge */
    --particle-glow: #B8D4E8;    /* Firefly blue */
    --danger: #C07A5C;           /* Terracotta warning */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(0.95rem, 1.15vw, 1.1rem);
    line-height: 1.75;
    color: var(--text-secondary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><path d='M6 28 L8 20 Q12 12 18 8 Q22 5 28 3 Q26 7 24 12 Q20 18 14 22 L6 28Z' fill='%236B8CA8' stroke='%232B3A4E' stroke-width='0.8'/><path d='M8 20 L6 28 L14 22' fill='none' stroke='%232B3A4E' stroke-width='0.5'/><line x1='6' y1='28' x2='4' y2='30' stroke='%232B3A4E' stroke-width='0.8' stroke-linecap='round'/></svg>") 2 28, auto;
}

/* Film Grain Overlay */
#grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9000;
    opacity: 0;
    mix-blend-mode: multiply;
    transition: opacity 600ms ease-out;
}

#grain-overlay.loaded {
    opacity: 0.04;
}

#grain-overlay.pulse {
    opacity: 0.08;
}

#grain-overlay svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Firefly Canvas */
#firefly-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 8000;
}

/* Navigation Ribbon */
#nav-ribbon {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 7000;
    background: linear-gradient(180deg, #FDF6EC 0%, #F5F0E8 100%);
    border-bottom: 1px solid var(--divider-border);
    box-shadow: 0 2px 6px rgba(43, 58, 78, 0.04);
    transition: padding 0.4s ease, background 0.4s ease;
    padding: 14px 0;
}

#nav-ribbon::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(45deg,
        rgba(213, 207, 195, 0.08) 0px,
        rgba(213, 207, 195, 0.08) 2px,
        transparent 2px,
        transparent 6px);
    pointer-events: none;
}

#nav-ribbon.compressed {
    padding: 6px 0;
    background: var(--bg-card);
}

.nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 64px);
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.4vw, 32px);
    flex-wrap: wrap;
    position: relative;
}

.nav-link {
    font-family: 'Caveat', cursive;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    color: var(--ink-annotation);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--accent-warm);
    transform: translateY(-1px);
}

.nav-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    color: var(--text-primary);
    letter-spacing: 0.04em;
    margin-right: auto;
}

/* General Section */
.section {
    position: relative;
    padding: clamp(60px, 10vh, 120px) clamp(20px, 4vw, 64px);
    max-width: 1180px;
    margin: 0 auto;
}

/* ==========================================================
   OPENING SECTION
   ========================================================== */
.opening-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

.opening-content {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#main-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(4rem, 10vw, 8rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.title-animated .title-letter {
    display: inline-block;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
                opacity 0.7s ease;
}

.title-animated.animate-in .title-letter {
    transform: translateY(0);
    opacity: 1;
}

.subtitle {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--ink-annotation);
    margin-bottom: 2.4rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.8s ease 0.4s, transform 0.8s ease 0.4s;
}

.subtitle.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.vine-container {
    width: clamp(180px, 30vw, 320px);
    height: clamp(280px, 45vh, 460px);
    margin: 0 auto 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.vine-path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 2s ease-out;
}

.vine-path.draw {
    stroke-dashoffset: 0;
}

.vine-path.vine-delay-1 {
    transition-delay: 0.5s;
}

.vine-path.vine-delay-2 {
    transition-delay: 1s;
}

.vine-path.vine-delay-3 {
    transition-delay: 1.5s;
}

.vine-node {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.vine-node.draw {
    opacity: 1;
}

.vine-label {
    font-family: 'Caveat', cursive;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.vine-label.draw {
    opacity: 1;
}

.scroll-chevron {
    margin-top: 1rem;
    animation: breathe 3s ease-in-out infinite;
    opacity: 0;
    transition: opacity 1s ease 2s;
}

.scroll-chevron.show {
    opacity: 1;
}

@keyframes breathe {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(8px) scale(1.05);
        opacity: 1;
    }
}

/* ==========================================================
   SECTION DIVIDERS (Pressed-Flower)
   ========================================================== */
.section-divider {
    width: 100%;
    height: 120px;
    max-width: 1180px;
    margin: 20px auto;
    padding: 0 clamp(20px, 4vw, 64px);
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1s ease, transform 1s ease;
}

.section-divider.in-view {
    opacity: 1;
    transform: translateY(0);
}

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

/* ==========================================================
   CHAPTERS (Magazine-Spread)
   ========================================================== */
.chapter-section {
    padding-top: clamp(40px, 8vh, 90px);
    padding-bottom: clamp(40px, 8vh, 90px);
}

.chapter-intro {
    text-align: center;
    margin-bottom: clamp(40px, 6vh, 80px);
}

.chapter-heading {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.2rem, 1.8vw, 1.6rem);
    color: var(--ink-annotation);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.chapter-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.8rem);
    line-height: 1.1;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.chapter-tagline {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.1rem, 1.6vw, 1.5rem);
    color: var(--ink-annotation);
    font-style: italic;
}

/* The Almanac Spread - 2 columns */
.almanac-spread {
    display: grid;
    grid-template-columns: 62% 34%;
    gap: 4%;
    align-items: start;
    position: relative;
}

.spread-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.spread-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

.body-text {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(0.95rem, 1.15vw, 1.1rem);
    line-height: 1.75;
    color: var(--text-secondary);
}

.body-text em {
    color: var(--accent-warm);
    font-style: italic;
}

.body-text strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Margin Note (Sticky Sidebar) */
.margin-note {
    background: var(--bg-card);
    border-left: 3px solid var(--accent-warm);
    padding: 1rem 1.2rem;
    border-radius: 2px;
    box-shadow: 1px 2px 6px rgba(43, 58, 78, 0.06);
    transform: rotate(-0.5deg);
    position: relative;
}

.margin-note::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 12px;
    width: 28px;
    height: 14px;
    background: rgba(196, 149, 106, 0.2);
    border-radius: 1px;
    transform: rotate(-3deg);
}

.margin-note .caveat-text {
    font-family: 'Caveat', cursive;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    color: var(--ink-annotation);
    line-height: 1.5;
}

.sidebar-vine {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.sidebar-vine-svg {
    width: 100%;
    max-width: 200px;
    height: auto;
}

/* ==========================================================
   RECIPE CARDS (Torn-edge cards)
   ========================================================== */
.recipe-card-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(16px, 2.5vw, 32px);
    margin-top: 2rem;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(16px, 2.5vw, 32px);
    margin: 2rem 0;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.recipe-card {
    --card-rotate: 0deg;
    background: var(--bg-card);
    padding: 1.6rem 1.4rem;
    position: relative;
    box-shadow: 2px 3px 8px rgba(43, 58, 78, 0.08);
    transform: rotate(var(--card-rotate));
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    clip-path: polygon(
        2% 0%, 8% 1%, 16% 0%, 25% 2%, 35% 0%, 45% 1%, 55% 0%, 65% 2%, 75% 0%, 85% 1%, 92% 0%, 98% 2%,
        100% 8%, 99% 16%, 100% 25%, 98% 35%, 100% 45%, 99% 55%, 100% 65%, 98% 75%, 100% 85%, 99% 92%, 100% 98%,
        92% 100%, 85% 99%, 75% 100%, 65% 98%, 55% 100%, 45% 99%, 35% 100%, 25% 98%, 15% 100%, 8% 99%, 2% 100%,
        0% 92%, 1% 85%, 0% 75%, 2% 65%, 0% 55%, 1% 45%, 0% 35%, 2% 25%, 0% 15%, 1% 8%
    );
    overflow: hidden;
}

.recipe-card:hover {
    transform: rotate(0deg) translateY(-4px);
    box-shadow: 4px 6px 14px rgba(43, 58, 78, 0.12);
    z-index: 4;
}

.recipe-card-large {
    grid-column: span 2;
}

@media (max-width: 720px) {
    .recipe-card-large {
        grid-column: span 1;
    }
}

.card-watermark-svg {
    position: absolute;
    bottom: 8px;
    right: 8px;
    pointer-events: none;
}

.card-wax-seal {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.18),
                inset 2px 2px 4px rgba(255, 255, 255, 0.25),
                1px 2px 3px rgba(43, 58, 78, 0.18);
}

.seal-green {
    background: radial-gradient(circle at 35% 35%, #8FAE7E, #5C7A4F);
}

.seal-amber {
    background: radial-gradient(circle at 35% 35%, #D4A766, #A37640);
}

.seal-terracotta {
    background: radial-gradient(circle at 35% 35%, #D78F71, #A95B3D);
}

.card-title {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(1.3rem, 1.8vw, 1.7rem);
    color: var(--accent-warm);
    margin-bottom: 0.5rem;
    line-height: 1.1;
    padding-right: 30px;
}

.card-body {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.card-code {
    display: block;
    margin-top: 0.8rem;
    padding: 0.5rem 0.7rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Source Code Pro', monospace;
    font-size: clamp(0.75rem, 0.85vw, 0.85rem);
    line-height: 1.6;
    border-left: 2px solid var(--accent-primary);
    word-break: break-all;
}

.connecting-vine {
    margin: 2rem auto 1rem auto;
    max-width: 900px;
}

.connecting-vine-svg {
    width: 100%;
    height: auto;
}

/* ==========================================================
   CHAPTER 3 - Garden Tree
   ========================================================== */
.garden-viewport {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 4px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 900px;
    box-shadow: inset 0 0 30px rgba(123, 167, 201, 0.05);
}

.garden-legend {
    display: flex;
    justify-content: center;
    gap: clamp(14px, 2vw, 28px);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.legend-direct {
    background: var(--accent-primary);
}

.legend-transitive {
    background: var(--accent-secondary);
}

.legend-dev {
    background: var(--divider-border);
    border: 1px dashed var(--ink-annotation);
}

.garden-tree-svg {
    width: 100%;
    height: auto;
    max-height: 600px;
    display: block;
}

.tree-node {
    transition: transform 0.3s ease, stroke-width 0.3s ease;
    transform-origin: center center;
    transform-box: fill-box;
    cursor: pointer;
}

.tree-node:hover {
    stroke-width: 2.5;
    transform: scale(1.2);
}

.garden-label {
    font-family: 'Lora', Georgia, serif;
    pointer-events: none;
    user-select: none;
}

.garden-tooltip {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--divider-border);
    padding: 0.5rem 0.8rem;
    border-radius: 3px;
    box-shadow: 2px 4px 10px rgba(43, 58, 78, 0.15);
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    color: var(--ink-annotation);
    pointer-events: none;
    z-index: 100;
    transform: rotate(-1deg);
    max-width: 240px;
}

.garden-description {
    margin-top: 2rem;
}

/* ==========================================================
   CHAPTER 4 - Pests and Thorns
   ========================================================== */
.chapter-thorns {
    position: relative;
}

.chapter-thorns::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%,
                rgba(192, 122, 92, 0.03),
                transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.trellis-timeline {
    position: relative;
    padding: 2rem 0 2rem 60px;
    margin: 2rem 0;
}

.trellis-line {
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: repeating-linear-gradient(
        to bottom,
        var(--ink-annotation) 0,
        var(--ink-annotation) 5px,
        transparent 5px,
        transparent 10px
    );
    border-radius: 2px;
}

.trellis-line::before,
.trellis-line::after {
    content: "";
    position: absolute;
    left: -8px;
    width: 19px;
    height: 4px;
    background: var(--accent-warm);
    opacity: 0.6;
}

.trellis-line::before {
    top: 25%;
}

.trellis-line::after {
    top: 75%;
}

.trellis-event {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 30px;
}

.trellis-node {
    position: absolute;
    left: -40px;
    top: 8px;
    width: 28px;
    height: 28px;
    background: var(--bg-card);
    border: 2px solid var(--danger);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(192, 122, 92, 0.15);
    transition: transform 0.3s ease;
}

.trellis-node::after {
    content: "";
    position: absolute;
    inset: 4px;
    background: var(--danger);
    border-radius: 50%;
    opacity: 0.5;
    animation: pulse-thorn 2.4s ease-in-out infinite;
}

@keyframes pulse-thorn {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(0.85);
        opacity: 0.9;
    }
}

.trellis-event:hover .trellis-node {
    transform: scale(1.15);
}

.trellis-content {
    background: var(--bg-card);
    padding: 1rem 1.4rem;
    border-radius: 3px;
    box-shadow: 1px 2px 8px rgba(43, 58, 78, 0.07);
    transform: rotate(-0.4deg);
}

.trellis-year {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    color: var(--accent-warm);
    display: block;
    margin-bottom: 0.2rem;
}

.trellis-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.1rem, 1.4vw, 1.35rem);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.trellis-desc {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Vulnerability cards */
.vuln-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.vuln-card {
    position: relative;
    background: var(--bg-card);
    border-left: 4px solid var(--danger);
    padding: 1rem 1.2rem;
    border-radius: 2px;
    box-shadow: 1px 2px 6px rgba(43, 58, 78, 0.07);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vuln-card:hover {
    transform: translateY(-3px);
    box-shadow: 2px 4px 10px rgba(43, 58, 78, 0.12);
}

.vuln-critical {
    border-left-color: #C07A5C;
}

.vuln-high {
    border-left-color: #C4956A;
}

.vuln-medium {
    border-left-color: #D4A766;
}

.vuln-low {
    border-left-color: var(--accent-secondary);
}

.vuln-thorn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
    opacity: 0.7;
}

.vuln-thorn-large {
    width: 20px;
    height: 30px;
}

.vuln-thorn-medium {
    width: 16px;
    height: 22px;
    background: #C4956A;
}

.vuln-thorn-small {
    width: 12px;
    height: 16px;
    background: #D4A766;
}

.vuln-thorn-tiny {
    width: 8px;
    height: 12px;
    background: var(--accent-secondary);
}

.vuln-severity {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.2rem, 1.6vw, 1.5rem);
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.4rem;
}

.vuln-desc {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    font-style: italic;
}

/* ==========================================================
   CHAPTER 5 - Almanac Index
   ========================================================== */
.index-search-container {
    margin: 2rem auto;
    max-width: 500px;
    display: flex;
    justify-content: center;
}

.index-search-card {
    background: var(--bg-card);
    padding: 0.8rem 1.2rem;
    box-shadow: 2px 3px 8px rgba(43, 58, 78, 0.08);
    transform: rotate(-0.8deg);
    clip-path: polygon(
        2% 0%, 30% 2%, 60% 0%, 88% 1%, 98% 3%,
        100% 30%, 99% 60%, 100% 90%, 98% 100%,
        70% 99%, 40% 100%, 10% 98%, 2% 100%,
        0% 70%, 1% 40%, 0% 10%
    );
    width: 100%;
}

.index-search-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Caveat', cursive;
    font-size: clamp(1.1rem, 1.4vw, 1.3rem);
    color: var(--text-primary);
}

.index-search-input::placeholder {
    color: var(--ink-annotation);
    font-style: italic;
    opacity: 0.7;
}

.index-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 3vw, 50px);
    margin: 2rem 0;
}

@media (max-width: 800px) {
    .index-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .index-columns {
        grid-template-columns: 1fr;
    }
}

.index-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.index-entry {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "term dots"
        "def def";
    gap: 0 8px;
    padding: 0.4rem 0;
    border-bottom: 1px dotted var(--divider-border);
    transition: background 0.3s ease, opacity 0.3s ease;
}

.index-entry.fade-out {
    opacity: 0.2;
    pointer-events: none;
}

.index-entry.highlight {
    background: rgba(196, 149, 106, 0.08);
}

.index-term {
    grid-area: term;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.index-dots {
    grid-area: dots;
    align-self: end;
    height: 1em;
    background-image: radial-gradient(circle, var(--ink-annotation) 1px, transparent 1.5px);
    background-size: 6px 6px;
    background-repeat: repeat-x;
    background-position: bottom;
    margin-bottom: 4px;
}

.index-def {
    grid-area: def;
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-top: 4px;
    padding-left: 12px;
    text-indent: -12px;
}

/* ==========================================================
   CLOSING SECTION
   ========================================================== */
.closing-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.closing-content {
    width: 100%;
    max-width: 900px;
}

.closing-vine-container {
    width: clamp(180px, 28vw, 280px);
    margin: 0 auto 2rem auto;
}

.closing-vine-svg {
    width: 100%;
    height: auto;
}

.closing-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    margin: 1.5rem 0;
    background: linear-gradient(135deg,
        var(--accent-primary) 0%,
        var(--accent-warm) 35%,
        var(--ink-annotation) 70%,
        var(--accent-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.closing-note {
    margin-top: 2rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.closing-quote {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    line-height: 1.5;
    color: var(--ink-annotation);
    font-style: italic;
}

/* ==========================================================
   REVEAL ON SCROLL
   ========================================================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

.caveat-text {
    font-family: 'Caveat', cursive;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 820px) {
    .almanac-spread {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .nav-inner {
        gap: 12px 18px;
    }

    .nav-link:not(.nav-brand) {
        font-size: 0.95rem;
    }
}

@media (max-width: 560px) {
    .nav-link:not(.nav-brand) {
        display: none;
    }

    #nav-ribbon.compressed .nav-brand {
        font-size: 1rem;
    }
}
