/* =========================================================
   1º Roliúde Cine Fest — sertão meets cinema
   Palette tokens are the single source of truth (spec §8).
   ========================================================= */
:root {
  /* core palette */
  --noite:     #1B1410; /* warm near-black — night screening */
  --barro:     #B5532A; /* sunbaked terracotta / clay */
  --ouro:      #E5A23C; /* marquee gold — primary accent + CTA */
  --bordo:     #7A2B2B; /* deep wine — secondary accent */
  --areia:     #F3E7D3; /* cordel paper / sand — light surface */
  --mandacaru: #3E5641; /* muted cactus green — sparing */

  /* derived */
  --noite-2:   #120d0a; /* deeper than noite, footer */
  --areia-ink: #2a1f17; /* readable ink on areia */
  --ouro-soft: #f0c27e;

  /* film-strip sprocket perforation, rounded, in --areia */
  --sprockets: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='16'%3E%3Crect x='7' y='4' width='12' height='8' rx='2.5' fill='%23F3E7D3'/%3E%3C/svg%3E");

  --wrap: 980px;
  --radius: 12px;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--noite); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: "Bitter", Georgia, serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.075rem);
  line-height: 1.6;
  color: var(--areia);
  background: var(--noite);
  -webkit-font-smoothing: antialiased;
  max-width: 1600px;
  margin-inline: auto;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--ouro); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* ---------- accessibility helpers ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--ouro); color: var(--noite); font-family: "Oswald", sans-serif;
  font-weight: 600; padding: .6rem 1rem; border-radius: 0 0 8px 8px;
  z-index: 50; transition: top .15s ease;
}
.skip-link:focus { top: 0; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--ouro);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- shared type ---------- */
.eyebrow {
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .26em;
  font-size: clamp(.72rem, .66rem + .35vw, .84rem);
  color: var(--ouro);
}
.eyebrow--dark { color: var(--barro); }

.section-title {
  font-family: "Rye", "Bitter", serif;
  font-weight: 400;
  line-height: 1;
  color: var(--bordo);
  font-size: clamp(2.3rem, 1.6rem + 4.2vw, 4rem);
  letter-spacing: .01em;
}
.section-title--light { color: var(--ouro); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  text-decoration: none;
  padding: .9rem 1.7rem;
  border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn-primary {
  background: var(--ouro);
  color: var(--noite);
}
.btn-primary:hover {
  background: var(--ouro-soft);
  transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(1px); }
.btn-lg { font-size: 1.05rem; padding: 1.05rem 2.2rem; }

/* =========================================================
   FILM-STRIP — the signature element (sprocket perforations)
   ========================================================= */
.film-frame {
  position: relative;
  background: var(--noite-2);
  padding: 18px 10px;
  border-radius: 6px;
  box-shadow: 0 24px 60px -28px rgba(0,0,0,.9);
}
.film-frame::before,
.film-frame::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px;
  height: 16px;
  background-image: var(--sprockets);
  background-repeat: repeat-x;
  background-position: center;
  opacity: .9;
}
.film-frame::before { top: 1px; }
.film-frame::after  { bottom: 1px; }
.film-frame img { border-radius: 3px; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--noite);
}
.hero-banner {
  display: block;
  width: 100%;
  height: auto;
  animation: hero-fade .8s ease both;
}
@keyframes hero-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-banner { animation: none; }
}

.kicker {
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ouro-soft);
  margin-top: 1.6rem;
  font-size: clamp(1rem, .9rem + .6vw, 1.25rem);
}
.hero-dates {
  font-family: "Rye", serif;
  color: var(--ouro);
  font-size: clamp(1.5rem, 1.1rem + 2.4vw, 2.4rem);
  line-height: 1.1;
  margin-top: .5rem;
}
.tagline {
  font-style: italic;
  color: var(--areia);
  opacity: .92;
  margin-top: .35rem;
  font-size: clamp(1.05rem, .98rem + .5vw, 1.25rem);
}
.hero .btn-primary { margin-top: 1.9rem; }

/* =========================================================
   PROGRAMAÇÃO  (dark, minimal)
   ========================================================= */
.programacao {
  background: var(--noite);
  color: var(--areia);
  padding-top: clamp(3rem, 2rem + 5vw, 5rem);
  padding-bottom: 0;
}
.programacao .section-title {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--areia);
  text-align: center;
  margin-bottom: 1.8rem;
}

.filmstrip {
  background: none;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: clamp(18px, 3vw, 28px);
}
/* if the no-js fallback shows everything stacked, hide the inert tablist */
.no-js .tabs { display: none; }

.tab {
  appearance: none;
  cursor: pointer;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .55rem 1.1rem;
  border: 1px solid rgba(243,231,211,.28);
  border-radius: 999px;
  background: transparent;
  color: var(--areia);
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.tab:hover { border-color: var(--areia); }

.tab[aria-selected="true"] {
  background: var(--areia);
  color: var(--noite);
  border-color: var(--areia);
}

/* panels */
.panels { padding-inline: clamp(0px, 1vw, 8px); }

.panel { text-align: center; }
.panel[hidden] { display: none; }
/* no-JS fallback: ignore the initial hidden attr and stack every day */
.no-js .panel[hidden] { display: block; }
.no-js .panel + .panel { margin-top: 2.5rem; }

/* swipe in when JS swaps panels — direction set by JS via --swipe-from */
.js .panel:not([hidden]) { animation: panel-swipe .42s cubic-bezier(.22,.61,.36,1) both; }
@keyframes panel-swipe {
  from { opacity: 0; transform: translateX(var(--swipe-from, 0)); }
  to   { opacity: 1; transform: translateX(0); }
}

/* day heading: the tab carries the label when JS runs, so hide it then */
.panel-day {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--areia);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}
.js .panel-day { display: none; }

/* the poster image — breaks out of .wrap to fill the page, capped at 1600px */
.prog-poster {
  width: min(100vw, 1600px);
  max-width: none;
  margin-left: calc(50% - min(50vw, 800px));
  margin-right: calc(50% - min(50vw, 800px));
  height: auto;
}

/* =========================================================
   INGRESSOS  (night-screening block, gold CTA)
   ========================================================= */
.ingressos {
  background: var(--noite);
  text-align: center;
  padding-block: clamp(3.5rem, 2.5rem + 5vw, 6rem);
  position: relative;
}
.ingressos-inner { max-width: 560px; }
.ingressos .section-title {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .7rem;
}
.ingressos-sub {
  font-family: "Oswald", sans-serif;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--areia);
  opacity: .9;
  margin-bottom: 2rem;
}

/* =========================================================
   RODAPÉ
   ========================================================= */
.rodape {
  background: var(--noite-2);
  color: var(--areia);
  text-align: center;
  padding-bottom: 2.4rem;
  border-top: 1px solid rgba(243,231,211,.1);
}
.patrocinadores {
  display: block;
  width: 100%;
  height: auto;
}
.copyr {
  margin-top: 1.5rem;
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-family: "Oswald", sans-serif;
  opacity: .6;
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .btn-primary:hover { transform: none; }
}
