/* ===== EXEMPLARY FILMS - MOBILE-FIRST RESPONSIVE REDESIGN ===== */
/* Professional Film Discovery Platform - Yellow/Orange Brand */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================================
   HEADER + NAV (BEM classes matching templates/layouts/header.php)
   ============================================================ */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #f59e0b;
    color: #0b0d12;
    padding: 0.5rem 1rem;
    font-weight: 700;
    z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Global keyboard-focus indicator (WCAG 2.4.7). Bare :focus-visible is low-specificity, so
   component focus styles still win; this is the fallback for controls that lack their own.
   Amber reads on the dark theme; the dark halo guarantees visibility on light cards too. */
:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.55);
}

/* Visually hidden, still exposed to assistive tech — for section headings that keep the
   document outline correct (no skipped levels) without changing the visual design. */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 13, 18, 0.85);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid rgba(245, 158, 11, 0.18);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .site-header__inner { padding: 1rem 1.5rem; }
}

/* Brand */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: #fff;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    line-height: 1;
}

.brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 50%, #fb7c2c 100%);
    color: #0b0d12;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.brand__wordmark {
    display: inline-flex;
    align-items: baseline;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
}

@media (min-width: 640px) {
    .brand__wordmark { font-size: 1.25rem; }
}

.brand__word { color: #fff; }
.brand__word--accent {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 0.15em;
}

.brand--small .brand__wordmark { font-size: 1.0625rem; }

/* Desktop nav */
.site-nav { display: none; }

@media (min-width: 880px) {
    .site-nav { display: block; }
}

.site-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.75rem;
    align-items: center;
}

.site-nav__link {
    display: inline-block;
    padding: 0.5rem 0;
    color: #d1d5db;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    position: relative;
    transition: color 0.2s ease;
}

.site-nav__link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
    color: #f59e0b;
}

.site-nav__link:hover::after,
.site-nav__link:focus-visible::after,
.site-nav__link.is-active::after {
    transform: scaleX(1);
}

.site-nav__link.is-active { color: #f59e0b; }

/* Hamburger button */
.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-toggle:hover { border-color: #f59e0b; background: rgba(245, 158, 11, 0.06); }

.nav-toggle__bar {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: #f59e0b;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: #f59e0b;
}

@media (min-width: 880px) {
    .nav-toggle { display: none; }
}

/* Mobile nav panel */
.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 150;
    pointer-events: none;
    background: rgba(0, 0, 0, 0);
    transition: background 0.25s ease;
}

.mobile-nav.is-open {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.55);
}

.mobile-nav .mobile-nav__panel,
.mobile-nav__panel {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    width: min(86vw, 340px) !important;
    background: #0f1117 !important;
    background-color: #0f1117 !important;
    background-image: linear-gradient(180deg, #14171f 0%, #0b0d12 100%) !important;
    border-left: 1px solid rgba(245, 158, 11, 0.18);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    visibility: hidden; /* S3: keep the closed off-canvas menu out of the tab order / a11y tree at every viewport */
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0.3s;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    z-index: 160 !important;
    opacity: 1 !important;
}

/* Also force the backdrop to be visible when open — in case JS isn't adding .is-open */
.mobile-nav[aria-hidden="false"] {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.55);
}
.mobile-nav[aria-hidden="false"] .mobile-nav__panel {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
}

.mobile-nav.is-open .mobile-nav__panel { transform: translateX(0); visibility: visible; transition-delay: 0s; }

.mobile-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(245, 158, 11, 0.12);
}

.mobile-nav__close {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #d1d5db;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}
.mobile-nav__close:hover { color: #f59e0b; background: rgba(245, 158, 11, 0.08); }

.mobile-nav__list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    flex: 1;
}

.mobile-nav__link {
    display: block;
    padding: 1rem 1.5rem;
    color: #e5e7eb;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1.0625rem;
    border-left: 3px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mobile-nav__link:hover,
.mobile-nav__link.is-active {
    background: rgba(245, 158, 11, 0.07);
    color: #f59e0b;
    border-left-color: #f59e0b;
}

.mobile-nav__footer {
    padding: 1.25rem;
    border-top: 1px solid rgba(245, 158, 11, 0.12);
}

.btn--block { display: flex; width: 100%; }

/* Lock body scroll when mobile nav is open */
body.nav-open { overflow: hidden; }



:root {
    /* Brand Colors - Yellow/Orange Palette */
    --color-primary: #f59e0b;
    --color-primary-hover: #d97706;
    --color-secondary: #f97316;
    --color-accent: #fb923c;
    
    /* Gradient Magic */
    --color-gradient: linear-gradient(135deg, #f59e0b 0%, #f97316 50%, #fb7c2c 100%);
    --color-gradient-dark: linear-gradient(135deg, #d97706 0%, #ea580c 50%, #dc2626 100%);
    
    /* Dark Cinema Theme */
    --color-dark: #0f0f0f;
    --color-dark-lighter: #1a1a1a;
    --color-dark-card: #262626;
    
    /* Text Colors */
    --color-text: #ffffff;
    --color-text-muted: #d1d5db;
    --color-text-light: #9ca3af;
    --color-text-dark: #111827;
    
    /* Backgrounds */
    --color-bg: #0f0f0f;
    --color-bg-alt: #1a1a1a;
    --color-bg-card: #262626;
    --color-bg-light: #ffffff;
    
    /* Borders & Shadows */
    --color-border: #374151;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.3);
    
    /* Sizing */
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    
    /* Responsive Spacing */
    --container-max-width: 1200px;
    --section-padding-mobile: 3rem 0;
    --section-padding-desktop: 5rem 0;
}

/* ===== GLOBAL RESET & TYPOGRAPHY ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 16px;
}

/* Mobile-First Typography */
h1 { font-size: 2rem; font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; margin-bottom: 0.75rem; }
h4 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; font-size: 1rem; }

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Desktop Typography Scaling */
@media (min-width: 768px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
    .lead { font-size: 1.25rem; line-height: 1.7; }
}

/* ===== LAYOUT COMPONENTS ===== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container { padding: 0 1.5rem; }
}

.section {
    padding: var(--section-padding-mobile);
}

.section.bg-white {
    background: #ffffff;
    color: var(--color-text-dark);
}

.section.bg-gray {
    background: #f8fafc;
    color: var(--color-text-dark);
}

.section.bg-gradient {
    background: var(--color-gradient);
    color: #111827; /* WCAG AA: dark label on the amber gradient ≈ 7–9:1 (was white ≈ 2.2:1). 2026-09-08, Damian-delegated brand call. */
}

@media (min-width: 768px) {
    .section { padding: var(--section-padding-desktop); }
}

/* ===== RESPONSIVE HEADER & NAVIGATION ===== */
.header {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    min-height: 60px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--color-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .logo { font-size: 1.75rem; }
}

.nav-menu {
    display: none;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

@media (min-width: 768px) {
    .nav-menu { 
        display: flex; 
        gap: 2rem;
    }
}

.nav-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.3s ease;
    position: relative;
}

@media (min-width: 768px) {
    .nav-link { font-size: 1rem; }
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle - Hamburger Button */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
    z-index: 102;
    position: relative;
}

@media (min-width: 768px) {
    .mobile-menu-toggle { display: none; }
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: var(--color-primary);
}

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

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    background: var(--color-primary);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 98;
}

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

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100%;
    background: var(--color-bg);
    border-left: 1px solid var(--color-border);
    transition: right 0.3s ease;
    z-index: 101;
    box-shadow: var(--shadow-xl);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-alt);
}

.mobile-logo {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--color-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.3s ease;
}

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

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

.mobile-nav-list li {
    border-bottom: 1px solid rgba(245, 158, 11, 0.1);
}

.mobile-nav-link {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    min-height: 44px; /* Touch-friendly */
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--color-primary);
    background: rgba(245, 158, 11, 0.05);
    padding-left: 2rem;
}

@media (min-width: 768px) {
    .mobile-menu,
    .mobile-menu-overlay {
        display: none;
    }
}

/* ===== HERO SECTION ===== */
.hero {
    background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.1) 0%, transparent 70%),
                linear-gradient(180deg, var(--color-bg) 0%, var(--color-dark-lighter) 100%);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero { padding: 8rem 0; }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
                      radial-gradient(circle at 75% 75%, rgba(249, 115, 22, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    background: var(--color-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
}

@media (min-width: 768px) {
    .hero h1 { 
        font-size: 4rem; 
        margin-bottom: 2rem; 
    }
}

.hero .lead {
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .hero .lead { 
        font-size: 1.5rem; 
        margin-bottom: 3rem; 
    }
}

/* ===== RESPONSIVE STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
        margin: 3rem 0;
        padding: 3rem;
        border-radius: var(--border-radius-xl);
    }
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

@media (min-width: 640px) {
    .stat-item { padding: 1.5rem; }
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    background: var(--color-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .stat-number { font-size: 3rem; }
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (min-width: 640px) {
    .stat-label { font-size: 0.875rem; }
}

/* ===== RESPONSIVE BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    gap: 0.5rem;
    white-space: nowrap;
    min-height: 44px; /* Touch-friendly minimum */
}

@media (min-width: 640px) {
    .btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

.btn-primary {
    background: var(--color-gradient);
    color: #111827; /* WCAG AA: dark label on the amber gradient ≈ 7–9:1 (was white ≈ 2.2:1). 2026-09-08, Damian-delegated brand call. */
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-muted);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

@media (min-width: 640px) {
    .btn-lg {
        padding: 1.25rem 3rem;
        font-size: 1.125rem;
    }
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 640px) {
    .btn-group {
        flex-direction: row;
        justify-content: center;
    }
}

/* ===== RESPONSIVE FILM POSTER GRID ===== */
.film-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

@media (min-width: 480px) {
    .film-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .film-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .film-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

.film-card {
    background: var(--color-bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(245, 158, 11, 0.1);
    position: relative;
    cursor: pointer;
}

.film-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary);
}

@media (min-width: 768px) {
    .film-card:hover {
        transform: translateY(-8px) scale(1.02);
    }
}

.film-poster {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

@media (min-width: 480px) {
    .film-poster { height: 300px; }
}

@media (min-width: 768px) {
    .film-poster { height: 375px; }
}

@media (min-width: 1024px) {
    .film-poster { height: 400px; }
}

.film-card-content {
    padding: 1rem;
}

@media (min-width: 640px) {
    .film-card-content { padding: 1.5rem; }
}

.film-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 640px) {
    .film-title { font-size: 1.125rem; }
}

@media (min-width: 768px) {
    .film-title { font-size: 1.25rem; }
}

.film-year {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

@media (min-width: 640px) {
    .film-year { 
        font-size: 0.875rem; 
        margin-bottom: 1rem; 
    }
}

.film-score {
    display: inline-flex;
    align-items: center;
    background: var(--color-gradient);
    color: #111827; /* WCAG AA: dark label on the amber gradient ≈ 7–9:1 (was white ≈ 2.2:1). 2026-09-08, Damian-delegated brand call. */
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.25rem;
}

@media (min-width: 640px) {
    .film-score {
        padding: 0.25rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* ===== RESPONSIVE SEARCH & FILTERS ===== */
.search-section {
    background: var(--color-bg-alt);
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
}

@media (min-width: 768px) {
    .search-section { padding: 3rem 0; }
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.search-form {
    position: relative;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .search-form { margin-bottom: 2rem; }
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
    background: var(--color-bg-card);
    border: 2px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--border-radius-lg);
    color: var(--color-text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

@media (min-width: 640px) {
    .search-input {
        padding: 1rem 1.5rem 1rem 3rem;
        font-size: 1.125rem;
    }
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 1rem;
}

@media (min-width: 640px) {
    .search-icon {
        left: 1rem;
        font-size: 1.25rem;
    }
}

.filters {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (min-width: 640px) {
    .filters { gap: 1rem; }
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    min-height: 44px; /* Touch-friendly */
}

@media (min-width: 640px) {
    .filter-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-gradient);
    color: #111827; /* WCAG AA: dark label on the amber gradient ≈ 7–9:1 (was white ≈ 2.2:1). 2026-09-08, Damian-delegated brand call. */
    border-color: transparent;
}

/* ===== CARD GRID & COMPONENTS ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .card-grid {
        gap: 2rem;
        margin: 3rem 0;
    }
}

.card {
    background: white;
    color: var(--color-text-dark); /* fix: cards have a white bg by default, so the inherited body color (white) was rendering white-on-white in plain .section (no bg-modifier) contexts. About.php had 15 invisible h3s for this reason. */
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

/* WCAG AA (2026-09-11): the dark-theme text tokens (light grays) are illegible on the site's
   LIGHT surfaces — measured 1.47:1 (#d1d5db) and 2.54:1 (#9ca3af) on white. Remap them to dark
   equivalents wherever the background is light. Both tokens are text-only (never a background),
   so a scoped remap is safe and fixes every inline color:var(--color-text-*) at once. */
.card,
.section.bg-white,
.section.bg-gray {
    --color-text-muted: #374151; /* was #d1d5db → ~9:1 on white */
    --color-text-light: #4b5563; /* was #9ca3af → ~6.6:1 on white */
}
/* The amber gradient band is mid-luminance, so its muted text must be darker still. */
.section.bg-gradient {
    --color-text-muted: #1f2937; /* ~6:1 on the lightest amber stop */
    --color-text-light: #1f2937;
}
/* Exception: a card deliberately re-darkened (inline --color-bg-card) keeps the light tokens
   (higher specificity than the .card rule above, so it wins regardless of order). */
.card[style*="bg-card"] {
    --color-text-muted: #d1d5db;
    --color-text-light: #9ca3af;
}

.section.bg-white .card {
    background: white;
    color: var(--color-text-dark);
}

.section.bg-gray .card {
    background: white;
    color: var(--color-text-dark);
}

.section.bg-gradient .card {
    background: rgba(255, 255, 255, 0.14);
    color: #111827; /* WCAG AA: dark text on the frosted-amber card (was white ≈ 2:1). 2026-09-08. */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.card h3 {
    color: inherit;
    margin-bottom: 1rem;
}

.card p {
    color: inherit;
    opacity: 0.8;
    line-height: 1.6;
}

/* ===== RESPONSIVE UTILITIES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.hidden-mobile { display: none; }
.visible-mobile { display: block; }

@media (min-width: 768px) {
    .hidden-mobile { display: block; }
    .visible-mobile { display: none; }
    .hidden-desktop { display: none; }
    .visible-desktop { display: block; }
}

/* ===== ANIMATIONS ===== */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(245, 158, 11, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE FOOTER ===== */
.footer {
    background: var(--color-dark);
    border-top: 1px solid var(--color-border);
    padding: 2rem 0 1.5rem;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .footer {
        padding: 3rem 0 2rem;
        margin-top: 5rem;
    }
}

.footer-content {
    text-align: center;
    color: var(--color-text-muted);
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--color-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .footer-logo { font-size: 1.5rem; }
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

@media (min-width: 640px) {
    .footer-links {
        gap: 2rem;
        margin-bottom: 2rem;
    }
}

.footer-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .footer-link { font-size: 1rem; }
}

.footer-link:hover {
    color: var(--color-primary);
}

.footer-copyright {
    font-size: 0.75rem;
    opacity: 0.7;
}

@media (min-width: 640px) {
    .footer-copyright { font-size: 0.875rem; }
}

/* ===== HIGH-CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    :root {
        --color-bg: #000000;
        --color-bg-card: #1a1a1a;
        --color-text: #ffffff;
        --color-border: #666666;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto !important; } /* m8: don't animate scroll for reduced-motion users */
}

/* ===== DARK MODE SUPPORT (if toggled) ===== */
@media (prefers-color-scheme: light) {
    .light-mode {
        --color-bg: #ffffff;
        --color-bg-alt: #f8fafc;
        --color-bg-card: #ffffff;
        --color-text: #1f2937;
        --color-text-muted: #6b7280;
        --color-border: #e5e7eb;
    }
}

/* ===== SITE FOOTER (restored 2026-09-04 — footer.php's BEM classes were missing from main.css) ===== */
.site-footer {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-light);
    margin-top: 5rem;
    padding: 3.5rem 0 2rem;
}
.site-footer__grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1.4fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-border);
}
.site-footer__brand .brand--footer { display: inline-block; text-decoration: none; margin-bottom: 1rem; }
.site-footer__tagline { color: var(--color-text-light); font-size: 0.9rem; line-height: 1.65; max-width: 36ch; margin: 0; }
.site-footer__heading {
    color: var(--color-text);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin: 0 0 1.1rem;
}
.site-footer__links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.65rem; }
.site-footer__links a { color: var(--color-text-light); text-decoration: none; font-size: 0.9rem; transition: color 0.15s ease; }
.site-footer__links a:hover, .site-footer__links a:focus-visible { color: var(--color-primary); }
.site-footer__note { color: var(--color-text-light); font-size: 0.85rem; line-height: 1.55; margin: 0 0 1rem; }
.newsletter { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.newsletter__input {
    flex: 1 1 10rem; min-width: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    color: var(--color-text);
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem; font-family: inherit;
}
.newsletter__input::placeholder { color: var(--color-text-light); }
.newsletter__input:focus { outline: none; border-color: var(--color-primary); box-shadow: var(--shadow-glow); }
.newsletter__btn { flex: 0 0 auto; }
.newsletter__msg { font-size: 0.85rem; color: var(--color-primary); margin-top: 0.6rem; min-height: 1.1em; }
.site-footer__base {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
    padding-top: 1.75rem;
    font-size: 0.85rem; color: var(--color-text-light);
}
.site-footer__meta { display: flex; align-items: center; gap: 0.65rem; }
.site-footer__meta a { color: var(--color-text-light); text-decoration: none; transition: color 0.15s ease; }
.site-footer__meta a:hover, .site-footer__meta a:focus-visible { color: var(--color-primary); }
.site-footer__meta span { color: var(--color-border); }
@media (max-width: 900px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem 2.5rem; }
    .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .site-footer__grid { grid-template-columns: 1fr; gap: 2rem; }
    .site-footer__base { flex-direction: column; text-align: center; }
}

/* Back-to-top — site-wide floating button rendered in the footer */
.back-to-top {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 60;
    width: 46px; height: 46px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--color-gradient); color: #111827; /* WCAG: dark arrow icon on the amber FAB */
    border: none; border-radius: 50%;
    box-shadow: var(--shadow-lg); cursor: pointer;
    opacity: 0; visibility: hidden; transform: translateY(0.5rem);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.2s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); }

/* ===== Blog (listing + detail) — restored 2026-09-08. This block was dropped in the same
   restore that took the footer CSS (grep-confirmed absent); reconstructed to the dark-cinema/amber
   system so /blog renders styled and its links meet contrast (was UA-blue on near-black = 2.04:1). ===== */
.page-section { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.blog-wrap { max-width: 1080px; }
.blog-wrap > h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin: 0 0 0.5rem;
    background: var(--color-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.section-subtitle { color: var(--color-text-light); font-size: 1.1rem; margin: 0 0 2.5rem; max-width: 60ch; }

/* listing grid */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.75rem; }
.blog-card { display: flex; flex-direction: column; background: var(--color-bg-card);
    border: 1px solid var(--color-border); border-radius: var(--border-radius-lg); overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--color-primary); }
.blog-card > a { display: block; line-height: 0; }
.blog-card img { width: 100%; height: 190px; object-fit: cover; }
.blog-card-body { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.25rem 1.4rem 1.5rem; }
.blog-meta { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-light); margin: 0; }
.blog-card-body h3 { margin: 0; font-size: 1.25rem; line-height: 1.3; }
.blog-card-body h3 a { color: var(--color-text); text-decoration: none; }
.blog-card-body h3 a:hover { color: var(--color-primary); }
.blog-card-body p { margin: 0; color: var(--color-text-muted); font-size: 0.95rem; line-height: 1.55; }

/* detail */
.blog-detail { max-width: 720px; margin: 0 auto; }
.blog-detail .blog-meta { margin-bottom: 1.25rem; }
.blog-detail .blog-meta a { color: var(--color-primary); text-decoration: none; }
.blog-detail .blog-meta a:hover { text-decoration: underline; }
.blog-detail > h1 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); line-height: 1.15; margin: 0 0 1.5rem;
    background: var(--color-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.blog-hero { width: 100%; border-radius: var(--border-radius-lg); margin: 0 0 2rem; border: 1px solid var(--color-border); }
.blog-body { color: var(--color-text-muted); font-size: 1.08rem; line-height: 1.75; }
.blog-body > * + * { margin-top: 1.25rem; }
.blog-body h2 { color: var(--color-text); font-size: 1.6rem; line-height: 1.25; margin-top: 2.25rem; }
.blog-body h3 { color: var(--color-text); font-size: 1.3rem; margin-top: 1.75rem; }
.blog-body a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }
.blog-body a:hover { color: var(--color-accent); }
.blog-body img { max-width: 100%; border-radius: var(--border-radius); margin: 1.5rem 0; }
.blog-body ul, .blog-body ol { padding-left: 1.5rem; }
.blog-body li + li { margin-top: 0.4rem; }
.blog-body blockquote { border-left: 3px solid var(--color-primary); margin: 1.5rem 0;
    padding: 0.25rem 0 0.25rem 1.25rem; color: var(--color-text-light); font-style: italic; }
.blog-body code { background: var(--color-bg-alt); border: 1px solid var(--color-border);
    border-radius: 4px; padding: 0.1rem 0.4rem; font-size: 0.9em; }

/* shared: empty state + flash notice */
.content-block { background: var(--color-bg-card); border: 1px solid var(--color-border);
    border-radius: var(--border-radius); padding: 2rem; color: var(--color-text-muted); }
.flash { border-radius: var(--border-radius); padding: 1rem 1.25rem; margin-bottom: 1.5rem; border: 1px solid var(--color-border); }
.flash-info { background: rgba(245, 158, 11, 0.08); border-color: var(--color-primary); color: var(--color-text-muted); }
.flash code { background: var(--color-bg-alt); padding: 0.1rem 0.4rem; border-radius: 4px; }

@media (max-width: 560px) { .blog-grid { grid-template-columns: 1fr; } }