/* ByFarhan — Dark Mode + Theme Toggle
   Linked on every page via <link rel="stylesheet" href="css/dark-mode.css">
   Dark-mode rules only fire when <html data-theme="dark"> is set by theme.js. */

/* ── CSS Variable Overrides ──────────────────────────────────── */
html[data-theme="dark"] {
    --bg-color:       #1C1C1E;
    --text-primary:   #F5F5F7;
    --text-secondary: #98989D;
    --glass-bg:       rgba(44, 44, 46, 0.94);
    --glass-border:   rgba(255, 255, 255, 0.10);
    --glass-shadow:   0 4px 24px rgba(0,0,0,0.35), 0 12px 48px rgba(0,0,0,0.45);
    /* Used as fallback in inline border-color vars e.g. var(--border-color, #eee) */
    --border-color:   rgba(255, 255, 255, 0.08);
    color-scheme: dark;
}

/* FAQ answer text — hardcoded #666 inline style is too dark on dark bg */
html[data-theme="dark"] details p {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] details {
    border-bottom-color: rgba(255,255,255,0.08) !important;
}

/* ── Base backgrounds ─────────────────────────────────────────── */
html[data-theme="dark"],
html[data-theme="dark"] body {
    background-color: #1C1C1E;
}
html[data-theme="dark"] body::before {
    background-color: #1C1C1E !important;
}

/* ── Mobile Safari scroll stability ───────────────────────────── */
@media (max-width: 900px), (hover: none), (pointer: coarse) {
    html,
    body {
        scroll-snap-type: none !important;
    }

    .slide-sentinel {
        scroll-snap-align: none !important;
        scroll-snap-stop: normal !important;
    }

    /* iOS Safari can crash the renderer when many image cards combine
       backdrop-filter with SVG filters while scrolling. Keep the gallery
       shape and shadows, but use a flat glass fallback on touch devices. */
    .gallery-item {
        contain: paint style;
        transition:
            opacity 0.35s ease,
            box-shadow 0.25s ease,
            border-color 0.25s ease !important;
    }

    .gallery-item::before {
        display: none !important;
    }

    .gallery-item::after {
        background: rgba(255, 255, 255, 0.72) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        filter: none !important;
    }

    .gallery-item img {
        filter: none !important;
        transform: none !important;
        will-change: auto !important;
    }

    .gallery-item.interactive {
        transform: none !important;
    }

    .lightbox {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    html[data-theme="dark"] .gallery-item::after {
        background: rgba(28, 28, 30, 0.72) !important;
    }
}

/* ── Sitewide content links ───────────────────────────────────── */
a {
    text-decoration: none !important;
}

/* ── Navbar logo optical balance ──────────────────────────────── */
.nav-brand {
    gap: 7px;
}

.nav-brand .nav-logo-mark {
    height: 14.5px;
    transform: translateY(0.5px);
}

/* PJAX swaps should feel instant and settled. Keep first-load entrance
   animations for hard loads, but do not replay nav/header drops after an
   in-site page change. */
body.pjax-no-intro .main-nav,
body.pjax-no-intro .page-header,
body.pjax-no-intro .page-title,
body.pjax-no-intro .page-subtitle {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
}

main p a:not(.cta-btn):not(.prints-cta):not(.print-card):not(.gallery-item),
main li a:not(.cta-btn):not(.prints-cta):not(.print-card):not(.gallery-item),
.seo-section a:not(.cta-btn),
.prints-custom-note a,
.prints-faq a {
    color: var(--text-primary, #1D1D1F) !important;
    font-weight: 500;
    text-decoration: none !important;
    border-bottom: 0 !important;
    transition: opacity 0.2s ease, background 0.2s ease;
}

main p a:not(.cta-btn):not(.prints-cta):not(.print-card):not(.gallery-item):hover,
main li a:not(.cta-btn):not(.prints-cta):not(.print-card):not(.gallery-item):hover,
.seo-section a:not(.cta-btn):hover,
.prints-custom-note a:hover,
.prints-faq a:hover {
    opacity: 0.78;
}

html[data-theme="dark"] main p a:not(.cta-btn):not(.prints-cta):not(.print-card):not(.gallery-item),
html[data-theme="dark"] main li a:not(.cta-btn):not(.prints-cta):not(.print-card):not(.gallery-item),
html[data-theme="dark"] .seo-section a:not(.cta-btn),
html[data-theme="dark"] .prints-custom-note a,
html[data-theme="dark"] .prints-faq a {
    border-bottom: 0 !important;
}

/* ── Nav — white text, keep original font-size untouched ─────── */
html[data-theme="dark"] .main-nav {
    border-bottom-color: rgba(255,255,255,0.07);
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
html[data-theme="dark"] .main-nav::before {
    background: rgba(28,28,30,0.60) !important;
}
/* White nav text in dark mode (not grey) */
html[data-theme="dark"] .nav-brand,
html[data-theme="dark"] .nav-menu a {
    color: var(--text-primary);
}
html[data-theme="dark"] .nav-menu a:hover,
html[data-theme="dark"] .nav-menu a.active {
    color: #fff;
}

/* Slideshow has its own dark overlay nav — make toggle visible */
.slideshow-nav .theme-toggle {
    color: rgba(255,255,255,0.85);
    opacity: 1;
}
.slideshow-nav .theme-toggle:hover {
    color: #fff;
    opacity: 1;
}

/* ── Cards / Glass frames ─────────────────────────────────────── */
html[data-theme="dark"] .glass-frame,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .gallery-frame,
html[data-theme="dark"] .photo-card,
html[data-theme="dark"] .card {
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

/* Location highlight cards (nanaimo, tofino, vancouver pages) */
html[data-theme="dark"] .highlight-card {
    background: rgba(44,44,46,0.92) !important;
    border-color: rgba(255,255,255,0.08) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
}

/* Journal story cards — existing .dark-mode selector never fires; use data-theme */
html[data-theme="dark"] .journal-card {
    background-image: linear-gradient(145deg, rgba(44,44,46,0.96), rgba(36,36,38,0.90)) !important;
    border-color: rgba(255,255,255,0.08) !important;
    box-shadow: 0 12px 40px -4px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}
html[data-theme="dark"] .journal-footer {
    border-top-color: rgba(255,255,255,0.08) !important;
}

/* Journal tabs pill */
html[data-theme="dark"] .journal-tabs {
    background: rgba(44,44,46,0.92) !important;
    border-color: rgba(255,255,255,0.08) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}
html[data-theme="dark"] .journal-tab-btn.active {
    background: rgba(255,255,255,0.12) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4) !important;
}

/* About page hero card */
html[data-theme="dark"] .about-hero-container {
    background-image: linear-gradient(145deg, rgba(44,44,46,0.95), rgba(36,36,38,0.85)) !important;
    border-color: rgba(255,255,255,0.08) !important;
    box-shadow: 0 24px 60px -8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}
html[data-theme="dark"] .about-hero-img {
    border-color: rgba(255,255,255,0.15) !important;
}
/* About page Instagram social tag */
html[data-theme="dark"] .social-tag {
    background: rgba(44,44,46,0.9);
    border-color: rgba(255,255,255,0.1);
    color: var(--text-primary);
}
html[data-theme="dark"] .social-tag:hover {
    background: rgba(60,60,62,0.95);
    border-color: rgba(255,255,255,0.2);
}

/* ── CTA buttons ──────────────────────────────────────────────── */
/* Primary: white bg with dark text (inverted from light mode) */
html[data-theme="dark"] .cta-btn--primary {
    background: #F5F5F7 !important;
    color: #1C1C1E !important;
}
html[data-theme="dark"] .cta-btn--primary:hover {
    background: #ffffff !important;
    color: #1C1C1E !important;
}
/* Secondary: white outline + text */
html[data-theme="dark"] .cta-btn--secondary {
    color: #F5F5F7;
    border-color: rgba(255,255,255,0.35);
}
html[data-theme="dark"] .cta-btn--secondary:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

/* Submit button on forms */
html[data-theme="dark"] .submit-btn {
    background: #F5F5F7;
    color: #1C1C1E;
}
html[data-theme="dark"] .submit-btn:hover {
    background: #ffffff;
    color: #1C1C1E;
}

/* ── Location / Vancouver CTA card ───────────────────────────── */
html[data-theme="dark"] .location-cta {
    background: rgba(44,44,46,0.92) !important;
    border-color: rgba(255,255,255,0.08) !important;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3) !important;
}

/* ── Service pills (location pages) ──────────────────────────── */
html[data-theme="dark"] .service-pill {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.1);
    color: var(--text-secondary);
}

/* ── Filter Buttons ───────────────────────────────────────────── */
html[data-theme="dark"] .filter-btn {
    color: var(--text-secondary);
    border-color: rgba(255,255,255,0.1);
}
html[data-theme="dark"] .filter-btn:hover {
    background: rgba(255,255,255,0.07);
    color: var(--text-primary);
}
html[data-theme="dark"] .filter-btn.active {
    background: #F5F5F7;
    color: #1C1C1E;
    border-color: #F5F5F7;
}

/* ── CTA section / box ────────────────────────────────────────── */
html[data-theme="dark"] .cta-section,
html[data-theme="dark"] .cta-box {
    background: rgba(44,44,46,0.9);
    border-color: rgba(255,255,255,0.08);
}

/* ── Forms ────────────────────────────────────────────────────── */
html[data-theme="dark"] .form-group label {
    color: var(--text-primary);
}
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group textarea,
html[data-theme="dark"] .form-group select {
    background: rgba(44,44,46,0.9) !important;
    color: var(--text-primary) !important;
    border-color: rgba(255,255,255,0.12) !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: var(--text-secondary);
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] .form-group input:focus,
html[data-theme="dark"] .form-group textarea:focus,
html[data-theme="dark"] .form-group select:focus {
    border-color: rgba(255,255,255,0.3) !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.06) !important;
    outline: none;
}

/* Back-to-top */
.back-to-top {
    position: fixed;
    right: max(20px, calc(env(safe-area-inset-right, 0px) + 20px));
    bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 24px));
    z-index: 160;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid rgba(29, 29, 31, 0.06);
    border-radius: 50%;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.82);
    color: #1D1D1F;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, 14px, 0) scale(0.96);
    transition:
        opacity 0.28s ease,
        visibility 0.28s ease,
        transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
}

.back-to-top:hover {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(29, 29, 31, 0.1);
    transform: translate3d(0, -2px, 0) scale(1.02);
    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.back-to-top:active {
    transform: translate3d(0, 0, 0) scale(0.98);
}

.back-to-top svg {
    width: 22px;
    height: 22px;
}

@media (max-width: 768px) {
    .back-to-top {
        right: max(18px, calc(env(safe-area-inset-right, 0px) + 18px));
        bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 18px));
        width: 52px;
        height: 52px;
        background: rgba(255, 255, 255, 0.86);
        box-shadow:
            0 10px 26px rgba(0, 0, 0, 0.055),
            inset 0 1px 0 rgba(255, 255, 255, 0.92);
    }

    .back-to-top:hover {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

html[data-theme="dark"] .back-to-top {
    background: rgba(44, 44, 46, 0.76);
    border-color: rgba(255, 255, 255, 0.1);
    color: #F5F5F7;
    box-shadow:
        0 14px 32px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .back-to-top:hover {
    background: rgba(58, 58, 60, 0.9);
    border-color: rgba(255, 255, 255, 0.16);
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: opacity 0.18s ease, visibility 0.18s ease;
        transform: none;
    }

    .back-to-top.visible,
    .back-to-top:hover,
    .back-to-top:active {
        transform: none;
    }
}

/* ── Footer ───────────────────────────────────────────────────── */
/* Logo uses mix-blend-mode:multiply which darkens on dark bg — reset to normal */
html[data-theme="dark"] footer img {
    mix-blend-mode: normal !important;
    opacity: 0.7 !important;
}
html[data-theme="dark"] footer,
html[data-theme="dark"] .site-footer {
    background: #161618 !important;
    border-top-color: rgba(255,255,255,0.07);
    color: var(--text-secondary);
}
html[data-theme="dark"] footer a,
html[data-theme="dark"] .site-footer a {
    color: var(--text-secondary);
}
html[data-theme="dark"] footer a:hover,
html[data-theme="dark"] .site-footer a:hover {
    color: var(--text-primary);
}

/* ── Mobile nav overlay ───────────────────────────────────────── */
html[data-theme="dark"] .mobile-nav-overlay {
    background: rgba(28,28,30,0.98) !important;
}

/* ── Lightbox ─────────────────────────────────────────────────── */
html[data-theme="dark"] .lightbox {
    background: rgba(20,20,22,0.96) !important;
    backdrop-filter: blur(40px) !important;
}
html[data-theme="dark"] .lightbox-content {
    box-shadow: 0 24px 80px rgba(0,0,0,0.7) !important;
}
html[data-theme="dark"] .close {
    background: rgba(44,44,46,0.9) !important;
    color: #F5F5F7 !important;
}
html[data-theme="dark"] .close:hover {
    background: rgba(60,60,62,1) !important;
}
html[data-theme="dark"] .lightbox-nav {
    background: rgba(255,255,255,0.08) !important;
    color: #F5F5F7 !important;
}
html[data-theme="dark"] .lightbox-nav:hover {
    background: rgba(255,255,255,0.18) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4) !important;
}

/* ── Page header titles ───────────────────────────────────────── */
html[data-theme="dark"] .page-header .page-title,
html[data-theme="dark"] .page-header .page-subtitle {
    color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════════════
   THEME TOGGLE BUTTON
══════════════════════════════════════════════════════════════ */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    /* Inherit color from nav-menu context so it matches adjacent icons exactly */
    color: inherit;
    cursor: pointer;
    padding: 6px;
    margin: -6px;
    opacity: 1;
    transition: color 0.6s ease;
    line-height: 0;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
    z-index: 1;
}
.theme-toggle:hover {
    opacity: 1;
    background: transparent;
    color: var(--text-primary);
}
/* The icon "stage" — reserves a fixed 17px square so both icons can be
 * stacked on top of each other via absolute positioning. That's what
 * powers the rotate + cross-fade animation on theme switch. */
.theme-toggle {
    width: 29px;   /* 17 + 6*2 padding */
    height: 29px;
    margin: -6px;
    padding: 6px;
}
.theme-toggle svg {
    width: 17px;
    height: 17px;
    display: block;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    /* `will-change` kicks the icons to the GPU compositor so the swap
     * stays at 60fps on budget Android devices. Scoped tightly so it
     * doesn't leak memory on the whole page. */
    will-change: transform, opacity;
    transition:
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity   0.3s ease;
    transform-origin: center;
}

.theme-toggle .icon-moon {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    opacity: 1;
}
.theme-toggle .icon-sun {
    transform: translate(-50%, -50%) rotate(90deg) scale(0.4);
    opacity: 0;
}

html[data-theme="dark"] .theme-toggle .icon-moon {
    transform: translate(-50%, -50%) rotate(-90deg) scale(0.4);
    opacity: 0;
}
html[data-theme="dark"] .theme-toggle .icon-sun {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    opacity: 1;
}

/* Respect reduced-motion: skip the spring rotation, just cross-fade. */
@media (prefers-reduced-motion: reduce) {
    .theme-toggle svg { transition: opacity 0.15s ease; transform: translate(-50%, -50%) !important; }
    .theme-toggle .icon-sun,
    html[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; }
    .theme-toggle .icon-moon,
    html[data-theme="dark"] .theme-toggle .icon-sun  { opacity: 1; }
}

/* Desktop nav: match theme toggle colour to adjacent .nav-menu a icons */
.nav-menu .theme-toggle {
    color: var(--text-secondary);
}
.nav-menu .theme-toggle:hover {
    color: var(--text-primary);
}

/* Scroll: light background behind nav → icons turn white (matches .nav-icon.nav-text-light) */
.theme-toggle.nav-text-light {
    color: rgba(255, 255, 255, 0.95);
}
.theme-toggle.nav-text-light:hover {
    color: #fff;
}

/* ── Mobile-only toggle ───────────────────────────────────────── */
.mobile-theme-toggle {
    display: none;
}
@media (max-width: 768px) {
    /* Order: brand | … | instagram(1) | toggle(2) | hamburger(3) */
    .mobile-instagram  { order: 1 !important; }
    .mobile-theme-toggle { order: 2 !important; }
    .mobile-menu-btn   { order: 3 !important; }

    /* Align all right-side nav icons identically.
       Use consistent tap targets (44×44 WCAG) and visible gaps between icons. */
    .mobile-instagram,
    .mobile-theme-toggle,
    .mobile-menu-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        border-radius: 10px !important;
        flex-shrink: 0 !important;
    }
    /* Visible breathing room between icons */
    .mobile-instagram      { margin-right: 2px !important; }
    .mobile-theme-toggle   { margin-right: 2px !important; }
    /* Pull the hamburger toward the edge so it feels balanced with the 20px container padding */
    .mobile-menu-btn       { margin-right: -6px !important; }

    /* Remove the old -2px nudge that caused vertical misalignment */
    .mobile-instagram svg { margin-top: 0 !important; }

    .mobile-theme-toggle {
        border: none;
        background: transparent;
        cursor: pointer;
        color: inherit;
        opacity: 1;
        transition: color 0.6s ease, background-color 0.2s ease;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }
    .mobile-theme-toggle svg {
        width: 18px;
        height: 18px;
    }
    /* Subtle press feedback on touch */
    .mobile-instagram:active,
    .mobile-theme-toggle:active,
    .mobile-menu-btn:active {
        background: rgba(0, 0, 0, 0.06);
    }
    html[data-theme="dark"] .mobile-instagram:active,
    html[data-theme="dark"] .mobile-theme-toggle:active,
    html[data-theme="dark"] .mobile-menu-btn:active {
        background: rgba(255, 255, 255, 0.08);
    }
    .mobile-theme-toggle:hover {
        color: var(--text-primary);
    }
    .mobile-theme-toggle.nav-text-light {
        color: rgba(255, 255, 255, 0.95);
    }
}

/* ════════════════════════════════════════════════════════════════
   GLOBAL ENHANCEMENTS (April 2026)
   Loaded after every page's inline CSS, so rules here override.
   ════════════════════════════════════════════════════════════════ */

/* ── Mobile vertical rhythm: slightly denser, still image-led ─── */
@media (max-width: 768px) {
    main.page-container,
    .page-container {
        padding-top: 88px !important;
        padding-bottom: 72px !important;
    }

    .page-header {
        margin-bottom: 42px !important;
    }

    .page-title {
        margin-bottom: 10px !important;
    }

    .page-subtitle {
        line-height: 1.48 !important;
    }

    .filter-buttons,
    .prints-filters,
    .journal-tabs-wrap {
        margin-top: 22px !important;
    }

    .filter-buttons {
        margin-bottom: 34px !important;
    }

    .masonry-wrapper {
        gap: 16px !important;
    }

    .gallery-item {
        padding: 10px !important;
    }

    .journal-grid {
        gap: 22px !important;
        margin-top: 34px !important;
    }

    .journal-body {
        padding: 24px !important;
    }

    .journal-tag {
        margin-bottom: 12px !important;
    }

    .journal-excerpt {
        margin-bottom: 22px !important;
    }

    .article-header {
        margin-bottom: 40px !important;
    }

    .article-body p {
        margin-bottom: 18px !important;
    }

    .article-body h2 {
        margin-top: 36px !important;
        margin-bottom: 18px !important;
    }

    .article-body blockquote {
        margin: 34px 0 !important;
        padding-left: 18px !important;
    }

    .article-gallery {
        gap: 16px !important;
        margin-top: 34px !important;
    }

    .breadcrumb {
        padding-top: 58px !important;
    }

    .location-hero {
        padding-top: 34px !important;
        padding-bottom: 28px !important;
    }

    .location-tag {
        margin-bottom: 14px !important;
    }

    .location-title {
        margin-bottom: 12px !important;
    }

    .location-subtitle {
        margin-bottom: 24px !important;
        line-height: 1.5 !important;
    }

    .highlights {
        gap: 14px !important;
        margin-bottom: 44px !important;
    }

    .highlight-card {
        padding: 22px 20px !important;
    }

    .highlight-icon {
        margin-bottom: 8px !important;
    }

    .location-gallery {
        margin-bottom: 52px !important;
    }

    .location-gallery h2,
    .location-services h2,
    .location-cta h2 {
        margin-bottom: 10px !important;
    }

    .location-services {
        margin-bottom: 58px !important;
    }

    .location-services p {
        margin-bottom: 24px !important;
        line-height: 1.6 !important;
    }

    .service-pills {
        gap: 8px !important;
    }

    .service-pill {
        padding: 8px 16px !important;
    }

    .location-cta {
        padding: 30px 22px !important;
        margin-bottom: 52px !important;
    }

    .location-cta p {
        margin-bottom: 22px !important;
    }

    .seo-hub {
        margin-top: 58px !important;
    }

    .seo-section + .seo-section {
        margin-top: 34px !important;
        padding-top: 32px !important;
    }

    .seo-section h2 {
        margin-bottom: 10px !important;
    }

    .seo-pill-row {
        margin-top: 22px !important;
        gap: 8px !important;
    }

    .seo-faq {
        margin-top: 22px !important;
    }

    .seo-faq summary {
        padding-top: 15px !important;
        padding-bottom: 15px !important;
    }

    .prints-main {
        padding-bottom: 64px !important;
    }

    .prints-grid {
        gap: 18px !important;
        margin-top: 34px !important;
    }

    .prints-info {
        margin-top: 58px !important;
        padding-top: 30px !important;
    }

    .prints-info-row {
        gap: 18px !important;
        margin-bottom: 34px !important;
    }

    .prints-faq {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

    .about-hero-container {
        margin-top: 0 !important;
        padding: 26px 22px !important;
        gap: 16px !important;
    }

    .about-content-inner p {
        margin-bottom: 12px !important;
        line-height: 1.48 !important;
    }

    .about-intro-greeting {
        margin-bottom: 8px !important;
    }

    .contact-form {
        gap: 18px !important;
    }

    .form-group {
        margin-bottom: 18px !important;
    }

    .contact-direct {
        margin-top: 28px !important;
    }

    main.page-container > section[style*="margin-top: 64px"] {
        margin-top: 46px !important;
        padding-top: 34px !important;
    }
}

@media (max-width: 480px) {
    main.page-container,
    .page-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-top: 82px !important;
        padding-bottom: 64px !important;
    }

    .page-header {
        margin-bottom: 34px !important;
    }

    .location-hero {
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-top: 30px !important;
    }

    .highlights,
    .location-gallery,
    .location-services {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .location-cta {
        margin-left: 20px !important;
        margin-right: 20px !important;
    }

    .cta-group {
        gap: 10px !important;
    }

    .cta-btn,
    .submit-btn {
        min-height: 42px !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }
}

/* ── A11y: consistent focus rings for keyboard users ───────────── */
/* Uses :focus-visible so mouse clicks don't show an outline, only keyboard nav
   does. Applied to every interactive element including nav links, buttons,
   theme toggles, gallery items, and form controls. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible,
.gallery-item:focus-visible,
.filter-pill:focus-visible,
.theme-toggle:focus-visible,
.mobile-menu-btn:focus-visible,
.mobile-instagram:focus-visible,
.mobile-theme-toggle:focus-visible {
    outline: 2px solid rgba(29, 29, 31, 0.42);
    outline-offset: 2px;
    border-radius: 6px;
}
html[data-theme="dark"] a:focus-visible,
html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] input:focus-visible,
html[data-theme="dark"] textarea:focus-visible,
html[data-theme="dark"] select:focus-visible,
html[data-theme="dark"] summary:focus-visible,
html[data-theme="dark"] [role="button"]:focus-visible,
html[data-theme="dark"] .gallery-item:focus-visible,
html[data-theme="dark"] .filter-pill:focus-visible {
    outline-color: rgba(245, 245, 247, 0.52);
}

/* ── Perf: skip layout & paint for offscreen gallery items ───── */
/* 30-50% rendering speedup on long masonry grids. `contain-intrinsic-size`
   reserves space so the scrollbar doesn't jitter while items materialise. */
/* NOTE: `content-visibility: auto` was previously applied to gallery
 * items but it broke the CSS masonry layout — offscreen items collapsed
 * to their reserved intrinsic size, leaving huge vertical gaps between
 * cards on mobile. Removed. If we re-enable it later it needs to be
 * paired with per-item `contain-intrinsic-size` that matches each
 * image's real aspect ratio. */

/* ── Mobile menu: slide-from-right + backdrop fade ────────────── */
/* Overrides the scale-fade transition baked into each page's inline CSS with
   a more premium slide pattern. Specificity bumped with `.mobile-nav-overlay`
   appearing twice so it wins over the existing `.mobile-nav-overlay.active`
   rule in the inline <style> block. */
@media (max-width: 768px) {
    .mobile-nav-overlay.mobile-nav-overlay {
        transform: translateX(100%) !important;
        transition:
            transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.32s ease !important;
    }
    .mobile-nav-overlay.mobile-nav-overlay.active {
        transform: translateX(0) !important;
    }

    /* Backdrop layer — a dim + blur behind the panel that fades in/out. */
    .mobile-nav-overlay::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.18);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: -1;
    }
    .mobile-nav-overlay.active::before {
        opacity: 1;
    }

    /* Respect reduced-motion: disable slide, fall back to simple fade. */
    @media (prefers-reduced-motion: reduce) {
        .mobile-nav-overlay.mobile-nav-overlay,
        .mobile-nav-overlay.mobile-nav-overlay.active {
            transform: none !important;
            transition: opacity 0.2s ease !important;
        }
    }
}

/* ── Sticky bottom CTA bar (mobile only) ─────────────────────── */
/* Appears on pages that opt in via `data-sticky-cta` on <body>. The bar
   auto-hides on scroll-down and reappears on scroll-up (logic in app.js). */
.sticky-cta {
    position: fixed;
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    transform: translate(-50%, 0);
    z-index: 95;

    display: none;
    gap: 8px;
    padding: 8px;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.6);

    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
    will-change: transform, opacity;
}
html[data-theme="dark"] .sticky-cta {
    background: rgba(28, 28, 30, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 2px 6px rgba(0, 0, 0, 0.3);
}
.sticky-cta.hidden {
    transform: translate(-50%, calc(100% + 40px));
    opacity: 0;
    pointer-events: none;
}
.sticky-cta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    border-radius: 999px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease, background 0.15s ease;
}
.sticky-cta a.cta-primary {
    background: #1D1D1F;
    color: #fff;
}
.sticky-cta a.cta-primary:active { background: #000; }
.sticky-cta a.cta-secondary {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary, #1D1D1F);
}
html[data-theme="dark"] .sticky-cta a.cta-primary {
    background: #F5F5F7;
    color: #1D1D1F;
}
html[data-theme="dark"] .sticky-cta a.cta-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #F5F5F7;
}
.sticky-cta a svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Only show on mobile/tablet AND only when the page opted in. */
@media (max-width: 900px) {
    body[data-sticky-cta] .sticky-cta {
        display: inline-flex;
    }
    /* Leave a little room at the bottom so the bar doesn't cover final content. */
    body[data-sticky-cta] {
        padding-bottom: 76px;
    }
}

/* ── Lightbox: gestures + full EXIF panel ─────────────────────── */
/* Info toggle button, sits opposite the close button. */
.lightbox-info-btn {
    position: absolute;
    top: 24px;
    right: 80px;
    width: 36px;
    height: 36px;
    background: rgba(230, 230, 235, 0.8);
    border-radius: 50%;
    color: #1D1D1F;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 502;
    -webkit-tap-highlight-color: transparent;
}
.lightbox-info-btn:hover { background: #e5e5ea; }
.lightbox-info-btn svg { width: 18px; height: 18px; }
html[data-theme="dark"] .lightbox-info-btn {
    background: rgba(44, 44, 46, 0.85);
    color: #F5F5F7;
}

/* Full EXIF panel — slides in from the right side on desktop,
   up from the bottom on mobile. Hidden by default. */
.lightbox-exif-panel {
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translate(calc(100% + 40px), -50%);
    width: 280px;
    max-height: 70vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 18px 20px;
    font-size: 13px;
    color: #1D1D1F;
    z-index: 503;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
}
html[data-theme="dark"] .lightbox-exif-panel {
    background: rgba(28, 28, 30, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
    color: #F5F5F7;
}
.lightbox-exif-panel.visible {
    transform: translate(0, -50%);
    opacity: 1;
    pointer-events: auto;
}
.lightbox-exif-panel h3 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #86868B;
    margin: 0 0 14px;
}
.lightbox-exif-panel dl {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 8px;
    column-gap: 12px;
    align-items: baseline;
}
.lightbox-exif-panel dt {
    font-size: 11px;
    color: #86868B;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.lightbox-exif-panel dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    text-align: right;
}

.lightbox-print-availability {
    position: absolute;
    left: 50%;
    bottom: 92px;
    transform: translate(-50%, 6px);
    z-index: 506;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(29, 29, 31, 0.12);
    color: #1D1D1F;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.10);
    backdrop-filter: saturate(170%) blur(18px);
    -webkit-backdrop-filter: saturate(170%) blur(18px);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, background 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.lightbox-print-availability:not([hidden]) {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.lightbox-print-availability:hover {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(29, 29, 31, 0.24);
}

.lightbox-print-dot {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.42;
    flex-shrink: 0;
}

html[data-theme="dark"] .lightbox-print-availability {
    background: rgba(44, 44, 46, 0.78);
    border-color: rgba(255, 255, 255, 0.13);
    color: #F5F5F7;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .lightbox-print-availability:hover {
    background: rgba(58, 58, 60, 0.9);
    border-color: rgba(255, 255, 255, 0.24);
}

/* Mobile: panel slides up from bottom, narrow vertical list */
@media (max-width: 768px) {
    .lightbox-info-btn {
        right: 68px;
        width: 40px;
        height: 40px;
    }
    .lightbox-exif-panel {
        top: auto;
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
        max-height: 50vh;
        transform: translate(0, calc(100% + 40px));
        padding: 16px 18px;
    }
    .lightbox-exif-panel.visible {
        transform: translate(0, 0);
    }
    .lightbox-print-availability {
        bottom: 90px;
        min-height: 32px;
        padding: 0 13px;
        font-size: 12px;
    }
}

@media (max-height: 620px) {
    .lightbox-print-availability {
        bottom: 74px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lightbox-print-availability {
        transition: none;
    }
}

/* Gesture hints: swipe-down-to-close translates the image, pinch scales it. */
.lightbox-content {
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    touch-action: none;   /* JS handles all gestures — prevents browser zoom fighting */
    will-change: transform;
}
.lightbox.is-gesturing .lightbox-content {
    transition: none;
}
.lightbox.is-closing .lightbox-content {
    transition: transform 0.28s cubic-bezier(0.5, 0, 0.75, 0), opacity 0.28s ease;
    opacity: 0;
}
/* Fade the whole backdrop as user swipes down — JS sets --swipe-progress. */
.lightbox.is-gesturing {
    background-color: rgba(255, 255, 255, calc(0.88 - var(--swipe-progress, 0) * 0.7));
    backdrop-filter: blur(calc(40px - var(--swipe-progress, 0) * 30px));
}
html[data-theme="dark"] .lightbox {
    background: rgba(0, 0, 0, 0.92);
}
html[data-theme="dark"] .lightbox.is-gesturing {
    background-color: rgba(0, 0, 0, calc(0.92 - var(--swipe-progress, 0) * 0.7));
}

/* Hide the bottom focal/aperture overlay while the full panel is open
   to avoid overlap on mobile. */
.lightbox.panel-open .exif-overlay {
    opacity: 0 !important;
}

/* ── Journal editorial cards ──────────────────────────────────── */
.journal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: clamp(30px, 4.5vw, 58px) !important;
    margin-top: clamp(42px, 5vw, 66px) !important;
    align-items: start !important;
}

.journal-card {
    display: grid !important;
    grid-template-rows: auto 1fr !important;
    gap: 20px !important;
    overflow: visible !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: inherit !important;
    text-decoration: none !important;
    transform: none !important;
}

.journal-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

.journal-header {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1.18 / 1 !important;
    overflow: hidden !important;
    border-radius: 14px !important;
    background: rgba(29, 29, 31, 0.05) !important;
    box-shadow: 0 18px 45px rgba(29, 29, 31, 0.08) !important;
    position: relative !important;
}

.journal-header::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.08));
    opacity: 0.26;
    transition: opacity 0.35s ease;
}

.journal-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transform: scale(1.015) !important;
    filter: saturate(1.03) contrast(1.02) !important;
    transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease !important;
    will-change: auto !important;
}

.journal-card:hover .journal-img {
    transform: scale(1.05) !important;
    filter: saturate(1.05) contrast(1.03) !important;
}

.journal-card:hover .journal-header::after {
    opacity: 0.16;
}

.journal-body {
    padding: 0 2px !important;
    display: block !important;
}

.journal-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.journal-meta .journal-tag,
.journal-date {
    margin: 0 !important;
    color: currentColor !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    letter-spacing: inherit !important;
}

.journal-date::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 10px 2px 0;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.5;
}

.journal-card-title {
    margin: 0 0 12px !important;
    max-width: 12ch;
    color: var(--text-primary) !important;
    font-size: clamp(30px, 3.5vw, 42px) !important;
    font-weight: 650 !important;
    line-height: 1.04 !important;
    letter-spacing: -0.045em !important;
}

.journal-excerpt {
    max-width: 37rem;
    margin: 0 0 18px !important;
    color: var(--text-secondary) !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
}

.journal-footer {
    display: contents !important;
    border-top: 0 !important;
    padding-top: 0 !important;
}

.journal-read-more {
    display: inline-flex !important;
    align-items: center !important;
    width: fit-content;
    gap: 7px !important;
    color: var(--text-primary) !important;
    border-bottom: 0 !important;
    padding-bottom: 0;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    transition: opacity 0.2s ease !important;
}

.journal-read-more svg {
    width: 13px;
    height: 13px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.journal-card:hover .journal-read-more {
    transform: none !important;
    opacity: 0.82;
}

.journal-card:hover .journal-read-more svg {
    transform: translateX(3px);
}

html[data-theme="dark"] .journal-card {
    background: transparent !important;
    background-image: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .journal-header {
    background: rgba(245, 245, 247, 0.06) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .journal-header::after {
    background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(0,0,0,0.18));
    opacity: 0.22;
}

html[data-theme="dark"] .journal-read-more {
    border-bottom: 0 !important;
}

html[data-theme="dark"] .journal-card:hover .journal-read-more {
    border-bottom: 0 !important;
}

@media (max-width: 900px) {
    .journal-grid {
        grid-template-columns: 1fr !important;
        gap: 42px !important;
        margin-top: 38px !important;
    }

    .journal-header {
        aspect-ratio: 16 / 10 !important;
    }

    .journal-card-title {
        max-width: 14ch;
        font-size: clamp(28px, 8vw, 36px) !important;
    }
}

@media (max-width: 480px) {
    .journal-grid {
        gap: 36px !important;
        margin-top: 30px !important;
    }

    .journal-header {
        aspect-ratio: 4 / 3 !important;
        border-radius: 12px !important;
    }

    .journal-card {
        gap: 16px !important;
    }

    .journal-card-title {
        font-size: 28px !important;
        line-height: 1.08 !important;
    }

    .journal-excerpt {
        font-size: 14px !important;
        line-height: 1.62 !important;
        margin-bottom: 15px !important;
    }

    .journal-meta {
        margin-bottom: 10px;
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .journal-img,
    .journal-header::after,
    .journal-read-more,
    .journal-read-more svg {
        transition: none !important;
    }

    .journal-card:hover .journal-img {
        transform: scale(1.015) !important;
    }

    .journal-card:hover .journal-read-more svg {
        transform: none !important;
    }
}
