/* ============================================
   A2TintasTattoo - Common Styles
   ============================================ */

@font-face {
    font-family: 'Excellent Display';
    src: url('../assets/fonts/Excellent Display Font Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Old London';
    src: url('../assets/fonts/OldLondon.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Museo 500';
    src: url('../assets/fonts/museo-500.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #141414;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #555555;
    --accent: #d4af37;
    /* Gold accent */
    --accent-hover: #e5c453;

    /* Corporate Secondary/Tertiary Colors (Burgundy) */
    --accent-tertiary: #9b2743;
    /* Original */
    --accent-tertiary-sat: #aa183c;
    /* +25% Saturation */
    --accent-tertiary-desat: #8f3349;
    /* -25% Desaturation */

    --font-script: 'Excellent Display', 'Old London', sans-serif;
    --font-heading: 'Museo 500', serif;
    --font-body: 'Museo 500', sans-serif;

    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;

    /* == MOBILE SAFE AREAS == */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);

    /* == DYNAMIC VIEWPORT HEIGHT == */
    /* Fallback for browsers not supporting dvh */
    --vh: 1vh;
    --real-height: calc(var(--vh, 1vh) * 100);
}

/* Fix 100vh on mobile browsers (address bar issue) */
/* Use svh for stable height — won't shift when mobile address bar hides */
@supports (height: 100svh) {
    :root {
        --real-height: 100svh;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Remove tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
}

/* Prevent horizontal overflow on main containers only (not all elements) */
html,
body {
    overflow-x: hidden;
}

/* ============================================
   ADAPTIVE PERFORMANCE SYSTEM
   Classes applied by performance-monitor.js:
   - perf-full:    ≥45 FPS - All effects
   - perf-reduced: 30-44 FPS - No blur, reduced particles
   - perf-minimal: <30 FPS - Minimal effects
   ============================================ */

/* REDUCED MODE: Disable expensive blur effects */
body.perf-reduced .modal-overlay,
body.perf-reduced .main-navbar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(0, 0, 0, 0.92) !important;
}

body.perf-reduced .branch-card__glow {
    display: none;
}

/* MINIMAL MODE: Survival mode - smooth scroll guaranteed */
body.perf-minimal .modal-overlay,
body.perf-minimal .main-navbar,
body.perf-minimal .gallery-card__view {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(0, 0, 0, 0.95) !important;
}

body.perf-minimal .branch-card__glow,
body.perf-minimal .branch-card__overlay {
    display: none !important;
}

body.perf-minimal * {
    box-shadow: none !important;
    text-shadow: none !important;
}

/* ============================================
   UTILITIES
   ============================================ */

/* 
   no-scroll: Prevents scrolling during intro animation.
   Uses overflow: clip on html (no scrollbar shift) + 
   position: fixed on body (prevents mobile bounce/scroll).
   The scrollbar space is always reserved via overflow-y on html
   when not in no-scroll mode, so removing the class causes no jump.
*/
html.no-scroll {
    overflow: hidden !important; /* Fallback: Safari <16, Chrome <90 */
    overflow: clip !important;
}

body.no-scroll {
    overflow: hidden !important;
    overscroll-behavior: none !important;
    -ms-scroll-chaining: none !important; /* IE/Edge legacy */
    touch-action: none !important;
    -ms-touch-action: none !important;
}

/* Always show scrollbar gutter to prevent layout shift */
html {
    overflow-y: auto;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    /* Hide native scrollbar completely — replaced by custom overlay */
    scrollbar-width: none;           /* Firefox */
    -ms-overflow-style: none;        /* IE/old Edge */
}

body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* ============================================
   HIDE NATIVE SCROLLBAR — Custom overlay replaces it
   ============================================ */

/* Webkit (Chrome, Safari, Edge) - hide only root/native page scrollbar */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
    background: transparent;
}

/* ============================================
   CUSTOM OVERLAY SCROLLBAR (injected by JS)
   ============================================ */

.a2-scrollbar {
    position: fixed;
    top: 0;
    right: 0;
    width: 6px;
    height: 100vh;
    height: 100dvh;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.a2-scrollbar.visible {
    opacity: 1;
    pointer-events: auto;
}

.a2-scrollbar__thumb {
    position: absolute;
    right: 0;
    width: 6px;
    min-height: 30px;
    background: rgba(170, 24, 60, 0.5);
    border-radius: 10px;
    transition: background 0.2s ease, width 0.2s ease;
    cursor: grab;
}

.a2-scrollbar__thumb:hover,
.a2-scrollbar__thumb.dragging {
    background: rgba(170, 24, 60, 0.8);
    width: 8px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    background-image: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('../assets/concrete-wall-texture.jpg');
    /* Default: scroll (CPU-friendly) - upgraded to fixed for capable devices */
    background-attachment: scroll;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    /* Safe area top only - sides handled by individual containers */
    padding-top: var(--safe-top);
    /* Deep Rendering Standardization */
    -webkit-font-smoothing: antialiased;
    /* Mac/iOS: Thinner text */
    -moz-osx-font-smoothing: grayscale;
    /* Firefox Mac */
    text-rendering: optimizeLegibility;
    /* Page transition */
    animation: pageEnter 0.4s ease both;
}

body.page-exit {
    animation: pageExit 0.3s ease both;
}

@keyframes pageEnter {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes pageExit {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* ============================================
   DEEP RENDERING STANDARDIZATION
   ============================================ */

/* 1. Brand Identity in Selection */
::selection {
    background: var(--accent-tertiary-sat);
    color: #ffffff;
}

/* 2. Standardized Focus States (Accessibility + Aesthetic) */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* 3. Aggressive Form Normalization (Kill iOS Native Styles) */
input,
button,
textarea,
select {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
    box-shadow: none;
}

/* Only use fixed background on capable devices */
/* background-attachment: fixed REMOVED — it forces full-page
   repaint every frame, killing GPU compositing and causing freeze.
   The texture is barely visible under the 85 % dark overlay anyway. */

/* Cinematic Vignette Overlay - Disabled on low-power devices */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 900;
    /* Above content, below modal/navbar */
    background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.4) 100%);
    opacity: 0.8;
}

/* Kill vignette on struggling devices */
body.perf-minimal::after {
    display: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   SECTION SEPARATOR
   ============================================ */
/* ============================================
   SECTION SEPARATOR
   ============================================ */
.section-separator {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    /* No vertical space */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 0px;
    /* Zero height in flow */
    overflow: visible;
    z-index: 10;
}

/* Tapered Line Design */
.section-separator::after {
    content: '';
    position: absolute;
    /* Absolute positioning to float */
    top: 50%;
    left: 0;
    width: 100%;
    height: 6px;
    /* Visual height increased */
    background: radial-gradient(ellipse at center,
            var(--accent-tertiary-sat) 20%,
            rgba(170, 24, 60, 0) 90%);
    /* Extended gradient stops */
    border-radius: 50%;
    transform: translateY(-50%) scaleX(0) scaleY(1.8);
    /* Center, start collapsed, scale heavily for thickness */
    transform-origin: center;
    opacity: 0.95;
    /* Slightly more opaque */
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-separator.in-view::after {
    transform: translateY(-50%) scaleX(1) scaleY(1.8);
}

/* Legacy SVG support removed/hidden just in case */
.separator-svg {
    display: none;
}

@media screen and (max-width: 600px) {
    .section-separator {
        margin: 0 auto;
        /* Maintain zero margin */
        padding: 0 2rem;
    }
}

/* ============================================
   SECTION COMMON STYLES
   ============================================ */

section {
    padding: 8rem 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem; /* Fallback */
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    text-align: center;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children: script appears first, main follows */
.section-title .title-script {
    display: block;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-title .title-main {
    display: block;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.12s,
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.12s;
}

.section-title.in-view .title-script,
.section-title.in-view .title-main {
    opacity: 1;
    transform: translateY(0);
}

/* Fallback for titles without children — works in all browsers.
   The .section-title already inherits opacity:0/translateY(20px) from above,
   and .in-view already triggers the reveal. This covers browsers without :has(). */
@supports selector(:has(*)) {
    .section-title:not(:has(.title-script)) {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .section-title.in-view:not(:has(.title-script)) {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 4rem;
    font-weight: 300;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s,
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

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

/* ============================================
   FOOTER STYLES
   ============================================ */

.site-footer {
    background-color: #050505;
    color: #fff;
    padding: 6rem 2rem 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4rem;
    margin-bottom: 5rem;
}
/* Flex-gap fallback: Safari <14.1, Chrome <84 */
.footer-content > * { margin-bottom: 2rem; }
@supports (gap: 1px) { .footer-content > * { margin-bottom: 0; } }

.footer-brand {
    flex: 1;
    min-width: 250px;
}

/* Logo */
.footer-logo {
    font-family: 'Excellent Display', sans-serif !important;
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #fff;
    line-height: 1;
}

.footer-tagline {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Links */
.footer-links,
.footer-location {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-heading {
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.social-nav {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
/* Flex-gap fallback */
.social-nav > * + * { margin-top: 1.2rem; }
@supports (gap: 1px) { .social-nav > * + * { margin-top: 0; } }

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.social-link:not(.studio-link)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text-secondary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-link:not(.studio-link):hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.studio-link {
    font-family: var(--font-heading);
    font-weight: 600;
    color: #fff;
    font-size: 1.1rem;
    position: relative;
    display: inline-block;
}

.studio-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-tertiary-sat);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.studio-link:hover {
    color: var(--accent-tertiary-sat);
}

.artists-grid {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}
/* Flex-gap fallback */
.artists-grid > * + * { margin-left: 1.5rem; }
@supports (gap: 1px) { .artists-grid > * + * { margin-left: 0; } }

.artist-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    position: relative;
    display: inline-block;
    transition: color 0.3s ease, transform 0.3s ease;
}

.artist-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.artist-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.artist-link:hover {
    color: #fff;
    transform: translateY(-2px);
}

/* Contact Button */
.footer-action {
    flex: 0 0 auto;
}

/* Unified Premium Button Style */
.footer-btn,
.modal-submit-btn,
.nav-link--contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 28px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    line-height: normal;
    /* Ensure consistent height */
}
/* Flex-gap fallback for buttons */
.footer-btn > * + *,
.modal-submit-btn > * + *,
.nav-link--contact > * + * { margin-left: 12px; }
@supports (gap: 1px) {
    .footer-btn > * + *,
    .modal-submit-btn > * + *,
    .nav-link--contact > * + * { margin-left: 0; }
}

/* Specific override for Modal Submit (Fill background) */
.modal-submit-btn {
    background: var(--accent-tertiary-sat);
    border: none;
    width: 100%;
}

.footer-btn::before,
.modal-submit-btn::before,
.nav-link--contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 0;
}

.footer-btn:hover,
.modal-submit-btn:hover,
.nav-link--contact:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border-color: var(--accent-tertiary-sat);
    box-shadow: 0 0 20px rgba(170, 24, 60, 0.3);
    transform: translateY(-2px);
}

.footer-btn:hover::before,
.modal-submit-btn:hover::before,
.nav-link--contact:hover::before {
    left: 100%;
}

/* Navbar specific adjustments to override specific link styles */
.nav-link.nav-link--contact {
    margin-left: 1rem;
    /* spacing from other links */
    padding: 10px 24px;
    /* Slightly smaller for navbar if needed, or keep same */
    font-size: 0.75rem;
    /* slightly smaller font for navbar context */
}

.footer-action {
    flex: 0 0 auto;
}

/* ============================================
   PERFORMANCE TOGGLE SWITCH
   ============================================ */

.footer-perf-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 2rem;
}
/* Flex-gap fallback */
.footer-perf-toggle > * + * { margin-left: 1rem; }
@supports (gap: 1px) { .footer-perf-toggle > * + * { margin-left: 0; } }

/* Toggles row: stacks on mobile */
.footer-toggles-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 2rem;
    padding: 1.2rem 0 0.5rem;
}
/* Flex-gap fallback */
.footer-toggles-row > * + * { margin-left: 2.5rem; }
@supports (gap: 1px) { .footer-toggles-row > * + * { margin-left: 0; } }

.footer-toggles-row .footer-perf-toggle {
    border-top: none;
    margin-top: 0;
    padding: 0.5rem 0;
}

/* Intro toggle label states (JS-driven via updateIntroLabels) */
.intro-label--off {
    opacity: 1;
    color: var(--text-secondary);
}

.intro-label--on {
    opacity: 0.5;
}

/* ============================================
   FOOTER RESPONSIVE (MOBILE-FIRST COMPACT)
   ============================================ */
@media screen and (max-width: 900px) {
    .site-footer {
        padding: 2.5rem 1.2rem 1.2rem;
    }

    .footer-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.8rem 1.4rem;
        margin-bottom: 1.6rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .footer-links,
    .footer-location {
        min-width: 0;
        width: auto;
    }

    .footer-action {
        grid-column: 1 / -1;
        text-align: center;
        min-width: 0;
        width: auto;
    }

    .footer-logo {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .footer-tagline {
        font-size: 0.74rem;
    }

    .footer-seo-text {
        display: none;
    }

    .footer-heading {
        margin-bottom: 0.7rem;
        font-size: 0.7rem;
    }

    .social-nav {
        gap: 0.6rem;
    }

    .studio-link {
        font-size: 0.92rem;
    }

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

    .artist-link {
        font-size: 0.85rem;
    }

    .footer-location address p {
        font-size: 0.85rem !important;
        margin-top: 0.3rem !important;
        line-height: 1.5;
    }

    .footer-btn {
        width: auto;
        min-width: 180px;
        max-width: 240px;
        margin: 0 auto;
        padding: 11px 18px;
        font-size: 0.72rem;
        letter-spacing: 1.2px;
    }

    .footer-action p {
        font-size: 0.72rem !important;
        margin-top: 6px !important;
    }

    .footer-seo-nav {
        padding: 0.7rem 0 !important;
    }

    .footer-seo-nav a {
        display: inline-block;
        margin: 0.1rem 0.4rem !important;
        font-size: 0.65rem !important;
        letter-spacing: 0.5px !important;
    }

    .footer-toggles-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .footer-perf-toggle {
        margin-top: 0.8rem;
        padding: 0.8rem 0;
        gap: 0.6rem;
        flex-wrap: nowrap;
    }

    .footer-bottom p {
        text-align: center;
        font-size: 0.76rem;
        line-height: 1.35;
    }
}

@media screen and (max-width: 480px) {
    .site-footer {
        padding: 2rem 1rem 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.4rem;
        margin-bottom: 1.2rem;
    }

    .footer-brand,
    .footer-links,
    .footer-location,
    .footer-action {
        text-align: center;
        align-items: center;
    }

    .footer-logo {
        font-size: 1.8rem;
    }

    .footer-tagline {
        font-size: 0.7rem;
    }

    .footer-perf-toggle {
        gap: 0.45rem;
    }

    .perf-label {
        font-size: 0.6rem;
        letter-spacing: 0.1em;
    }

    .perf-switch {
        width: 44px;
        height: 24px;
    }

    .perf-switch__slider::before {
        width: 16px;
        height: 16px;
    }

    .perf-switch__input:checked+.perf-switch__slider::before {
        transform: translateX(20px);
    }
}

.perf-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    transition: color 0.3s ease, opacity 0.3s ease;
    -webkit-user-select: none; /* Safari <17 */
    user-select: none;
}

/* Active label highlight based on toggle state */
.perf-label--performance {
    opacity: 1;
    color: var(--text-secondary);
}

.perf-label--quality {
    opacity: 0.5;
}

/* When toggle is checked (quality mode), flip label states */
.perf-switch__input:checked~.perf-label--performance,
body.perf-full .perf-label--performance {
    opacity: 0.5;
    color: var(--text-muted);
}

body.perf-full .perf-label--quality {
    opacity: 1;
    color: var(--text-secondary);
}

/* The switch container */
.perf-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

/* Hide default checkbox */
.perf-switch__input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

/* Slider track */
.perf-switch__slider {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    transition: all 0.3s ease;
}

/* Slider knob */
.perf-switch__slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Checked state (Quality/Animations mode) */
.perf-switch__input:checked+.perf-switch__slider {
    background: var(--accent-tertiary-sat);
    border-color: var(--accent-tertiary-sat);
}

.perf-switch__input:checked+.perf-switch__slider::before {
    transform: translateX(24px);
    background: #fff;
}

/* Hover effect */
.perf-switch:hover .perf-switch__slider {
    border-color: rgba(255, 255, 255, 0.4);
}

.perf-switch:hover .perf-switch__slider::before {
    transform: scale(1.1);
}

.perf-switch__input:checked+.perf-switch__slider:hover::before {
    transform: translateX(24px) scale(1.1);
}

/* Focus state for accessibility */
.perf-switch__input:focus-visible+.perf-switch__slider {
    outline: 2px solid var(--accent-tertiary-sat);
    outline-offset: 2px;
}

/* Small variant for video toggle */
.perf-switch--small {
    width: 36px !important;
    height: 20px !important;
}

.perf-switch--small .perf-switch__slider {
    border-radius: 20px;
}

.perf-switch--small .perf-switch__slider::before {
    width: 14px;
    height: 14px;
    left: 2px;
    bottom: 2px;
}

.perf-switch--small .perf-switch__input:checked+.perf-switch__slider::before {
    transform: translateX(16px);
}

/* ============================================
   SKIP LINK (Accessibility)
   Ensure the "Saltar al contenido" link is visually hidden
   by default and becomes visible only when focused.
   This prevents it from appearing in the top-left corner
   on pages that don't include page-specific rules.
   ============================================ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: var(--accent-tertiary-sat);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0 0 8px 8px;
    z-index: 100001;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* ============================================
   CONTENT-VISIBILITY: Auto-render below-fold
   Mejora INP y Render Performance
   ============================================ */
.seo-content,
.values-section,
.gallery-section,
.team-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}
        