/* ══════════════════════════════════════
   COOLEST CATS LAB — Shared Stylesheet
   Dark surreal aesthetic. Covers both
   the home page and secondary pages.
   ══════════════════════════════════════ */

/* ── VARIABLES ── */

:root {
    --ink: #0a0a0b;
    --ink-raised: #161514;
    --parchment: #d4cbb8;
    --bone: #c2b9a7;
    --gilt: #8b6914;
    --gilt-glow: #c49a1e;
    --aureate: #7a5c10;
    --fog: #958b7d;
    --ash: #3a3631;
    --faint: rgba(212, 203, 184, 0.06);
    --faint-line: rgba(212, 203, 184, 0.08);
    --nav-bg: rgba(10, 10, 11, 0.55);
    --nav-border: rgba(212, 203, 184, 0.04);
    --nav-text: #a89f92;
    --nav-text-hover: var(--parchment);
    --memoriam-bg: rgba(30, 27, 24, 0.85);
    --memoriam-border: rgba(212, 203, 184, 0.07);
    --toggle-bg: rgba(30, 27, 24, 0.8);
    --toggle-border: rgba(212, 203, 184, 0.1);
    --toggle-color: var(--fog);
    --footer-line: rgba(212, 203, 184, 0.08);
    --footer-icon: var(--fog);
    --footer-icon-hover: var(--parchment);
    --footer-text: #a89f92;
    --slider-track: rgba(212, 203, 184, 0.12);
    --slider-fill: rgba(212, 203, 184, 0.35);
    --slider-thumb: var(--bone);
}

/* ── LIGHT MODE VARIABLES ── */

.light-mode {
    --ink: #f0ebe3;
    --ink-raised: #e4ddd3;
    --parchment: #1a1815;
    --bone: #2e2a25;
    --gilt: #8b6914;
    --gilt-glow: #c49a1e;
    --aureate: #6b4e08;
    --fog: #7a7268;
    --ash: #b5ad9f;
    --faint: rgba(30, 27, 24, 0.04);
    --faint-line: rgba(30, 27, 24, 0.08);
    --nav-bg: rgba(240, 235, 227, 0.55);
    --nav-border: rgba(30, 27, 24, 0.04);
    --nav-text: #6b6459;
    --nav-text-hover: var(--bone);
    --memoriam-bg: rgba(220, 213, 201, 0.7);
    --memoriam-border: rgba(30, 27, 24, 0.07);
    --toggle-bg: rgba(220, 213, 201, 0.8);
    --toggle-border: rgba(30, 27, 24, 0.1);
    --toggle-color: var(--fog);
    --footer-line: rgba(30, 27, 24, 0.1);
    --footer-icon: var(--fog);
    --footer-icon-hover: var(--bone);
    --footer-text: #6b6459;
    --slider-track: rgba(30, 27, 24, 0.1);
    --slider-fill: rgba(30, 27, 24, 0.25);
    --slider-thumb: var(--fog);
}

/* ── RESET ── */

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

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    background: var(--ink);
    color: var(--parchment);
    font-family: "EB Garamond", "Georgia", serif;
    line-height: 1.85;
    overflow-x: hidden;
    min-height: 100vh;
    cursor: crosshair;
    transition:
        background 0.6s ease,
        color 0.6s ease;
}

::selection {
    background: var(--gilt);
    color: #f0ebe3;
}

.light-mode ::selection {
    background: var(--gilt);
    color: #f0ebe3;
}

/* ══════════════════════════════════════
   BACKGROUND LAYERS
   ══════════════════════════════════════ */

.atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse 80% 60% at 20% 10%,
            rgba(139, 105, 20, 0.04) 0%,
            transparent 70%
        ),
        radial-gradient(
            ellipse 60% 80% at 80% 90%,
            rgba(58, 54, 49, 0.08) 0%,
            transparent 70%
        );
    transition: opacity 0.6s ease;
}

.light-mode .atmosphere {
    opacity: 0;
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

.light-mode .grain {
    opacity: 0.015;
}

/* ── Memory Image Layer ── */

.memory-layer {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.memory-image {
    position: absolute;
    width: 45vw;
    max-width: 500px;
    height: auto;
    opacity: 0;
    filter: blur(1px) saturate(0.35) contrast(1.2) brightness(0.85);
    transition: none;
    object-fit: cover;
    mask-image: radial-gradient(
        ellipse 70% 60% at center,
        rgba(0, 0, 0, 0.6) 0%,
        transparent 75%
    );
    -webkit-mask-image: radial-gradient(
        ellipse 70% 60% at center,
        rgba(0, 0, 0, 0.6) 0%,
        transparent 75%
    );
}

.light-mode .memory-image {
    filter: blur(1px) saturate(0.25) contrast(1.1) brightness(1.1);
}

/* ── Particle Canvas ── */

.particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

/* ══════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 95px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--nav-border);
    transition:
        background 0.6s ease,
        border-color 0.6s ease;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--parchment);
    transition: color 0.6s ease;
}

.nav-brand-logo {
    width: 85px;
    height: 85px;
    object-fit: contain;
    flex-shrink: 0;
}

.nav-brand-text {
    font-family: "Cinzel", serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--parchment);
    transition: color 0.6s ease;
}

/* ── Nav Center (Music Controls) ── */

.nav-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn {
    background: transparent;
    border: 1px solid var(--nav-text);
    color: var(--nav-text);
    padding: 0.4rem 1.2rem;
    font-family: "Cinzel", serif;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-btn:hover {
    border-color: var(--parchment);
    color: var(--parchment);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.volume-container.disabled {
    display: none;
}

.vol-icon {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: var(--nav-text);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-volume-slider {
    width: 80px;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: var(--slider-track);
    border-radius: 2px;
    cursor: pointer;
}

.nav-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ink-raised);
    border: 2px solid var(--slider-thumb);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    margin-top: -5px;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.nav-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    border-color: var(--parchment);
}

.nav-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ink-raised);
    border: 2px solid var(--slider-thumb);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.nav-volume-slider::-moz-range-thumb:hover {
    transform: scale(1.25);
    border-color: var(--parchment);
}

/* ── Nav Links ── */

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-family: "Cinzel", serif;
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--nav-text);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--nav-text-hover);
}

/* ── Nav Dropdown ── */

.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    cursor: default;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 190px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--nav-border);
    border-radius: 4px;
    padding: 0.6rem 0;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.nav-dropdown-menu::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.5rem 1.2rem;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    background: var(--faint);
}

/* ══════════════════════════════════════
   FOOTER (injected by footer.js)
   Used on secondary pages
   ══════════════════════════════════════ */

.site-footer {
    position: relative;
    z-index: 10;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.footer-line {
    border: none;
    border-top: 1px solid var(--footer-line);
    margin-bottom: 1.8rem;
    transition: border-color 0.6s ease;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-icon);
    transition: color 0.3s ease;
}

.footer-socials a:hover {
    color: var(--footer-icon-hover);
}

.footer-socials svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.footer-copyright {
    font-family: "Cinzel", serif;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--footer-text);
    transition: color 0.6s ease;
}

/* ══════════════════════════════════════
   HOME PAGE FOOTER — Bottom Left
   (inline on index.html, not injected)
   ══════════════════════════════════════ */

.home-footer {
    position: fixed;
    bottom: 1.8rem;
    left: 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    opacity: 0;
    animation: fadeIn 2s ease 2.5s forwards;
}

.home-footer-socials {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.home-footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-icon);
    transition: color 0.3s ease;
}

.home-footer-socials a:hover {
    color: var(--footer-icon-hover);
}

.home-footer-socials svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.home-footer-copyright {
    font-family: "Cinzel", serif;
    font-size: 0.52rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--footer-text);
    opacity: 0.6;
    transition: color 0.6s ease;
}

/* ══════════════════════════════════════
   GUI / TOGGLE CONTROLS
   ══════════════════════════════════════ */

.toggle-controls {
    position: fixed;
    bottom: 1.4rem;
    right: 1.4rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.toggle-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--toggle-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--toggle-border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--toggle-color);
    transition:
        color 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        transform 0.2s ease;
}

.toggle-btn:hover {
    color: var(--parchment);
    transform: scale(1.08);
}

.toggle-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.toggle-btn .icon-hidden {
    display: none;
}

.toggle-btn.active .icon-default {
    display: none;
}

.toggle-btn.active .icon-hidden {
    display: block;
}

/* ── Language Toggle Label ── */

.lang-label {
    font-family: "Cinzel", serif;
    font-size: 0.52rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: currentColor;
    line-height: 1;
}

/* ══════════════════════════════════════
   PAGE LAYOUT — Secondary Pages
   ══════════════════════════════════════ */

.page {
    position: relative;
    z-index: 10;
    max-width: 720px;
    margin: 0 auto;
    padding: 130px 2rem 6rem;
}

/* ══════════════════════════════════════
   PAGE TITLE — Glitch Effect
   (h1 on secondary pages)
   15% larger than old: 1.6rem → 1.84rem
   Equal padding above and below
   ══════════════════════════════════════ */

.page-title {
    position: relative;
    font-family: "Cinzel", serif;
    font-weight: 500;
    font-size: 2.21rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--parchment);
    padding: 3rem 0;
    margin-bottom: 0;
    text-align: center;
    opacity: 1;
    animation: fadeIn 2s ease 0.3s forwards;
    transition: color 0.6s ease;
}

/* Glitch pseudo-elements */
.page-title::before,
.page-title::after {
    content: attr(data-text);
    position: absolute;
    top: 3rem; /* match padding-top */
    left: 0;
    width: 100%;
    height: auto;
    background: var(--ink);
    opacity: 0.8;
}

/* Gold shift layer */
.page-title::before {
    left: 2px;
    text-shadow: -1px 0 #ffd700;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    animation: glitch-anim-1 4s infinite linear alternate-reverse;
}

/* Cyan shift layer */
.page-title::after {
    left: -2px;
    text-shadow: -1px 0 #00ffff;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

.light-mode .page-title::before,
.light-mode .page-title::after {
    background: var(--ink);
}

/* ══════════════════════════════════════
   SECTION HEADINGS — Glitch Effect
   (h2.section-heading on secondary pages)
   All caps with gold/cyan distortion
   ══════════════════════════════════════ */

.section-heading {
    position: relative;
    font-family: "Cinzel", serif;
    font-weight: 500;
    font-size: clamp(0.55rem, 1.25vw, 0.75rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--parchment);
    line-height: 1.4;
    margin-bottom: 2rem;
    text-align: center;
    transition: color 0.6s ease;
}

/* Glitch pseudo-elements for section headings */
.section-heading::before,
.section-heading::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--ink);
    opacity: 0.8;
}

.section-heading::before {
    left: 1px;
    text-shadow: -1px 0 #ffd700;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    animation: glitch-anim-1 4s infinite linear alternate-reverse;
}

.section-heading::after {
    left: -1px;
    text-shadow: -1px 0 #c49a1e;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

.light-mode .section-heading::before,
.light-mode .section-heading::after {
    background: var(--ink);
}

/* ── Glitch Keyframes ── */

/* Heavy slice animation 1 */
@keyframes glitch-anim-1 {
    0% {
        clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%);
        transform: translate(0);
    }
    10% {
        clip-path: polygon(0 15%, 100% 15%, 100% 15%, 0 15%);
        transform: translate(-2px, 1px);
    }
    20% {
        clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%);
        transform: translate(1px, -1px);
    }
    30% {
        clip-path: polygon(0 1%, 100% 1%, 100% 2%, 0 2%);
        transform: translate(0);
    }
    40% {
        clip-path: polygon(0 33%, 100% 33%, 100% 33%, 0 33%);
        transform: translate(0);
    }
    50% {
        clip-path: polygon(0 44%, 100% 44%, 100% 50%, 0 50%);
        transform: translate(-1px, 2px);
    }
    60% {
        clip-path: polygon(0 50%, 100% 50%, 100% 20%, 0 20%);
        transform: translate(0);
    }
    70% {
        clip-path: polygon(0 70%, 100% 70%, 100% 70%, 0 70%);
        transform: translate(2px, -2px);
    }
    80% {
        clip-path: polygon(0 80%, 100% 80%, 100% 80%, 0 80%);
        transform: translate(0);
    }
    90% {
        clip-path: polygon(0 50%, 100% 50%, 100% 55%, 0 55%);
        transform: translate(-1px, 1px);
    }
    100% {
        clip-path: polygon(0 70%, 100% 70%, 100% 80%, 0 80%);
        transform: translate(1px, -1px);
    }
}

/* Heavy slice animation 2 */
@keyframes glitch-anim-2 {
    0% {
        clip-path: polygon(0 25%, 100% 25%, 100% 30%, 0 30%);
        transform: translate(0);
    }
    15% {
        clip-path: polygon(0 3%, 100% 3%, 100% 3%, 0 3%);
        transform: translate(2px, 1px);
    }
    30% {
        clip-path: polygon(0 5%, 100% 5%, 100% 20%, 0 20%);
        transform: translate(-1px, -1px);
    }
    45% {
        clip-path: polygon(0 20%, 100% 20%, 100% 20%, 0 20%);
        transform: translate(0);
    }
    60% {
        clip-path: polygon(0 40%, 100% 40%, 100% 40%, 0 40%);
        transform: translate(0);
    }
    75% {
        clip-path: polygon(0 52%, 100% 52%, 100% 59%, 0 59%);
        transform: translate(1px, 2px);
    }
    90% {
        clip-path: polygon(0 60%, 100% 60%, 100% 65%, 0 65%);
        transform: translate(0);
    }
    100% {
        clip-path: polygon(0 80%, 100% 80%, 100% 85%, 0 85%);
        transform: translate(-2px, -1px);
    }
}

/* ══════════════════════════════════════
   HOME PAGE — body.page-home overrides
   ══════════════════════════════════════ */

/* Navbar: transparent, no bar, elements float */
.page-home .navbar {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
}

/* Page wrapper: full-screen hero, no max-width */
.page-home .page {
    max-width: none;
    padding: 0;
}

/* Full-screen semi-transparent background image */
.hero-bg-image {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: url("images/hero-bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.18;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.light-mode .hero-bg-image {
    opacity: 0.12;
}

/* ══════════════════════════════════════
   HERO SECTION
   ══════════════════════════════════════ */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 4rem 2rem;
}

.hero-vignette {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 200px 60px rgba(0, 0, 0, 0.8);
    z-index: 1;
    pointer-events: none;
}

.light-mode .hero-vignette {
    box-shadow: inset 0 0 200px 60px rgba(240, 235, 227, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero .epigraph {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    font-size: 1.1rem;
    color: var(--fog);
    letter-spacing: 0.08em;
    margin-bottom: 4rem;
    border: none;
    padding: 0;
    opacity: 0;
    animation: bleed-in 3s ease 0.5s forwards;
}

.hero-title {
    font-family: "Cormorant Garamond", serif;
    font-weight: 300;
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: 1.15;
    color: var(--parchment);
    letter-spacing: 0.04em;
    margin-bottom: 2rem;
    opacity: 0;
    animation: bleed-in 3s ease 1.2s forwards;
}

.hero-title em {
    font-style: italic;
    color: var(--gilt-glow);
    font-weight: 300;
}

.hero-sub {
    font-family: "EB Garamond", serif;
    font-size: 1.05rem;
    color: var(--fog);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    animation: bleed-in 2.5s ease 2s forwards;
}

.scroll-sigil {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0;
    animation:
        bleed-in 2s ease 3s forwards,
        drift 3s ease-in-out infinite 3s;
}

.scroll-sigil span {
    display: block;
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--fog), transparent);
}

/* ══════════════════════════════════════
   SECONDARY PAGE CONTENT
   ══════════════════════════════════════ */

/* ── Dividers ── */

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

.divider-line {
    width: 120px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--ash), transparent);
}

.divider-glyph {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.4rem;
    color: var(--gilt);
    padding: 0 1.5rem;
    opacity: 0.6;
}

/* ── Sections ── */

.section {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 1.2s ease,
        transform 1.2s ease;
}

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

.section-number {
    font-family: "Cormorant Garamond", serif;
    font-weight: 300;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    text-align: center;
    color: var(--gilt);
    margin-bottom: 2rem;
    opacity: 0.7;
}

/* Plain h2 fallback (for sections without .section-heading) */
.section h2 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 300;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    color: var(--parchment);
    line-height: 1.3;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

.section p {
    margin-bottom: 1.6rem;
    font-size: 1.05rem;
    color: var(--bone);
    font-weight: 400;
    text-align: justify;
    hyphens: auto;
    transition: color 0.6s ease;
}

.section p:last-child {
    margin-bottom: 0;
}

.section-img {
    display: block;
    max-width: 100%;
    width: 648px;
}

.section em {
    font-style: italic;
    color: var(--gilt-glow);
    transition: color 0.6s ease;
}

.section strong {
    font-weight: 600;
    color: var(--parchment);
    font-family: "Cormorant Garamond", serif;
    transition: color 0.6s ease;
}

/* ── Pull Quotes ── */

.pull-quote {
    max-width: 660px;
    margin: 5rem auto;
    padding: 3rem 0;
    text-align: center;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 1.4s ease,
        transform 1.4s ease;
}

.pull-quote.visible {
    opacity: 1;
    transform: translateY(0);
}

.pull-quote::before,
.pull-quote::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: var(--gilt);
    opacity: 0.4;
}

.pull-quote::before {
    top: 0;
}
.pull-quote::after {
    bottom: 0;
}

.pull-quote p {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    line-height: 1.7;
    color: var(--gilt-glow);
    letter-spacing: 0.01em;
}

.pull-quote cite {
    display: block;
    margin-top: 1.2rem;
    font-family: "Cinzel", serif;
    font-style: normal;
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gilt);
    opacity: 0.8;
}

.pull-quote em {
    color: var(--gilt-glow);
    font-style: italic;
}

/* ── Standards Grid ── */

.standards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 1.2s ease,
        transform 1.2s ease;
}

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

.standard {
    padding: 2rem;
    border: 1px solid var(--memoriam-border);
    background: var(--memoriam-bg);
    position: relative;
    transition:
        border-color 0.6s ease,
        background 0.6s ease;
}

.standard:hover {
    border-color: rgba(139, 105, 20, 0.25);
}

.standard-name {
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--gilt-glow);
    letter-spacing: 0.08em;
    margin-bottom: 0.8rem;
}

.standard-work {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    font-size: 1.5rem;
    color: var(--parchment);
    margin-bottom: 1rem;
}

.standard p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--fog);
}

/* ── Closing ── */

.closing {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 0;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 1.4s ease,
        transform 1.4s ease;
    /* Prevent the closing-bg gradient from being clipped */
    overflow: visible;
}

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

.closing-bg {
    position: absolute;
    /* Extend beyond the container to prevent visible cutoff */
    top: -40%;
    left: -20%;
    right: -20%;
    bottom: -40%;
    background: radial-gradient(
        ellipse 80% 60% at 50% 50%,
        rgba(139, 105, 20, 0.06) 0%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

.closing h2 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 300;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--parchment);
    line-height: 1.3;
    max-width: 700px;
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.closing p {
    font-family: "EB Garamond", serif;
    font-size: 1.05rem;
    color: var(--fog);
    max-width: 560px;
    line-height: 1.85;
    position: relative;
    z-index: 1;
    text-align: center;
}

.closing-sigil {
    margin-top: 4rem;
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    color: var(--gilt);
    opacity: 0.4;
    position: relative;
    z-index: 1;
}

/* ══════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bleed-in {
    from {
        opacity: 0;
        filter: blur(3px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes drift {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

@media (max-width: 768px) {
    .nav-center {
        position: static;
        transform: none;
        order: 2;
        margin: 0 1rem;
    }

    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 0.8rem 1.2rem;
        gap: 1rem;
        justify-content: center;
    }

    .nav-brand {
        order: 1;
    }

    .nav-links {
        order: 3;
        gap: 1.2rem;
    }

    .home-footer {
        left: 1.2rem;
        bottom: 1.2rem;
    }
}

@media (max-width: 600px) {
    html {
        font-size: 16px;
    }

    .nav-brand-logo {
        width: 60px;
        height: 60px;
    }

    .page {
        padding: 90px 1.4rem 5rem;
    }

    .page-home .page {
        padding: 0;
    }

    .section p {
        text-align: left;
    }

    .standards {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section,
    .pull-quote {
        padding-left: 1.4rem;
        padding-right: 1.4rem;
    }

    .site-footer {
        padding: 0 1.4rem 4rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .toggle-controls {
        bottom: 1rem;
        right: 1rem;
    }

    .toggle-btn {
        width: 34px;
        height: 34px;
    }

    .home-footer {
        left: 1rem;
        bottom: 1rem;
    }
}
