/* ============================================================
   Uncork'd Entertainment — Design System
   Big/bright/fluid. Burgundy #b21117. WCAG 2.2 AA.
   Dark-first; light via prefers-color-scheme + data-theme="light"
   ============================================================ */

/* ── 1. Tokens ── */
:root {
  /* Dark theme (default) */
  --bg:          #0d0d0d;
  --bg-raised:   #181818;
  --bg-card:     #1c1c1c;
  --text:        #ededed;
  --text-muted:  #999;
  --text-on-accent: #fff;
  --accent:      #e04347;   /* burgundy lightened for dark bg — 5.2:1 on #0d0d0d */
  --accent-btn:  #b21117;   /* for buttons (white text on red) */
  --accent-btn-hover: #8f0d12;
  --border:      #2c2c2c;
  --border-focus:#e04347;
  --shadow:      0 4px 24px rgba(0,0,0,.6);
  --shadow-card: 0 2px 12px rgba(0,0,0,.5);

  /* Typography scale (fluid) */
  --text-xs:   clamp(.75rem,  .7rem + .25vw,  .875rem);
  --text-sm:   clamp(.875rem, .82rem + .28vw,  1rem);
  --text-base: clamp(1rem,    .95rem + .25vw,  1.125rem);
  --text-lg:   clamp(1.125rem,1rem  + .6vw,   1.375rem);
  --text-xl:   clamp(1.25rem, 1rem  + 1.2vw,  1.75rem);
  --text-2xl:  clamp(1.5rem,  1rem  + 2.5vw,  2.5rem);
  --text-3xl:  clamp(2rem,    1rem  + 4vw,    3.5rem);

  /* Spacing */
  --space-1:  .25rem;
  --space-2:  .5rem;
  --space-3:  .75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --max-width: 1280px;
  --nav-height: 4rem;
  --radius-sm: .375rem;
  --radius:    .625rem;
  --radius-lg: 1rem;

  /* Transitions */
  --transition: 180ms ease;
}

/* Light theme overrides */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:          #fafafa;
    --bg-raised:   #fff;
    --bg-card:     #fff;
    --text:        #111;
    --text-muted:  #555;
    --accent:      #b21117;
    --accent-btn:  #b21117;
    --accent-btn-hover: #8f0d12;
    --border:      #e0e0e0;
    --border-focus:#b21117;
    --shadow:      0 4px 24px rgba(0,0,0,.12);
    --shadow-card: 0 2px 8px rgba(0,0,0,.08);
  }
}
:root[data-theme="light"] {
  --bg:          #fafafa;
  --bg-raised:   #fff;
  --bg-card:     #fff;
  --text:        #111;
  --text-muted:  #555;
  --accent:      #b21117;
  --accent-btn:  #b21117;
  --accent-btn-hover: #8f0d12;
  --border:      #e0e0e0;
  --border-focus:#b21117;
  --shadow:      0 4px 24px rgba(0,0,0,.12);
  --shadow-card: 0 2px 8px rgba(0,0,0,.08);
}


/* ── 2. Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  color-scheme: dark light;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  background-color: var(--bg);
  background-image: url('/static/img/body-bg-dark.png');
  background-repeat: no-repeat;
  background-position: top center;
  background-attachment: scroll;
  background-size: 100% auto;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) body {
    background-image: url('/static/img/body-bg-light.png');
  }
}
:root[data-theme="light"] body {
  background-image: url('/static/img/body-bg-light.png');
}
:root[data-theme="dark"] body {
  background-image: url('/static/img/body-bg-dark.png');
}

main { flex: 1; }

img, video:not(.hero-video__el) { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration: none; }

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.02em;
}

ul { list-style: none; }
ol { list-style: none; }

/* ── 3. Accessibility ── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  background: var(--accent-btn);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition);
}
.skip-link:focus { top: var(--space-4); }

:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
  border-radius: 2px;
}


/* ── 4. Layout helpers ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 4vw, var(--space-12));
}


/* ── 5. Navigation ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  border-bottom: 1px solid var(--border);
}
/* Blurred bar background lives on a pseudo-element. Putting backdrop-filter on
   .site-header itself would make it a containing block for the position:fixed
   mobile nav drawer, trapping the drawer inside the 64px header. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 100%;
}

.site-logo {
  text-decoration: none;
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -.03em;
  flex-shrink: 0;
  color: var(--text);
  display: inline-flex;
  align-items: center;
}
.site-logo:hover { color: var(--accent); }
.site-logo__accent { color: var(--accent); }

/* Real logo images — swap dark/light per theme.
   Dark bg (default) → show light-colored logo; Light bg → show dark-colored logo. */
.logo-img--dark { display: none; }
.logo-img--light { display: block; }
.logo-text-fallback { display: none; }

:root[data-theme="light"] .logo-img--dark { display: block; }
:root[data-theme="light"] .logo-img--light { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .logo-img--dark { display: block; }
  :root:not([data-theme="dark"]) .logo-img--light { display: none; }
}

.logo-img--dark img,
.logo-img--light img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-menu {
  display: flex;
  gap: var(--space-1);
  align-items: center;
  margin-inline-start: auto;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover { background: var(--bg-raised); color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  margin-inline-start: auto;
  color: var(--text);
}
.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  flex-shrink: 0;
  margin-inline-start: auto;
}
.theme-toggle:hover { background: var(--bg-raised); border-color: var(--accent); color: var(--accent); }

/* Show correct icon per theme */
.theme-icon--moon { display: none; }
:root[data-theme="light"] .theme-icon--sun,
:root:not([data-theme="dark"]) .theme-icon--sun {  /* shown in dark */
}
/* In dark: show moon icon, hide sun */
:root:not([data-theme="light"]) .theme-icon--sun { display: none; }
:root:not([data-theme="light"]) .theme-icon--moon { display: block; }
/* In light: show sun icon, hide moon */
:root[data-theme="light"] .theme-icon--sun { display: block; }
:root[data-theme="light"] .theme-icon--moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-icon--sun { display: block; }
  :root:not([data-theme="dark"]) .theme-icon--moon { display: none; }
}

/* Mobile nav */
@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    background: var(--bg-raised);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-6) var(--space-6);
    gap: var(--space-2);
    transform: translateX(100%);
    transition: transform 280ms cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
  }
  .nav-menu.is-open { transform: translateX(0); }
  .nav-link {
    font-size: var(--text-lg);
    width: 100%;
    padding: var(--space-3) var(--space-4);
  }
}


/* ── 6. Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: .625em 1.375em;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}
/* btn--centered: block-level centered button (e.g. submit, browse catalog) */
.btn--centered { display: flex; width: fit-content; margin-inline: auto; }
.btn:active { transform: scale(.97); }

.btn--primary {
  background: var(--accent-btn);
  color: #fff;
  border-color: var(--accent-btn);
}
.btn--primary:hover { background: var(--accent-btn-hover); border-color: var(--accent-btn-hover); color: #fff; }

.btn--outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn--outline:hover { background: var(--accent-btn); color: #fff; border-color: var(--accent-btn); }

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--bg-raised); color: var(--text); border-color: var(--text-muted); }

.btn--lg { padding: .75em 1.75em; font-size: var(--text-base); }


/* ── 7. Film card ── */
.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .film-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (min-width: 1024px) {
  .film-grid { grid-template-columns: repeat(4, 1fr); }
}

.film-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius); /* sharp top corners on key-art, rounded bottom */
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.film-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.film-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.film-card__art {
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--bg-raised);
  position: relative;
}
.film-card__art picture,
.film-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}
.film-card:hover .film-card__art img { transform: scale(1.04); }

.film-card__art-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-raised), var(--border));
}

.film-card__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}

.film-card__title {
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.film-card:hover .film-card__title { color: var(--accent); }

.film-card__date {
  font-size: var(--text-xs);
  /* Brand burgundy — uses --accent which is #e04347 on dark (~5:1) and #b21117 on light (~6.8:1); both pass WCAG AA */
  color: var(--accent);
}

.film-card__synopsis {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: var(--space-1);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ── 8. Section / typography helpers ── */
.section-heading {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-8);
  position: relative;
  padding-bottom: var(--space-4);
}
.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 3rem; height: 3px;
  background: var(--accent-btn);
  border-radius: 2px;
}

.page-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-6);
}
.page-title em { color: var(--accent); font-style: normal; }

.prose {
  max-width: 70ch;
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--text);
}
.prose p + p { margin-top: 1em; }

.section-cta {
  margin-top: var(--space-8);
  text-align: center;
}


/* ── 9. Home page ── */
.home-hero {
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg-raised) 100%);
  padding-block: clamp(var(--space-6), 10vw, var(--space-12));
  border-bottom: 1px solid var(--border);
}

.home-hero__inner {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.home-hero__title {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
}

.home-hero__tagline {
  font-size: var(--text-xl);
  color: var(--text-muted);
  font-weight: 400;
}

.home-hero__blurb {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.7;
}

.featured-section {
  padding-block: var(--space-16);
}

/* ── Featured carousel ──
   No-JS fallback: a horizontally scrollable list of 16:9 slides.
   With JS (.is-enhanced) it becomes a sliding carousel with controls. */
.carousel { position: relative; }

.carousel__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
}
.carousel.is-enhanced .carousel__viewport { overflow: hidden; }

.carousel__track { display: flex; }
.carousel.is-enhanced .carousel__track {
  width: 100%;
  will-change: transform;
}

.carousel__slide {
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: start;
}
.carousel.is-enhanced .carousel__slide[aria-hidden="true"] {
  pointer-events: none;
}

.carousel__link {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--bg-raised);
}
.carousel__link img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel__link:focus-visible { outline: 3px solid var(--border-focus); outline-offset: -3px; }

.carousel__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: var(--space-12) var(--space-6) var(--space-4);
  font-size: var(--text-xl);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,0));
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}

/* Controls — hidden until JS enhances (they do nothing without it). */
.carousel__btn { display: none; }
.carousel.is-enhanced .carousel__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  z-index: 10;
  width: 3rem; height: 3rem;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition);
}
.carousel.is-enhanced .carousel__btn:hover { background: var(--accent-btn); }
.carousel__btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.carousel__btn--prev { left: var(--space-3);  top: 50%; transform: translateY(-50%); }
.carousel__btn--next { right: var(--space-3); top: 50%; transform: translateY(-50%); }

.carousel__pause {
  right: var(--space-3);
  bottom: var(--space-3);
  width: 2.5rem !important;
  height: 2.5rem !important;
  font-size: 1rem !important;
}
.carousel__pause-icon {
  display: block;
  position: relative;
  width: .85rem; height: .95rem;
}
.carousel__pause-icon::before,
.carousel__pause-icon::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: .28rem;
  background: currentColor;
}
.carousel__pause-icon::before { left: .04rem; }
.carousel__pause-icon::after  { right: .04rem; }
/* Paused → show a play triangle instead of the two bars. */
.carousel.is-paused .carousel__pause-icon::after { display: none; }
.carousel.is-paused .carousel__pause-icon::before {
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 0; height: 0;
  background: transparent;
  border-style: solid;
  border-width: .45rem 0 .45rem .72rem;
  border-color: transparent transparent transparent currentColor;
}

.home-about,
.home-services,
.home-contact {
  padding-block: var(--space-16);
  border-top: 1px solid var(--border);
}

.home-about__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.social-link:hover { color: var(--accent); border-color: var(--accent); background: var(--bg-raised); }

.contact-placeholder {
  color: var(--text-muted);
  font-style: italic;
  margin-top: var(--space-4);
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 36rem;
  margin-top: var(--space-8);
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.contact-field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}

.contact-field input,
.contact-field textarea {
  background: var(--bg-raised);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  transition: border-color var(--transition);
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.contact-field textarea { resize: vertical; }

/* Honeypot — visually hidden but not display:none (some bots check) */
.contact-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Result messages */
.contact-result {
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.contact-result--ok {
  background: color-mix(in srgb, #22c55e 12%, var(--bg-raised));
  border: 1px solid #22c55e;
  color: var(--text);
}

.contact-result--err {
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-raised));
  border: 1px solid var(--accent);
  color: var(--text);
}


/* ── 10. Catalog page ── */
.catalog-page { padding-block: var(--space-12); }

.catalog-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  padding: var(--space-4) var(--space-6);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Row containing the Sort/Filter toggle and search input */
.catalog-search-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.catalog-filter-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  padding: .625em 1em;
}

/* Collapsible panel — visible by default (no-JS safe).
   JS adds .is-collapsed to hide it after enhancing. */
.catalog-filter-panel { overflow: hidden; }
.catalog-filter-panel.is-collapsed { display: none; }

.catalog-filter-actions {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

.catalog-search {
  display: flex;
  gap: var(--space-2);
  flex: 1;
  max-width: 480px;
}

.catalog-search input[type="search"] {
  flex: 1;
  padding: .625rem var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: var(--text-base);
  transition: border-color var(--transition);
}
.catalog-search input[type="search"]:focus { border-color: var(--border-focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-6);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.filter-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
}

.sort-radios,
.genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.radio-pill input[type="radio"],
.radio-pill input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-pill span {
  display: inline-block;
  padding: .3em .85em;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.radio-pill input:checked + span {
  background: var(--accent-btn);
  border-color: var(--accent-btn);
  color: #fff;
}
.radio-pill:hover span { border-color: var(--accent); color: var(--accent); }
.radio-pill input:focus-visible + span { outline: 2px solid var(--border-focus); outline-offset: 2px; }

/* Toggle (foreign sales) */
.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  display: inline-flex;
  width: 2.5rem;
  height: 1.375rem;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 1rem; height: 1rem;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform var(--transition), background var(--transition);
}
.toggle-input:checked + .toggle-track { background: var(--accent-btn); }
.toggle-input:checked + .toggle-track::after { transform: translateX(1.125rem); background: #fff; }
.toggle-input:focus-visible + .toggle-track { outline: 2px solid var(--border-focus); outline-offset: 2px; }

.filter-group--genres .genre-list { max-width: 100%; }

.filter-apply { flex-shrink: 0; }

.catalog-summary {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

/* ── 11. Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-12);
  flex-wrap: wrap;
}

.pagination__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: .5em 1em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background var(--transition), border-color var(--transition);
}
.pagination__btn:hover { background: var(--bg-raised); border-color: var(--accent); color: var(--accent); }

.pagination__pages {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.pagination__page:hover { background: var(--bg-raised); border-color: var(--accent); color: var(--accent); }
.pagination__page--current {
  background: var(--accent-btn);
  border-color: var(--accent-btn);
  color: #fff;
  pointer-events: none;
}

.pagination__ellipsis {
  color: var(--text-muted);
  padding-inline: var(--space-1);
  user-select: none;
}


/* ── 12. Film detail page ── */
.film-page { padding-block: var(--space-12); }

.breadcrumb { margin-bottom: var(--space-8); }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--text); }

/* Container query wrapper for key art float */
.film-layout {
  container-type: inline-size;
  container-name: film-layout;
}

.film-key-art {
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.film-key-art__img {
  width: 100%;
  height: auto;
  display: block;
}

@media (min-width: 680px) {
  .film-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* content left, key art right */
    gap: var(--space-12);
    align-items: start;
  }
  /* Key art is second in the DOM but renders in the right column.
     The title is now outside the grid, so key art top aligns naturally
     with the release date — no artificial offset needed. */
  .film-content { order: 1; }
  .film-key-art {
    order: 2;
    margin-top: 0;
    margin-bottom: 0;
    max-width: 340px;
    justify-self: start;
  }
}

.film-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.film-title {
  font-size: var(--text-3xl);
  line-height: 1.1;
  letter-spacing: -.04em;
  margin-bottom: var(--space-6);
}

.film-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.film-meta__date {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.film-meta__badge {
  display: inline-block;
  padding: .2em .75em;
  background: var(--accent-btn);
  color: #fff;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.film-genres {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.genre-tag {
  display: inline-block;
  padding: .25em .75em;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.genre-tag:hover { background: var(--accent-btn); border-color: var(--accent-btn); color: #fff; }

.film-synopsis { max-width: 72ch; }

/* Trailer embed — responsive 16:9 */
.film-trailer__heading {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}
.film-trailer__wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}
.film-trailer__wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Share buttons */
.film-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.film-share__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 600;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: .3em .7em;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--bg-raised); }
.share-btn--copy.copied { border-color: #22c55e; color: #22c55e; }

.film-back {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
}


/* ── 13. Footer ── */
.site-footer {
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  padding-block: var(--space-8);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-6);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--accent); }

.footer-social {
  display: flex;
  gap: var(--space-3);
}
.footer-social a {
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-social a:hover { color: var(--accent); }

.footer-copy {
  color: var(--text-muted);
  font-size: var(--text-xs);
  margin-inline-start: auto;
}

@media (max-width: 640px) {
  .footer-copy { margin-inline-start: 0; width: 100%; text-align: left; }
}

/* ── Animated logo hero ── */
/* Fixed fullscreen overlay — covers the sticky header and all page content.
   The page renders normally underneath; the overlay fades out while the page
   scrolls to Featured, revealing the sticky header and content beneath. */
.hero-video {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  overflow: hidden;
  /* Fade-out transition — triggered by JS adding .hero-video--fading */
  transition: opacity 1000ms ease;
}

.hero-video--fading {
  opacity: 0;
  pointer-events: none;
}

.hero-video__el {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-skip {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10;
  padding: 0.5rem 1.25rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.hero-skip:hover,
.hero-skip:focus-visible {
  background: rgba(178, 17, 23, 0.85);
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .hero-video { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}


/* ── Key-art lightbox trigger ── */
.film-key-art__link {
  display: block;
  position: relative;
  text-decoration: none;
  overflow: hidden;
}
.film-key-art__zoom {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--transition);
}
.film-key-art__link:hover .film-key-art__zoom,
.film-key-art__link:focus-visible .film-key-art__zoom { opacity: 1; }
.film-key-art__link:focus-visible { outline: 3px solid var(--border-focus); outline-offset: 2px; }

/* ── Services page ── */
.services-page { padding-block: var(--space-12); }
.services-prose { margin-top: var(--space-6); }

/* ── Lightbox modal ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.lightbox[hidden] { display: none; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.88);
  cursor: pointer;
}

.lightbox__content {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 700px);
  max-height: 90dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 90dvh;
  width: auto;
  height: auto;
  box-shadow: 0 8px 48px rgba(0,0,0,.8);
}

.lightbox__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition);
}
.lightbox__close:hover { background: var(--accent-btn); border-color: var(--accent-btn); }
.lightbox__close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
