/* ============================================================
   PSYCHO-SYS — STILE DEL SITO
   ============================================================ */

:root {
  --bg: #0a0a0c;
  --bg-alt: #111114;
  --ink: #f3f2ef;
  --ink-dim: #b7b5b0;
  --accent: #e0242c;
  --accent-dim: #7a1418;
  --border: rgba(255, 255, 255, 0.1);
  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --container-w: 1140px;
  --header-h: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.nav-open,
body.lightbox-open,
body.modal-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.muted {
  color: var(--ink-dim);
}

/* ---------------- HEADER ---------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled,
body.nav-open .site-header {
  background: rgba(10, 10, 12, 0.92);
  box-shadow: 0 1px 0 var(--border);
}

.site-header.is-scrolled {
  backdrop-filter: blur(6px);
}

/* Il menu mobile (.primary-nav) e "position: fixed" e vive dentro
   .site-header: se l'header avesse un backdrop-filter mentre il menu
   e aperto, diventerebbe lui stesso "containing block" per gli
   elementi fixed al suo interno (stesso effetto di transform/filter),
   facendo collassare/sparire il pannello del menu. Lo disattiviamo
   sempre quando il menu e aperto, a prescindere dallo scroll. */
body.nav-open .site-header {
  backdrop-filter: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-logo {
  height: 34px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* ---------------- SELETTORE LINGUA ---------------- */
.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  z-index: 110;
}

.lang-btn {
  border: none;
  background: none;
  color: var(--ink-dim);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.is-active {
  background: var(--accent);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.primary-nav {
  display: flex;
  gap: 32px;
}

.primary-nav a {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.primary-nav a:hover::after,
.primary-nav a:focus::after {
  width: 100%;
}

/* ---------------- HERO ---------------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video,
.hero-fallback-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video-yt {
  /* Trucco per far coprire l'intera Hero all'iframe YouTube, come
     un vero video di sfondo, senza controlli e senza deformarsi. */
  width: 177.77vh; /* 16:9 */
  height: 100vh;
  min-width: 100%;
  min-height: 56.25vw; /* 16:9 */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: 0;
}

.hero-fallback-bg {
  background:
    radial-gradient(circle at 50% 20%, rgba(224, 36, 44, 0.25), transparent 60%),
    linear-gradient(180deg, #16151a 0%, #0a0a0c 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Se il video non c'è o non parte, mostriamo il fallback grafico */
body.no-hero-video .hero-video {
  display: none;
}
body.no-hero-video .hero-fallback-bg {
  opacity: 1;
}

.hero-overlay {
  /* Overlay leggero: il video/immagine di sfondo resta visibile,
     ma abbastanza scurito da far risaltare bene il logo davanti. */
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.5) 65%, rgba(0, 0, 0, 0.68) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
}

.hero-logo {
  width: min(78vw, 460px);
  filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.6));
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
}

.scroll-cue span {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: var(--accent);
  border-radius: 2px;
  animation: scroll-cue-move 1.8s ease-in-out infinite;
}

@keyframes scroll-cue-move {
  0% { top: 6px; opacity: 1; }
  70% { top: 22px; opacity: 0.2; }
  100% { top: 22px; opacity: 0; }
}

/* ---------------- SEZIONI ---------------- */
.section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  margin-bottom: 44px;
}

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--accent);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-line {
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-style: italic;
  letter-spacing: 0.01em;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin: 0;
  text-shadow: 4px 4px 0 rgba(224, 36, 44, 0.28);
}

.section-head-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-head-center .section-eyebrow {
  justify-content: center;
}

/* ---------------- BIO ---------------- */
.bio-text {
  max-width: 720px;
  font-size: 1.08rem;
  color: var(--ink-dim);
}

.bio-text p {
  margin: 0 0 1.2em;
}

.bio-text p:last-child {
  margin-bottom: 0;
}

/* ---------------- VIDEO ---------------- */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--border);
  overflow: hidden;
}

.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.video-coming-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: repeating-linear-gradient(
    135deg,
    #141316,
    #141316 24px,
    #191519 24px,
    #191519 48px
  );
  border: 1px dashed var(--border);
  color: var(--ink-dim);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 24px;
  margin: 0;
}

.video-promo-slot {
  margin-bottom: 14px;
}

.video-caption {
  margin: 0 0 40px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1rem;
  color: var(--ink);
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.video-card {
  margin: 0;
}

.video-card figcaption {
  margin-top: 12px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1rem;
  color: var(--ink);
}

.video-more-wrap {
  margin-top: 40px;
  text-align: center;
}

.video-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.85rem;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.video-more-btn:hover,
.video-more-btn:focus-visible {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------------- DATE ---------------- */
.table-wrap {
  overflow-x: auto;
}

.dates-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.dates-table thead th {
  text-align: left;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  color: var(--ink-dim);
  padding: 0 12px 14px;
  border-bottom: 1px solid var(--border);
}

.dates-table tbody td {
  padding: 18px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.dates-table tbody tr:hover {
  background: rgba(224, 36, 44, 0.06);
}

.dates-table tbody tr.is-past {
  opacity: 0.45;
}

.col-date {
  font-family: var(--font-display);
  white-space: nowrap;
}

.date-parts {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.date-day {
  font-size: 1.3rem;
}

.date-month {
  text-transform: uppercase;
  color: var(--accent);
}

.date-year {
  color: var(--ink-dim);
  font-size: 0.85rem;
}

.col-country {
  white-space: nowrap;
}

.flag {
  font-size: 1.2rem;
  margin-right: 6px;
}

.country-code {
  color: var(--ink-dim);
  font-size: 0.82rem;
}

.col-info {
  white-space: nowrap;
}

.date-info-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.78rem;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.date-info-btn svg {
  width: 14px;
  height: 14px;
}

.date-info-btn:hover,
.date-info-btn:focus-visible {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.date-info-empty {
  color: var(--ink-dim);
}

.past-events-wrap {
  margin-top: 28px;
  text-align: center;
}

.past-events-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: none;
  color: var(--ink-dim);
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.past-events-btn:hover,
.past-events-btn:focus-visible {
  border-color: var(--accent);
  color: var(--ink);
}

/* ---------------- FOTO ---------------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.photo-item {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: grayscale(15%);
}

.photo-item:hover img,
.photo-item:focus img {
  transform: scale(1.06);
  filter: grayscale(0%);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 40px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(90vw, 1100px);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--ink-dim);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
}

.lightbox-close {
  top: 16px;
  right: 20px;
  font-size: 2rem;
}

.lightbox-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

/* Modale (es. eventi passati) */
.modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  max-height: 82vh;
  overflow-y: auto;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 6px;
}

.modal-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-style: italic;
  font-size: 1.6rem;
  margin: 0 0 24px;
  padding-right: 30px;
}

/* ---------------- DOWNLOADS ---------------- */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.download-card:hover {
  border-color: var(--accent);
  background: rgba(224, 36, 44, 0.06);
  transform: translateY(-2px);
}

.download-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.download-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
}

.download-sub {
  color: var(--ink-dim);
  font-size: 0.88rem;
}

.download-icon-box {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.download-icon-box svg {
  width: 22px;
  height: 22px;
}

/* ---------------- CONTATTI / SOCIAL: PROMO BANNER ---------------- */
.section-contact,
.section-social {
  text-align: left;
}

.promo-banners {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.promo-banner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}

.promo-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.promo-icon svg {
  width: 28px;
  height: 28px;
}

.promo-text {
  flex: 1 1 auto;
  min-width: 0;
}

.promo-title {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0;
  font-size: clamp(0.92rem, 1.6vw, 1.05rem);
  color: var(--ink);
}

.promo-body {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.95rem;
  max-width: 62ch;
}

.promo-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.promo-cta:hover,
.promo-cta:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.promo-cta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.promo-cta-icon svg {
  width: 18px;
  height: 18px;
}

.promo-cta-handle {
  font-weight: 400;
  opacity: 0.85;
}

/* Instagram */
.promo-banner--instagram .promo-icon {
  border-color: #e1306c;
  color: #e1306c;
}

.promo-banner--instagram .promo-cta {
  background: #e1306c;
}

/* Facebook */
.promo-banner--facebook .promo-icon {
  border-color: #1877f2;
  color: #1877f2;
}

.promo-banner--facebook .promo-cta {
  background: #1877f2;
}

/* ---------------- FOOTER ---------------- */
.site-footer {
  padding: 64px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-logo-btn {
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 4px;
  cursor: pointer;
  border-radius: 12px;
}

.footer-logo-btn:hover .footer-logo {
  transform: scale(1.04);
}

.footer-logo {
  width: min(52vw, 200px);
  opacity: 0.95;
  transition: transform 0.3s ease;
}

.footer-logo-btn.is-clicked .footer-logo {
  animation: logo-spin 0.9s cubic-bezier(0.25, 0.8, 0.3, 1);
}

@keyframes logo-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(1080deg); }
}

.footer-logo-hint {
  margin: 4px 0 0;
  color: var(--ink-dim);
  font-size: 0.78rem;
  font-style: italic;
}

.footer-legal {
  margin: 18px 0 0;
  color: var(--ink-dim);
  font-size: 0.82rem;
}

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

  .header-right {
    gap: 14px;
  }

  .primary-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 12, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    overflow-y: auto;
    padding: 24px 0;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .primary-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .primary-nav a {
    font-size: 1.3rem;
  }

  body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .section {
    padding: 72px 0;
  }

  .promo-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .promo-cta {
    width: 100%;
    justify-content: center;
  }

  .download-card {
    flex-wrap: wrap;
  }

  /* Lista date: da tabella a "card" impilate, più leggibili su mobile
     (niente scroll orizzontale, informazioni compattate). */
  .table-wrap {
    overflow-x: visible;
  }

  .dates-table {
    min-width: 0;
    width: 100%;
  }

  .dates-table thead {
    display: none;
  }

  .dates-table,
  .dates-table tbody,
  .dates-table tr,
  .dates-table td {
    display: block;
  }

  .dates-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
  }

  .dates-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .dates-table tbody td {
    border-bottom: none;
    padding: 0;
  }

  .col-date {
    order: 1;
    margin-right: 12px;
  }

  .col-country {
    order: 2;
    margin-left: auto;
  }

  .col-venue {
    order: 3;
    flex: 0 0 100%;
    margin-top: 14px;
    font-weight: 700;
    color: var(--ink);
  }

  .col-place {
    order: 4;
    flex: 0 0 100%;
    margin-top: 2px;
    color: var(--ink-dim);
    font-size: 0.85rem;
  }

  .col-info {
    order: 5;
    flex: 0 0 100%;
    margin-top: 14px;
    text-align: center;
  }

  .col-info .date-info-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .brand-logo {
    height: 26px;
    max-width: 150px;
  }

  .lang-btn {
    padding: 5px 8px;
    font-size: 0.68rem;
  }
}
