/*

  Tooplate 2164 Compass
  https://www.tooplate.com/view/2164-compass
  Free HTML CSS Template

*/

/* ================================================
   THE COMPASS — Arctic & Cobalt Editorial System
   ================================================ */

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

:root {
    --glacier:  #F7F9FC;
    --snow:     #FFFFFF;
    --slate:    #0F172A;
    --cobalt:   #0047AB;
    --cobalt-light: #0047AB1A;
    --mist:     #E2E8F0;
    --stone:    #64748B;

    --serif:    'Playfair Display', Georgia, serif;
    --sans:     'Inter', system-ui, sans-serif;

    --space-xs:  clamp(0.5rem, 1vw, 1rem);
    --space-sm:  clamp(1rem, 2vw, 2rem);
    --space-md:  clamp(2rem, 5vw, 5rem);
    --space-lg:  clamp(4rem, 10vh, 10rem);
    --space-xl:  clamp(6rem, 15vh, 15rem);

    --gutter:    clamp(1.5rem, 4vw, 4rem);
    --max-w:     1400px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--sans);
    font-weight: 400;
    line-height: 1.7;
    color: var(--slate);
    background-color: var(--glacier);
}

body.menu-open {
    overflow: hidden;
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

a {
    color: var(--cobalt);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

/* ================================================
   NAVIGATION — Minimal top bar
   ================================================ */

.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem var(--gutter);
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid transparent;
    transition: background 0.5s ease, backdrop-filter 0.5s ease, 
                padding 0.4s ease, border-color 0.5s ease;
}

.nav-bar.scrolled {
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.nav-logo {
    font-family: var(--serif);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--snow);
    text-transform: uppercase;
}

.nav-links {
    list-style: none;
}

.nav-links a {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.nav-links--desktop {
    display: flex;
    gap: 2rem;
}

.nav-links--mobile {
    display: none;
}

.nav-links a:hover {
    color: var(--snow);
    letter-spacing: 0.14em;
    opacity: 1;
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
}

.nav-toggle span {
    width: 24px;
    height: 1.5px;
    background: var(--snow);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(4.5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-4.5px);
}

/* ================================================
   SECTION 1 — HERO (The Cover)
   ================================================ */

.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    inset: 0;
}

.hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(15, 23, 42, 0.65) 0%,
        rgba(15, 23, 42, 0.15) 40%,
        rgba(15, 23, 42, 0.05) 100%
    );
}

.hero-content {
    position: absolute;
    bottom: clamp(3rem, 8vh, 8rem);
    left: var(--gutter);
    right: var(--gutter);
    color: var(--snow);
}

.hero-issue {
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.hero-title {
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 6.5rem);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.03em;
    max-width: 14ch;
    margin-bottom: 2rem;
}

.hero-title em {
    font-style: italic;
    font-weight: 400;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-family: var(--sans);
    font-size: 1.0rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    opacity: 0.7;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-meta .divider {
    width: 40px;
    height: 1px;
    background: var(--snow);
    opacity: 0.4;
}

.hero-hours {
    margin-top: 0.75rem; /* Creates a small, neat gap below the entrance fees */
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    opacity: 0.7;
}

.hero-hours strong {
    font-weight: 600; /* Makes "Open" stand out clearly */
}

.hero-scroll {
    position: absolute;
    bottom: clamp(3rem, 8vh, 8rem);
    right: var(--gutter);
    writing-mode: vertical-rl;
    font-family: var(--sans);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--snow);
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-scroll::before {
    content: '';
    width: 1px;
    height: 60px;
    background: var(--snow);
    opacity: 0.4;
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.2; transform: scaleY(1); }
    50% { opacity: 0.6; transform: scaleY(1); }
}

/* ================================================
   SECTION 2 — PROLOGUE (Typographic Drop)
   ================================================ */

.prologue {
    padding: var(--space-xl) var(--gutter);
    background: var(--snow);
}

.prologue-inner {
    max-width: 60ch;
    margin: 0 auto;
}

.prologue-label {
    font-family: var(--sans);
    font-size: 1.0rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cobalt);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.prologue-label::after {
    content: '';
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: var(--cobalt);
    opacity: 0.3;
}

.prologue-text {
    font-family: var(--serif);
    font-size: 1.35rem;
    line-height: 1.8;
    color: var(--slate);
    letter-spacing: -0.01em;
}

.prologue-text + .prologue-text {
    margin-top: 1.5em;
    text-indent: 0;
}

.prologue-text + .prologue-text::first-letter {
    font-size: inherit;
    float: none;
    margin: 0;
    color: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.prologue-pullquote {
    margin: var(--space-md) 0;
    padding: var(--space-sm) 0;
    border-top: 1px solid var(--mist);
    border-bottom: 1px solid var(--mist);
}

.prologue-pullquote p {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.35rem;
    line-height: 1.45;
    color: var(--cobalt);
    letter-spacing: -0.02em;
}

.prologue-pullquote cite {
    display: block;
    margin-top: 1rem;
    font-family: var(--sans);
    font-style: normal;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--stone);
}


/* ================================================
   SECTION 3 — THE ROUTE (Sticky Image Offset)
   ================================================ */

.route {
    position: relative;
    background: var(--glacier);
}

.route-bg {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    z-index: 0;
}

.route-bg img {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.route-bg img.active {
    opacity: 1;
}

.route-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        var(--glacier) 0%,
        var(--glacier) 15%,
        rgba(247, 249, 252, 0.85) 30%,
        rgba(247, 249, 252, 0.45) 50%,
        rgba(247, 249, 252, 0.1) 75%,
        transparent 100%
    );
    z-index: 1;
    pointer-events: none;
}

.route-chapters {
    position: relative;
    z-index: 2;
    margin-top: -100vh;
    padding: var(--space-xl) var(--gutter);
}

.chapter {
    padding: 10vh 0;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chapter:first-child {
    padding-top: 5vh;
}

.chapter-number {
    font-family: var(--serif);
    font-size: clamp(4rem, 8vw, 6rem);
    font-weight: 400;
    color: var(--cobalt);
    opacity: 0.12;
    line-height: 1;
    margin-bottom: 1rem;
}

.chapter-location {
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cobalt);
    margin-bottom: 1rem;
}

.chapter-title {
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--slate);
    margin-bottom: 1.5rem;
    max-width: 18ch;
}

.chapter-body {
    font-family: var(--sans);
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--stone);
    max-width: 48ch;
}

.chapter-body + .chapter-body {
    margin-top: 1em;
}

.chapter-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cobalt);
}

.chapter-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.chapter-link:hover {
    opacity: 1;
}

.chapter-link:hover svg {
    transform: translateX(4px);
}

/* MINIMALIST PDF ACTION DOWNLOAD BUTTON */
.download-pdf-btn {
    display: inline-block !important;
    color: #ffffff !important;
    background-color: var(--cobalt, #1e3a8a) !important; /* Uses your theme blue or drops back to navy */
    font-family: var(--sans, sans-serif) !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    padding: 12px 24px !important;
    border-radius: 3px !important;
    text-decoration: none !important;
    transition: opacity 0.25s ease, transform 0.2s ease !important;
    margin-top: 10px !important;
}

.download-pdf-btn:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px) !important; /* Soft micro-interaction bounce */
}

/* ================================================
   SECTION 4 — THE GALLERY (Structured Masonry)
   ================================================ */

.gallery {
    padding: var(--space-xl) var(--gutter);
    background: var(--snow);
}

.gallery-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--mist);
}

.gallery-title {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.gallery-count {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--stone);
    padding-bottom: 0.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: clamp(180px, 20vw, 280px);
    gap: 6px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.5) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-caption {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 2;
    color: var(--snow);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease 0.05s, transform 0.4s ease 0.05s;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

.gallery-caption-title {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.gallery-caption-sub {
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    opacity: 0.7;
}

.gallery-item.tall {
    grid-row: span 2;
}

/* ==========================================================================
   THEME STYLES FROM TOOPLATE HEALTH SECTION
   ========================================================================== */
@import url('https://fonts.googleapis.com/css?family=Poppins:400,500,600');

.matched-footer {
    background: #ffffff !important;
    padding-top: 100px !important;
    padding-bottom: 100px !important;
    font-family: 'Poppins', sans-serif !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.matched-footer-container {
    max-width: 1140px !important;
    margin: 0 auto !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.matched-footer-row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-right: -15px !important;
    margin-left: -15px !important;
}

.matched-footer-col {
    flex: 0 0 33.3333% !important;
    max-width: 33.3333% !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
    box-sizing: border-box !important;
}

/* TYPOGRAPHY INJECTIONS FROM THE FILE */
.footer-thumb h4 {
    color: #454545 !important;
    font-size: 1.8em !important;
    font-weight: 600 !important;
    line-height: inherit !important;
    letter-spacing: -1px !important;
    padding-bottom: 2px !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}

.footer-thumb p, 
.matched-interests li,
.custom-opening-hours p {
    color: #757575 !important;
    font-size: 14px !important;
    font-weight: normal !important;
    line-height: 24px !important;
    margin-bottom: 15px !important;
}

/* NEW: FIXED CONTACT LIST ALIGNMENT AND GRID ENGINE */
.contact-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    margin-top: 20px !important;
}

.contact-item {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin: 0 !important;
}

/* New: Enforces the clean charcoal circle from your screenshot */
.circle-icon-wrap {
    width: 40px !important;
    height: 40px !important;
    background-color: #333333 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: background-color 0.3s ease !important;
}

/* New: Inner solid icon graphics scaling */
.circle-vector {
    width: 16px !important;
    height: 16px !important;
    color: #ffffff !important;
}

.contact-item-text, .contact-item-text a {
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    color: #757575 !important;
    text-decoration: none !important;
}

/* COMPONENT INTERACTION LINKS */
.contact-info a {
    color: #252525 !important;
    transition: 0.5s !important;
}

.contact-info a:hover {
    color: #a5c422 !important;
}

.contact-item:hover .circle-icon-wrap {
    background-color: #a5c422 !important;
}

.matched-interests {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.matched-interests li {
    padding: 6px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

/* SCHEDULE METRICS */
.opening-hours p {
    display: flex !important;
    justify-content: space-between !important;
    border-bottom: 1px dashed #e5e5e5 !important;
    padding-bottom: 8px !important;
    margin-bottom: 12px !important;
}

.opening-hours p span {
    font-weight: 500 !important;
    color: #252525 !important;
}

/* BORDER AND BASE CREDIT STYLES */
.matched-footer-col-full {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
    box-sizing: border-box !important;
}

.border-top {
    border-top: 1px solid #f2f2f2 !important;
    margin-top: 4em !important;
    padding-top: 2.5em !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

.border-top p, .border-top a {
    font-size: 14px !important;
    color: #757575 !important;
}

.matched-support-center p {
    font-style: italic !important;
    font-weight: 500 !important;
}

.border-top a {
    transition: 0.5s !important;
}

.border-top a:hover {
    color: #a5c422 !important;
}

/* PORTABLE MEDIA STACK ENGINE */
@media (max-width: 768px) {
    .matched-footer-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 40px !important;
    }
    .border-top {
        flex-direction: column !important;
        text-align: center !important;
        gap: 15px !important;
    }
}

/* HORIZONTAL SOCIAL ICON ROW & BRAND HOVER EFFECTS */
.footer-social-icons {
    list-style: none !important;
    padding: 0 !important;
    margin: 15px 0 0 0 !important; /* Spaces cleanly beneath the Facebook text list */
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
}

.footer-social-icons li {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.footer-social-icons a {
    width: 38px !important;
    height: 38px !important;
    background-color: #333333 !important; /* Default dark charcoal circle */
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
}

.social-svg-glyph {
    width: 16px !important;
    height: 16px !important;
    color: #ffffff !important;
}

/* Brands light up with authentic colors when hovered over */
.footer-social-icons li:nth-child(1) a:hover {
    background-color: #3b5998 !important; /* Facebook Blue */
}

.footer-social-icons li:nth-child(2) a:hover {
    background-color: #1da1f2 !important; /* Twitter / X Sky Blue */
}

.footer-social-icons li:nth-child(3) a:hover {
    background-color: #e1306c !important; /* Instagram Pink */
}

.footer-social-icons a:hover {
    transform: scale(1.08) translateY(-2px) !important; /* Slight bounce micro-animation */
}

/* ================================================
   SCROLL REVEAL SYSTEM
   ================================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ================================================
   RESPONSIVE — Tablet
   ================================================ */

@media (max-width: 1024px) {
    .route-chapters {
        padding: var(--space-md) var(--gutter);
    }

    .chapter {
        min-height: auto;
        padding: 6vh 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item.tall {
        grid-row: span 2;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        row-gap: var(--space-md);
    }
}

/* ==========================================================================
   PRODUCTION MASTER COMBINED MOBILE LAYOUT CONFIGURATION
   ========================================================================== */

@media (max-width: 850px) {
    /* 1. FORCE THE ROUTE WRAPPER CONTAINER TO BREAK SLIDESHOW CONFIG */
    .route, #route {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        display: block !important;
        transform: none !important;
        top: 0 !important;
        left: 0 !important;
        margin-top: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background-color: #ffffff !important;
        background-image: none !important;
        clear: both !important;
    }

    /* 2. COMPLETELY SHATTER BACKGROUND PHOTOS ON SMARTPHONES AND TABLETS */
    .route-bg, .route-bg img {
        display: none !important; /* Hides image layers so they don't block text tracking */
    }

    /* 3. CONVERT SLIDESHOW CONTAINER INTO A NATURAL VERTICAL BLOCK FLOW */
    .route-chapters {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        display: flex !important;
        flex-direction: column !important; /* Forces About Us, Volunteers, and Research to stack */
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    /* 4. UNLOCK ARTICLES SO THEY DISPLAY ENTIRELY FROM HEADINGS TO DOWNLOAD LINKS */
    .chapter {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        opacity: 1 !important;             /* Force immediate visibility bypassing scroll scripts */
        visibility: visible !important;   /* Cancels visual display clipping flags */
        transform: none !important;
        display: block !important;
        overflow: visible !important;
        padding: 60px var(--gutter, 20px) 40px var(--gutter, 20px) !important;
        border-bottom: 1px solid #f2f2f2 !important; /* Adds a clean division line between chapters */
    }

    /* 5. FORCE COMFORTABLE FONT WEIGHT AND SIZE TYPOGRAPHY SCALING */
    .chapter-title {
        font-size: 2.2rem !important;
        margin-bottom: 20px !important;
        display: block !important;
        position: relative !important;
    }

    .chapter-body {
        font-size: 1.1rem !important;
        line-height: 1.7 !important;
        margin-bottom: 15px !important;
        display: block !important;
    }
}

@media (max-width: 680px) {
    .nav-links--desktop {
        display: none;
    }

    .nav-links--mobile {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        background: var(--slate);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    box-shadow 0.45s ease;
        z-index: 150;
        overflow-y: auto;
        padding: 100px var(--gutter) 80px;
        box-shadow: -20px 0 60px rgba(15, 23, 42, 0);
    }

    .nav-links--mobile.open {
        transform: translateX(0);
        box-shadow: -20px 0 60px rgba(15, 23, 42, 0.3);
    }

    .nav-close-wrap {
        align-self: flex-end;
        margin-bottom: 1rem;
    }

    .nav-close {
        background: none;
        border: none;
        color: rgba(255, 255, 255, 0.5);
        font-size: 2rem;
        line-height: 1;
        cursor: pointer;
        padding: 0.25rem 0.5rem;
        transition: color 0.3s ease;
    }

    .nav-close:hover {
        color: var(--snow);
    }

    .nav-links--mobile a {
        font-size: 1.125rem;
        letter-spacing: 0.15em;
        padding: 0.5rem 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 200;
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4.5rem);
    }

    .hero-scroll {
        display: none;
    }

    .hero-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }

    /* 6. REMOVE PROLOGUE DROP CAP COMPLETELY */
    .prologue-text::first-letter,
    .prologue p.prologue-text::first-letter {
        font-family: inherit !important;
        font-weight: inherit !important;
        float: none !important;
        font-size: inherit !important;
        line-height: inherit !important;
        margin: 0 !important;
        color: inherit !important;
    }

    /* 7. FORCE HISTORY SECTION TO REMAIN FULLY VISIBLE */
    .prologue {
        height: auto !important;          
        min-height: auto !important;
        max-height: none !important;
        position: relative !important;    
        display: block !important;
        padding: 50px 20px 40px 20px !important; 
        z-index: 5 !important;
        overflow: visible !important;
    }

    .prologue-inner {
        height: auto !important;
        max-height: none !important;
        max-width: 100% !important;       
        display: block !important;
        position: relative !important;
        overflow: visible !important;
    }

    .prologue .prologue-text {
        font-family: var(--serif) !important;
        font-size: 1.15rem !important;   
        line-height: 1.65 !important;    
        margin-bottom: 30px !important;
        height: auto !important;
        max-height: none !important;
        display: block !important;
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow: visible !important;
    }

    .prologue .prologue-pullquote {
        position: relative !important;
        height: auto !important;
        max-height: none !important;
        display: block !important;
        margin: 30px 0 !important;
        overflow: visible !important;
    }

    /* ORIGINAL TEMPLATE REMAINING BASE COMPONENTS */
    .chapter-number {
        display: none !important; /* Hides floating chapter indexes to keep layouts clear on phones */
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: clamp(140px, 30vw, 200px);
    }

    .gallery-item.tall {
        grid-row: span 2;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

/* ==========================================================================
   PREFERS REDUCED MOTION ACCESSIBILITY COMPONENT
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-scroll::before {
        animation: none;
    }

    .gallery-item img {
        transition: none;
    }
}
