/* ── OAT VARIABLE OVERRIDES — LIGHT (default) ── */
:root {
  --primary:            rgb(0 113 227);
  --primary-foreground: rgb(255 255 255);
  --muted:              rgb(245 245 247);
  --muted-foreground:   rgb(110 110 115);
  --faint:              rgb(250 250 252);
  --border:             rgb(220 220 224);

  /* layout */
  --max-w: 1200px;
  --ease:  0.18s ease;
  --r:     12px;
  --header-bg: rgba(255, 255, 255, 0.88);

  /* typography scale */
  --fs-2xs:  0.7rem;   /* badges, micro-labels, buttons */
  --fs-xs:   0.8rem;   /* footer, notes, secondary nav */
  --fs-sm:   0.9rem;   /* nav links, card desc, body secondary */
  --fs-base: 1rem;     /* card date, card price, card-info */
  --fs-md:   1.1rem;   /* card title, info-text, section values */
  --fs-lg:   1.3rem;   /* contatti, prominent links */
  --fs-xl:   1.6rem;   /* cinema card title */
}

/* ── OAT VARIABLE OVERRIDES — DARK ───────────── */
[data-theme="dark"] {
  --background:         rgb(20 20 20);
  --foreground:         rgb(245 245 247);
  --card:               rgb(28 28 30);
  --card-foreground:    rgb(245 245 247);
  --muted:              rgb(44 44 46);
  --muted-foreground:   rgb(134 134 139);
  --faint:              rgb(36 36 38);
  --faint-foreground:   rgb(174 174 178);
  --accent:             rgb(44 44 46);
  --accent-foreground:  rgb(245 245 247);
  --border:             rgba(255 255 255 / 0.08);
  --input:              rgba(255 255 255 / 0.08);
  --ring:               rgb(245 245 247);
  --primary:            rgb(0 113 227);
  --primary-foreground: rgb(255 255 255);

  --header-bg: rgba(20, 20, 20, 0.88);
}

/* ── BASE ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ── HEADER ──────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.header-inner {
  margin: 2rem auto;
  padding: 0px 5rem;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo-main {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}
.main-nav a {
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  transition: color var(--ease);
}
.main-nav a:hover { color: var(--foreground); }

/* theme toggle */
.theme-toggle {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 6px !important;
  border-radius: 50% !important;
  cursor: pointer;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--ease);
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--foreground); }

.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  padding: 4px !important;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--foreground);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--muted);
  padding: 0.75rem 2rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.mobile-nav a:last-child { border-bottom: none; }

/* ── HERO — cinema screen ────────────────────── */
.hero-screen-wrap {
  margin: 1.25rem 0 0;
  padding: 0 5rem;
}

.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 2.70 / 1;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* ── Letterbox bars ───────────────────────────── */
@keyframes letterboxGrow {
  from { transform: scaleY(1); }
  to   { transform: scaleY(0); }
}

.letterbox-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 15%;
  background: #000;
  z-index: 3;
  pointer-events: none;
}
.letterbox-top {
  top: 0;
  transform-origin: top;
  animation: letterboxGrow 5s cubic-bezier(0.80, 0.80, 0.70, 0.64) forwards;
  animation-delay: 1s;
}
.letterbox-bottom {
  bottom: 0;
  transform-origin: bottom;
  animation: letterboxGrow 5s cubic-bezier(0.80, 0.80, 0.70, 0.64) forwards;
  animation-delay: 1s;
}

/* ── Background: slow zoom-in + B&W → colour ── */
@keyframes cinemaZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.10); }
}
@keyframes cinemaColour {
  0%   { filter: grayscale(100%) brightness(0.6); }
  30%  { filter: grayscale(90%)  brightness(0.7); }
  100% { filter: grayscale(0%)   brightness(1);   }
}

.hero-bg {
  position: absolute;
  inset: 0;
  /* background-image: url('../images/orciano-66.jpg'); */
  background-image: url('../images/orciano-66.webp');
  background-size: cover;
  background-position: center 55%;
  z-index: 0;
  animation:
    cinemaZoom   7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
    cinemaColour  4s ease forwards;
}

/* ── Gradient vignette ────────────────────────── */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.06) 0%,
    rgba(0, 0, 0, 0.42) 55%,
    rgba(0, 0, 0, 0.80) 100%
  );
  pointer-events: none;
}

[data-theme="dark"] .hero::before {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.20) 0%,
    rgba(0, 0, 0, 0.60) 55%,
    rgba(0, 0, 0, 0.88) 100%
  );
}

/* ── Projection screen weave texture ─────────── */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  /* dot matrix simulating screen perforation weave */
  background-image:
    radial-gradient(ellipse 55% 55% at 50% 40%, rgba(255,255,255,0.07) 0%, transparent 70%),
    radial-gradient(circle, rgba(0,0,0,0.20) 0.6px, transparent 0.6px);
  background-size: 100% 100%, 3px 3px;
}

/* ── Title animations ─────────────────────────── */
@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero-content {

  /* position: relative; */
  margin: auto;
  text-align: center;
  width: 100%;
  padding: 3rem 2.5rem 3.5rem;
  z-index: 4;
}

.hero-eyebrow {
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.1rem;
  animation: heroFadeIn 3.2s ease 0.6s both;
}

.hero-title {
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.97;
  margin-bottom: 1.5rem;
  color: #fff;
  animation: heroFadeIn 8.2s ease 0.6s both;
}

.hero-desc {
  font-size: 1.2rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
  /* max-width: 520px; */
  line-height: 1.55;
  animation: heroFadeIn 3.2s ease 0.6s both;
}

/* ── MAIN ────────────────────────────────────── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 5rem 5rem;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 3.5rem 0 2.5rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
}

/* ── GRID ────────────────────────────────────── */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
}

/* ── CARD ────────────────────────────────────── */
.event-card {
  display: flex;
  flex-direction: column;
  border-radius: 0;
  overflow: hidden;
  background: var(--card, var(--muted));
  border: 1px solid var(--border);
  animation: fadeUp 0.3s ease both;
}
.event-card:hover .card-poster img { transform: scale(1.04); }
.event-card.hidden { display: none; }

/* cinema cards: full-width, horizontal layout */
.event-card[data-categoria="cinema"] {
  grid-column: 1 / -1;
  flex-direction: row;
  min-height: 420px;
}
.event-card[data-categoria="cinema"] .card-poster {
  width: 300px;
  flex-shrink: 0;
  aspect-ratio: unset;
  align-self: stretch;
}
.event-card[data-categoria="cinema"] .card-body {
  padding: 2rem 2rem;
  justify-content: space-between;
}
.event-card[data-categoria="cinema"] .card-title {
  font-size: var(--fs-xl);
}
.event-card[data-categoria="cinema"] .card-desc {
  font-size: var(--fs-base);
  -webkit-line-clamp: 5;
  line-clamp: 5;
}

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

.card-poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--faint);
}
.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted-foreground);
  text-align: center;
  line-height: 1.3;
}


.card-body {
  padding: 1rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.card-date {
  font-size: var(--fs-base);
  color: var(--muted-foreground);
  margin: 0;
}

.card-title {
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
}

.card-desc {
  font-size: var(--fs-sm);
  color: var(--muted-foreground);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0.15rem 0 0;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.75rem;
}

.card-price {
  font-size: var(--fs-base);
  color: var(--muted-foreground);
}

.btn-prenota {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.35rem 0.8rem;
  border-radius: 0;
  font-size: var(--fs-2xs);
  font-weight: 600;
  transition: opacity var(--ease);
  white-space: nowrap;
}
.btn-prenota:hover { opacity: 0.82; }

.card-info-sala {
  font-size: var(--fs-base);
  color: var(--muted-foreground);
}

/* ── LOADING / EMPTY ─────────────────────────── */
.loading-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 5rem 2rem;
  color: var(--muted-foreground);
  font-size: var(--fs-sm);
}
.loading-state p { margin: 0; }

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted-foreground);
  font-size: var(--fs-sm);
}
.no-results p { margin: 0; }

/* ── PAGE SECTIONS ───────────────────────────── */
.page-section {
  border-top: 1px solid var(--border);
}

.page-section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3.5rem 5rem 5rem;
}

.page-section-inner h2 { margin-bottom: 2.5rem; }

/* shared info label / text */
.info-label {
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin: 0 0 0.35rem;
}
.info-text {
  font-size: var(--fs-md);
  line-height: 1.6;
  margin: 0 0 2rem;
}

/* ── DOVE SIAMO ──────────────────────────────── */
.dove-siamo-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.dove-siamo-map {
  height: 380px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ── PREZZI ──────────────────────────────────── */
.prezzi-section {
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}

.prezzi-cols { display: flex; gap: 4rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

.prezzi-cat { display: flex; flex-direction: column; gap: 0.3rem; }

.prezzi-cat strong {
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 0.4rem;
  display: block;
}

.prezzi-cat span { font-size: var(--fs-md); }

.prezzi-note {
  font-size: var(--fs-xs);
  color: var(--muted-foreground);
  line-height: 1.6;
  margin: 0;
}

/* ── CONTATTI ────────────────────────────────── */
.contatti-grid {
  display: flex;
  gap: 5rem;
  flex-wrap: wrap;
}

.contatti-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contatti-link {
  font-size: var(--fs-lg);
  font-weight: 500;
  color: var(--foreground);
  transition: color var(--ease);
}
.contatti-link:hover { color: var(--primary); }

.contatti-social {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.contatti-social a {
  color: var(--muted-foreground);
  transition: color var(--ease);
}
.contatti-social a:hover { color: var(--foreground); }

/* ── FOOTER ──────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 2rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.footer-brand { flex: 1; min-width: 160px; }

.footer-brand address {
  font-style: normal;
  font-size: var(--fs-xs);
  color: var(--muted-foreground);
  line-height: 1.8;
  margin-top: 0.5rem;
}

.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-size: var(--fs-xs); color: var(--muted-foreground); transition: color var(--ease); }
.footer-links a:hover { color: var(--foreground); }

.footer-social { display: flex; gap: 1rem; align-items: center; }
.footer-social a { color: var(--muted-foreground); transition: color var(--ease); }
.footer-social a:hover { color: var(--foreground); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1rem 2rem;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--muted-foreground);
}
.footer-bottom p { margin: 0; }

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }

  /* logo left, controls right */
  .logo-main { margin-right: auto; }

  .hero-screen-wrap { padding: 0 1rem; }
  .hero { aspect-ratio: 16 / 9; }
  .hero-content { padding: 2.5rem 1.5rem 2.5rem; }
  main  { padding: 0 1.5rem 4rem; }

  .section-header { padding: 2.5rem 0 2rem; }
  .events-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }

  /* cinema collapses to vertical on tablet */
  .event-card[data-categoria="cinema"] { grid-column: 1 / -1; flex-direction: column; min-height: unset; }
  .event-card[data-categoria="cinema"] .card-poster { width: 100%; aspect-ratio: 2/3; }
  .event-card[data-categoria="cinema"] .card-body { padding: 1rem 1.1rem; }
  .event-card[data-categoria="cinema"] .card-title { font-size: var(--fs-lg); }
  .event-card[data-categoria="cinema"] .card-desc { font-size: var(--fs-sm); }

  .page-section-inner { padding: 2.5rem 1.5rem 3.5rem; }

  .dove-siamo-layout { grid-template-columns: 1fr; gap: 2rem; }
  .dove-siamo-map { height: 280px; }

  .contatti-grid { gap: 2.5rem; }
  .prezzi-cols { gap: 2.5rem; }

  .footer-inner { flex-direction: column; gap: 1.5rem; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 1rem; }
  .logo-main { margin-right: auto; }
  .hero-screen-wrap { padding: 0 0.75rem; }
  .hero  { aspect-ratio: 4 / 3; }
  .hero-content { padding: 2rem 1.25rem 2rem; }
  main   { padding: 0 1rem 3rem; }
  .section-header { padding: 2rem 0 1.5rem; }
  .events-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .mobile-nav { padding: 0.75rem 1rem; }
  .page-section-inner { padding: 2rem 1rem 3rem; }
  .dove-siamo-map { height: 240px; }
  .contatti-link { font-size: var(--fs-md); }
  .footer-inner { padding: 2rem 1rem 1.5rem; }
  .footer-bottom { padding: 1rem; }
}
