/* =========================================================
   BLUE ZONE STUDIO — base.css
   Design system condiviso da tutte le pagine di bluezonestudio.it
   (Home, Lo studio, Prenota studio, Newsletter, hub eventi, legali).
   Contiene solo le fondamenta riusabili: font, token, reset,
   tipografia, blob decorativi, layout, bottoni, nav, footer, utility.
   I componenti specifici dell'evento Convivium NON stanno qui.
   ========================================================= */

/* ============ FONT FACES ============ */
@font-face {
  font-family: 'Sandro Grottesco';
  src: url('/assets/fonts/sandro_grotesque/SANDROGROTTESCO_FREE%20TRIAL/SandroGrottesco-Regular.otf') format('opentype'),
       url('/assets/fonts/sandro_grotesque/SANDROGROTTESCO_FREE%20TRIAL/SandroGrottesco-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face { font-family: 'Darker Grotesque'; src: url('/assets/fonts/Barlow/Darker_Grotesque/static/DarkerGrotesque-Light.ttf') format('truetype'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Darker Grotesque'; src: url('/assets/fonts/Barlow/Darker_Grotesque/static/DarkerGrotesque-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Darker Grotesque'; src: url('/assets/fonts/Barlow/Darker_Grotesque/static/DarkerGrotesque-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Darker Grotesque'; src: url('/assets/fonts/Barlow/Darker_Grotesque/static/DarkerGrotesque-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Darker Grotesque'; src: url('/assets/fonts/Barlow/Darker_Grotesque/static/DarkerGrotesque-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

/* ============ TOKENS ============ */
:root {
  --blue-electric: #2E3FF5;
  --blue-navy: #040B59;
  --cyan-sky: #7DDCEB;
  --lavender: #A78BF6;
  --periwinkle-pale: #D9D9F2;
  --off-white: #F2F1FA;
  --white: #FFFFFF;
  --font-display: 'Sandro Grottesco', 'Arial Narrow', 'Impact', sans-serif;
  --font-body: 'Darker Grotesque', system-ui, -apple-system, sans-serif;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--blue-navy);
  background: var(--off-white);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* ============ TIPOGRAFIA ============ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.92;
}
.display-xxl { font-size: clamp(72px, 14vw, 200px); letter-spacing: -0.035em; }
.display-xl  { font-size: clamp(44px, 6vw, 72px);   letter-spacing: -0.025em; }
.display-lg  { font-size: clamp(40px, 6vw, 80px);   letter-spacing: -0.025em; }
.display-md  { font-size: clamp(28px, 4vw, 48px);   letter-spacing: -0.02em;  }
.body-lg { font-size: 22px; line-height: 1.5; font-weight: 500; }
.body-md { font-size: 17px; line-height: 1.6; font-weight: 500; }
.body-sm { font-size: 14px; line-height: 1.5; font-weight: 500; }
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--blue-electric);
}
.section-dark .eyebrow { color: var(--cyan-sky); }

/* ============ BLOB ============ */
.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
  will-change: transform;
}
.blob-cyan {
  background: radial-gradient(circle at 35% 35%,
    rgba(125, 220, 235, 0.78) 0%,
    rgba(150, 195, 240, 0.50) 25%,
    rgba(200, 220, 250, 0.25) 55%,
    rgba(240, 245, 252, 0.05) 80%,
    transparent 100%);
}
.blob-electric {
  background: radial-gradient(circle at 40% 40%,
    rgba(46, 63, 245, 0.45) 0%,
    rgba(100, 140, 245, 0.28) 35%,
    rgba(180, 200, 248, 0.12) 65%,
    transparent 100%);
}
.blob-lavender {
  background: radial-gradient(circle at 50% 50%,
    rgba(167, 139, 246, 0.42) 0%,
    rgba(200, 180, 248, 0.22) 45%,
    rgba(230, 220, 250, 0.08) 75%,
    transparent 100%);
}
.blob-on-dark {
  background: radial-gradient(circle at 40% 40%,
    rgba(125, 220, 235, 0.45) 0%,
    rgba(46, 63, 245, 0.32) 35%,
    rgba(46, 63, 245, 0.12) 65%,
    transparent 100%);
}
@keyframes blob-a { 0%,100% { transform: translate3d(0,0,0) scale(1); } 33% { transform: translate3d(5%,-4%,0) scale(1.08); } 66% { transform: translate3d(-3%,3%,0) scale(0.94); } }
@keyframes blob-b { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(-6%,5%,0) scale(1.12); } }
@keyframes blob-c { 0%,100% { transform: translate3d(0,0,0) scale(1); } 25% { transform: translate3d(4%,4%,0) scale(1.06); } 50% { transform: translate3d(7%,-3%,0) scale(0.92); } 75% { transform: translate3d(-3%,5%,0) scale(1.08); } }
.blob { animation: blob-a 28s ease-in-out infinite; }
.blob:nth-of-type(2n) { animation: blob-b 36s ease-in-out infinite -8s; }
.blob:nth-of-type(3n) { animation: blob-c 44s ease-in-out infinite -15s; }
@media (prefers-reduced-motion: reduce) { .blob { animation: none !important; } }

/* ============ LAYOUT / CONTAINER ============ */
section { position: relative; overflow: hidden; padding: 120px 48px; }
.section-dark { background: var(--blue-navy); color: var(--white); }
.section-light { background: var(--white); color: var(--blue-navy); }
.section-cream { background: var(--off-white); color: var(--blue-navy); }
.container { max-width: 1280px; margin: 0 auto; position: relative; z-index: 2; }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 32px;
  background: rgba(4, 11, 89, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-back {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  display: flex; align-items: center; gap: 10px;
}
.nav-back:hover { color: var(--cyan-sky); }
.nav-logo img { height: 32px; filter: brightness(0) invert(1); }
.nav-cta {
  background: var(--cyan-sky); color: var(--blue-navy);
  padding: 10px 18px;
  font-family: var(--font-body); font-size: 12px;
  font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  transition: transform 0.18s;
}
.nav-cta:hover { transform: translateX(2px); }

/* ============ SITE NAV (header multi-pagina) ============ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 32px;
  background: rgba(4, 11, 89, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-nav__logo img { height: 30px; filter: brightness(0) invert(1); }
.site-nav__links { display: flex; align-items: center; gap: 26px; }
.site-nav__links a {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--white); transition: color 0.15s;
}
.site-nav__links a:hover { color: var(--cyan-sky); }
.site-nav__cta {
  background: var(--cyan-sky); color: var(--blue-navy) !important;
  padding: 10px 18px; letter-spacing: 0.14em !important;
  transition: transform 0.18s;
}
.site-nav__cta:hover { color: var(--blue-navy) !important; transform: translateX(2px); }
.site-nav__burger { display: none; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .site-nav { padding: 10px 18px; }
  .site-nav__burger {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; cursor: pointer;
    color: var(--white); font-size: 24px; line-height: 1;
    background: transparent; border: none;
  }
  .site-nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: rgba(4, 11, 89, 0.97);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    max-height: 0; overflow: hidden;
    transition: max-height 0.28s ease;
  }
  .nav-toggle:checked ~ .site-nav__links { max-height: 340px; }
  .site-nav__links a {
    width: 100%; padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.07);
    font-size: 13px;
  }
  .site-nav__cta {
    background: transparent; color: var(--cyan-sky) !important;
  }
}

/* ============ BOTTONI ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 18px 28px;
  font-family: var(--font-body); font-weight: 700; font-size: 15px;
  letter-spacing: 0.04em; border: none; border-radius: 0;
  cursor: pointer; transition: transform 0.18s;
}
.btn:hover { transform: translateX(4px); }
.btn .arrow { font-family: var(--font-display); font-size: 20px; line-height: 0.8; }
.btn-primary { background: var(--blue-electric); color: var(--white); }
.btn-cyan { background: var(--cyan-sky); color: var(--blue-navy); }
.btn-ghost-light { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ============ TITOLI LEGGIBILI (sito madre) ============ */
/* Il display Sandro Grottesco resta per logo/accenti brevi.
   I titoli di sezione usano il body Darker Grotesque: più leggibili. */
.headline {
  font-family: var(--font-body);
  font-weight: 700; text-transform: none;
  letter-spacing: -0.01em; line-height: 1.06;
  font-size: clamp(30px, 4.2vw, 50px);
  max-width: 20ch;
}
.headline--lg { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; max-width: 16ch; }
.kicker {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--blue-electric);
}
.section-dark .kicker { color: var(--cyan-sky); }

/* ============ HERO FULL-BLEED (foto) ============ */
.hero-full {
  position: relative; min-height: 74vh;
  display: flex; align-items: flex-end;
  padding: 48px; overflow: hidden;
  background-position: center 58%; background-size: cover;
  color: var(--white);
}
.hero-full__video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero-full::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(4,11,89,0.30) 0%, rgba(4,11,89,0.20) 40%, rgba(4,11,89,0.86) 100%);
}
.hero-full__inner { position: relative; z-index: 2; max-width: 1280px; margin: 0 auto; width: 100%; }
.hero-full__logo { width: clamp(200px, 26vw, 340px); height: auto; margin-bottom: 26px; }

/* ============ MEDIA CARD (foto + etichetta) ============ */
.media-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.media-card {
  position: relative; display: flex; align-items: flex-end;
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px;
  color: var(--white); isolation: isolate;
}
.media-card__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2; transition: transform 0.5s ease;
}
.media-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(4,11,89,0) 30%, rgba(4,11,89,0.82) 100%);
}
.media-card:hover .media-card__img { transform: scale(1.05); }
.media-card__body { padding: 24px; width: 100%; }
.media-card__body h3 { font-family: var(--font-body); font-weight: 700; text-transform: none; letter-spacing: -0.01em; font-size: 26px; line-height: 1.1; }
.media-card__body p { font-size: 15px; opacity: 0.9; margin-top: 6px; }
.media-card__arrow { display: inline-block; margin-top: 12px; font-family: var(--font-display); font-size: 22px; color: var(--cyan-sky); }

/* ============ SPLIT (foto + testo) ============ */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.split--flip .split__media { order: 2; }
.split__media img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; max-height: 560px; }

/* ============ MARQUEE (gallery infinita, foto NON croppate) ============ */
.marquee { position: relative; width: 100%; overflow: hidden; }
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none;
}
.marquee__track { display: flex; gap: 16px; width: max-content; animation: marquee-scroll 55s linear infinite; }
.marquee__track img {
  height: clamp(220px, 34vh, 360px); width: auto; display: block;
  border-radius: 4px; flex: 0 0 auto;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }
/* sfumature laterali coerenti col fondo della sezione */
.section-cream .marquee::before { background: linear-gradient(90deg, var(--off-white), transparent); left: 0; }
.section-cream .marquee::after { background: linear-gradient(270deg, var(--off-white), transparent); right: 0; }

@media (max-width: 780px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split--flip .split__media { order: 0; }
  .split__media img { max-height: 420px; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
  .gallery .wide { grid-column: span 2; }
  .hero-full { padding: 28px 20px; min-height: 66vh; }
}

/* ============ CARD / GRID ============ */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  position: relative; z-index: 2;
  background: var(--white); color: var(--blue-navy);
  padding: 34px 30px; border-radius: 4px;
  box-shadow: 0 1px 0 rgba(4,11,89,0.08);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.18s, box-shadow 0.18s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 34px rgba(4,11,89,0.12); }
.card .card__arrow { margin-top: auto; font-family: var(--font-display); color: var(--blue-electric); font-size: 22px; }
.section-dark .card { background: rgba(255,255,255,0.05); color: var(--white); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); }
.section-dark .card .card__arrow { color: var(--cyan-sky); }
.lead { max-width: 62ch; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--blue-navy);
  color: var(--white);
  padding: 48px 48px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-row {
  max-width: 1280px; margin: 0 auto;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 24px;
}
.footer-row img {
  height: 36px;
  filter: brightness(0) invert(1);
}
.footer-row p { font-size: 13px; opacity: 0.65; }
.footer-legal { margin-top: 8px; }
.footer-legal a {
  color: var(--cyan-sky);
  text-decoration: none;
  transition: opacity 0.15s;
}
.footer-legal a:hover { opacity: 0.75; text-decoration: underline; }

/* ============ MEDIA QUERIES ============ */
@media (max-width: 900px) {
  section { padding: 80px 24px; }
  .blob { filter: blur(40px); animation-duration: 48s !important; }

  /* NAV mobile: griglia 3 colonne bilanciata */
  .nav {
    padding: 10px 16px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .nav-back { justify-self: start; }
  .nav-back span:last-child { display: none; }
  .nav-logo { justify-self: center; }
  .nav-logo img { height: 26px; }
  .nav-cta {
    justify-self: end;
    padding: 8px 14px;
    font-size: 11px;
    letter-spacing: 0.14em;
  }

  .footer-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 540px) {
  section { padding: 60px 18px; }
  .blob { filter: blur(30px); }
  .display-xxl { font-size: 52px; }
  .display-xl { font-size: 34px; }
  .display-lg { font-size: 30px; }
  .footer-row p { font-size: 12px; }
}
@media (max-width: 540px) and (max-resolution: 1.5dppx) {
  .blob { animation: none; }
}
