/* ═══════════════════════════════════════════════════════════════
   CREATIVE AGENCY — "il segno"
   Carta bianca, tratto d'inchiostro, una scintilla rosa.
   Il rosa compare solo dove qualcosa e' vivo o si puo' toccare:
   le storie, le dirette, le azioni principali.
   ═══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/literata-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/literata-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/montserrat-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  --paper: #FFFFFF;
  --ink: #1E1E1E;          /* il nero del logo */
  --graphite: #5C5C5C;
  --line: #E4E4E4;
  --mist: #F5F5F4;
  --pink: #DB2B72;         /* il rosa di "AGENCY" */
  --pink-press: #BE1C5E;
  --pink-soft: #FCEAF2;
  --pink-on-ink: #EE5E97;
  --drinkeria: #4C6142;
  --monticelli: #143E35;

  --serif: 'Literata', Georgia, 'Times New Roman', serif;
  --sans: 'Montserrat', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(2rem, 1.35rem + 2.6vw, 2.9rem);
  --step-4: clamp(2.55rem, 1.4rem + 4.9vw, 4.85rem);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(56px, 9vw, 120px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font: 400 var(--step-0)/1.65 var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.lead {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--graphite);
  max-width: 36rem;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.solid { fill: currentColor; stroke: none; }

.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
}
.skip:focus { left: 16px; }

[hidden] { display: none !important; }

/* ── Pulsanti ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0.7em 1.35em;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 var(--step-0)/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-small { min-height: 40px; padding: 0.5em 1.05em; font-size: 0.9375rem; }
.btn-pink { background: var(--pink); color: #fff; }
.btn-pink:hover { background: var(--pink-press); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-line { background: transparent; color: inherit; border-color: currentColor; }
.btn-line:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-paper { background: #fff; color: var(--drinkeria); }
.btn-paper:hover { background: #EEF2EC; }
.btn-forest { background: var(--monticelli); color: #fff; }
.btn-forest:hover { background: #0B2C25; }

/* ── Barra in alto ────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
}
.brand-bulb {
  width: 32px;
  height: 35px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand-word {
  display: grid;
  line-height: 1;
  text-transform: uppercase;
}
.brand-agency {
  justify-self: end;
  margin: 0 -0.2em 2px 0;
  font: 600 0.56rem/1 var(--sans);
  letter-spacing: 0.2em;
  color: var(--pink);
}
.brand-creative {
  font: 500 1.28rem/1 var(--sans);
  letter-spacing: 0.02em;
}
/* Come nel logo: un filo che sfuma ai lati e MUSSOMELI spaziato sotto. */
.brand-rule {
  height: 1px;
  margin: 4px 0 3px;
  background: linear-gradient(90deg, transparent, currentColor 22%, currentColor 78%, transparent);
  opacity: 0.45;
}
.brand-city {
  justify-self: center;
  margin-right: -0.32em;
  font: 700 0.5rem/1 var(--sans);
  letter-spacing: 0.32em;
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  padding: 6px 0;
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}
.nav a:hover { color: var(--pink); }

/* Live Patronali: l'unica voce che resta anche su telefono. */
.nav .nav-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
.nav .nav-live:hover { border-color: var(--ink); color: var(--ink); }
.nav .nav-live[aria-current="page"] { border-color: var(--ink); }
.nav .nav-live.is-live { border-color: var(--pink); color: var(--pink-press); }

@media (max-width: 859px) {
  .topbar-inner { gap: 12px; }
  .nav a:not(.nav-live) { display: none; }
  .nav-live-more { display: none; }
}

/* ── Apertura ─────────────────────────────────────────────────── */

.hero { padding: clamp(24px, 5vw, 64px) 0 var(--section); }

.hero-inner {
  display: grid;
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
}

/* La lampadina e il marchio sotto, nelle proporzioni della foto profilo.
   Le misure del marchio sono in cqi (larghezza del riquadro): restano in
   proporzione a qualsiasi dimensione. */
.hero-art {
  container-type: inline-size;
  display: grid;
  justify-items: center;
  width: min(68vw, 290px);
}
.hero-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 78%;
  aspect-ratio: 1;
}

.hero-word {
  display: grid;
  justify-items: center;
  width: 100%;
  margin-top: -5cqi;
  color: var(--ink);
  line-height: 1;
  text-transform: uppercase;
}
.hw-agency {
  justify-self: end;
  margin-right: 1.2cqi;
  font: 600 4.3cqi/1 var(--sans);
  letter-spacing: 0.2em;
  color: var(--pink);
}
.hw-creative {
  display: flex;
  margin-top: 1cqi;
  padding-block: 0.06em;
  overflow: hidden;
  font: 500 17.2cqi/1 var(--sans);
  letter-spacing: 0.02em;
}
.hw-creative span { display: inline-block; }
.hw-rule {
  width: 96%;
  height: 1px;
  margin: 3.2cqi 0 2.6cqi;
  background: linear-gradient(90deg, transparent, currentColor 20%, currentColor 80%, transparent);
  opacity: 0.5;
}
.hw-city {
  margin-right: -0.32em;
  font: 700 3.5cqi/1 var(--sans);
  letter-spacing: 0.32em;
}

.bulb {
  width: 94%;
  height: auto;
  overflow: visible;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bulb-rays,
.bulb .spark { stroke: var(--pink); }
.spark-nodes circle { fill: var(--pink); stroke: none; }

.hero-text { display: grid; gap: 22px; }
.hero h1 { font-size: var(--step-4); font-weight: 750; line-height: 1.03; letter-spacing: -0.022em; }
.hero .lead { max-width: 33rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

.hero-note { font-size: var(--step--1); color: var(--graphite); }
.hero-note a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.hero-note a:hover { color: var(--pink); }

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .hero-art { width: min(100%, 430px); justify-self: center; }
}

/* Il tratto si disegna una volta sola, poi la lampadina si accende. */
@media (prefers-reduced-motion: no-preference) {
  .bulb .draw {
    stroke-dasharray: 1 2;
    stroke-dashoffset: 1.02;
    animation: ink-draw 1.15s cubic-bezier(0.55, 0.1, 0.35, 1) forwards;
  }
  .bulb .d2 { animation-delay: 0.25s; }
  .bulb .d3 { animation-delay: 0.45s; }
  .bulb .d4 { animation-delay: 0.8s; }
  .bulb .d5 { animation-delay: 1.15s; animation-duration: 0.6s; }
  .bulb-rays {
    opacity: 0;
    transform: scale(0.8);
    transform-box: view-box;
    transform-origin: 50px 46px;
    animation: ignite 0.55s 1.55s cubic-bezier(0.2, 0.9, 0.3, 1.3) forwards;
  }
  .spark-nodes { opacity: 0; animation: appear 0.3s 1.6s forwards; }

  /* Poi il marchio si compone: le lettere di CREATIVE salgono una alla volta
     da una linea invisibile, il filo si traccia dal centro, AGENCY entra in
     rosa e MUSSOMELI si stringe fino alla spaziatura del logo. */
  .hw-creative span {
    transform: translateY(110%);
    animation: letter-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }
  .hw-creative span:nth-child(1) { animation-delay: 1.2s; }
  .hw-creative span:nth-child(2) { animation-delay: 1.27s; }
  .hw-creative span:nth-child(3) { animation-delay: 1.34s; }
  .hw-creative span:nth-child(4) { animation-delay: 1.41s; }
  .hw-creative span:nth-child(5) { animation-delay: 1.48s; }
  .hw-creative span:nth-child(6) { animation-delay: 1.55s; }
  .hw-creative span:nth-child(7) { animation-delay: 1.62s; }
  .hw-creative span:nth-child(8) { animation-delay: 1.69s; }
  .hw-rule {
    transform: scaleX(0);
    animation: rule-draw 0.7s 1.95s cubic-bezier(0.6, 0, 0.2, 1) forwards;
  }
  .hw-agency {
    clip-path: inset(0 100% 0 0);
    animation: wipe-in 0.5s 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  .hw-city {
    opacity: 0;
    letter-spacing: 0.9em;
    margin-right: -0.9em;
    animation: track-in 0.9s 2.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }
}
@keyframes ink-draw { to { stroke-dashoffset: 0; } }
@keyframes ignite { to { opacity: 1; transform: none; } }
@keyframes appear { to { opacity: 1; } }
@keyframes letter-rise { to { transform: none; } }
@keyframes rule-draw { to { transform: scaleX(1); } }
@keyframes wipe-in { to { clip-path: inset(0 0 0 0); } }
@keyframes track-in { to { opacity: 1; letter-spacing: 0.32em; margin-right: -0.32em; } }

/* Storie attive: la lampadina diventa l'immagine del profilo con l'anello. */
.hero-art.has-stories .hero-mark::before {
  content: "";
  position: absolute;
  inset: -3%;
  border: 3px solid var(--pink);
  border-radius: 50%;
}
/* L'etichetta sta in cima all'anello: sotto c'e' il marchio. */
.stories-open {
  position: absolute;
  inset: -3%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.stories-open-label {
  transform: translateY(-45%);
  padding: 0.6em 1.1em;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font: 600 var(--step--1)/1 var(--sans);
  white-space: nowrap;
}
.stories-open:hover .stories-open-label { background: var(--pink-press); }

/* ── Lavori (feed Instagram) ──────────────────────────────────── */

.work {
  padding: var(--section) 0;
  border-top: 1px solid var(--line);
}

.work-head {
  display: grid;
  gap: 12px;
  max-width: 40rem;
  margin-bottom: 32px;
}

.filters { display: grid; gap: 22px; margin-bottom: 30px; }

.cats {
  display: flex;
  gap: 16px;
  margin-inline: calc(var(--gutter) * -1);
  padding: 4px var(--gutter) 6px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.cats::-webkit-scrollbar { display: none; }

.cat {
  flex: none;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 82px;
  padding: 0;
  border: 0;
  background: none;
  font: 500 0.8125rem/1.25 var(--sans);
  text-align: center;
  cursor: pointer;
  scroll-snap-align: start;
}
.cat-ring {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  transition: border-color 0.15s ease;
}
.cat-ring svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cat:hover .cat-ring { border-color: var(--ink); }
.cat[aria-pressed="true"] .cat-ring {
  border: 2px solid var(--pink);
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px var(--line);
}
.cat[aria-pressed="true"] .cat-label { font-weight: 700; }
.cat:focus-visible { outline: none; }
.cat:focus-visible .cat-ring { outline: 3px solid var(--pink); outline-offset: 3px; }

.kinds {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}
.kind {
  margin-bottom: -1px;
  padding: 10px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--graphite);
  cursor: pointer;
}
.kind:hover { color: var(--ink); }
.kind[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 12px;
}
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 18px; }
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.tile-btn {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--mist);
  cursor: pointer;
}
.tile-btn img { width: 100%; height: 100%; object-fit: cover; }
.tile-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(30, 30, 30, 0);
  transition: background-color 0.2s ease;
}
.tile-btn:hover::after { background: rgba(30, 30, 30, 0.14); }
.tile-kind {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 22px;
  height: 22px;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.tile-meta { display: grid; gap: 3px; margin-top: 11px; }
.tile-who { font-weight: 600; font-size: 0.9375rem; line-height: 1.3; }
.tile-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--step--1);
  line-height: 1.45;
  color: var(--graphite);
}
.tile-when { font-size: 0.8125rem; color: var(--graphite); }

.tile-skeleton .tile-btn { cursor: default; }
.tile-skeleton .tile-meta span {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: var(--mist);
}
.tile-skeleton .tile-meta span + span { width: 60%; }

.grid-state {
  display: grid;
  justify-items: start;
  gap: 16px;
  padding: 36px 0 8px;
  color: var(--graphite);
  font-size: var(--step-1);
}
.grid-more { margin-top: 40px; }

/* ── Servizi ──────────────────────────────────────────────────── */

.services { padding: var(--section) 0; background: var(--mist); }

.services-inner { display: grid; gap: 40px; }
.services-intro { display: grid; gap: 16px; align-content: start; }

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 30px;
}
.service {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.service-icon,
.event-icon {
  width: 76px;
  height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service h3 { margin: 6px 0 8px; }
.service p { max-width: 32rem; color: var(--graphite); }

@media (min-width: 960px) {
  .services-inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; }
  .services-intro { position: sticky; top: 112px; }
}

/* ── Metodo: l'unica vera sequenza della pagina ───────────────── */

.method { padding: var(--section) 0; }

.steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 32px;
  counter-reset: step;
}
.step {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  padding-top: 68px;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font: 650 1.3rem/1 var(--serif);
}
.step h3 { font-size: 1.35rem; }
.step p { color: var(--graphite); max-width: 22rem; }

@media (min-width: 820px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .step::after {
    content: "";
    position: absolute;
    top: 25px;
    left: 62px;
    right: -20px;
    border-top: 1.5px solid var(--ink);
  }
  .step:last-child::after { display: none; }
}

/* ── Stato della diretta ──────────────────────────────────────── */

.live-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8A8A8A;
}
.is-live .live-dot { background: var(--pink); animation: live-pulse 1.6s ease-out infinite; }
@keyframes live-pulse {
  from { box-shadow: 0 0 0 0 rgba(219, 43, 114, 0.55); }
  to { box-shadow: 0 0 0 10px rgba(219, 43, 114, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .is-live .live-dot { animation: none; }
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: var(--step--1);
  color: #CFCFCF;
}
.live-status.is-live { color: var(--pink-on-ink); }

/* Banda nella pagina principale */
.live-band { padding: clamp(44px, 6vw, 76px) 0; background: var(--ink); color: #fff; }
.live-band-inner { display: grid; gap: 24px; align-items: end; }
.live-band-text { display: grid; gap: 12px; max-width: 44rem; }
.live-band-text > p:not(.live-status) { color: #D2D2D2; font-size: var(--step-1); }
.live-band .btn-line,
.stage .btn-line { color: #fff; }
.live-band .btn-line:hover,
.stage .btn-line:hover { background: #fff; border-color: #fff; color: var(--ink); }

@media (min-width: 820px) {
  .live-band-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 48px; }
}

/* ── Pagina Live Patronali ────────────────────────────────────── */

.stage {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}

/* Il castello di notte. Su telefono e' una fascia in cima, tagliata in modo
   da tenere palazzo e sperone, e il titolo viene dopo; da 900px la foto sta a
   destra e il titolo a sinistra sul buio, con il castello che sale accanto. */
.stage-photo {
  position: relative;
  height: clamp(230px, 66vw, 340px);
}
.stage-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.stage-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 30, 30, 0) 50%, var(--ink) 100%);
}
/* Su telefono sulla sfumatura in fondo alla foto, da 900px nel cielo in alto a destra. */
.photo-caption {
  position: absolute;
  top: calc(clamp(230px, 66vw, 340px) - 30px);
  left: var(--gutter);
  z-index: 1;
  font-size: 0.75rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
@media (min-width: 900px) {
  .photo-caption { top: 14px; left: auto; right: var(--gutter); }
}

.stage-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(26px, 4vw, 44px);
  padding-top: 4px;
}

@media (min-width: 900px) {
  /* Proporzioni della foto: nessun taglio ai lati, il castello resta intero e a
     destra del titolo a qualsiasi larghezza. */
  .stage-photo {
    position: absolute;
    top: 0;
    right: 0;
    width: min(74%, 1600px);
    height: auto;
    aspect-ratio: 2000 / 866;
  }
  .stage-photo img { object-position: center; }
  .stage-photo::after {
    background:
      linear-gradient(90deg, var(--ink) 0%, rgba(30, 30, 30, 0.55) 22%, rgba(30, 30, 30, 0) 42%),
      linear-gradient(180deg, rgba(30, 30, 30, 0) 58%, var(--ink) 100%);
  }
  .stage-inner { padding-top: clamp(110px, 18vh, 210px); }
}
.stage-head { display: grid; gap: 14px; max-width: 46rem; }
.stage h1 { font-size: var(--step-4); font-weight: 750; line-height: 1.03; letter-spacing: -0.022em; }
.stage .lead { color: #D2D2D2; }

.screen {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  background: #151515;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13);
}
.screen-off,
.screen-cta {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 28px 22px;
  text-align: center;
}
.screen-on { position: relative; display: grid; }
.screen-on iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.screen-title { font: 700 clamp(1.4rem, 1.1rem + 1.2vw, 2rem)/1.2 var(--serif); text-wrap: balance; }
.screen-text { max-width: 30rem; color: #CFCFCF; }
.screen-note { max-width: 26rem; font-size: 0.8125rem; color: #BDBDBD; }
.screen .actions { justify-content: center; margin-top: 6px; }

.candle {
  width: clamp(64px, 8vw, 96px);
  height: auto;
  margin-bottom: 2px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.candle-smoke { stroke: rgba(255, 255, 255, 0.4); }

@media (max-width: 699px) {
  /* In verticale il 16:9 e' troppo basso per il messaggio; il video invece resta 16:9. */
  .screen { aspect-ratio: auto; min-height: 430px; }
  .screen.is-live { aspect-ratio: 16 / 9; min-height: 0; }
}

/* Altezza legata alla larghezza (viewBox 1200x138): su schermi larghi il
   disegno cresce invece di perdere la cima del castello. */
.skyline {
  display: block;
  width: 100%;
  height: clamp(96px, 11.5vw, 340px);
  margin-top: clamp(36px, 5vw, 72px);
  fill: none;
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skyline path { vector-effect: non-scaling-stroke; }

.events { padding: var(--section) 0; }
.events-head { display: grid; gap: 12px; max-width: 40rem; margin-bottom: 40px; }
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 34px 56px; }
.event { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 22px; align-items: start; }
.event h3 { margin: 6px 0 8px; font-size: 1.35rem; }
.event p { max-width: 32rem; color: var(--graphite); }

@media (min-width: 820px) {
  .event-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.places { padding: 0 0 var(--section); }
.places h2 { margin-bottom: 36px; }
.place-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 44px 32px; }
.place { display: grid; gap: 10px; align-content: start; }
.place-art {
  width: 100%;
  height: 118px;
  margin-bottom: 8px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.place h3 { font-size: 1.3rem; }
.place p { color: var(--graphite); }

@media (min-width: 640px) {
  .place-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
  .place-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.tech-partner { padding: 0 0 var(--section); }
.tech-partner h2 { margin-bottom: 28px; }

/* ── Partner: ognuno con i propri colori ──────────────────────── */

.partners { padding: var(--section) 0; border-top: 1px solid var(--line); }

.partners-head { display: grid; gap: 12px; max-width: 40rem; margin-bottom: 36px; }

.partner-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }

/* minmax(0, 1fr): senza, la colonna si allarga alla larghezza naturale del logo
   e su telefono il testo esce dal riquadro. */
.partner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  border-radius: 22px;
  overflow: hidden;
}
.partner-logo {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
}
.partner-logo picture { display: contents; }
.partner-body {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 26px clamp(22px, 3vw, 36px) 32px;
}
.partner h3 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.2rem); }
.partner-kind { font-weight: 600; font-size: var(--step--1); }

.facts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.facts li { display: flex; align-items: flex-start; gap: 10px; }
.facts .icon { margin-top: 0.2em; }
.facts a { font-weight: 600; text-underline-offset: 3px; }

.partner-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.partner-drinkeria { background: var(--drinkeria); color: #fff; }
.partner-drinkeria .partner-logo img { width: min(64%, 300px); height: auto; }
.partner-drinkeria .partner-kind { color: #DCE5D6; }

.partner-monticelli { background: #fff; color: var(--monticelli); box-shadow: inset 0 0 0 1px var(--line); }
.partner-monticelli .partner-logo { background: #F1F5F2; }
.partner-monticelli .partner-logo img { width: min(56%, 270px); height: auto; }
.partner-monticelli .btn-line:hover { background: var(--monticelli); border-color: var(--monticelli); }

/* Genesys Labs: il loro verde notte e il verde menta del logo. */
.partner-genesys { background: #0B1714; color: #fff; }
.partner-genesys .partner-logo img { width: min(30%, 132px); height: auto; }
.partner-genesys .partner-kind { color: #4ADE80; }
.partner-genesys .btn-line:hover { background: #fff; border-color: #fff; color: #0B1714; }
.btn-mint { background: #10B981; color: #04130D; }
.btn-mint:hover { background: #34D399; }

@media (min-width: 960px) {
  .partner-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .partner-wide {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    grid-template-rows: auto;
  }
  .partner-wide .partner-logo { aspect-ratio: auto; min-height: 280px; }
  .partner-wide .partner-body { align-content: center; padding-block: 40px; }
}

/* ── Contatti ─────────────────────────────────────────────────── */

.contact { padding: var(--section) 0; background: var(--ink); color: #fff; }

.contact-inner { display: grid; gap: 40px; }
.contact-intro { display: grid; gap: 18px; align-content: start; }
.contact h2 { font-size: clamp(2.35rem, 1.5rem + 3.4vw, 3.9rem); line-height: 1.04; letter-spacing: -0.02em; }
.contact .lead { color: #D2D2D2; }

.contact-direct { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 14px; }
.contact-direct a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: var(--step-1);
  text-decoration: none;
}
.contact-direct a:hover { color: var(--pink-on-ink); }

.wa-form {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 3.5vw, 36px);
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
}
.field { display: grid; gap: 7px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label,
.field > legend { padding: 0; font-weight: 600; font-size: 0.9375rem; }
.field input,
.field textarea {
  width: 100%;
  padding: 0.75em 0.9em;
  border: 1.5px solid #C9C9C9;
  border-radius: 12px;
  background: #fff;
}
.field input::placeholder { color: #8A8A8A; }
.field input:focus-visible,
.field textarea:focus-visible { outline: 3px solid var(--pink); outline-offset: 1px; border-color: var(--ink); border-radius: 12px; }
.field textarea { min-height: 100px; resize: vertical; }
.field-error { color: var(--pink-press); font-size: var(--step--1); font-weight: 500; }
.field input[aria-invalid="true"] { border-color: var(--pink); }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.chip { position: relative; }
.chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.45em 1em;
  border: 1.5px solid #C9C9C9;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
}
.chip input:checked + span { border-color: var(--pink); background: var(--pink-soft); color: var(--pink-press); }
.chip input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: 2px; }

.wa-form .btn { justify-self: start; }

@media (min-width: 960px) {
  .contact-inner { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; }
}

/* ── Piede ────────────────────────────────────────────────────── */

.footer {
  padding: 48px 0 calc(40px + env(safe-area-inset-bottom));
  background: var(--ink);
  color: #fff;
  border-top: 1px solid #343434;
}
.footer-inner { display: grid; gap: 30px; }

.logo-stack { display: grid; justify-items: center; width: 184px; }
.logo-stack-bulb {
  width: 64px;
  height: 70px;
  margin-bottom: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.logo-stack-agency {
  justify-self: end;
  margin-right: 2px;
  font: 600 0.72rem/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pink-on-ink);
}
.logo-stack-creative { margin-top: 3px; font: 500 1.95rem/1 var(--sans); letter-spacing: 0.02em; text-transform: uppercase; }
.logo-stack-rule {
  width: 100%;
  height: 1px;
  margin: 9px 0 7px;
  background: linear-gradient(90deg, transparent, currentColor 22%, currentColor 78%, transparent);
  opacity: 0.55;
}
.logo-stack-city { margin-right: -0.3em; font: 700 0.6rem/1 var(--sans); letter-spacing: 0.3em; text-transform: uppercase; }

.footer-info { display: grid; gap: 8px; color: #CFCFCF; font-size: 0.9375rem; }
.footer-info a { text-decoration: none; }
.footer-info a:hover { color: var(--pink-on-ink); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.footer-links a { font-weight: 600; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--pink-on-ink); }
.footer-legal { padding-top: 20px; border-top: 1px solid #343434; font-size: 0.8125rem; color: #A8A8A8; }

@media (min-width: 820px) {
  .footer-inner { grid-template-columns: auto 1fr auto; align-items: end; gap: 56px; }
  .footer-legal { grid-column: 1 / -1; }
}

/* ── Barra di contatto su telefono ────────────────────────────── */

.quickbar {
  position: fixed;
  inset: auto 0 0;
  z-index: 45;
  display: none;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.25s ease;
}
.quickbar .btn { flex: 1; }
.quickbar.is-visible { transform: none; }

@media (max-width: 819px) {
  .quickbar { display: flex; }
  .topbar-cta span { display: none; }
  .topbar-cta { width: 44px; min-height: 44px; padding: 0; }
  .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* ── Finestra del lavoro ──────────────────────────────────────── */

dialog { max-width: none; max-height: none; padding: 0; border: 0; }
body.has-dialog { overflow: hidden; }

.lightbox {
  width: min(1120px, 100vw - 40px);
  height: min(780px, 100dvh - 40px);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  color: var(--ink);
}
.lightbox::backdrop { background: rgba(18, 18, 18, 0.84); }

.lb-frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr);
  height: 100%;
}

.lb-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  background: #121212;
}
/* Tracce esplicite: con righe "auto" l'altezza al 100% di foto e video non si
   risolve e un reel verticale esce dal riquadro, tagliato. */
.lb-stage,
.lb-slide,
.sv-media {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
}
.lb-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.lb-stage > img,
.lb-stage > video { width: 100%; height: 100%; object-fit: contain; }

.lb-side {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 0;
  padding: 30px 28px 26px;
}
.lb-head { display: grid; gap: 2px; padding-right: 48px; }
.lb-who { font: 700 1.35rem/1.2 var(--serif); }
.lb-when { font-size: var(--step--1); color: var(--graphite); }
.lb-caption {
  overflow: auto;
  padding-right: 6px;
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-size: 0.9375rem;
  line-height: 1.62;
  color: #333;
}
.lb-caption a { color: var(--pink-press); text-decoration: none; font-weight: 500; }
.lb-caption a:hover { text-decoration: underline; }
.lb-open { justify-self: start; }

.round-btn {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}
.round-btn:hover { background: var(--mist); }
.lb-close { top: 14px; right: 14px; }
.lb-prev,
.lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }

.lb-slides {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.lb-slides::-webkit-scrollbar { display: none; }
.lb-slide {
  flex: 0 0 100%;
  height: 100%;
  margin: 0;
  scroll-snap-align: center;
}
.lb-slide img,
.lb-slide video { width: 100%; height: 100%; object-fit: contain; }
.lb-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.lb-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); }
.lb-dots span.is-on { background: #fff; }

.lb-external {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.lb-external > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: brightness(0.5); }
.lb-external .btn { position: relative; }

@media (max-width: 819px) {
  .lightbox { width: 100vw; height: 100dvh; border-radius: 0; }
  .lb-frame { grid-template-columns: 1fr; grid-template-rows: minmax(0, 60%) minmax(0, 1fr); }
  .lb-side { padding: 18px 18px 22px; gap: 12px; }
  .lb-head { padding-right: 0; }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
}

/* ── Visore delle storie ──────────────────────────────────────── */

.storyview {
  width: min(420px, 100vw);
  height: min(92dvh, 760px);
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  color: #fff;
}
.storyview::backdrop { background: rgba(10, 10, 10, 0.93); }

.sv-frame { position: relative; width: 100%; height: 100%; }
.sv-media { position: absolute; inset: 0; }
.sv-media img,
.sv-media video { width: 100%; height: 100%; object-fit: contain; }
.sv-media .btn { position: absolute; bottom: 36px; z-index: 3; }

.sv-bars { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3; display: flex; gap: 4px; }
.sv-bar { flex: 1; height: 3px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, 0.35); }
.sv-bar i { display: block; width: 0; height: 100%; background: #fff; }
.sv-bar.is-done i { width: 100%; }
.sv-bar.is-active i { animation: story-progress linear forwards; }
.storyview.is-paused .sv-bar.is-active i { animation-play-state: paused; }
@keyframes story-progress { from { width: 0; } to { width: 100%; } }

.sv-head {
  position: absolute;
  top: 22px;
  left: 12px;
  right: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.sv-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; }
.sv-avatar svg { width: 22px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.sv-name { font-weight: 600; font-size: 0.9375rem; }
.sv-time { font-size: var(--step--1); opacity: 0.85; }
.sv-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}
.sv-close .icon { width: 26px; height: 26px; }
.sv-tap { position: absolute; top: 72px; bottom: 90px; z-index: 2; padding: 0; border: 0; background: none; cursor: pointer; }
.sv-tap-prev { left: 0; width: 34%; }
.sv-tap-next { right: 0; width: 66%; }
.sv-tap:focus-visible { outline-offset: -4px; }

@media (max-width: 600px) {
  .storyview { width: 100vw; height: 100dvh; border-radius: 0; }
}

/* ── Pagine di testo: privacy e 404 ───────────────────────────── */

.doc { padding: clamp(40px, 7vw, 88px) 0 var(--section); }
.doc-inner { display: grid; gap: 16px; max-width: 46rem; }
.doc h1 { margin-bottom: 6px; font-size: var(--step-4); font-weight: 750; letter-spacing: -0.02em; }
.doc h2 { margin-top: 22px; font-size: 1.45rem; }
.doc p { max-width: 40rem; }
.doc p a:not(.btn) { color: var(--pink-press); font-weight: 500; text-underline-offset: 3px; }
.doc-updated { margin-top: 18px; font-size: var(--step--1); color: var(--graphite); }
.doc-404 .bulb-off { width: 116px; margin-bottom: 8px; stroke: var(--graphite); stroke-width: 2.2; }
.footer-inner-slim { display: block; }
.footer-inner-slim .footer-legal { padding-top: 0; border-top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
