/* ============================================================
   TEATRO 90 — Design tokens
   Hybrid theme: dark cinematic (hero, rewinds, footer)
   + warm light gallery (featured, all events)
   ============================================================ */
:root {
  /* Color — minimal: black, off-black, grey, white + curtain red */
  --ink: #0a0a0a;            /* stage black */
  --ink-2: #161616;          /* dark surface */
  --ink-3: #222222;          /* dark card */
  --paper: #f5f5f4;          /* off-white */
  --white: #ffffff;
  --crimson: #a01f2d;        /* curtain red */
  --crimson-deep: #6f1420;
  --crimson-bright: #c9303f; /* red accent for dark surfaces */

  /* Semantic */
  --text: #1a1a1a;
  --text-muted: #525252;
  --text-inverse: #f5f5f5;
  --text-inverse-muted: #a3a3a3;
  --border-light: #e4e4e4;
  --border-dark: #333333;
  --focus: #d64550;

  /* Type scale */
  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --fs-sm: 0.875rem;   /* 14 */
  --fs-base: 1rem;     /* 16 */
  --fs-md: 1.125rem;   /* 18 */
  --fs-lg: 1.5rem;     /* 24 */
  --fs-xl: 2.25rem;    /* 36 */
  --fs-2xl: clamp(2.75rem, 6vw, 4.5rem);
  --fs-hero: clamp(3.25rem, 9vw, 7rem);

  /* Spacing (8px rhythm) */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-6: 3rem;
  --s-8: 4rem;
  --s-12: 6rem;

  --radius: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 2px 8px rgba(10, 10, 10, 0.06), 0 12px 32px rgba(10, 10, 10, 0.08);
  --shadow-card-hover: 0 4px 12px rgba(10, 10, 10, 0.1), 0 20px 44px rgba(10, 10, 10, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 84px;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }

h1, h2, h3 { margin: 0; line-height: 1.05; }

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

[hidden] { display: none !important; }

a { color: inherit; }

button { font: inherit; cursor: pointer; }

.container {
  width: min(100% - 2.5rem, 1200px);
  margin-inline: auto;
}

.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }

/* Focus */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-2);
  z-index: 200;
  padding: var(--s-1) var(--s-2);
  background: var(--crimson);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 200ms var(--ease);
}
.skip-link:focus { top: 0; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.75rem 1.75rem;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: transparent;
  font-weight: 600;
  font-size: var(--fs-base);
  text-decoration: none;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease),
              color 200ms var(--ease), transform 150ms var(--ease);
}
.btn:active { transform: scale(0.97); }

/* Outline pills — red accent (for dark surfaces) */
.btn-primary { border-color: var(--crimson-bright); color: var(--white); }
.btn-primary:hover { background: var(--crimson); border-color: var(--crimson); }

/* Outline pills — white (for dark surfaces) */
.btn-ghost { border-color: rgba(255, 255, 255, 0.55); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.12); }

/* Outline pills — white, fills on hover (for the red band) */
.btn-outline-light { border-color: var(--white); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--crimson-deep); }

.btn-lg { min-height: 56px; padding: 1rem 2.25rem; font-size: var(--fs-md); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  font-weight: 600;
  color: var(--crimson);
  text-decoration: none;
}
.link-arrow .icon { transition: transform 200ms var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ============ Header / Nav ============ */
/* Transparent over the hero; background + logo fade in once scrolled */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease);
}

.site-header.is-scrolled {
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: var(--header-h);
  padding-block: var(--s-1);
}

.nav-brand {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 300ms var(--ease), transform 300ms var(--ease), visibility 300ms;
}
.site-header.is-scrolled .nav-brand {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nav-brand img { width: 108px; height: auto; }

.nav-menu { display: flex; align-items: center; gap: var(--s-4); }

.nav-links { display: flex; gap: var(--s-3); }

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s-1);
  color: var(--text-inverse);
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}
.nav-links a:hover { color: var(--white); border-bottom-color: var(--crimson-bright); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  color: var(--white);
}
.nav-toggle .icon-menu, .nav-toggle .icon-close { width: 26px; height: 26px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ============ Hero ============ */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100dvh;
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.45) 40%, rgba(10, 10, 10, 0.55) 100%);
}

.hero-content {
  padding-block: var(--s-12) var(--s-8);
}

.hero-logo { margin: 0; }

.hero-logo img {
  width: min(60vw, 620px);
  height: auto;
  filter: drop-shadow(0 8px 40px rgba(0, 0, 0, 0.55));
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-6);
}

/* Next-up strip */
.hero-strip {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding-block: var(--s-3);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-strip-label {
  flex-shrink: 0;
  color: var(--text-inverse-muted);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-strip-list {
  display: flex;
  gap: var(--s-3);
  overflow-x: auto;
  scrollbar-width: none;
}
.hero-strip-list::-webkit-scrollbar { display: none; }

.hero-strip-list a {
  display: flex;
  align-items: baseline;
  gap: 0.75em;
  min-height: 44px;
  align-items: center;
  color: var(--text-inverse);
  text-decoration: none;
  white-space: nowrap;
  transition: color 200ms var(--ease);
}
.hero-strip-list a:hover { color: var(--white); }

.strip-date {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  color: var(--white);
  text-transform: uppercase;
}

.strip-title { font-size: var(--fs-sm); font-weight: 500; color: var(--text-inverse-muted); }
.hero-strip-list a:hover .strip-title { color: var(--white); }

/* ============ Sections ============ */
.section { padding-block: var(--s-12); }

.section-light { background: var(--paper); }

.section-dark {
  background: var(--ink);
  color: var(--text-inverse);
}

.section-crimson {
  background: linear-gradient(135deg, var(--crimson) 0%, var(--crimson-deep) 100%);
  color: var(--white);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-6);
}

.kicker {
  margin-bottom: var(--s-1);
  color: var(--crimson);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.kicker-muted { color: var(--text-inverse-muted); }

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.section-sub {
  max-width: 36rem;
  margin: calc(-1 * var(--s-4)) 0 var(--s-6);
  color: var(--text-inverse-muted);
}

/* ============ Event cards ============ */
.featured-grid,
.events-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-3);
}

.event-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 250ms var(--ease), transform 250ms var(--ease);
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  text-decoration: none;
}

/* Uploaded event poster image fills the card media area */
.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms var(--ease);
}
.card-media:hover img { transform: scale(1.04); }

/* Poster placeholders — typographic, spotlight-lit */
.poster {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--s-3);
  isolation: isolate;
}

.poster-spot {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 90% 60% at 70% 12%, rgba(255, 244, 214, 0.32), transparent 60%);
}

.poster-crimson  { background: linear-gradient(160deg, var(--crimson) 10%, var(--crimson-deep) 90%); }
.poster-grey     { background: linear-gradient(160deg, #9a9a9a 10%, #565656 90%); }
.poster-ink      { background: linear-gradient(160deg, #3a3a3a 10%, var(--ink) 90%); }
.poster-charcoal { background: linear-gradient(160deg, #55524e 10%, #1f1e1c 90%); }

.poster-num {
  position: absolute;
  top: var(--s-2);
  right: var(--s-2);
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.28);
}

.poster-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.2vw, 2.25rem);
  line-height: 1.02;
  text-transform: uppercase;
  color: var(--white);
  transition: transform 250ms var(--ease);
}
.card-media:hover .poster-title { transform: translateY(-4px); }

.card-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  flex-grow: 1;
  padding: var(--s-3);
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-1);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.chip {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: #eaeae8;
  color: #3d3d3d;
}

.card-title {
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.card-book { margin-top: auto; }

/* ============ Filters ============ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
  margin-bottom: var(--s-6);
}

.chip-filter {
  min-height: 44px;
  padding: 0.5rem 1.5rem;
  background: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 600;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}
.chip-filter:hover { border-color: var(--crimson); color: var(--crimson); }
.chip-filter[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.events-empty {
  padding: var(--s-8) 0;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-md);
}

/* ============ Rewinds carousel ============ */
.carousel-nav { display: flex; gap: var(--s-1); }

.carousel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: transparent;
  border: 1.5px solid var(--border-dark);
  border-radius: 999px;
  color: var(--text-inverse);
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
}
.carousel-btn:hover { background: var(--crimson); border-color: var(--crimson); color: var(--white); }

.rewind-track {
  display: flex;
  gap: var(--s-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--s-2);
  scrollbar-color: var(--border-dark) transparent;
}

.rewind-card {
  position: relative;
  flex: 0 0 min(78vw, 480px);
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--ink-2);
  isolation: isolate;
}

.rewind-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.rewind-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.92) 8%, rgba(10, 10, 10, 0.35) 60%, rgba(10, 10, 10, 0.2) 100%);
}

.rewind-card-poster {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.rewind-info {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-1);
  height: 100%;
  justify-content: flex-end;
  padding: var(--s-3);
}

.rewind-year {
  color: var(--text-inverse-muted);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.rewind-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  text-transform: uppercase;
  color: var(--white);
}

.btn-play {
  margin-top: var(--s-1);
  min-height: 44px;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  color: var(--white);
  font-weight: 600;
  font-size: var(--fs-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  backdrop-filter: blur(6px);
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
}
.btn-play:hover { background: var(--white); border-color: var(--white); color: var(--ink); }

/* ============ Statement / newsletter ============ */
.statement { text-align: center; }

.statement-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  text-transform: uppercase;
}

.statement-sub {
  max-width: 30rem;
  margin: var(--s-3) auto 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: var(--fs-md);
}

.newsletter { max-width: 420px; margin: var(--s-4) auto 0; }

.newsletter-label {
  display: block;
  margin-bottom: var(--s-1);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: left;
}

.newsletter-row { display: flex; gap: var(--s-1); }

.newsletter-input {
  flex-grow: 1;
  min-height: 48px;
  min-width: 0;
  padding: 0.75rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  color: var(--text);
  background: var(--white);
}
.newsletter-input:focus-visible { outline-color: var(--ink); }

.newsletter-msg {
  min-height: 1.5rem;
  margin-top: var(--s-1);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: left;
}

/* ============ Footer ============ */
.site-footer {
  background: var(--ink);
  color: var(--text-inverse-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr 1fr;
  gap: var(--s-6);
  padding-block: var(--s-8);
}

.footer-brand img { width: 150px; height: auto; margin-bottom: var(--s-2); }

.footer-brand p { max-width: 26ch; font-size: var(--fs-sm); }

.footer-col h3 {
  margin-bottom: var(--s-2);
  color: var(--white);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-col ul { display: flex; flex-direction: column; gap: var(--s-1); }

.footer-col li {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
  font-size: var(--fs-sm);
}
.footer-col li .icon { margin-top: 0.2em; color: var(--crimson-bright); }

.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--text-inverse-muted);
  text-decoration: none;
  transition: color 200ms var(--ease);
}
.footer-col a:hover { color: var(--white); }

.socials { display: flex; gap: var(--s-1); }

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--border-dark);
  border-radius: 999px;
  color: var(--text-inverse);
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
}
.socials a:hover { background: var(--crimson); border-color: var(--crimson); color: var(--white); }

.footer-bar {
  border-top: 1px solid var(--border-dark);
  padding-block: var(--s-3);
  font-size: var(--fs-sm);
}

/* ============ Video modal ============ */
.video-modal {
  width: min(92vw, 960px);
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--ink);
  overflow: visible;
}
.video-modal::backdrop { background: rgba(10, 10, 10, 0.85); }

.video-modal video { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 16 / 9; }

.modal-close {
  position: absolute;
  top: -56px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  color: var(--white);
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.modal-close:hover { background: var(--white); border-color: var(--white); color: var(--ink); }

/* ============ Reveal on scroll ============ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* No-JS / pre-JS safety: only hide when observer is active */
html:not(.js) .reveal { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .featured-grid, .events-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  :root { --header-h: 72px; }

  .nav-toggle { display: flex; }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-2);
    padding: var(--s-3) var(--s-3) var(--s-4);
    background: rgba(10, 10, 10, 0.97);
    border-bottom: 1px solid var(--border-dark);
    display: none;
  }
  .nav-menu.is-open { display: flex; }

  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { min-height: 48px; font-size: var(--fs-base); }

  .hero-logo img { width: min(82vw, 440px); }

  .hero-strip { flex-direction: column; align-items: flex-start; gap: var(--s-1); }

  .section { padding-block: var(--s-8); }

  .section-head { flex-direction: column; align-items: flex-start; }

  .featured-grid, .events-grid { grid-template-columns: 1fr; }

  .card-media { aspect-ratio: 16 / 10; }

  .rewind-card { flex-basis: 86vw; }

  .newsletter-row { flex-direction: column; }

  .footer-grid { grid-template-columns: 1fr; gap: var(--s-4); }

  .modal-close { top: -52px; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
