/* Site nav and footer for the film hub and the film pages. Mirrors the nav and
   footer on public/index.html. Every rule is scoped to .nav or .site-footer,
   and the reset has zero specificity, so nothing here touches a film's own
   film.css. The markup comes from scripts/film-index.py; see docs/films.md. */
.nav, .site-footer {
  --text: #f1f5f9; --text-secondary: #cbd5e1; --text-muted: #64748b;
  --accent: #3b82f6; --purple: #8b5cf6; --pink: #ec4899;
  --surface: #111827; --border: #1e293b;
  font: 400 16px/1.6 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: normal; text-transform: none;
  -webkit-font-smoothing: antialiased;
}
:where(.nav, .site-footer) :where(*) { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Navigation ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(5, 8, 22, 0.8);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
  transition: all 0.3s;
}
.nav.scrolled { background: rgba(5, 8, 22, 0.95); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.nav-logo .shield {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.nav-logo span { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 32px; flex: 1; margin-left: 40px; }
.nav-links .nav-demo { margin-left: auto; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.875rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.nav-demo {
  position: relative;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff; padding: 10px 20px; border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s;
}
.nav-links a.nav-demo:hover { transform: translateY(-1px); opacity: 0.9; }
.nav-links .nav-demo::after {
  content: "Login: admin@company.com / admin";
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--surface); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 14px; font-size: 0.75rem; font-weight: 500;
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity 0.2s; z-index: 10;
}
.nav-links .nav-demo:hover::after { opacity: 1; }
.nav-links a.nav-cta {
  background: var(--accent); color: #fff;
  padding: 10px 24px; border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s;
}
.nav-links a.nav-cta:hover { background: #2563eb; transform: translateY(-1px); }
.nav .mobile-toggle {
  display: none; background: none; border: none;
  color: var(--text); font-size: 1.5rem; cursor: pointer;
}

/* ── Footer ── */
.site-footer {
  padding: 64px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--text);
}
.site-footer .footer-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.site-footer .footer-inner {
  display: flex; justify-content: space-between; align-items: start;
  flex-wrap: wrap; gap: 40px;
}
.site-footer .footer-brand { max-width: 320px; }
.site-footer .footer-brand .nav-logo { margin-bottom: 14px; }
.site-footer .footer-brand p {
  font-size: 0.85rem; color: var(--text-muted); line-height: 1.7;
  margin-bottom: 8px; max-width: none;
}
.site-footer .footer-brand .tag-line {
  display: block; margin-top: 8px;
  color: var(--text-muted); font-size: 0.82rem; font-weight: 500;
  font-style: italic;
}
.site-footer .footer-col h4 {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 16px;
}
.site-footer .footer-col a {
  display: block; color: var(--text-secondary); text-decoration: none;
  font-size: 0.9rem; padding: 6px 0; transition: color 0.2s;
}
.site-footer .footer-col a:hover { color: var(--text); }
.site-footer .footer-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; gap: 10px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; margin-left: 0; flex: none; }
  .nav-links .nav-demo { margin-left: 0; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: rgba(5, 8, 22, 0.98); padding: 24px;
    border-bottom: 1px solid var(--border); gap: 16px;
  }
  .nav .mobile-toggle { display: block; }
  .nav-links .nav-demo::after { display: none; }
  .site-footer .footer-inner { flex-direction: column; align-items: flex-start; }
  .site-footer .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
@media (max-width: 480px) {
  .nav-inner { padding: 0 16px; }
  .site-footer .footer-wrap { padding: 0 16px; }
}

/* A film embedded in another page shows only the player */
.is-embed .nav, .is-embed .site-footer { display: none; }
