/* =============================================
   LA MAGA ALCHEMY — style.css
   Palette: oro caldo su scuro / beige caldo
   ============================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600&family=Lato:wght@300;400;700&display=swap');

/* --- Custom Properties --- */
:root {
  --bg-warm:       #FDFAF5;
  --bg-mid:        #F2EBD9;
  --bg-dark:       #1A0F02;
  --bg-dark-soft:  #261608;

  --gold:          #C8952A;
  --gold-light:    #E8B84B;
  --gold-pale:     #F5D98A;
  --gold-dark:     #8C6318;

  --text-dark:     #1C1208;
  --text-mid:      #4A3520;
  --text-light:    #F5EDD8;
  --text-muted:    #9E8060;

  --border-gold:   rgba(200, 149, 42, 0.35);

  --font-title:    'Cormorant Garamond', Georgia, serif;
  --font-body:     'Lato', system-ui, sans-serif;

  --radius:        4px;
  --transition:    0.35s ease;
  --shadow-gold:   0 0 28px rgba(200, 149, 42, 0.22);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--bg-warm);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }

p { max-width: 68ch; }

/* =============================================
   ORNAMENTAL DIVIDER
   ============================================= */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 3.5rem auto;
  max-width: 480px;
  padding: 0 2rem;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.55;
}

.divider-symbol {
  color: var(--gold);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  opacity: 0.85;
}

.divider-symbol svg {
  width: 14px;
  height: 14px;
}

/* Dark variant for dark sections */
.divider--dark .divider-line {
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  opacity: 0.4;
}
.divider--dark .divider-symbol { color: var(--gold-light); }

/* Section label above heading */
.section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  display: block;
}

.section-label--dark { color: var(--gold-light); }

/* =============================================
   HEADER
   ============================================= */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
  padding: 0.5rem 0;
}

#header.scrolled {
  background: rgba(253, 250, 245, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--border-gold), 0 4px 24px rgba(28, 18, 8, 0.08);
}

#header.scrolled .nav-link { color: var(--text-dark); }
#header.scrolled .nav-link:hover { color: var(--gold); }

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;       /* logo e testo ravvicinati */
  flex-shrink: 0;
}

.logo-img {
  width: 67px;
  height: 67px;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0 10px rgba(200, 149, 42, 0.55));
  transition: filter var(--transition);
}

.logo-img:hover {
  filter: drop-shadow(0 0 18px rgba(200, 149, 42, 0.8));
}

.logo-text {
  font-family: var(--font-title);
  font-size: 1.38rem;       /* ≈ 22px */
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--gold-light);
  transition: color var(--transition);
  line-height: 1.15;
}

#header.scrolled .logo-text { color: var(--text-dark); }

.logo-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.69rem;       /* ≈ 11px */
  letter-spacing: 0.22em;   /* ≈ 3px */
  text-transform: uppercase;
  color: rgba(232, 184, 75, 0.58); /* gold-light tenue */
  font-weight: 400;
}

/* Nav */
.nav { display: flex; align-items: center; gap: 0.25rem; }

.nav-link {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 237, 216, 0.85);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover { color: var(--gold-light); }

.nav-cta {
  background: var(--gold);
  color: var(--bg-dark) !important;
  padding: 0.45rem 1rem;
  border-radius: 2px;
  margin-left: 0.5rem;
}

.nav-cta:hover { background: var(--gold-light) !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: transparent;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--gold-light);
  transition: transform var(--transition), opacity var(--transition);
}

#header.scrolled .hamburger span { background: var(--text-dark); }

.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-gold);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 0.25rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  }

  .nav.open { display: flex; }

  .nav-link { color: var(--text-light) !important; padding: 0.6rem 0; width: 100%; }
  .nav-cta { background: var(--gold); color: var(--bg-dark) !important; text-align: center; }
}

/* =============================================
   HERO
   ============================================= */
#hero {
  min-height: 100svh;
  background-color: #0A0A0A;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 8rem 2rem 5rem;
}

/* --- Cornice decorativa ---*/
.hero-frame {
  position: absolute;
  /* top: 90px → scende sotto l'header (~83px); left/right: 26px → cristalli (28px) restano dentro */
  inset: 90px 26px 26px;
  border: 1px solid rgba(200, 149, 42, 0.2);
  pointer-events: none;
  z-index: 2;
}

.hero-corner {
  position: absolute;
  width: 58px;
  height: 58px;
  pointer-events: none;
}
.hero-corner svg { width: 100%; height: 100%; display: block; }

.hero-corner--tl { top: -1px; left: -1px; }
.hero-corner--tr { top: -1px; right: -1px; transform: scaleX(-1); }
.hero-corner--bl { bottom: -1px; left: -1px; transform: scaleY(-1); }
.hero-corner--br { bottom: -1px; right: -1px; transform: scale(-1, -1); }

/* --- Cristalli PNG (bigliettino originale, sfondo trasparente) ---
   Strategia di posizionamento:
   • I PNG vengono ancorati ai bordi sinistro/destro dell'hero (left:0 / right:0).
   • L'altezza è vincolata a ~58vh con un max di 620px.
   • max-width: 26vw impedisce che un PNG molto largo invada il testo centrale.
   • L'hero ha overflow:hidden → se il cristallo sborda in alto/basso viene ritagliato
     in modo naturale (effetto "emerge dal bordo"), mentre lateralmente rimane integro.
   • Il cristallo destro è già l'immagine specchiata: nessun scaleX(-1).
-------------------------------------------------- */
/* Contenitore:
   • ancorato a left:0 / right:0 → nessuno sconfinamento orizzontale
   • max-width evita che un PNG molto largo invada il titolo centrale
   • overflow:hidden sull'#hero ritaglia solo l'eventuale sconfinamento verticale */
.hero-crystal {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  max-width: 28vw;
  animation: crystal-appear 1.8s ease 1.2s forwards;
}
/* 28px = 2px dentro la riga del frame (che ora è a 26px dai bordi dell'hero) */
.hero-crystal--left  { left: 28px; }
.hero-crystal--right { right: 28px; }

/* Immagine: altezza fissa, larghezza proporzionale automatica */
.hero-crystal .crystal-img {
  display: block;
  height: clamp(300px, 58vh, 620px);
  width: auto;
  max-width: 100%;    /* non supera il contenitore → rispetta max-width:28vw */
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes crystal-appear {
  from { opacity: 0; transform: translateY(-46%) scale(0.96); }
  to   { opacity: 1; transform: translateY(-50%) scale(1); }
}

/* ── Schermi medi ── */
@media (max-width: 1200px) {
  .hero-crystal           { max-width: 24vw; }
  .hero-crystal .crystal-img { height: clamp(240px, 46vh, 500px); }
}

/* ── Tablet ── */
@media (max-width: 900px) {
  .hero-crystal           { max-width: 22vw; }
  .hero-crystal .crystal-img { height: clamp(160px, 32vh, 320px); }
}

/* ── Cristalli laterali + stelle zona testo: nascosti su mobile ── */
@media (max-width: 768px) {
  .hero-crystal      { display: none; }
  .hero-star--text   { display: none; }
  .hero-star--zona1  { top: 24% !important; left: 12% !important; }
}

/* ── Riga CTA: su desktop è solo il bottone centrato ── */
.hero-cta-row {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* I cristalli accanto al bottone: nascosti su desktop */
.hero-cta-crystal {
  display: none;
}

/* ── Mobile (≤768px): flex row cristallo + bottone + cristallo ── */
@media (max-width: 768px) {
  .hero-cta-row {
    width: 100%;
    padding: 0 16px;
    gap: clamp(8px, 2vw, 12px);
    overflow: visible;
  }
  .hero-cta-crystal {
    display: block;
    width: clamp(60px, 16vw, 80px);
    height: auto;
    opacity: 0.7;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-drag: none;
  }
  /* Il bottone occupa lo spazio rimanente e non trabocca */
  .hero-cta {
    flex: 1;
    min-width: 0;
    padding-left: 24px;
    padding-right: 24px;
    justify-content: center;
  }
}

/* ── Frame mobile ── */
@media (max-width: 640px) {
  .hero-frame { inset: 86px 14px 14px; }
}

/* --- Stelle e scintille --- */
.hero-star {
  position: absolute;
  color: var(--gold);
  pointer-events: none;
  z-index: 1;
  line-height: 1;
  animation: twinkle var(--dur, 3.5s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes twinkle {
  /* stato spento: usa --op-lo dall'inline style, default alzato a 0.30 */
  0%, 100% {
    opacity: var(--op-lo, 0.30);
    transform: scale(1);
    filter: none;
  }
  /* stato acceso: opacità fissa alta + glow dorato, indipendente dal --op-hi inline */
  50% {
    opacity: 0.95;
    transform: scale(1.7);
    filter: drop-shadow(0 0 5px rgba(200, 149, 42, 0.9))
            drop-shadow(0 0 10px rgba(200, 149, 42, 0.4));
  }
}

/* --- Contenuto centrale --- */
.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 780px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fade-up 0.9s ease 0.3s forwards;
}

.hero-eyebrow span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-eyebrow-line {
  width: 32px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

.hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 300;
  color: var(--text-light);
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fade-up 1s ease 0.5s forwards;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-pale);
  font-weight: 400;
}

.hero-sub {
  font-family: var(--font-title);
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fade-up 1s ease 0.7s forwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  opacity: 0;
  animation: fade-up 1s ease 0.9s forwards;
}

.hero-cta:hover {
  background: var(--gold);
  color: var(--bg-dark);
  box-shadow: 0 0 24px rgba(200, 149, 42, 0.4);
}

.hero-scroll {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  opacity: 0.55;
  animation: bob 2.5s ease-in-out infinite;
  z-index: 1;
}

.hero-scroll span {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
}

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   SEZIONE GENERICA
   ============================================= */
.section {
  padding: 6rem 2rem;
}

.section--dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

/* Titoli sezioni chiare: oro per coerenza con l'hero */
.section-title { color: var(--gold); }
.section--dark .section-title { color: var(--text-light); }

.section-title span.gold { color: var(--gold); }
.section--dark .section-title span.gold { color: var(--gold-pale); }

.section-desc {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-mid);
  margin: 1rem auto 0;
  max-width: 56ch;
}

.section--dark .section-desc { color: var(--text-muted); }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* =============================================
   CHI SONO
   ============================================= */
.chi-sono-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.chi-sono-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Placeholder per foto di Magalì */
.portrait-placeholder {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3/4;
  background: linear-gradient(145deg, #2A1A06 0%, #3D2510 40%, #1A0F02 100%);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  border: 1px solid var(--border-gold);
  position: relative;
  overflow: hidden;
}

.portrait-placeholder::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(200, 149, 42, 0.2);
  border-radius: 1px;
  pointer-events: none;
}

.portrait-photo {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--border-gold);
}

.portrait-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
  font-weight: 700;
}

/* Decorative circle behind portrait */
.portrait-deco {
  position: absolute;
  width: 90%;
  max-width: 380px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(200, 149, 42, 0.2);
  top: 50%;
  left: 50%;
  transform: translate(-44%, -46%);
  z-index: -1;
}

.chi-sono-content p {
  color: var(--text-mid);
  margin-bottom: 1.25rem;
  font-size: 1.02rem;
  max-width: 100%;
}

.chi-sono-content p:last-of-type { margin-bottom: 2rem; }

.chi-sono-content .quote {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 400;
  color: var(--gold-dark);
  border-left: 2px solid var(--gold);
  padding-left: 1.25rem;
  margin: 2rem 0;
  line-height: 1.5;
}

/* Elementi cards */
.elementi-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.elemento-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid);
}

.elemento-chip svg { color: var(--gold); flex-shrink: 0; }

/* =============================================
   COLLEZIONI
   ============================================= */
.collezioni-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.tab-btn {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--border-gold);
  border-radius: 2px;
  background: transparent;
  color: var(--text-mid);
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn:hover,
.tab-btn.active {
  background: var(--gold);
  color: var(--bg-dark);
  border-color: var(--gold);
}

.collezione-group { display: none; }
.collezione-group.active { display: block; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 300px));
  justify-content: center;
  gap: 1.5rem;
}

/* Product card */
.product-card {
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg-warm);
  border: 1px solid var(--border-gold);
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(200, 149, 42, 0.18);
}

.product-img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

/* Foto reale prodotto (sostituisce .product-ph quando disponibile) */
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}
.product-card:hover .product-img { transform: scale(1.04); }

/* Placeholder gradienti per ogni prodotto */
.product-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s ease;
}

.product-card:hover .product-ph { transform: scale(1.04); }

.product-ph--1 {
  background: linear-gradient(135deg, #2A1806 0%, #8C5A20 50%, #3D2510 100%);
}
.product-ph--2 {
  background: linear-gradient(135deg, #1A1206 0%, #6B4A1A 45%, #2A1A08 100%);
}
.product-ph--3 {
  background: linear-gradient(135deg, #0F1A1A 0%, #1A4040 50%, #0A1215 100%);
}
.product-ph--4 {
  background: linear-gradient(135deg, #200A06 0%, #6B2010 50%, #1A0804 100%);
}
.product-ph--5 {
  background: linear-gradient(135deg, #101820 0%, #1A3050 50%, #080F18 100%);
}
.product-ph--6 {
  background: linear-gradient(135deg, #1A1006 0%, #4A3010 50%, #0F0A02 100%);
}

.product-ph-label {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 217, 138, 0.55);
  font-weight: 700;
}

/* Overlay on hover */
.product-overlay {
  position: absolute;
  inset: 0;
  background: rgba(200, 149, 42, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.product-card:hover .product-overlay { opacity: 1; }

.product-overlay-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(245, 237, 216, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 1.1rem;
}

.product-info {
  padding: 1.1rem 1.25rem 1.4rem;
}

.product-name {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.product-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  max-width: 100%;
}

.product-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  border: 1px solid var(--gold-dark);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
}

/* =============================================
   MERCATINI & EVENTI
   ============================================= */

/* Stati dinamici (caricamento / nessun evento) */
.eventi-loading,
.eventi-empty {
  grid-column: 1 / -1;
  text-align: center;
  font-family: var(--font-title);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-muted);
  padding: 3rem 1rem;
  opacity: 0.7;
}

/* Colonne a larghezza massima fissa + auto-fit: con pochi eventi le
   card restano centrate, quando le righe si riempiono l'ultima riga
   parte da sinistra (stesso comportamento della griglia workshop). */
.eventi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 384px));
  justify-content: center;
  gap: 1.5rem;
}

/* Con auto-fit le colonne vuote collassano: i messaggi di
   caricamento/vuoto userebbero una sola colonna stretta. */
.eventi-grid:has(> .eventi-loading, > .eventi-empty),
.workshop-grid:has(> .eventi-loading, > .eventi-empty) {
  display: block;
}

.evento-card {
  padding: 1.75rem;
  border: 1px solid rgba(200, 149, 42, 0.25);
  border-radius: 2px;
  background: rgba(200, 149, 42, 0.04);
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

.evento-card:hover {
  border-color: var(--gold);
  background: rgba(200, 149, 42, 0.08);
}

.evento-date {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
}

.evento-month {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
  margin-bottom: 1rem;
  display: block;
}

.evento-nome {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}

.evento-luogo {
  font-size: 0.82rem;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0.75rem;
}

.evento-desc {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.6;
  max-width: 100%;
}

.evento-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bg-dark);
  background: var(--gold);
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
}

/* =============================================
   WORKSHOP
   ============================================= */
.workshop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 420px));
  justify-content: center;
  gap: 2rem;
}

.workshop-card {
  padding: 2.25rem;
  background: var(--bg-warm);
  border: 1px solid var(--border-gold);
  border-radius: 2px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.workshop-card:hover {
  box-shadow: var(--shadow-gold);
  transform: translateY(-3px);
}

.workshop-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  color: var(--gold);
}

.workshop-title {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.workshop-desc {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 100%;
}

.workshop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.workshop-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
}

.workshop-meta-item svg { color: var(--gold); flex-shrink: 0; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  border: 1px solid var(--gold);
  padding: 0.6rem 1.2rem;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-outline:hover {
  background: var(--gold);
  color: var(--bg-dark);
}

/* =============================================
   CONTATTI
   ============================================= */
.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: start;
}

.contatti-info h3 {
  font-size: 1.7rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.contatti-info p {
  color: var(--text-mid);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.contatti-links { display: flex; flex-direction: column; gap: 1rem; }

.contatti-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-gold);
  border-radius: 2px;
  transition: border-color var(--transition), background var(--transition);
  color: var(--text-dark);
}

.contatti-link:hover {
  border-color: var(--gold);
  background: rgba(200, 149, 42, 0.05);
  color: var(--gold-dark);
}

.contatti-link-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}

.contatti-link-text { font-size: 0.88rem; }
.contatti-link-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.contatti-link-value { font-weight: 700; font-size: 0.92rem; }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-input,
.form-textarea,
.form-select {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-dark);
  background: var(--bg-warm);
  border: 1px solid var(--border-gold);
  border-radius: 2px;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 149, 42, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.6;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

.btn-primary {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--bg-dark);
  border: none;
  padding: 0.85rem 2rem;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
}

.btn-primary:hover {
  background: var(--gold-light);
  box-shadow: 0 4px 20px rgba(200, 149, 42, 0.35);
}

.form-success {
  display: none;
  background: rgba(200, 149, 42, 0.08);
  border: 1px solid var(--gold);
  padding: 1rem 1.25rem;
  border-radius: 2px;
  font-size: 0.9rem;
  color: var(--gold-dark);
  font-weight: 700;
}

.form-privacy-note {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.form-privacy-note a {
  color: var(--gold-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-privacy-note a:hover { color: var(--gold); }

/* =============================================
   PAGINA LEGALE (Privacy Policy)
   ============================================= */
.legal-page { padding: 9rem 2rem 6rem; }

.legal-container {
  max-width: 800px;
  margin: 0 auto;
}

.legal-title {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  color: var(--gold);
  margin-bottom: 0.9rem;
}

.legal-updated {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3.5rem;
}

.legal-intro {
  color: var(--text-mid);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 3rem;
}

.legal-body h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  color: var(--text-dark);
  margin: 3.25rem 0 1rem;
}

.legal-body h2:first-child { margin-top: 0; }

.legal-body p {
  color: var(--text-mid);
  font-size: 1rem;
  line-height: 1.85;
  max-width: 70ch;
  margin-bottom: 1.1rem;
}

.legal-body ul {
  margin: 0 0 1.1rem;
  padding-left: 1.3rem;
  max-width: 70ch;
}

.legal-body ul li {
  list-style: disc;
  color: var(--text-mid);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 0.4rem;
}

.legal-body a {
  color: var(--gold-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-body a:hover { color: var(--gold); }

.legal-back {
  display: inline-block;
  margin-top: 4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.legal-back:hover { color: var(--gold); }

@media (max-width: 640px) {
  .legal-page { padding: 7rem 1.25rem 4rem; }
  .legal-body h2 { margin: 2.5rem 0 0.9rem; }
}

/* =============================================
   FOOTER
   ============================================= */
#footer {
  background: var(--bg-dark);
  padding: 4rem 2rem 2.5rem;
  color: var(--text-light);
  position: relative;
  overflow: hidden;
}

.footer-bg-deco {
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 320px;
  height: 320px;
  opacity: 0.04;
  pointer-events: none;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(200, 149, 42, 0.2);
  margin-bottom: 2.5rem;
}

.footer-brand .logo-wrap { margin-bottom: 1rem; }
.footer-brand .logo-text { color: var(--text-light); }

.footer-tagline {
  font-family: var(--font-title);
  font-size: 1rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 32ch;
}

.footer-col-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }

.footer-link {
  font-size: 0.88rem;
  color: rgba(245, 237, 216, 0.55);
  transition: color var(--transition);
}

.footer-link:hover { color: var(--gold-light); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(245, 237, 216, 0.35);
}

.footer-symbols {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  opacity: 0.45;
}

.footer-symbols svg { width: 14px; height: 14px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .chi-sono-grid { grid-template-columns: 1fr; gap: 3rem; }
  .portrait-placeholder { max-width: 340px; margin: 0 auto; }
  .contatti-grid { grid-template-columns: 1fr; gap: 3rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 4.5rem 1.5rem; }
  .workshop-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero-title { font-size: clamp(2.2rem, 9vw, 3.5rem); }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .eventi-grid { grid-template-columns: 1fr; }
}

/* =============================================
   PRODUCT LIGHTBOX
   ============================================= */
.product-card { cursor: pointer; }

.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.product-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.product-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 18, 8, 0.72);
  backdrop-filter: blur(3px);
}

.product-lightbox-dialog {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  max-width: 920px;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  background: var(--bg-warm);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  box-shadow: var(--shadow-gold);
  transform: translateY(16px) scale(0.97);
  transition: transform var(--transition);
}

.product-lightbox.open .product-lightbox-dialog {
  transform: translateY(0) scale(1);
}

.product-lightbox-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--bg-warm);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  color: var(--text-dark);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.product-lightbox-close:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.product-lightbox-media {
  position: relative;
  min-height: 280px;
  background: var(--bg-warm);
}

.product-lightbox-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: rgba(28, 18, 8, 0.55);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.product-lightbox-nav:hover {
  background: var(--gold);
  color: var(--text-dark);
}

.product-lightbox-nav--prev { left: 0.75rem; }
.product-lightbox-nav--next { right: 0.75rem; }

.product-lightbox-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.product-lightbox-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.product-lightbox-dot.active {
  background: var(--gold);
}

.product-lightbox-info {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 2.5rem 2.25rem;
}

.product-lightbox-name {
  font-size: 1.5rem;
  color: var(--text-dark);
}

.product-lightbox-desc {
  color: var(--text-mid);
  line-height: 1.7;
}

.product-lightbox-tag {
  align-self: flex-start;
  padding: 0.35rem 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-dark);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
}

@media (max-width: 640px) {
  .product-lightbox-dialog {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }
  .product-lightbox-media { min-height: 220px; }
  .product-lightbox-info { padding: 1.75rem; }
}
