:root {
  --bg: #0b0b10;
  --card: #14141c;
  --text: #e7e7ee;
  --muted: #a0a0b8;
  --accent: #f0b400;
  --accent-2: #b37d00;
  --sticky-offset: 72px; /* offset per link ad ancora sotto navbar sticky */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
html { scroll-behavior: smooth; scroll-padding-top: var(--sticky-offset); }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 800px at 20% -10%, #1b1b28 0%, var(--bg) 45%), var(--bg);
  color: var(--text);
  line-height: 1.6;
  /* Spazio per la navbar fissa in alto */
  padding-top: var(--sticky-offset);
}

/* Promo banner "Porta un amico" */
.promo-banner { position: relative; margin: 0; border-bottom: 1px solid #2a2a40; background: linear-gradient(90deg, #1a1620 0%, #151524 100%); }
.promo-inner { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.promo-badge { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #ffcc33, #ff9f1a); color: #1a1408; font-weight: 800; border-radius: 999px; padding: 6px 10px; font-size: .85rem; letter-spacing: .2px; box-shadow: 0 4px 18px rgba(0,0,0,.35); }
.promo-text { margin: 0; flex: 1; }
.promo-cta { white-space: nowrap; }
@media (max-width: 640px) {
  .promo-inner { flex-wrap: wrap; gap: 10px; }
  .promo-cta { width: 100%; text-align: center; }
}

.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; backdrop-filter: blur(6px); background: rgba(11,11,16,.55); border-bottom: 1px solid #24243a; transform: translateY(0); transition: transform .22s ease, opacity .22s ease; }
.navbar.hide { transform: translateY(-100%); opacity: 0.98; }
.navbar[data-reveal] { opacity: 1; transform: translateY(0); }
.nav-inner { width: min(1100px, 92%); margin: 0 auto; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; }
.nav-cta { padding: 8px 14px; }

.container { width: min(1100px, 92%); margin: 0 auto; }

.hero {
  position: relative;
  padding: 90px 0 70px; /* più spazio verticale */
  min-height: 68vh; /* aumenta l'altezza percepita */
  background: radial-gradient(600px 320px at 70% 8%, #2a2a3a 0%, transparent 72%);
  border-bottom: 1px solid #24243a;
  background-size: cover;
  /* Posizione di default quando non c'è locandina */
  background-position: center;
}
.hero.has-bg { /* Con locandina: abbassa l'immagine per mettere in evidenza gli occhi */
  background-position: center 25%;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 38%; /* abbassa lievemente il fuoco */
  z-index: 0; display: none;
  transition: object-position .6s ease;
}
.hero.has-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.5));
}
.hero .container { position: relative; z-index: 1; }
.hero.has-video::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.5));
}
.hero.has-video .hero-video { display: block; }

@media (max-width: 700px) {
  .hero { min-height: 52vh; padding: 68px 0 42px; overflow: hidden; }
  /* Aumenta il crop: sposta il fuoco più in basso e applica uno zoom leggero */
  .hero-video { object-position: center 45%; transform: scale(1.12); }
}
.title { font-family: "Playfair Display", serif; font-size: clamp(2rem, 4vw, 3.2rem); margin: 0 0 8px; }
.subtitle { color: var(--muted); margin: 0 0 16px; }

/* Evita che le sezioni ancorate finiscano coperte dalla navbar sticky */
#prenota, #info, #duo, #gallery, #cards, #sinossi, #cast { scroll-margin-top: var(--sticky-offset); }

.cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #121214;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .06s ease; 
}
.cta:hover { transform: translateY(-1px); }
.cta:active { transform: translateY(0); }

main { margin-top: -16px; padding-bottom: 48px; }
.card {
  background: linear-gradient(180deg, #12121a 0%, var(--card) 100%);
  border: 1px solid #24243a;
  border-radius: 14px;
  padding: 20px;
  margin-top: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

/* Reveal animations */
[data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--reveal-delay, 0ms); }
[data-reveal].navbar { opacity: 1 !important; transform: none !important; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
.reveal-left { transform: translateX(-14px); }
.reveal-right { transform: translateX(14px); }
.reveal-zoom { transform: scale(.96); }

.navbar.shrink .nav-inner { height: 48px; transition: height .2s ease; }

.gallery { margin-top: 24px; border-radius: 14px; border: 1px solid #24243a; background: linear-gradient(180deg, #12121a 0%, var(--card) 100%); overflow: hidden; }
.gallery-track { display: grid; grid-auto-flow: column; grid-auto-columns: 80%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px; }
.gallery-item { scroll-snap-align: start; margin: 0; position: relative; border-radius: 10px; overflow: hidden; }
.gallery-item img { width: 100%; height: 360px; object-fit: cover; display: block; }

/* Cast & Regia */
#cast { margin-top: 40px; }
.cast-grid { display: flex; flex-wrap: wrap; gap: 32px; }
.credit { flex: 1 1 280px; background: linear-gradient(180deg, #12121a 0%, var(--card) 100%); border: 1px solid #24243a; border-radius: 14px; padding: 18px 20px; box-shadow: 0 8px 28px rgba(0,0,0,.28); }
.credit h3 { margin: 0 0 10px; font-family: "Playfair Display", serif; font-size: 1.2rem; }
.cast-list { list-style: none; padding: 0; margin: 0; }
.cast-list li { padding: 4px 0; border-bottom: 1px dashed #2a2a40; font-size: .98rem; }
.cast-list li:last-child { border-bottom: none; }


.synopsis { color: var(--text); opacity: .92; font-size: 1.05rem; }

/* Sinossi layout con immagine */
.sinossi-flex { display: flex; gap: 24px; align-items: flex-start; }
.sinossi-media { flex: 0 0 300px; max-width: 300px; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 28px rgba(0,0,0,.4); position: relative; }
.sinossi-media img { display: block; width: 100%; height: auto; object-fit: contain; aspect-ratio: auto; filter: brightness(.97) saturate(1.05); transition: transform .5s ease, filter .5s ease; image-rendering: auto; }
.sinossi-flex:hover .sinossi-media img { transform: translateY(-2px); filter: brightness(1) saturate(1.12); }
.sinossi-body { flex: 1; min-width: 0; }

/* Evita upscaling oltre dimensione naturale se l'immagine è piccola */
.sinossi-media img { max-width: 100%; height: auto; }
@media (min-width: 1200px) {
  .sinossi-media { flex: 0 0 320px; max-width: 320px; }
}

@media (max-width: 820px) {
  .sinossi-flex { flex-direction: column; }
  .sinossi-media { width: 100%; max-width: 100%; }
  .sinossi-media img { width: 100%; height: auto; object-fit: cover; }
}

/* Duo quotes protagonista */
.duo-quotes { padding: 32px 0 8px; }
.duo-quotes .container { position: relative; min-height: 120px; }
.quote { font-family: "Playfair Display", serif; font-style: italic; font-weight: 700; line-height: 1.2; letter-spacing: .2px; color: var(--text); opacity: .95; }
.quote.left { font-size: clamp(1.6rem, 4.2vw, 2.6rem); max-width: 48ch; }
.quote.right { font-size: clamp(1.6rem, 4.2vw, 2.6rem); max-width: 48ch; }
.quote.left { text-align: left; }
.quote.right { text-align: right; margin-top: 14px; margin-left: auto; }

@media (min-width: 820px) {
  .duo-quotes .container { min-height: 180px; }
  .quote.left { position: relative; top: 0; }
  .quote.right { position: relative; top: 12px; }
}

/* Dialogue excerpt */
.dialogue .line { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px dashed #2a2a40; }
.dialogue .line:last-child { border-bottom: none; }
.dialogue .who { color: var(--muted); font-weight: 600; }
.dialogue .what { margin: 0; position: relative; }
.dialogue .what::before, .dialogue .what::after { content: '"'; color: var(--accent); }
.dialogue .what::before { margin-right: 4px; }
.dialogue .what::after { margin-left: 4px; }

h2 { font-family: "Playfair Display", serif; margin: 0 0 12px; }
.note { color: var(--muted); margin-top: 10px; }
.venue-block { margin: 4px 0 12px; line-height: 1.4; }
.venue-name { font-family: "Playfair Display", serif; font-weight: 700; }
.venue-address { color: var(--muted); font-size: .95rem; }

label { display: block; margin: 10px 0; }
input, select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #2a2a40;
  background: #0f0f16;
  color: var(--text);
}

.row { display: flex; gap: 12px; }
.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.availability { margin: 8px 0 14px; color: var(--muted); }
.result { margin-top: 16px; padding: 12px; border-radius: 10px; background: #0f1a0f; border: 1px solid #1e3a1e; }
.result.error { background: #1a0f0f; border-color: #3a1e1e; }
.small { font-size: .9rem; }
.muted { color: var(--muted); }

.show-list { list-style: none; padding: 0; margin: 0 0 8px; }
.show-list li { padding: 8px 0; border-bottom: 1px dashed #2a2a40; }
.show-list li:last-child { border-bottom: none; }


.footer { border-top: 1px solid #24243a; padding: 20px 0; color: var(--muted); font-size: .95rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.social-links { display: flex; gap: 12px; }
.social-link { color: var(--muted); display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid #24243a; background: #12121a; transition: transform .12s ease, color .12s ease, border-color .12s ease, box-shadow .12s ease; text-decoration: none; }
.social-link:hover { color: var(--accent); transform: translateY(-1px); border-color: #3a2a00; box-shadow: 0 6px 18px rgba(0,0,0,.28); }
.social-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,1px,1px); white-space: nowrap; border: 0; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.features .feature { background: linear-gradient(180deg, #12121a 0%, var(--card) 100%); border: 1px solid #24243a; border-radius: 14px; padding: 18px; }
.features h3 { margin: 0 0 6px; font-family: "Playfair Display", serif; }

.cta-band { margin-top: 24px; }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-radius: 14px; border: 1px solid #24243a; background: linear-gradient(90deg, #1a1a25 0%, #141420 100%); }
.cta-text { margin: 0; color: var(--text); }

/* Price panel */
.price-panel { margin: 10px 0 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid #3a2a00; background: linear-gradient(180deg, #1a1608 0%, #14120a 100%); box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.price-panel-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price-panel-label { color: var(--muted); }
.price-panel-total { font-weight: 800; color: var(--accent); font-size: 1.2rem; letter-spacing: .2px; }
.price-panel-breakdown { margin-top: 8px; color: var(--muted); font-size: .95rem; line-height: 1.4; display: grid; gap: 4px; }
.price-panel-breakdown .price-panel-discount { color: var(--accent); font-weight: 600; }
.price-panel-note { margin-top: 6px; color: var(--muted); font-size: .92rem; }

/* Avviso limite posti */
#seat-limit-warning { display: none; margin: 6px 0 10px; padding: 10px 12px; border-radius: 10px; font-size: .85rem; line-height: 1.3; background: #1a1310; border: 1px solid #543126; color: #f3c7b6; }
#seat-limit-warning strong { color: #ffb48a; }
@media (max-width: 700px) {
  #seat-limit-warning.show { display: block; }
}

/* Cards grid + microinteractions */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.cards.one { grid-template-columns: min(960px, 100%); justify-content: center; }
.cardx { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid #24243a; background: linear-gradient(180deg, #12121a 0%, var(--card) 100%); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.cardx-link { display: block; color: inherit; text-decoration: none; }
.cardx-media { position: relative; overflow: hidden; }
.cardx-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.45)); pointer-events: none; }
.cardx img { width: 100%; height: 220px; object-fit: cover; transform: scale(1); transition: transform .35s ease; display: block; }
.cardx .mini-track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 2px; }
.cardx .mini-track { scroll-behavior: smooth; }
.cardx .mini-track::-webkit-scrollbar { display: none; }
.cardx .mini-track { -ms-overflow-style: none; scrollbar-width: none; }
.cardx .mini-item { scroll-snap-align: start; }
.cardx .mini-item img { width: 100%; height: 220px; object-fit: cover; display: block; }
.cards.one .cardx img,
.cards.one .mini-item img { height: 320px; }
.cardx-body { padding: 14px; }
.cardx-title { margin: 0 0 6px; font-family: "Playfair Display", serif; }
.cardx-text { margin: 0; color: var(--muted); }
.cardx:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(0,0,0,.35); border-color: #3a2a00; }
.cardx:hover img { transform: scale(1.06); }
.cardx:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 640px) {
  .row { flex-direction: column; }
  /* Su mobile alziamo leggermente il fuoco per compensare l'altezza ridotta */
  .hero.has-bg { background-position: center 38%; }
  .hero { min-height: 48vh; padding: 62px 0 36px; overflow: hidden; }
  .hero-video { object-position: center 48%; transform: scale(1.28); }
  .features { grid-template-columns: 1fr; }
  .nav-inner { width: 92%; }
  .cards { grid-template-columns: 1fr; }
  .gallery-track { grid-auto-columns: 90%; }
  .cards.one .cardx img,
  .cards.one .mini-item img { height: 240px; }
}
