/* =============================
 * SISTERS PENDRAGON MASTER CSS
 * =============================
 * A nice clean stylesheet for The Sisters Pendragon site
 */

/* ================
 * 1. CUSTOM FONTS
 * ================ */

@font-face {
    font-family: 'Hotzenplotz';
    src: url('assets/fonts/HOTZENPLOTZ.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Oldenburg';
    src: url('assets/fonts/Oldenburg-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'OpenDyslexic';
    src: url('assets/fonts/OpenDyslexic-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ================================
 * 2. CSS VARIABLES - THEME SYSTEM
 * ================================ */

:root {
    /* Z-index management */
    --z-base: 1;
    --z-sticky: 200;
    --z-navigation: 1000;
    --z-overlay: 9999;
    --z-modal: 10000;

    /* Brand colors */
    --brand-gold: #C6C32F;
    --brand-pink: #EF508F;
    --brand-green: #44B649;

    /* Dark theme colors (default) */
    --bg-primary: #000000;
    --bg-secondary: #0d0d0d;
    --bg-card: #1a1a1a;
    --text-primary: #e8e8e8;
    --text-secondary: #b8b8b8;
    --text-light: #888888;
    --accent-primary: var(--brand-gold);
    --accent-secondary: var(--brand-pink);
    --accent-tertiary: var(--brand-green);
    --border-color: #444444;
    --overlay-bg: rgba(0, 0, 0, 0.6); /* Dimming filter for hero/slideshow images */
    --shadow: rgba(0, 0, 0, 0.3);

    /* Gradient fade distances for main content background */
    --gradient-start: 1200px;
    --gradient-fade-1: 900px;
    --gradient-fade-2: 600px;
    --gradient-fade-3: 400px;
    --gradient-fade-4: 200px;

    /* Gradient fade colors */
    --gradient-fade-color-60: rgba(0, 0, 0, 0.6);
    --gradient-fade-color-40: rgba(0, 0, 0, 0.4);
    --gradient-fade-color-20: rgba(0, 0, 0, 0.2);
    --gradient-fade-color-10: rgba(0, 0, 0, 0.1);

    /* Animation timing and easing */
    --timing-fast: 150ms;
    --timing-normal: 300ms;
    --timing-slow: 400ms;
    --easing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
    /* Light theme colors (cozy storybook) */
[data-theme="light"] {
    /* Light mode colors */
    --bg-primary: #c8ccc5;        /* Soft sage gray */
    --bg-secondary: #ebe5d6;      /* Aged paper */
    --bg-card: #faf8f2;           /* Off-white with warmth */
    --text-primary: #2e2416;      /* Warm dark sepia */
    --text-secondary: #5c4d39;    /* Medium warm brown */
    --text-light: #7d6e5d;        /* Soft taupe */
    --brand-gold: #B8931F;        /* Rich gold for light mode */
    --accent-primary: #B8931F;    /* Match brand gold */
    --border-color: #d4c4a8;      /* Warm tan */
    --overlay-bg: rgba(46, 36, 22, 0.35); /* Warm sepia overlay for hero images */
    --shadow: rgba(46, 36, 22, 0.12); /* Soft warm shadow */

    /* Gradient fade colors */
    --gradient-fade-color-60: rgba(245, 240, 230, 0.6);
    --gradient-fade-color-40: rgba(245, 240, 230, 0.4);
    --gradient-fade-color-20: rgba(245, 240, 230, 0.2);
    --gradient-fade-color-10: rgba(245, 240, 230, 0.1);
}

/* ============================
 * TEXT SIZE SCALING
 * ============================ */

html[data-text-size="xsmall"] {
    font-size: 85%;
}

html[data-text-size="small"] {
    font-size: 92.5%;
}

html[data-text-size="medium"] {
    font-size: 100%;
}

html[data-text-size="large"] {
    font-size: 110%;
}

html[data-text-size="xlarge"] {
    font-size: 125%;
}

/* Prevent theme transition flash on initial load */
.theme-loading * {
    transition: none !important;
}

/* =======================
 * 3. RESET & BASE STYLES
 * ======================= */

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

html {
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-size: 100%;
}

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul {
    margin: 0;
    padding: 0;
}

body {
    position: relative;
    width: 100%;
    min-width: 320px;
    overflow-x: hidden;
    font-family: 'Convergence', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: background 450ms var(--easing-smooth) 300ms,
                color 450ms var(--easing-smooth) 300ms;
}

body[data-font="opendyslexic"] {
    font-family: 'OpenDyslexic', 'Convergence', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body[data-font="opendyslexic"] .mobile-nav-link,
body[data-font="opendyslexic"] .mobile-dropdown-link,
body[data-font="opendyslexic"] .form-input,
body[data-font="opendyslexic"] .form-textarea,
body[data-font="opendyslexic"] .form-input::placeholder,
body[data-font="opendyslexic"] .form-textarea::placeholder {
    font-family: 'OpenDyslexic', 'Convergence', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Universal link styling */
a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover,
a:focus {
    color: var(--accent-primary);
}

/* Utility classes */
.nowrap {
    white-space: nowrap;
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================
 * 4. HEADER & HERO SECTION
 * ========================= */

.header {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 2rem;
    color: white;
    text-align: center;
    transition: background-color 450ms var(--easing-smooth) 300ms,
                color 450ms var(--easing-smooth) 300ms;
}

/* Remove header background in light mode to prevent overlay effect */
[data-theme="light"] .header {
    background: transparent;
}


/* Hero Slideshow Container */
.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-base);
    overflow: hidden;
}

/* Blur gradients at top and bottom edges */
.hero-slideshow::before,
.hero-slideshow::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 15px;
    z-index: 2;
    pointer-events: none;
}

.hero-slideshow::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), transparent);
}

.hero-slideshow::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
}

/* Remove overlay in light mode */
[data-theme="light"] .hero-slideshow::before,
[data-theme="light"] .hero-slideshow::after {
    display: none;
    content: none;
    background: none;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide picture,
.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        transition: none;
    }
}

.hero-content {
    position: relative;
    z-index: calc(var(--z-base) + 1);
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
    transform: translateY(65px);
}

.hero-title {
    font-family: 'Hotzenplotz', serif;
    font-size: clamp(2rem, 6vw, 4.5rem);
    color: var(--brand-gold);
    margin-bottom: 1rem;
    -webkit-text-stroke: 1.5px black;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9),
                 0 0 15px rgba(198, 195, 47, 0.5),
                 3px 3px 8px rgba(0, 0, 0, 0.7);
    letter-spacing: 0.05em;
    paint-order: stroke fill;
    max-width: 100%;
    box-sizing: border-box;
    transition: color 450ms var(--easing-smooth) 300ms,
                text-shadow 450ms var(--easing-smooth) 300ms;
}

.hero-tagline {
    font-family: 'Oldenburg', serif;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: #ffffff;
    margin-bottom: 2rem;
    font-weight: 400;
    font-style: normal;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9),
                 3px 3px 8px rgba(0, 0, 0, 0.7);
    transition: color 450ms var(--easing-smooth) 300ms,
                text-shadow 450ms var(--easing-smooth) 300ms;
}

/* ===============
 * 5. NAVIGATION
 * =============== */

.navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 2rem 0;
}

.nav-item {
    position: relative;
    padding: 5px 10px;
    margin: -5px -10px;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: transform var(--timing-normal) var(--easing-smooth),
                background-color var(--timing-normal) var(--easing-smooth),
                border-color var(--timing-normal) var(--easing-smooth),
                color var(--timing-normal) var(--easing-smooth),
                box-shadow var(--timing-normal) var(--easing-smooth),
                text-shadow 450ms var(--easing-smooth) 300ms;
    will-change: transform;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                0 0 20px rgba(255, 255, 255, 0.1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.nav-link:hover,
.nav-link:focus {
    background: var(--brand-gold);
    border-color: var(--brand-gold);
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4),
                0 0 30px rgba(198, 195, 47, 0.6);
    text-shadow: none;
}

/* Dropdown menus */
.dropdown {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translate(-10px, -50%);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                0 0 20px rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--timing-fast) ease 0.3s,
                visibility var(--timing-fast) ease 0.3s,
                transform var(--timing-fast) var(--easing-smooth);
    will-change: transform, opacity;
    z-index: var(--z-dropdown);
    padding: 0.5rem;
    margin-left: 10px;
    display: flex;
    gap: 0.5rem;
}

.nav-item:hover .dropdown,
.dropdown:hover,
.nav-item:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
    transition: opacity var(--timing-fast) var(--easing-smooth),
                visibility var(--timing-fast) var(--easing-smooth),
                transform var(--timing-fast) var(--easing-smooth);
}

.dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: transform var(--timing-normal) var(--easing-smooth),
                background-color var(--timing-normal) var(--easing-smooth),
                border var(--timing-normal) var(--easing-smooth);
    will-change: transform;
    border-radius: 4px;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dropdown a:hover,
.dropdown a:focus {
    background: rgba(239, 80, 143, 0.3);
    border: 1px solid var(--accent-secondary);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(239, 80, 143, 0.4);
    transform: translateY(-2px);
}

/* =====================================
 * 6. NAVIGATION CONTROLS (THEME TOGGLE)
 * ===================================== */

.nav-controls {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-sticky);
    pointer-events: none;
}

.nav-controls .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    max-width: none;
    pointer-events: none;
}

.nav-controls .container > * {
    pointer-events: auto;
}

.theme-toggle {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    padding: 0;
    cursor: pointer;
    transition: transform var(--timing-normal) var(--easing-smooth),
                border-color var(--timing-normal) var(--easing-smooth),
                box-shadow var(--timing-normal) var(--easing-smooth),
                background-color 450ms var(--easing-smooth) 300ms;
    will-change: transform;
    font-size: 16px !important;
}

[data-theme="light"] .theme-toggle {
    border-color: rgba(0, 0, 0, 0.4);
}

.theme-toggle:hover,
.theme-toggle:focus {
    transform: scale(1.05);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px var(--shadow);
}


/* Contact page */
[data-page="contact"] .hamburger-menu {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
}

html:has(body[data-page="contact"]) {
    scroll-snap-type: y proximity;
    scroll-padding-top: 4rem;
}

[data-page="contact"] .header {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

[data-page="contact"] .footer {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.theme-emoji {
    font-size: 24px;
    line-height: 1;
}

/* ============================
 * TEXT SIZE CONTROLS
 * ============================ */

.text-size-controls {
    position: fixed;
    bottom: 64px;
    left: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0;
    font-size: 16px !important;
    opacity: 1;
    transition: opacity 300ms var(--easing-smooth);
}

.text-size-controls.interacted {
    opacity: 0.5;
    transition: opacity 3000ms var(--easing-smooth);
}

.text-size-controls:hover,
.text-size-controls:focus-within {
    opacity: 1 !important;
    transition: opacity 300ms var(--easing-smooth);
}

.text-size-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Convergence', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 700;
    background: var(--bg-card);
    border: 3px solid rgba(255, 255, 255, 0.3);
    width: 56px;
    height: 44px;
    padding: 0;
    cursor: pointer;
    transition: transform var(--timing-normal) var(--easing-smooth),
                border-color var(--timing-normal) var(--easing-smooth),
                box-shadow var(--timing-normal) var(--easing-smooth),
                background-color var(--timing-normal) var(--easing-smooth),
                opacity var(--timing-normal) var(--easing-smooth);
    will-change: transform;
    color: var(--text-primary);
}

[data-theme="light"] .text-size-btn {
    border-color: rgba(0, 0, 0, 0.4);
}

/* Aa+ button (increase) - larger text */
.text-size-btn:first-child {
    border-radius: 10px 10px 0 0;
    border-bottom-width: 2px;
    font-size: 17.6px;
}

/* Aa- button (decrease) - smaller text */
.text-size-btn:last-child {
    border-radius: 0 0 10px 10px;
    border-top-width: 2px;
    font-size: 13.6px;
}

.text-size-btn:hover:not(:disabled),
.text-size-btn:focus:not(:disabled) {
    transform: scale(1.05);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px var(--shadow);
    z-index: 1;
}

.text-size-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.text-size-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Text size indicator */
.text-size-indicator {
    position: fixed;
    bottom: 152px;
    left: 34px;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 40px;
    background: var(--bg-card);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    font-family: 'Convergence', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 0.9rem !important;
    font-weight: 700;
    color: var(--text-primary);
    pointer-events: none;
    user-select: none;
    opacity: 1;
    transition: opacity 300ms var(--easing-smooth);
}

.text-size-indicator.interacted {
    opacity: 0.5;
    transition: opacity 3000ms var(--easing-smooth);
}

[data-theme="light"] .text-size-indicator {
    border-color: rgba(0, 0, 0, 0.4);
}

.text-size-indicator.is-medium {
    color: var(--accent-secondary);
}

/* Font toggle indicator */
.font-toggle-indicator {
    position: fixed;
    bottom: 24px;
    left: 29px;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 40px;
    background: var(--bg-card);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: none;
    border-radius: 0 0 20px 20px;
    font-family: 'OpenDyslexic', sans-serif;
    font-size: 0.7rem !important;
    font-weight: 400;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    opacity: 1;
    transition: opacity 300ms var(--easing-smooth),
                transform var(--timing-normal) var(--easing-smooth),
                border-color var(--timing-normal) var(--easing-smooth);
    will-change: transform;
}

[data-theme="light"] .font-toggle-indicator {
    border-color: rgba(0, 0, 0, 0.4);
}

.font-toggle-indicator.interacted {
    opacity: 0.5;
    transition: opacity 3000ms var(--easing-smooth);
}

.font-toggle-indicator:hover,
.font-toggle-indicator:focus {
    transform: scale(1.05);
    border-color: var(--accent-primary);
    outline: none;
}

.font-toggle-indicator:active {
    transform: scale(0.98);
}

.font-toggle-indicator.is-default {
    font-family: 'Convergence', sans-serif;
    color: var(--accent-secondary);
}


/* Screen reader only announcer */
.sr-only {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ================
 * 7. MAIN CONTENT
 * ================ */

.main-content {
    position: relative;
    /* Background is now handled by pseudo-elements for smooth cross-fading */
    background-color: transparent;
    padding: 4rem 2rem;
    z-index: 10;
    /* isolation: isolate; creates a new stacking context so z-index on pseudo-elements works reliably */
    isolation: isolate;
    transition: color 450ms var(--easing-smooth) 300ms;
}

/* Create two pseudo-elements to hold the light and dark theme gradients */
.main-content::before,
.main-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
    transition: opacity 600ms var(--easing-smooth);
    opacity: 0;
}

/* Apply gradients and opacity within theme-specific rules */
[data-theme="light"] .main-content::after { /* Use ::after for light theme */
    background: linear-gradient(to bottom,
        var(--bg-primary) 0%,
        var(--bg-primary) calc(100% - var(--gradient-start)),
        var(--gradient-fade-color-60) calc(100% - var(--gradient-fade-1)),
        var(--gradient-fade-color-40) calc(100% - var(--gradient-fade-2)),
        var(--gradient-fade-color-20) calc(100% - var(--gradient-fade-3)),
        var(--gradient-fade-color-10) calc(100% - var(--gradient-fade-4)),
        transparent 100%
    );
    opacity: 1;
}

[data-theme="dark"] .main-content::before { /* Use ::before for dark theme */
    background: linear-gradient(to bottom,
        var(--bg-primary) 0%,
        var(--bg-primary) calc(100% - var(--gradient-start)),
        var(--gradient-fade-color-60) calc(100% - var(--gradient-fade-1)),
        var(--gradient-fade-color-40) calc(100% - var(--gradient-fade-2)),
        var(--gradient-fade-color-20) calc(100% - var(--gradient-fade-3)),
        var(--gradient-fade-color-10) calc(100% - var(--gradient-fade-4)),
        transparent 100%
    );
    opacity: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* =========================
 * 8. SECTIONS & TYPOGRAPHY
 * ========================= */

section {
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Hotzenplotz', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--brand-gold);
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4),
                 0 0 10px rgba(198, 195, 47, 0.35);
    transition: color 450ms var(--easing-smooth) 300ms,
                text-shadow 450ms var(--easing-smooth) 300ms;
}

[data-page="contact"] .section-title {
    margin-bottom: 0.5rem;
    flex: 0 0 auto;
}

[data-page="contact"] .section-text {
    flex: 0 0 auto;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-style: italic;
}

.section-text,
.intro-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    transition: color 450ms var(--easing-smooth) 300ms;
}

.intro-text {
    font-size: 1.4rem;
    text-align: center;
    font-weight: 400;
}

.section-text a,
.faq-answer a {
    color: var(--accent-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-secondary);
    transition: color var(--timing-fast) var(--easing-smooth),
                border-bottom-color var(--timing-fast) var(--easing-smooth);
}

.section-text a:hover,
.section-text a:focus,
.faq-answer a:hover,
.faq-answer a:focus {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

/* Drop caps for illuminated manuscript effect */
.drop-cap-letter {
    font-family: 'Hotzenplotz', serif;
    font-size: 3.5em;
    line-height: 0.85;
    float: left;
    margin: 0.1em 0.1em 0 0;
    color: var(--brand-gold);
    font-weight: normal;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4),
                 0 0 12px rgba(198, 195, 47, 0.4);
    transition: color 450ms var(--easing-smooth) 300ms,
                text-shadow 450ms var(--easing-smooth) 300ms;
}

/* ================
 * 9. AWARDS BADGE
 * ================ */

.awards-badge {
    text-align: center;
    margin: 2rem 0;
}

.awards-badge img {
    max-width: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow),
                0 0 20px rgba(239, 80, 143, 0.4);
}

/* ====================
 * 10. VIDEO CONTAINER
 * ==================== */

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ================
 * 11. STORY CARDS
 * ================ */

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

@media (min-width: 1024px) {
    .stories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.story-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: transform var(--timing-normal) var(--easing-smooth),
                box-shadow var(--timing-normal) var(--easing-smooth),
                border-color var(--timing-normal) var(--easing-smooth),
                background-color 600ms var(--easing-smooth) 250ms;
    will-change: transform;
    text-align: center;
    box-shadow: 0 4px 12px var(--shadow);
    display: flex;
    flex-direction: column;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--shadow);
    border-color: var(--accent-primary);
}

.story-title {
    font-family: 'Oldenburg', serif;
    font-size: 1.4rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.story-description {
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: justify;
}

.story-thumbnail-link {
    display: block;
    margin: 1.5rem auto 1rem auto;
    margin-top: auto;
    max-width: 320px;
    border-radius: 8px;
    overflow: hidden;
    transition: transform var(--timing-normal) var(--easing-smooth),
                box-shadow var(--timing-normal) var(--easing-smooth);
}

.story-thumbnail-link:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 16px var(--shadow);
}

.story-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.story-link {
    display: inline-block;
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform var(--timing-fast) var(--easing-smooth),
                color var(--timing-fast) var(--easing-smooth);
    will-change: transform;
}

.story-link:hover,
.story-link:focus {
    color: var(--accent-primary);
    transform: translateX(5px);
}

/* ================
 * 12. FAQ SECTION
 * ================ */

.faq-section {
    margin-top: 4rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 1024px) {
    .faq-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.faq-item {
    background: var(--bg-card);
    border-left: 4px solid var(--accent-primary);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px var(--shadow);
    transition: transform var(--timing-normal) var(--easing-smooth),
                box-shadow var(--timing-normal) var(--easing-smooth),
                background-color 600ms var(--easing-smooth) 300ms,
                border-left-color 600ms var(--easing-smooth) 300ms;
    will-change: transform;
}

/* Light mode: Semi-transparent FAQ items to show video through */
[data-theme="light"] .faq-item {
    background: rgba(250, 248, 242, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Dark mode: Semi-transparent FAQ items to show video through */
[data-theme="dark"] .faq-item {
    background: rgba(26, 26, 26, 0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.faq-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--shadow);
    border-left-color: var(--accent-secondary);
}

.faq-question {
    font-size: 1.3rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.faq-answer {
    color: var(--text-primary);
    font-size: 1.2rem;
    line-height: 1.7;
}

/* ==============================
 * 13. PHOTO GALLERY PLACEHOLDER
 * ============================== */

.gallery-section {
    margin-top: 4rem;
}

.gallery-placeholder {
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 4rem 2rem;
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--shadow);
}

.placeholder-text p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.placeholder-text em {
    color: var(--text-light);
    font-size: 1rem;
}

/* ======================
 * 14. FOOTER & BG VIDEO
 * ====================== */

/* New container for cropping videos */
.footer-video-container {
    position: absolute;
    bottom: 115px; /* Preserves original bottom alignment */
    left: 0;
    width: 100%;
    height: 100vh; /* Set to full viewport height to avoid cropping */
    z-index: 1;
    pointer-events: none;
    /* Apply the soft gradient mask to the container itself */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0px, black 80px);
    mask-image: linear-gradient(to bottom, transparent 0px, black 80px);
}

/* Override for contact page to lock video to the absolute bottom */
[data-page="contact"] .footer-video-container {
    bottom: 0;
}

/* Background videos */
.footer-bg-video {
    display: block;
    position: absolute;
    bottom: 0; /* Aligns video to the bottom of the container */
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 450ms var(--easing-smooth) 300ms;
}

/* Light mode video */
[data-theme="light"] .footer-bg-video--light {
    mix-blend-mode: multiply;
    opacity: 1.0;
}

/* Dark mode video */
html[data-theme="dark"] .footer-bg-video--dark,
:root[data-theme="dark"] .footer-bg-video--dark {
    opacity: 0.8;
}

/* Contact page */
[data-page="contact"] .footer-bg-video {
    bottom: 0;
}

/* Hide videos on mobile */
@media (max-width: 768px) {
    html {
        font-size: 87.5%;
    }

    .footer-bg-video,
    .footer-bg-video--light,
    .footer-bg-video--dark {
        display: none !important;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .footer-bg-video {
        display: none !important;
    }
}

.footer {
    position: relative;
    background: var(--bg-card);
    border-top: 3px solid var(--accent-primary);
    padding: 1.5rem 2rem;
    text-align: center;
    z-index: 10;
    transition: background-color 450ms var(--easing-smooth) 300ms,
                color 450ms var(--easing-smooth) 300ms,
                border-top-color 450ms var(--easing-smooth) 300ms;
}

/* Light mode footer transparency with blur */
[data-theme="light"] .footer {
    background: rgba(250, 248, 242, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Dark mode footer transparency with blur */
[data-theme="dark"] .footer {
    background: rgba(26, 26, 26, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Default dark theme (no data-theme attribute) */
:root:not([data-theme]) .footer {
    background: rgba(26, 26, 26, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.footer .container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer em {
    color: var(--accent-primary);
}

.footer-info {
    text-align: center;
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    opacity: 0.9;
}

.footer-info strong {
    color: var(--accent-secondary);
}

.footer-info strong:first-child {
    margin-right: 0.75rem;
}

.footer-info a {
    color: var(--text-primary);
    text-decoration: none;
    margin: 0 0.75rem 0 0;
    transition: all 0.3s ease;
}

.footer-info a:not(:first-of-type) {
    margin-left: 0.75rem;
}

.footer-info a:hover,
.footer-info a:focus {
    color: var(--accent-primary);
}

.footer .separator {
    margin: 0 0.75rem;
}

/* ======================
 * 15. RESPONSIVE DESIGN
 * ====================== */

/* Tablet */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1.3rem;
    }

    .navigation {
        gap: 1rem;
    }

    .nav-link {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    .main-content {
        padding: 3rem 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .intro-text {
        font-size: 1.1rem;
    }

    .stories-grid {
        grid-template-columns: 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    /* Contact page: convert to flexbox for proper textarea expansion */
    [data-page="contact"] .content-split {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem;
    }

    /* Non-contact pages: keep grid behavior */
    .content-split:not([data-page="contact"] *),
    .content-split.reverse:not([data-page="contact"] *) {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .content-split .content-image,
    .content-split.reverse .content-image {
        order: 2 !important;
        justify-content: center;
    }

    .content-split .content-text,
    .content-split.reverse .content-text {
        order: 1 !important;
    }

    .hamburger-menu {
        display: flex;
    }

    [data-page="contact"] .hamburger-menu {
        display: flex;
    }

    .navigation {
        display: none;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .navigation {
        flex-direction: column;
        gap: 0.5rem;
    }

    .main-content {
        padding: 2rem 1rem;
    }

    .story-card {
        padding: 1.5rem;
    }
}

/* ===============================
 * 14. SIDE-BY-SIDE IMAGE LAYOUTS
 * =============================== */

.content-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin: 2rem 0;
}

[data-page="contact"] .content-split {
    align-items: stretch;
    margin: 0;
    grid-template-rows: auto;
}

.content-split .content-text {
    max-width: 100%;
}

.content-split .content-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-split .content-image img {
    width: 100%;
    max-width: min(500px, 40vw);
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow);
    transition: transform var(--timing-normal) var(--easing-smooth),
                box-shadow var(--timing-normal) var(--easing-smooth);
    will-change: transform;
}

.content-split .content-image img:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px var(--shadow);
}

/* Contact page */
[data-page="contact"] .content-image {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

[data-page="contact"] .content-image img {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    max-width: 100%;
    border-radius: 0;
    outline: none;
    filter: drop-shadow(0 2px 4px var(--shadow))
            drop-shadow(0 0 8px rgba(239, 80, 143, 0.3));
}

[data-page="contact"] .content-image img:hover {
    outline: none;
    filter: drop-shadow(0 4px 8px var(--shadow))
            drop-shadow(0 0 20px rgba(239, 80, 143, 0.8));
}

[data-page="contact"] .image-caption {
    font-family: 'Oldenburg', cursive, serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #ffffff;
    text-align: center;
    margin-top: 1rem;
    flex-shrink: 0;
}

/* Reverse layout (image on left) */
.content-split.reverse {
    grid-template-columns: 1fr 1fr;
}

.content-split.reverse .content-image {
    order: -1;
}

/* Subsection titles (smaller than main section titles) */
.subsection-title {
    font-family: 'Hotzenplotz', serif;
    font-size: 2rem;
    color: var(--brand-gold);
    text-align: center;
    margin: 3rem 0 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4),
                 0 0 20px rgba(198, 195, 47, 0.5);
    transition: color 450ms var(--easing-smooth) 300ms,
                text-shadow 450ms var(--easing-smooth) 300ms;
}

/* Accolades section styling */
.accolades-section {
    text-align: center;
}

.accolades-section .section-text {
    max-width: 800px;
    margin: 1.5rem auto;
    text-align: justify;
}

/* Who We Are & What We Do section containers */
.who-we-are-section,
.what-we-do-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 4rem;
    transition: background-color 450ms var(--easing-smooth) 300ms,
                border-color 450ms var(--easing-smooth) 300ms,
                box-shadow 450ms var(--easing-smooth) 300ms;
}

/* ===============================
 * 15. MOBILE NAVIGATION SYSTEM
 * =============================== */

/* Hamburger menu button */
.hamburger-menu {
    position: fixed;
    top: 24px;
    right: 24px;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color var(--timing-normal) var(--easing-smooth),
                border-color var(--timing-normal) var(--easing-smooth);
    will-change: background-color, border-color;
    z-index: calc(var(--z-navigation) + 1);
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.hamburger-menu.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.hamburger-menu.visible {
    display: flex;
}

/* Hamburger lines */
.hamburger-line {
    width: 24px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    margin: 2px 0;
    transform-origin: center center;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg);
    position: relative;
    top: 6px;
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg);
    position: relative;
    top: -6px;
}

/* Light mode hamburger styling */
[data-theme="light"] .hamburger-menu {
    border-color: rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .hamburger-menu:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .hamburger-menu .hamburger-line {
    background: #2a2a2a;
}

[data-theme="light"] .hamburger-menu.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

[data-theme="light"] .hamburger-menu.active .hamburger-line {
    background: white;
}

/* Mobile navigation overlay */
.mobile-navigation {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: auto;
    max-height: 50vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 2px solid var(--accent-primary);
    border-radius: 0 0 0 12px;
    z-index: var(--z-overlay);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translate(100%, -100%);
    transition: all 0.3s ease;
    overflow-y: auto;
}

.mobile-navigation.active {
    opacity: 1;
    visibility: visible;
    transform: translate(0, 0);
}

/* Desktop sidebar (right side) */
@media (min-width: 1025px) {
    .mobile-navigation {
        width: 280px;
        max-height: 60vh;
    }

    .hamburger-menu.desktop-scroll {
        display: flex;
    }
}

/* Mobile fullscreen menu */
@media (max-width: 768px) {
    .mobile-navigation {
        width: 75%;
        max-width: 260px;
        max-height: 70vh;
    }
}

/* Mobile navigation header */
.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--accent-primary);
}

.mobile-nav-logo {
    max-height: 50px;
    width: auto;
}

.mobile-nav-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.mobile-nav-close:hover {
    color: var(--accent-primary);
}

/* Mobile navigation content */
.mobile-nav-content {
    padding: 2rem 0;
    flex: 1;
    overflow-y: auto;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    margin: 0;
}

.mobile-nav-link {
    display: block;
    padding: 0.8rem 1.5rem;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Convergence', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    transition: background-color var(--timing-normal) var(--easing-smooth),
                border-left-color var(--timing-normal) var(--easing-smooth),
                color var(--timing-normal) var(--easing-smooth);
    border-left: 4px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link.current {
    background: rgba(198, 195, 47, 0.3);
    border-left-color: var(--accent-primary);
    color: var(--accent-primary);
    text-shadow: 0 0 8px rgba(198, 195, 47, 0.5);
}

/* Mobile dropdown styles */
.mobile-nav-item.has-dropdown .mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    border-left: 4px solid transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.mobile-dropdown {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
}

.mobile-dropdown.open {
    max-height: 500px;
}

.mobile-dropdown-link {
    display: block;
    padding: 0.75rem 2rem 0.75rem 3rem;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Convergence', sans-serif;
    font-size: 1rem;
    transition: background-color var(--timing-normal) var(--easing-smooth),
                border-left-color var(--timing-normal) var(--easing-smooth),
                color var(--timing-normal) var(--easing-smooth);
    border-left: 4px solid transparent;
}

.mobile-dropdown-link:hover {
    background: rgba(198, 195, 47, 0.1);
    border-left-color: var(--accent-secondary);
    color: white;
}

/* ====================
 * 16. GALLERY BUTTON
 * ==================== */

.gallery-cta {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    z-index: calc(var(--z-base) + 2);
}

[data-page="contact"] .gallery-cta {
    position: absolute;
}

.gallery-button {
    font-family: 'Oldenburg', serif;
    font-size: 1.1rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    cursor: pointer;
    transition: transform var(--timing-normal) var(--easing-smooth),
                background-color var(--timing-normal) var(--easing-smooth),
                border-color var(--timing-normal) var(--easing-smooth),
                box-shadow var(--timing-normal) var(--easing-smooth);
    will-change: transform;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                0 0 20px rgba(255, 255, 255, 0.1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gallery-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), transparent);
    border-radius: 50px 50px 0 0;
}

.gallery-button:hover {
    background: rgba(239, 80, 143, 0.3);
    border-color: var(--brand-pink);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4),
                0 0 30px rgba(239, 80, 143, 0.6),
                inset 0 0 20px rgba(239, 80, 143, 0.2);
}

.gallery-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3),
                0 0 20px rgba(239, 80, 143, 0.4);
}

@media (max-width: 1024px) {
    .gallery-cta {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

/* ======================
 * 17. LIGHTBOX GALLERY
 * ====================== */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: var(--z-modal);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    width: 90vw;
    height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
    margin-top: 1.5rem;
    text-align: center;
    color: #ffffff;
    max-width: 600px;
}

.lightbox-caption {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.lightbox-counter {
    font-size: 0.95rem;
    color: var(--brand-gold);
    font-weight: 600;
}

/* Lightbox nav buttons */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(198, 195, 47, 0.5);
    color: var(--brand-gold);
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform var(--timing-normal) var(--easing-smooth),
                background-color var(--timing-normal) var(--easing-smooth),
                border-color var(--timing-normal) var(--easing-smooth),
                color var(--timing-normal) var(--easing-smooth);
    will-change: transform;
    z-index: calc(var(--z-modal) + 1);
    line-height: 1;
    padding: 0;
    font-family: Arial, sans-serif;
    padding-bottom: 2px;
}

.lightbox-close {
    top: 1.5rem;
    right: 1.5rem;
}

.lightbox-close:hover {
    background: rgba(198, 195, 47, 0.3);
    border-color: var(--brand-gold);
    color: #ffffff;
    transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(198, 195, 47, 0.3);
    border-color: var(--brand-gold);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

/* Delightful pink color at edges to indicate loop */
.lightbox-prev.at-edge,
.lightbox-next.at-edge {
    border-color: var(--brand-pink);
    color: var(--brand-pink);
}

.lightbox-prev.at-edge:hover,
.lightbox-next.at-edge:hover {
    background: rgba(239, 80, 143, 0.3);
    border-color: var(--brand-pink);
}

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}

/* Mobile responsive lightbox */
@media (max-width: 768px) {
    .lightbox-image {
        max-width: 95vw;
        max-height: 75vh;
    }

    .lightbox-info {
        margin-top: 1rem;
        padding: 0 1rem;
    }

    .lightbox-caption {
        font-size: 1rem;
    }

    .lightbox-counter {
        font-size: 0.9rem;
    }

    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1.8rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .lightbox-overlay {
        transition: none;
    }
}

/* ==================
 * 18. ACCESSIBILITY
 * ================== */

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 3px solid var(--accent-primary);
    outline-offset: 2px;
    animation: fade-outline 1s ease-out forwards;
}

@keyframes fade-outline {
    0% {
        outline-color: var(--accent-primary);
        outline-width: 3px;
    }
    100% {
        outline-color: transparent;
        outline-width: 0px;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
    }

    [data-theme="light"] {
        --border-color: #000000;
    }
}

/* ===============
 * 19. CONTACT FORM
 * =============== */

.contact-section {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 2rem 4rem 2rem;
    background: rgba(var(--card-rgb), 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: block;
}

/* Form layout */
.content-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Contact form base styles */
.contact-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Form group spacing */
.form-group {
    margin-bottom: 1rem;
}

.form-group:has(.form-textarea) {
    display: flex;
    flex-direction: column;
}

.contact-form .form-group:last-child {
    margin-bottom: 0;
}

/* Form labels */
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.required {
    color: var(--accent-primary);
    margin-left: 0.25rem;
}

/* Form inputs and textarea */
.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Convergence', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    background: rgba(var(--card-rgb), 0.65);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(var(--card-rgb), 0.8);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.form-textarea {
    resize: vertical;
    height: 25vh;
    min-height: 120px;
}

/* Success state */
.form-input.success,
.form-textarea.success {
    border-color: var(--accent-tertiary);
}

/* Error state */
.form-input.error,
.form-textarea.error {
    border-color: var(--accent-secondary);
    background: rgba(239, 80, 143, 0.05);
}

/* Error message */
.error-message {
    display: none;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--accent-secondary);
    font-weight: 500;
}

/* Submit button */
.form-submit-button {
    width: 100%;
    padding: 1rem 2rem;
    font-family: 'Oldenburg', cursive, serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: transform var(--timing-normal) var(--easing-smooth),
                background-color var(--timing-normal) var(--easing-smooth),
                border-color var(--timing-normal) var(--easing-smooth),
                box-shadow var(--timing-normal) var(--easing-smooth);
    will-change: transform;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.form-submit-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(239, 80, 143, 0.4);
    transform: translateY(-2px);
}

.form-submit-button:active:not(:disabled) {
    transform: translateY(0);
}

.form-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-submit-button.loading {
    pointer-events: none;
}

.form-submit-button.status--success {
    background: rgba(68, 182, 73, 0.3);
    border-color: var(--accent-tertiary);
}

.form-submit-button.status--error {
    background: rgba(239, 80, 143, 0.3);
    border-color: var(--accent-secondary);
}

/* Form status messages */
.form-status {
    display: none !important;
}

.form-status--success {
    background: rgba(68, 182, 73, 0.15);
    color: var(--accent-tertiary);
    border: 2px solid var(--accent-tertiary);
}

.form-status--error {
    background: rgba(239, 80, 143, 0.15);
    color: var(--accent-secondary);
    border: 2px solid var(--accent-secondary);
}

/* Honeypot field */
.honeypot-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Light theme adjustments */
[data-theme="light"] .contact-section {
    background: rgba(var(--card-rgb), 0.9);
}

[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea {
    background: rgba(255, 255, 255, 0.7);
}

[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-textarea:focus {
    background: rgba(255, 255, 255, 0.9);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .contact-section {
        padding: 2rem 1.5rem;
        margin-bottom: 1rem;
    }

    .content-split .content-form {
        order: 1;
    }

    [data-page="contact"] .content-form {
        width: 100%;
    }

    .content-split .content-image {
        order: 2;
        margin-top: 2rem;
    }

    .form-label {
        font-size: 0.95rem;
    }

    .form-input,
    .form-textarea {
        padding: 0.65rem 0.85rem;
        font-size: 0.95rem;
    }

    .form-textarea {
        resize: none;
        flex: 1 1 auto;
        min-height: 120px;
    }

    /* Contact page mobile */
    [data-page="contact"] .main-content {
        padding: 0 1.5rem 0 1.5rem;
    }

    [data-page="contact"] .contact-section {
        padding-top: 0;
        padding-bottom: 0;
    }

    .form-submit-button {
        font-size: 1.2rem;
        padding: 0.9rem 1.8rem;
    }

    [data-theme="light"] [data-page="contact"] .form-submit-button {
        color: #000000;
    }
}

@media (max-width: 480px) {
    .contact-section {
        padding: 0 1rem 1.5rem 1rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-submit-button {
        font-size: 1.1rem;
    }
}

/* ==================
 * 20. FOOTER DRAWER
 * ================== */

/* Footer drawer toggle button */
.footer-drawer-toggle {
    display: none;
}

[data-page="contact"] .footer-drawer-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 0;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    transition: transform var(--timing-normal) var(--easing-smooth),
                background-color var(--timing-normal) var(--easing-smooth),
                border-color var(--timing-normal) var(--easing-smooth),
                box-shadow var(--timing-normal) var(--easing-smooth);
    will-change: transform;
    z-index: 10001;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

[data-page="contact"] .footer-drawer-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 -4px 12px rgba(239, 80, 143, 0.3);
    transform: translateY(-2px);
}

[data-page="contact"] .footer-drawer-toggle:active {
    transform: translateY(0);
}

/* Drawer arrow */
.drawer-arrow {
    color: #ffffff;
    font-size: 1.2rem;
    line-height: 1;
    transition: transform var(--timing-slow) var(--easing-smooth);
    user-select: none;
}

/* Footer drawer */
[data-page="contact"] .footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
}

[data-page="contact"] .footer.open {
    transform: translateY(0);
}

/* Arrow rotation when drawer is open */
[data-page="contact"] .footer-drawer-toggle.open .drawer-arrow {
    transform: rotate(180deg);
}

/* Add padding to footer when open so it doesn't cover links */
[data-page="contact"] .footer.open {
    padding-right: 100px;
}

/* Contact page layout */
[data-page="contact"] body {
    height: auto;
    min-height: 200vh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Header section = first 100vh */
[data-page="contact"] .header {
    min-height: 100vh;
}

/* Main content section = second 100vh */
[data-page="contact"] .main-content {
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
    padding: 2rem 2rem 0 2rem;
    position: relative;
}

[data-page="contact"] .container {
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* Responsive adjustments for drawer toggle */
@media (max-width: 768px) {
    .drawer-arrow {
        font-size: 1rem;
    }
}

@media (max-width: 1024px) {
    [data-page="contact"] .content-image img[src*="4171.webp"],
    [data-page="contact"] .image-caption {
        display: none !important;
    }

    /* Make grid single-column on tablet when image is hidden */
    [data-page="contact"] .content-split {
        grid-template-columns: 1fr !important;
    }

    [data-page="contact"] .content-form {
        width: 90%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    [data-page="contact"] .form-textarea {
        height: 35vh;
    }

    [data-page="contact"] .contact-section {
        padding-top: 5rem;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    [data-page="contact"] .footer {
        transition: none;
    }

    .drawer-arrow {
        transition: none;
    }
}

/* =================================
 * BROWSER COMPATIBILITY FALLBACKS
 * ================================= */

/* Backdrop-filter fallback for Firefox < 103 and other unsupported browsers */
@supports not (backdrop-filter: blur(10px)) {
    .gallery-button,
    .nav-link,
    .dropdown,
    .mobile-navigation,
    .lightbox-prev,
    .lightbox-next,
    .footer-drawer-toggle {
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    [data-theme="light"] .gallery-button,
    [data-theme="light"] .nav-link,
    [data-theme="light"] .dropdown,
    [data-theme="light"] .mobile-navigation,
    [data-theme="light"] .lightbox-prev,
    [data-theme="light"] .lightbox-next,
    [data-theme="light"] .footer-drawer-toggle {
        background: rgba(245, 240, 230, 0.9);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .faq-section,
    .footer {
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    [data-theme="light"] .faq-section,
    [data-theme="light"] .footer {
        background: rgba(245, 240, 230, 0.85);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* =======================================
 * ACCESSIBILITY: REDUCED MOTION SUPPORT
 * ======================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Make drawer arrow visible on mobile light mode */
@media (max-width: 768px) {
    [data-theme="light"] [data-page="contact"] .drawer-arrow {
        color: #000000;
    }
}

@media (max-height: 750px) {
    [data-page="contact"] .contact-section {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

