/* ==========================================================================
   Lil Films — style.css
   Restyling 2026. Nessuna dipendenza: no jQuery, no framework, no build step.
   ========================================================================== */

/* --- Font ----------------------------------------------------------------
   Montserrat ospitato sul sito, non su Google Fonts: una richiesta esterna in
   meno che blocca il rendering, e nessun indirizzo IP dei visitatori inviato
   a terzi (in Europa i font caricati da Google sono un problema di privacy).
   ------------------------------------------------------------------------ */
@font-face{font-family:'Montserrat';src:url('../font/montserrat-400.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Montserrat';src:url('../font/montserrat-500.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:'Montserrat';src:url('../font/montserrat-600.woff2') format('woff2');font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:'Montserrat';src:url('../font/montserrat-700.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:'Montserrat';src:url('../font/montserrat-800.woff2') format('woff2');font-weight:800;font-style:normal;font-display:swap}

/* --- Reset essenziale ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, picture, video { display: block; max-width: 100%; height: auto; }
/* <picture> non ha dimensioni proprie: senza questo, un <img height:100%>
   annidato non riempie il contenitore e resta all'aspect-ratio nativo. */
.hero__media picture, .work__media picture { width: 100%; height: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --- Token --------------------------------------------------------------- */
:root {
  --ink:        #16161a;   /* nero caldo, non puro */
  --ink-2:      #2c2c33;
  --paper:      #ffffff;
  --paper-2:    #f6f5f2;   /* avorio */
  --paper-3:    #eceae4;
  --muted:      #6d6d76;
  --line:       #dedbd4;
  --accent:     #f9b033;   /* ambra Lil Films */
  --accent-ink: #16161a;   /* testo sopra l'ambra */

  --w-page: 1240px;
  --w-text: 62ch;

  --step--1: clamp(.82rem, .78rem + .2vw, .92rem);
  --step-0:  clamp(1rem, .96rem + .2vw, 1.1rem);
  --step-1:  clamp(1.25rem, 1.15rem + .5vw, 1.5rem);
  --step-2:  clamp(1.6rem, 1.4rem + 1vw, 2.25rem);
  --step-3:  clamp(2.1rem, 1.6rem + 2.4vw, 3.5rem);
  --step-4:  clamp(2.8rem, 1.6rem + 5.6vw, 7rem);

  --pad: clamp(1.25rem, 4vw, 3rem);
  --gap: clamp(1.25rem, 2.5vw, 2.25rem);
  --sec: clamp(4.5rem, 9vw, 9rem);

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* --- Base ---------------------------------------------------------------- */
body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.06; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--accent); color: var(--accent-ink); }

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

.wrap { width: 100%; max-width: var(--w-page); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--sec); }
.lead { font-size: var(--step-1); line-height: 1.45; font-weight: 500; max-width: var(--w-text); }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Etichetta di sezione */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: var(--step--1); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.25rem;
}
.eyebrow::before {
  content: ""; width: 1.75rem; height: 2px; background: var(--accent); flex: none;
}

/* --- Bottoni ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.6rem;
  font-size: var(--step--1); font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; border: 2px solid transparent; border-radius: 999px;
  cursor: pointer; transition: transform .25s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary  { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--primary:hover { background: #ffc45c; border-color: #ffc45c; }
.btn--ghost    { border-color: currentColor; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--on-dark  { border-color: rgba(255,255,255,.45); color: #fff; }
.btn--on-dark:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* --- Header -------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease), backdrop-filter .35s;
}
.site-header__inner {
  display: flex; align-items: center; gap: var(--gap);
  height: 84px;
  max-width: var(--w-page); margin-inline: auto; padding-inline: var(--pad);
}
.site-header.is-stuck {
  background: rgba(22,22,26,.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}
.site-header.is-stuck .site-header__inner { height: 68px; }

.brand { flex: none; display: block; }
.brand img,
.brand .logo { display: block; width: 148px; height: auto; transition: width .35s var(--ease); }
.site-header.is-stuck .brand img,
.site-header.is-stuck .brand .logo { width: 124px; }

/* ---- Il marchio che si ricompone al passaggio del mouse -------------------
   I quattro segni gialli del monogramma e le cinque lettere sono tracciati
   separati: arrivano da fuori campo e si incastrano. Parte solo al passaggio
   del mouse, mai da sola: un'animazione che scatta a ogni pagina stanca.
   Il riquadro deborda apposta (overflow visible), altrimenti i pezzi in arrivo
   verrebbero tagliati dal bordo del logo. */
.brand .logo { overflow: visible; }
.brand .logo [data-el],
.brand .logo [data-lettera] { transform-box: view-box; transform-origin: center; }

.brand.gira .logo [data-el="curva"]     { animation: logo-da-sinistra .62s cubic-bezier(.22,1.3,.4,1) both; }
.brand.gira .logo [data-el="asta"]      { animation: logo-dal-basso   .62s cubic-bezier(.22,1.3,.4,1) .07s both; }
.brand.gira .logo [data-el="verticale"] { animation: logo-dal-basso   .62s cubic-bezier(.22,1.3,.4,1) .14s both; }
.brand.gira .logo [data-el="punto"]     { animation: logo-dall-alto   .55s cubic-bezier(.22,1.5,.4,1) .3s  both; }
.brand.gira .logo [data-lettera] {
  animation: logo-da-destra .5s cubic-bezier(.2,1.1,.35,1) both;
  animation-delay: calc(.34s + var(--i) * .06s);
}

@keyframes logo-da-sinistra { from { opacity: 0; transform: translateX(-340px) rotate(-7deg); } to { opacity: 1; transform: none; } }
@keyframes logo-dal-basso   { from { opacity: 0; transform: translateY(300px); }                to { opacity: 1; transform: none; } }
@keyframes logo-dall-alto   { from { opacity: 0; transform: translateY(-260px) scale(.6); }     to { opacity: 1; transform: none; } }
@keyframes logo-da-destra   { from { opacity: 0; transform: translateX(120px); }                to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .brand.gira .logo [data-el],
  .brand.gira .logo [data-lettera] { animation: none !important; }
}

.nav { margin-left: auto; display: flex; align-items: center; }
.nav ul { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); list-style: none; padding: 0; }
.nav a {
  position: relative; text-decoration: none; color: #fff;
  font-size: var(--step--1); font-weight: 600; letter-spacing: .04em;
  padding-block: .4rem;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .3s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.lang { display: flex; align-items: center; gap: .45rem; margin-left: clamp(1rem, 2vw, 1.75rem); }
.lang a {
  font-size: var(--step--1); font-weight: 700; text-decoration: none; color: rgba(255,255,255,.55);
  padding: .2rem .1rem; transition: color .2s;
}
.lang a[aria-current="true"] { color: #fff; }
.lang a:hover { color: var(--accent); }
.lang span { color: rgba(255,255,255,.3); }

/* Toggle mobile */
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle span {
  display: block; position: relative; width: 24px; height: 2px; background: #fff;
  transition: background-color .2s;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 24px; height: 2px; background: #fff;
  transition: transform .3s var(--ease);
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top:  7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: 84px 0 auto 0; margin: 0;
    background: rgba(22,22,26,.97);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    padding: 1.5rem var(--pad) 2.5rem;
    transform: translateY(-120%); transition: transform .4s var(--ease);
    border-top: 1px solid rgba(255,255,255,.08);
    flex-direction: column; align-items: flex-start;
  }
  .nav.is-open { transform: translateY(0); }
  .nav ul { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
  .nav li { width: 100%; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav a { display: block; padding: 1rem 0; font-size: var(--step-1); font-weight: 700; }
  .nav a::after { display: none; }
  .lang { margin: 1.5rem 0 0; }
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative; display: grid; align-items: end;
  min-height: 100svh; padding-block: 12rem var(--sec);
  color: #fff; background: var(--ink); overflow: hidden; isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media picture { display: block; width: 100%; height: 100%; }
.hero__media img, .hero__media video {
  width: 100%; height: 100%; object-fit: cover;
  animation: heroDrift 26s var(--ease) infinite alternate;
}
@keyframes heroDrift { from { transform: scale(1.04); } to { transform: scale(1.14); } }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(22,22,26,.96) 0%, rgba(22,22,26,.6) 42%, rgba(22,22,26,.35) 100%),
    linear-gradient(to right, rgba(22,22,26,.7) 0%, transparent 60%);
}
.hero h1 {
  font-size: var(--step-4); font-weight: 800; letter-spacing: -.04em;
  max-width: 15ch; margin-bottom: 1.5rem;
}
.hero h1 em { font-style: normal; color: var(--accent); display: block; }
.hero__sub { font-size: var(--step-1); font-weight: 400; max-width: 48ch; color: rgba(255,255,255,.85); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.75rem; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 1.75rem; transform: translateX(-50%);
  font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(255,255,255,.5); display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
.hero__scroll::after {
  content: ""; width: 1px; height: 38px;
  background: linear-gradient(to bottom, rgba(255,255,255,.6), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100% { opacity: .35; transform: scaleY(.7); } 50% { opacity: 1; transform: scaleY(1); } }
@media (max-width: 700px) { .hero__scroll { display: none; } }

/* --- Le due porte -------------------------------------------------------- */
.doors { background: var(--paper-2); }
.doors__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }

.door {
  position: relative; display: flex; flex-direction: column;
  padding: clamp(2rem, 3.5vw, 3.25rem);
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px;
  text-decoration: none; overflow: hidden; isolation: isolate;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.door::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); z-index: 1;
}
.door:hover { transform: translateY(-6px); box-shadow: 0 24px 60px -28px rgba(22,22,26,.4); border-color: transparent; }
.door:hover::before { transform: scaleX(1); }
.door__num {
  font-size: var(--step--1); font-weight: 800; letter-spacing: .16em;
  color: var(--accent); margin-bottom: 1.5rem;
}
.door h3 { font-size: var(--step-2); margin-bottom: 1rem; }
.door p { color: var(--muted); margin-bottom: 1.75rem; }
.door ul { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.door li {
  font-size: var(--step--1); font-weight: 600;
  padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2);
}
.door__go {
  margin-top: auto; display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--step--1); font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.door__go .arrow { transition: transform .3s var(--ease); }
.door:hover .door__go .arrow { transform: translateX(6px); }

/* --- Lavori -------------------------------------------------------------- */
.works__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--gap); margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.works__head h2 { font-size: var(--step-3); }

.works__grid {
  display: grid; gap: clamp(1rem, 2vw, 1.75rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}

/* La locandina si vede INTERA — riquadro 2:3, immagine contenuta e mai
   ritagliata — e il testo le sta sopra, appoggiato su una sfumatura. */
.work {
  position: relative; display: block; text-decoration: none; color: #fff;
  background: #0b0b10; border-radius: 4px; overflow: hidden; isolation: isolate;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.work:hover { transform: translateY(-5px); box-shadow: 0 26px 56px -30px rgba(22,22,26,.55); }

.work__media { position: relative; aspect-ratio: 2 / 3; overflow: hidden; }
.work__media picture { display: block; width: 100%; height: 100%; }
.work__media img {
  width: 100%; height: 100%; object-fit: contain;
  transition: transform .6s var(--ease);
}
.work:hover .work__media img { transform: scale(1.03); }
.work__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(8,8,12,.94) 3%, rgba(8,8,12,.72) 18%,
                              rgba(8,8,12,0) 42%);
}

.work__body { position: absolute; inset: auto 0 0 0; padding: clamp(1.1rem, 2.2vw, 1.7rem); }
.work__kicker {
  display: block; font-size: .68rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .5rem;
}
.work h3 { font-size: var(--step-1); text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.work__meta { font-size: var(--step--1); color: rgba(255,255,255,.72); margin-top: .35rem; }

/* --- Studio / numeri ----------------------------------------------------- */
.studio { background: var(--ink); color: #fff; }
.studio__grid {
  display: grid; gap: clamp(2.5rem, 6vw, 5rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 60rem) { .studio__grid { grid-template-columns: 1.45fr 1fr; } }
.studio h2 { font-size: var(--step-3); margin-bottom: 1.75rem; }
.studio h2 em { font-style: normal; color: var(--accent); }
.studio p { color: rgba(255,255,255,.72); margin-bottom: 1.25rem; max-width: var(--w-text); }
.studio .eyebrow { color: rgba(255,255,255,.55); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: 2.5rem; }
.stat__num {
  font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.04em; line-height: 1;
  color: var(--accent);
}
.stat__label { font-size: var(--step--1); color: rgba(255,255,255,.6); margin-top: .5rem; }

/* --- Servizi ------------------------------------------------------------- */
.services { background: var(--paper-2); }
.services__head { max-width: var(--w-text); margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.services__head h2 { font-size: var(--step-3); margin-bottom: 1rem; }

.service {
  border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service__btn {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
  width: 100%; padding: clamp(1.4rem, 2.5vw, 2rem) 0;
  background: none; border: 0; text-align: left; cursor: pointer;
  transition: color .25s;
}
.service__btn:hover { color: var(--accent); }
.service__num { font-size: var(--step--1); font-weight: 800; color: var(--muted); letter-spacing: .1em; }
.service__btn:hover .service__num { color: var(--accent); }
.service__title { font-size: var(--step-2); font-weight: 800; letter-spacing: -.025em; }
.service__icon { position: relative; width: 22px; height: 22px; flex: none; }
.service__icon::before, .service__icon::after {
  content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 2px;
  background: currentColor; transition: transform .35s var(--ease);
}
.service__icon::after { transform: rotate(90deg); }
.service__btn[aria-expanded="true"] .service__icon::after { transform: rotate(0deg); }
.service__btn[aria-expanded="true"] { color: var(--accent); }

.service__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.service__panel > div { overflow: hidden; }
.service__btn[aria-expanded="true"] + .service__panel { grid-template-rows: 1fr; }
/* La descrizione si allarga fino a riempire la riga, ma non oltre: una riga
   molto più lunga di 90 caratteri diventa faticosa da seguire con l'occhio. */
.service__panel p {
  max-width: 84ch; color: var(--muted);
  padding: 0 clamp(1rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.25rem) clamp(2.5rem, 6vw, 5.5rem);
}
.service__tag {
  display: inline-block; margin-left: .75rem; vertical-align: middle;
  font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: 999px; background: var(--paper-3); color: var(--muted);
}

/* --- B'Art --------------------------------------------------------------- */
.bart__grid {
  display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}
.bart__media { display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem); }
.bart__media img { width: min(100%, 30rem); }
.bart h2 { font-size: var(--step-3); margin-bottom: 1.5rem; }
.bart p { color: var(--muted); margin-bottom: 1.25rem; max-width: var(--w-text); }

/* --- News ---------------------------------------------------------------- */
.news { background: var(--paper-2); }
.news__grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.post {
  display: flex; flex-direction: column; padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px;
  text-decoration: none; transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.post:hover { transform: translateY(-5px); box-shadow: 0 22px 50px -30px rgba(22,22,26,.45); }
.post time { font-size: var(--step--1); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.post h3 { font-size: var(--step-1); margin: .9rem 0 .85rem; }
.post p { color: var(--muted); font-size: var(--step--1); line-height: 1.6; margin-bottom: 1.75rem; }
.post__go { margin-top: auto; font-size: var(--step--1); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

/* --- CTA finale ---------------------------------------------------------- */
.cta { background: var(--accent); color: var(--accent-ink); text-align: center; }
.cta h2 { font-size: var(--step-3); margin-bottom: 1.25rem; }
.cta p { max-width: 46ch; margin-inline: auto; margin-bottom: 2.5rem; font-size: var(--step-1); }
.cta__actions { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; }
.cta .btn--ghost { border-color: var(--ink); }

/* --- Footer -------------------------------------------------------------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.7); padding-block: clamp(3.5rem, 7vw, 5.5rem) 2rem; }
.site-footer a { text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--accent); }
.footer__grid {
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.footer__brand { text-align: center; }
.footer__brand img { width: 160px; height: auto; margin: 0 auto 1rem; }
.footer__brand p { margin-bottom: 1.5rem; }
.footer__brand .social { justify-content: center; }
.footer h4 { font-size: var(--step--1); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 1.1rem; }
.footer ul { list-style: none; padding: 0; display: grid; gap: .6rem; font-size: var(--step--1); }
.footer address { font-style: normal; font-size: var(--step--1); line-height: 1.8; }

.footer__eu { border-top: 1px solid rgba(255,255,255,.12); padding-top: 2rem; }
.footer__eu p { font-size: .78rem; color: rgba(255,255,255,.5); max-width: 70ch; margin-top: 1.25rem; }

/* Blocco istituzionale — brand book Coesione Italia 21-27 Lazio.
   Su fondo chiaro, come prescritto per la versione a colori: l'emblema UE
   deve stare sul proprio campo bianco. La distanza fra ciascun marchio e la
   linea di separazione è pari all'altezza dell'emblema UE (--h). */
.blocco-istituzionale {
  --h: 34px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  row-gap: calc(var(--h) * .7);
  background: #fff; border-radius: 4px;
  padding: calc(var(--h) * .8) calc(var(--h) * 1.1);
}
.blocco-istituzionale picture { display: block; }
.blocco-istituzionale img { height: var(--h); width: auto; }
.blocco-istituzionale .sep {
  width: 1px; height: calc(var(--h) * .78); background: #9a9a9a;
  margin-inline: var(--h); flex: none;
}
@media (max-width: 52rem) {
  .blocco-istituzionale { --h: 28px; }
  .blocco-istituzionale .sep { display: none; }
  .blocco-istituzionale { gap: calc(var(--h) * .9) calc(var(--h) * 1.2); }
}

/* Il claim dello studio sta sotto i numeri: a sinistra resta più spazio
   per il testo, che è quello che si legge davvero. */
.studio__claim { font-size: var(--step-2); margin-top: clamp(2rem, 4vw, 3rem); }
.studio__claim em { font-style: normal; color: var(--accent); }

.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.75rem;
  font-size: .78rem; color: rgba(255,255,255,.5);
}
.footer .social { display: flex; flex-direction: row; gap: 1rem; list-style: none; padding: 0; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; }
.social a:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }

/* --- Reveal on scroll ----------------------------------------------------
   Nascosto SOLO se il JS è attivo (classe .js su <html>): senza JS, o se lo
   script fallisce, il contenuto resta comunque visibile.                    */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ==========================================================================
   PAGINE INTERNE
   L'intestazione del sito ha il testo bianco: sulle pagine chiare servirebbe
   invisibile. Ogni pagina interna si apre quindi con una fascia scura che le
   fa da appoggio, e che tiene insieme visivamente tutto il sito.
   ========================================================================== */

.page-hero {
  position: relative; background: var(--ink); color: #fff;
  padding-block: calc(84px + clamp(3.5rem, 8vw, 6.5rem)) clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(to right, var(--accent) 0%, transparent 55%);
}
.page-hero .eyebrow { color: rgba(255,255,255,.6); }
.page-hero h1 { font-size: var(--step-3); max-width: 20ch; }
.page-hero p {
  margin-top: 1.5rem; font-size: var(--step-1); font-weight: 400;
  color: rgba(255,255,255,.78); max-width: 54ch;
}

/* Briciole di navigazione */
.briciole { font-size: var(--step--1); color: rgba(255,255,255,.5); margin-bottom: 1.5rem; }
.briciole a { text-decoration: none; }
.briciole a:hover { color: var(--accent); }
.briciole span { margin-inline: .5rem; opacity: .5; }

/* --- Testo lungo ---------------------------------------------------------- */
.prosa { max-width: var(--w-text); }
.prosa > * + * { margin-top: 1.25rem; }
.prosa h2 {
  font-size: var(--step-2); margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: clamp(1.5rem, 3vw, 2rem); border-top: 1px solid var(--line);
}
.prosa h3 { font-size: var(--step-1); margin-top: 2.25rem; }
.prosa p, .prosa li { color: var(--ink-2); }
.prosa ul, .prosa ol { padding-left: 1.35rem; display: grid; gap: .5rem; }
.prosa a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: .2em; }
.prosa a:hover { color: var(--accent); }
.prosa strong { font-weight: 700; }
.prosa .nota {
  font-size: var(--step--1); color: var(--muted);
  padding: 1.25rem 1.5rem; background: var(--paper-2);
  border-left: 3px solid var(--accent); border-radius: 0 4px 4px 0;
}

/* Impaginato a due colonne: testo + spalla */
.con-spalla {
  display: grid; gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 60rem) { .con-spalla { grid-template-columns: minmax(0, 1fr) 20rem; } }
.spalla { align-self: start; position: sticky; top: 110px; display: grid; gap: 1.5rem; }
.scheda {
  padding: clamp(1.5rem, 3vw, 2rem); background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 4px;
}
.scheda h3 {
  font-size: var(--step--1); font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1rem;
}
.scheda p, .scheda address { font-size: var(--step--1); font-style: normal; line-height: 1.8; }
.scheda a { color: var(--ink); text-decoration-color: var(--accent); }
.scheda a:hover { color: var(--accent); }

/* --- Elenco delle news ---------------------------------------------------- */
.elenco-news { display: grid; gap: clamp(1.25rem, 2.5vw, 1.75rem); }
.riga-news {
  display: grid; gap: clamp(1rem, 2.5vw, 2rem); align-items: center;
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(1.5rem, 3vw, 2rem); background: var(--paper);
  border: 1px solid var(--line); border-radius: 4px; text-decoration: none;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
@media (min-width: 46rem) { .riga-news { grid-template-columns: 15rem minmax(0, 1fr); } }
.riga-news:hover { transform: translateY(-4px); box-shadow: 0 22px 50px -32px rgba(22,22,26,.45); }
.riga-news__media { border-radius: 3px; overflow: hidden; aspect-ratio: 16 / 10; }
.riga-news__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.riga-news:hover .riga-news__media img { transform: scale(1.05); }
.riga-news time {
  font-size: var(--step--1); font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
}
.riga-news h2 { font-size: var(--step-1); margin: .7rem 0 .6rem; }
.riga-news p { font-size: var(--step--1); color: var(--muted); line-height: 1.65; }
.riga-news__go {
  display: inline-block; margin-top: 1.1rem; font-size: var(--step--1);
  font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}

/* --- Articolo ------------------------------------------------------------- */
.articolo__meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center;
  font-size: var(--step--1); color: rgba(255,255,255,.6); margin-bottom: 1.5rem;
}
.articolo__meta time { color: var(--accent); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.articolo__copertina { margin-bottom: clamp(2rem, 4vw, 3rem); border-radius: 4px; overflow: hidden; }
.articolo__copertina img { width: 100%; }
.articolo__piede {
  margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 2rem;
  border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: center;
}

/* --- Contatti ------------------------------------------------------------- */
.contatti__griglia {
  display: grid; gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.contatto h3 {
  font-size: var(--step--1); font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .9rem;
}
.contatto p, .contatto address {
  font-style: normal; font-size: var(--step-0); line-height: 1.8;
}
.contatto a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: .2em; }
.contatto a:hover { color: var(--accent); }
.contatto .grande {
  font-size: var(--step-1); font-weight: 700; letter-spacing: -.02em;
  text-decoration: none; display: inline-block;
}

/* ==========================================================================
   MODULO DI CONTATTO
   ========================================================================== */

.modulo { display: grid; gap: clamp(1.1rem, 2.2vw, 1.5rem); max-width: 34rem; }

/* Campo esca per i robot: fuori dallo schermo, mai raggiungibile da tastiera. */
.esca { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.campo { display: grid; gap: .45rem; }
.campo label {
  font-size: var(--step--1); font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.campo input, .campo textarea {
  width: 100%; padding: .85rem 1rem;
  border: 1px solid var(--line); border-radius: 4px; background: var(--paper);
  font-family: inherit; font-size: var(--step-0); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.campo textarea { resize: vertical; min-height: 9rem; line-height: 1.6; }
.campo input:focus, .campo textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249,176,51,.25);
}
.campo input::placeholder, .campo textarea::placeholder { color: #a9a9b0; }

.campo--conto input { max-width: 7rem; }
.aiuto { font-size: .78rem; color: var(--muted); }

.errore { font-size: var(--step--1); color: #b4442f; font-weight: 600; }
.errore:empty { display: none; }

.consenso {
  display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start;
  font-size: var(--step--1); color: var(--ink-2); line-height: 1.55;
}
.consenso input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--accent); }
.consenso a { color: var(--ink); text-decoration-color: var(--accent); }

.modulo button { justify-self: start; }
.modulo button:disabled { opacity: .6; cursor: wait; transform: none; }

.esito { font-size: var(--step-0); font-weight: 600; line-height: 1.5; }
.esito:empty { display: none; }
.esito--ok {
  color: #1f6b4c; background: #e8f5ee; border-left: 3px solid #2e7d5b;
  padding: .9rem 1.1rem; border-radius: 0 4px 4px 0;
}
.esito--ko {
  color: #8c2f1d; background: #fdeeea; border-left: 3px solid #b4442f;
  padding: .9rem 1.1rem; border-radius: 0 4px 4px 0;
}

/* Banda istituzionale in coda a un articolo: fondo bianco, come nel footer. */
.banda-istituzionale {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
}
.banda-istituzionale img { width: min(100%, 44rem); margin-inline: auto; }

/* Indirizzo e-mail scritto a parole: i robot che raccolgono indirizzi cercano
   la forma nome@dominio, questa non la riconoscono. Per chi legge resta chiaro. */
.mail-scritta { font-weight: 600; }   /* niente nowrap: su schermi stretti deve andare a capo */
