/* Akinda — stili comuni a tutte le pagine (estratti dalla home) */
/* ===== brand-tokens ===== */
/* Colori dal Brand Book Akinda 2023, slide 21-22 */
:root {
  --ak-sport: #75B049;
  --ak-education: #41BD9E;
  --ak-marketplace: #218DAE;
  --ak-business: #15487B;
  --ak-agency: #00ADEE;      /* colore The Agency */
  --ak-corporate: #436390;
  --ak-font: #414346;        /* colore font */

  --accent: var(--ak-education);  /* accento del sito (scelto al posto dell'azzurro The Agency) */
  --ak-gradient: linear-gradient(90deg, #75B049 0%, #41BD9E 22%, #218DAE 42%, #15487B 60%, #00ADEE 80%, #436390 100%);

  --background: #FFFFFF;
  --surface: #F2F2F2;
  --foreground: var(--ak-font);
  --muted-foreground: #6B6E73;
  --border: #D9DBDE;

  --font-body: "Lato", sans-serif;
  --font-display: "Montserrat", "Lato", sans-serif;

  --radius-xl: 12px;
}

/* ===== reset-styles ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.page-container { position: relative; }
/* Lo sfondo della pagina cambia colore in base alla sezione visibile (data-bg) */
body { transition: background-color 0.7s ease; }
.brand-stripe { height: 6px; background: var(--ak-gradient); }

/* ===== Agency Wireframe ===== */
/* ===== navbar-styles ===== */
/* Barra bianca: il logo positivo (wordmark grigio) va su sfondo chiaro — Brand Book slide 12 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 64px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-brand { display: block; line-height: 0; }
/* Altezza 52px: la barra lascia almeno 1/3 dell'altezza come area di rispetto (slide 11) */
.nav-logo { height: 52px; width: auto; display: block; }
.nav-links { display: flex; gap: 40px; }
.nav-link {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ak-font);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-link:hover { color: var(--ak-business); border-color: var(--accent); }
section[id] { scroll-margin-top: 88px; }

/* ===== hero-styles ===== */
.hero {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ak-business);
  overflow: hidden;
}
/* Video a tutto schermo al posto dell'immagine e del titolo */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  background: #0B0B0B;
}
/* Titolo solo per motori di ricerca e screen reader */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.hero-sound {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: var(--intro-opacity, 1);
  transition: background 0.2s, border-color 0.2s;
}
.hero-sound:hover { background: rgba(0,0,0,0.6); border-color: var(--accent); }
.hero-sound:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.hero-sound iconify-icon { font-size: 16px; color: var(--accent); }

/* ===== about-styles ===== */
.about-section {
  display: flex;
  justify-content: center;
  padding: 140px 64px;
  background-color: #0B0B0B;
}
.about-container {
  max-width: 960px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 48px;
}
/* Sezione su sfondo nero (data-bg), testi chiari e più spessi */
.about-lead {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 900;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: -0.02em;
}
.about-body {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: #ffffff;
  max-width: 840px;
}
.about-highlight {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ===== Services List ===== */
/* ===== services-list-styles ===== */
.services-section {
  min-height: 812px;
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
}
.services-page {
  padding: 80px 64px;
  width: 100%;
  display: flex;
  justify-content: center;
}
.services-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.service-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
  cursor: pointer;
}
.service-name {
  font-family: var(--font-display);
  font-size: 90px;
  font-weight: 900;
  text-transform: uppercase;
  /* Lettere ravvicinate come nel claim; il contorno dello stesso colore ispessisce il Black */
  letter-spacing: -0.06em;
  -webkit-text-stroke: 0.025em currentColor;
  line-height: 0.92;
  color: #0B0B0B;
  white-space: nowrap;
  transition: color 0.2s;
}

/* ===== Works Portfolio ===== */
/* ===== works-styles ===== */
.works-section {
  width: 100%;
  background-color: var(--surface);
  min-height: 812px;
  padding: 120px 48px 80px;  /* spazio per far leggere "WORKS" sopra le foto */
  position: relative;
  overflow: hidden;
  font-family: var(--font-body);
}
.section-title-bg {
  font-family: var(--font-display);
  font-size: 200px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
  color: rgba(67,99,144,0.09);
  user-select: none;
  position: absolute;
  top: 10px;
  left: 36px;
  z-index: 0;
  white-space: nowrap;
}
/* Mosaico: griglia di 12 colonne e 18 righe; ogni progetto occupa un'area diversa,
   così larghezze e altezze dei box cambiano senza lasciare buchi.
   Colonne 1-7 | 8-12:  A (8 righe)          | B (11 righe)
   Colonne 1-3 | 4-7 | 8-12:  C (10 righe) | D (6) + F (4) | E (7) */
.works-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(34px, 3.8vw, 56px);
  gap: 6px;
  width: 100%;
}
.work-item { position: relative; min-height: 0; }
.work-a { grid-column: 1 / 8;  grid-row: 1 / 9; }
.work-b { grid-column: 8 / 13; grid-row: 1 / 12; }
.work-c { grid-column: 1 / 4;  grid-row: 9 / 19; }
.work-d { grid-column: 4 / 8;  grid-row: 9 / 15; }
.work-e { grid-column: 8 / 13; grid-row: 12 / 19; }
.work-f { grid-column: 4 / 8;  grid-row: 15 / 19; }
.work-card {
  overflow: hidden;
  cursor: pointer;
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #d0d0d0;
}
.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.work-card:hover img { transform: scale(1.04); }
.work-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(21,72,123,0.78);
  opacity: 0;
  z-index: 2;
  transition: opacity 0.25s ease;
}
.work-card:hover .work-card-overlay { opacity: 1; }
.work-card-logo {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #fff;
  text-align: center;
  padding: 10px 20px;
  border: 2px solid var(--accent);
}

/* ===== Clients Ticker + Contatti ===== */
/* ===== clients-contact-styles ===== */
.clients-contact {
  width: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  overflow: hidden;
}
.ticker-section {
  width: 100%;
  padding: 36px 0;
  overflow: hidden;
  position: relative;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}
.ticker-track {
  display: flex;
  align-items: center;
  width: 100%;
  overflow: hidden;
  position: relative;
}
.ticker-track::before,
.ticker-track::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.ticker-track::before { left: 0; background: linear-gradient(to right, #ffffff, transparent); }
.ticker-track::after { right: 0; background: linear-gradient(to left, #ffffff, transparent); }
.ticker-inner {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  animation: ticker-scroll 40s linear infinite;
}
.ticker-track:hover .ticker-inner { animation-play-state: paused; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-inner { animation: none; }
}
/* Loghi clienti: file in assets/clienti, già convertiti in grigio #8C8C8C con il bianco trasparente.
   --h regola l'altezza di ciascun logo per bilanciarne il peso visivo */
.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  padding: 0 44px;
  flex-shrink: 0;
}
.logo-img {
  display: block;
  height: var(--h, 44px);
  width: auto;
}

.contact-section {
  width: 100%;
  padding: 100px 80px 120px 80px;
  background: var(--surface);
  display: flex;
  align-items: flex-start;
  scroll-margin-top: 0;
}
.contact-left { flex: 1; padding-right: 60px; }
/* Sedi sotto il titolo, allineate a sinistra */
.offices {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  margin-top: 56px;
}
.office {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--ak-font);
}
.office p + p { margin-top: 12px; }
.office-name {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #2A8F77;
}
.office a {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.office a:hover { color: var(--ak-business); border-color: var(--accent); }
.office a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.contact-title {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 900;
  line-height: 1.05;
  color: var(--ak-font);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
/* Verde acqua scurito solo qui: #41BD9E sul grigio #F2F2F2 era troppo tenue (#2A8F77 ≈ 3,5:1) */
.contact-title .ct-line + .ct-line { color: #2A8F77; }
.contact-right {
  flex: 0 0 480px;
  display: flex;
  flex-direction: column;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid #c4c7cc;
  padding: 28px 0 12px 0;
  transition: border-color 0.2s;
}
.form-field:first-child { border-top: 1px solid #c4c7cc; }
.form-field:focus-within { border-bottom-color: var(--accent); }
.form-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ak-corporate);
}
.form-input {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--ak-font);
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  padding: 4px 0 8px 0;
}
.form-input::placeholder { color: #9A9DA2; }
.form-input.textarea { min-height: 100px; resize: vertical; line-height: 1.6; }
.form-submit { margin-top: 40px; display: flex; align-items: center; gap: 16px; }
.submit-btn {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--ak-business);
  border: 1.5px solid var(--ak-business);
  padding: 15px 36px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.submit-btn:hover { background: var(--ak-corporate); border-color: var(--ak-corporate); }
.submit-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.form-note { font-size: 14px; color: var(--ak-education); font-weight: 700; }

/* ===== Akinda Logo (footer) ===== */
/* ===== logo-styles ===== */
/* Footer nero con la scritta AKINDA in Montserrat Black */
.akinda-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #0B0B0B;
  width: 100%;
  padding: 64px 0 40px;
  overflow: hidden;
}
.footer-wordmark {
  display: block;
  width: 100%;
  font-family: var(--font-display);
  font-size: 22vw;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  color: #ffffff;
}
.footer-info {
  margin-top: 40px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
  text-align: center;
}

/* ===== responsive-styles ===== */
@media (max-width: 1400px) {
  .service-name { font-size: 6.3vw; }
}

/* ===== Animazioni allo scorrimento (reference: squaremediaagency.it) ===== */
:root { --nav-h: 88px; }

/* Sezioni trasparenti: il colore lo dà il body, che cambia allo scorrimento */
.js-bg .about-section, .js-bg .services-section, .js-bg .works-section, .js-bg .contact-section { background: transparent; }

/* Hero "bloccata": resta ferma mentre il titolo cresce e un pannello blu entra da sinistra */
.hero-pin { position: relative; height: 320vh; }
.hero {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  min-height: 0;
}
/* Il video si ingrandisce leggermente mentre entra il pannello */
.hero-video { transform: scale(var(--video-scale, 1)); will-change: transform; }
.hero-wipe {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  padding: 0 64px;
  /* Proposta B: grigio del brand book con una leggera griglia */
  background-color: #F2F2F2;
  background-image:
    linear-gradient(rgba(21,72,123,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21,72,123,0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  clip-path: inset(0 calc(100% - var(--wipe, 0%)) 0 0);
}
/* Claim (Brand Book p. 31): i tre verbi compaiono uno alla volta, poi "la tua community."
   Testo con sfumatura della palette, dal blu scuro al verde */
.hero-claim {
  --claim-gradient: linear-gradient(90deg, #15487B 0%, #436390 25%, #218DAE 50%, #41BD9E 75%, #75B049 100%);
  font-family: var(--font-display);
  font-size: min(10vw, 17vh);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  transform: translateX(var(--wipe-shift, 0));
}
/* Ogni riga ha la stessa larghezza del blocco, quindi la sfumatura resta allineata tra le righe */
.claim-line {
  display: block;
  padding-right: 0.08em;  /* evita che l'ultima lettera venga tagliata dal ritaglio del testo */
  background-image: var(--claim-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: var(--line, 1);
  transform: translateY(calc((1 - var(--line, 1)) * 0.4em));
}
/* "la tua community." su una riga sola, più piccola, con la sfumatura completa */
.claim-line.claim-tail {
  display: table;
  margin-top: 0.3em;
  font-size: 0.4em;
  letter-spacing: -0.03em;
}
.motion .claim-line { --line: 0; }

/* Presentazione: le parole si "accendono" una dopo l'altra */
.about-lead .w { opacity: 1; transition: opacity 0.25s ease; }
.motion .about-lead .w { opacity: 0.15; }
.motion .about-lead .w.on { opacity: 1; }

/* Servizi: il nome al centro dello schermo è grande e colorato, gli altri rimpiccioliscono */
.services-page { padding: 30vh 64px; }
.service-row { padding: 2px 0; }
.service-name {
  transform: scale(var(--s, 1));
  opacity: var(--o, 1);
  transition: color 0.3s ease;
  will-change: transform;
}
.service-row:nth-child(6n+1) { --row-color: var(--ak-sport); }
.service-row:nth-child(6n+2) { --row-color: var(--ak-education); }
.service-row:nth-child(6n+3) { --row-color: var(--ak-agency); }
.service-row:nth-child(6n+4) { --row-color: var(--ak-marketplace); }
.service-row:nth-child(6n+5) { --row-color: var(--ak-corporate); }
.service-row:nth-child(6n+6) { --row-color: var(--ak-sport); }
.service-row:hover .service-name,
.service-row.is-active .service-name { color: var(--row-color); }

/* Progetti: le foto si svelano dal basso con un leggero zoom */
.motion .work-card { clip-path: inset(100% 0 0 0); transition: clip-path 1s cubic-bezier(.7,0,.2,1); }
.motion .work-card img { transform: scale(1.25); transition: transform 1.4s cubic-bezier(.2,.7,.2,1); }
.motion .work-card.is-in { clip-path: inset(0 0 0 0); }
.motion .work-card.is-in img { transform: scale(1); }
.motion .work-card.is-in:hover img { transform: scale(1.04); transition-duration: 0.4s; }
.motion .work-b .work-card,
.motion .work-d .work-card,
.motion .work-f .work-card { transition-delay: 0.12s; }

/* Contatti: le due righe del titolo arrivano da lati opposti */
.contact-title .ct-line { display: block; transform: translateX(var(--shift, 0)); will-change: transform; }

/* Footer: il logo cresce mentre entra */
.footer-wordmark { transform: scale(var(--logo-scale, 1)); transform-origin: center bottom; }

@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
}
@media (max-width: 1000px) {
  .contact-section { flex-direction: column; gap: 48px; padding: 72px 16px 88px; }
  .contact-left { padding-right: 0; }
  .contact-title { font-size: clamp(40px, 9vw, 72px); }
  .contact-right { flex: none; width: 100%; }
}
@media (max-width: 720px) {
  .navbar { padding: 12px 16px; }
  .nav-logo { height: 32px; }
  section[id] { scroll-margin-top: 64px; }
  .hero-pin { height: 270vh; }
  .hero-wipe { padding: 0 16px; background-size: 28px 28px; }
  .hero-claim { font-size: 12.5vw; }
  .services-page { padding: 20vh 16px; }
  .nav-links { gap: 12px; }
  .nav-link { font-size: 10px; letter-spacing: 0.03em; }
  .hero { min-height: 480px; }
  .hero-sound { right: 16px; bottom: 16px; }
  .about-section { padding: 80px 16px; }
  .about-container { gap: 32px; }
  .about-lead { font-size: 28px; }
  .about-body { font-size: 19px; }
  .about-highlight { font-size: 30px; }
  .services-section { min-height: 0; }
  .services-page { padding: 60px 16px; }
  .service-name { font-size: 6.4vw; }
  .works-section { min-height: 0; padding: 48px 16px 60px; }
  .section-title-bg { font-size: 30vw; left: 8px; }
  /* Su telefono: una colonna, altezze comunque diverse */
  .works-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .works-grid .work-item { grid-column: auto; grid-row: auto; }
  .work-a { height: 260px; }
  .work-b { height: 400px; }
  .work-c { height: 320px; }
  .work-d { height: 220px; }
  .work-e { height: 300px; }
  .work-f { height: 200px; }
  .work-card-overlay { opacity: 1; background-color: rgba(21,72,123,0.5); }
  .ticker-track::before, .ticker-track::after { width: 40px; }
  .logo-item { height: 48px; padding: 0 24px; }
  .logo-img { height: calc(var(--h, 44px) * 0.72); }
  .akinda-logo { padding-top: 48px; }
  .footer-info { margin-top: 28px; }
}

/* =====================================================================
   Aggiunte comuni per le pagine interne
   ===================================================================== */
:root {
  /* Sfumatura della palette usata nei titoli (dal blu scuro al verde) */
  --palette-gradient: linear-gradient(90deg, #15487B 0%, #436390 25%, #218DAE 50%, #41BD9E 75%, #75B049 100%);
}

/* Voce del menu della pagina corrente */
.nav-link.is-current { color: var(--ak-business); border-color: var(--accent); }

/* Menu con 4 voci: su telefono le voci vanno su una seconda riga */
@media (max-width: 560px) {
  .navbar { flex-wrap: wrap; row-gap: 10px; }
  .nav-links { width: 100%; justify-content: space-between; gap: 8px; }
}

/* Griglia leggera di sfondo (come il pannello del claim) */
.grid-bg {
  background-color: #F2F2F2;
  background-image:
    linear-gradient(rgba(21,72,123,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21,72,123,0.07) 1px, transparent 1px);
  background-size: 40px 40px;
}
.js-bg .grid-bg { background-color: transparent; }

/* Titoli con sfumatura della palette */
.gradient-text {
  background-image: var(--palette-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Titolo grande di sezione */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 110px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  color: #0B0B0B;
}
.section-kicker {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ak-corporate);
}

/* Pulsanti */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  background: var(--ak-business);
  border: 2px solid var(--ak-business);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { background: var(--ak-corporate); border-color: var(--ak-corporate); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn iconify-icon { font-size: 18px; }
.btn--light { background: transparent; border-color: #ffffff; color: #ffffff; }
.btn--light:hover { background: #ffffff; border-color: #ffffff; color: #0B0B0B; }

/* Parole che si accendono e comparsa degli elementi */
.js-words .w { transition: opacity 0.25s ease; }
.motion .js-words .w { opacity: 0.15; }
.motion .js-words .w.on { opacity: 1; }
.motion .reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2,.7,.2,1); }
.motion .reveal.is-in { opacity: 1; transform: none; }

/* =====================================================================
   Pagina Brand Lover
   ===================================================================== */
.bl-hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: 96px 64px;
}
.bl-hero-inner { max-width: 1240px; }
.bl-logo { display: block; height: clamp(72px, 9vw, 120px); width: auto; margin-bottom: 56px; }
.bl-headline {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.6vw, 92px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  padding-right: 0.08em;
}
.bl-headline-tail {
  display: table;
  margin-top: 0.6em;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 42px);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  padding-right: 0.08em;
}
.bl-hero .btn { margin-top: 56px; }

.bl-intro {
  padding: 160px 64px;
  text-align: center;
  background-color: #0B0B0B;
}
.bl-intro-text {
  max-width: 1100px;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 50px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.bl-audience {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 120px 48px;
  background-color: #F2F2F2;
}
.bl-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 64px 56px;
  background: #FFFFFF;
}
.bl-card-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 5.6vw, 92px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  color: #0B0B0B;
}
.bl-card-question {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ak-business);
}
.bl-card-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ak-font);
  flex: 1;
}

.bl-steps {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 80px;
  align-items: start;
  padding: 140px 64px;
  background-color: #F2F2F2;
}
.bl-steps .section-title { margin-bottom: 56px; }
.bl-step {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  align-items: start;
  --num-size: 64px;
  padding: 32px 0;
  border-top: 2px solid rgba(11,11,11,0.12);
}
.bl-step:last-child { border-bottom: 2px solid rgba(11,11,11,0.12); }
.bl-step-num {
  font-family: var(--font-display);
  font-size: var(--num-size);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--step-color, var(--ak-business));
}
.bl-step:nth-child(1) { --step-color: var(--ak-sport); }
.bl-step:nth-child(2) { --step-color: #2A8F77; }
.bl-step:nth-child(3) { --step-color: var(--ak-marketplace); }
.bl-step:nth-child(4) { --step-color: var(--ak-business); }
.bl-step:nth-child(5) { --step-color: var(--ak-corporate); }
.bl-step-desc {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ak-font);
}
.bl-step-text {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 800;
  line-height: 1.1;
  /* centra la prima riga del titolo sull'altezza del numero */
  margin-top: calc((var(--num-size) - 1.1em) / 2);
  letter-spacing: -0.01em;
  color: #0B0B0B;
}
.bl-screen {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
  margin: 0;
}
.bl-screen-frame {
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 30px 60px -20px rgba(21,72,123,0.35), 0 0 0 1px rgba(11,11,11,0.06);
}
.bl-screen-bar { display: flex; gap: 6px; padding: 12px 14px; background: #E6E7E9; }
.bl-screen-bar span { width: 10px; height: 10px; border-radius: 50%; background: #C4C7CC; }
.bl-screen img { display: block; width: 100%; height: auto; }
.bl-screen figcaption {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-foreground);
}

.bl-clients {
  padding: 100px 48px;
  text-align: center;
  background-color: #FFFFFF;
}
.bl-clients { padding-left: 0; padding-right: 0; }
.bl-ticker { margin-top: 48px; }
.bl-clients-title { padding: 0 16px; font-size: clamp(28px, 3.6vw, 52px); }
.bl-clients-title .gradient-text { padding-right: 0.08em; }

.bl-cta {
  padding: 160px 64px;
  text-align: center;
  background-color: #0B0B0B;
  overflow: hidden;
}
.bl-cta-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 110px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  color: #ffffff;
}
.bl-cta-title .ct-line + .ct-line { color: var(--accent); }
.bl-cta .btn { margin-top: 56px; }

@media (max-width: 1000px) {
  .bl-audience { grid-template-columns: 1fr; padding: 80px 16px; }
  .bl-steps { grid-template-columns: 1fr; gap: 56px; padding: 96px 16px; }
  .bl-screen { position: static; max-width: 420px; }
}
@media (max-width: 720px) {
  .bl-hero { padding: 64px 16px; min-height: 0; }
  .bl-logo { margin-bottom: 36px; }
  .bl-intro { padding: 96px 16px; }
  .bl-card { padding: 40px 24px; }
  .bl-step { grid-template-columns: 64px 1fr; gap: 16px; padding: 24px 0; }
  .bl-step { --num-size: 40px; }
  .bl-step-text { font-size: 22px; }
  .bl-clients { padding: 72px 16px; }
  .bl-cta { padding: 110px 16px; }
}
/* Con JS attivo il colore lo dà il body, che cambia allo scorrimento (data-bg) */
/* Le sezioni nere (.bl-intro, .bl-cta) restano opache: il testo bianco resta leggibile anche durante il cambio colore */
.js-bg .bl-audience, .js-bg .bl-steps, .js-bg .bl-clients { background-color: transparent; }
.bl-cta-title .ct-line { display: block; transform: translateX(var(--shift, 0)); will-change: transform; }
.bl-intro-sub {
  max-width: 900px;
  margin: 56px auto 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: #ffffff;
}

/* Brand Lover — Cosa consente di fare (sezione nera, opaca) */
.bl-benefits {
  padding: 140px 64px;
  background-color: #0B0B0B;
}
.bl-benefits .section-title { color: #ffffff; margin-bottom: 72px; }
.bl-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px 80px;
}
.bl-benefit {
  padding-top: 28px;
  border-top: 4px solid var(--benefit-color, var(--accent));
}
.bl-benefit:nth-child(1) { --benefit-color: var(--ak-sport); }
.bl-benefit:nth-child(2) { --benefit-color: var(--ak-education); transition-delay: 0.1s; }
.bl-benefit:nth-child(3) { --benefit-color: var(--ak-marketplace); }
.bl-benefit:nth-child(4) { --benefit-color: #8FA6C9; transition-delay: 0.1s; } /* corporate schiarito per il nero */
.bl-benefit-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #ffffff;
}
.bl-benefit-text {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
  color: rgba(255,255,255,0.75);
}
@media (max-width: 1000px) {
  .bl-benefits { padding: 96px 16px; }
  .bl-benefits-grid { grid-template-columns: 1fr; gap: 48px; }
  .bl-benefits .section-title { margin-bottom: 48px; }
}

/* Home: attività cliccabili e pulsante "Tutti i progetti" */
a.service-row { text-decoration: none; }
a.service-row:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.works-more { position: relative; z-index: 1; margin-top: 48px; text-align: center; }

/* =====================================================================
   Pagina Progetti
   ===================================================================== */
.pj-page { background-color: #F2F2F2; }
.js-bg .pj-page { background-color: transparent; }
.pj-hero { padding: 96px 64px 40px; }
.pj-hero .section-title { font-size: clamp(64px, 12vw, 190px); }
.pj-intro {
  margin-top: 24px;
  max-width: 720px;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 700;
  line-height: 1.45;
  color: var(--ak-font);
}

/* Barra dei filtri: resta sotto il menu mentre scorri */
.pj-filters {
  position: sticky;
  top: var(--nav-h);
  z-index: 10;
  padding: 16px 64px;
  background: rgba(242,242,242,0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(11,11,11,0.08);
}
.pj-filters-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.pj-chip {
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0B0B0B;
  background: #ffffff;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.pj-chip:hover { border-color: var(--chip-color, #0B0B0B); }
.pj-chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pj-chip[aria-pressed="true"] { background: var(--chip-color, #0B0B0B); border-color: var(--chip-color, #0B0B0B); color: #ffffff; }
.pj-chip[data-filter="social-media-marketing"]  { --chip-color: #467C29; }
.pj-chip[data-filter="strategia"]               { --chip-color: #23775F; }
.pj-chip[data-filter="branding"]                { --chip-color: var(--ak-marketplace); }
.pj-chip[data-filter="produzione-video"]        { --chip-color: var(--ak-business); }
.pj-chip[data-filter="comunicazione-corporate"] { --chip-color: var(--ak-corporate); }
.pj-chip[data-filter="community-management"]    { --chip-color: #23775F; }
.pj-chip[data-filter="eventi"]                  { --chip-color: #467C29; }
.pj-chip[data-filter="digital-pr"]              { --chip-color: var(--ak-business); }
.pj-count {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-foreground);
}

/* Griglia a mosaico: le schede hanno taglie diverse e si ricompattano quando filtri */
.pj-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: clamp(120px, 14vw, 200px);
  grid-auto-flow: dense;
  gap: 6px;
  padding: 32px 48px 120px;
}
.pj-grid .work-item { grid-row: span 2; }
.pj-grid .work-item.is-tall { grid-row: span 3; }
.pj-grid .work-item.is-short { grid-row: span 1; }
.pj-grid .work-item.is-wide { grid-column: span 2; }
.pj-grid .work-item[hidden] { display: none; }
.pj-grid .work-item.is-entering { animation: pj-in 0.45s ease both; }
@keyframes pj-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
.work-card-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  padding: 0 16px;
}
.work-card-tags span {
  padding: 4px 10px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0B0B0B;
  background: #ffffff;
  border-radius: 999px;
}
.pj-grid .work-card-overlay { flex-direction: column; }
.pj-empty {
  grid-column: 1 / -1;
  padding: 80px 16px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--muted-foreground);
}

.pj-cta { padding: 160px 64px; text-align: center; background-color: #0B0B0B; overflow: hidden; }

@media (max-width: 1000px) {
  .pj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; padding: 24px 16px 96px; }
}
@media (max-width: 720px) {
  .pj-hero { padding: 56px 16px 24px; }
  .pj-filters { padding: 12px 16px; }
  .pj-filters-inner { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .pj-filters-inner::-webkit-scrollbar { display: none; }
  .pj-chip { flex-shrink: 0; }
  .pj-count { display: none; }
  .pj-grid { grid-template-columns: 1fr; grid-auto-rows: 120px; }
  .pj-grid .work-item.is-wide { grid-column: auto; }
  .pj-grid .work-item.is-short { grid-row: span 2; }
  .pj-cta { padding: 110px 16px; }
}

/* =====================================================================
   Pagine dei singoli progetti (pd-)
   ===================================================================== */
a.work-card { display: block; }
.pd-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: center;
  min-height: calc(100vh - var(--nav-h));
  padding: 72px 64px 96px;
}
.pd-crumbs {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.pd-crumbs a { color: var(--ak-business); text-decoration: none; }
.pd-crumbs a:hover { text-decoration: underline; }
.pd-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 96px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  padding-right: 0.08em;
}
.pd-client {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 40px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--ak-font);
}
.pd-client img { width: 84px; height: auto; border-radius: 12px; background: #fff; padding: 6px; }

/* Collage di post nell'apertura */
.pd-stack { position: relative; height: min(70vh, 620px); }
.pd-stack img {
  position: absolute;
  width: 52%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 30px 60px -20px rgba(21,72,123,0.45);
}
.pd-stack img:nth-child(1) { left: 0; top: 12%; transform: rotate(-6deg); }
.pd-stack img:nth-child(2) { left: 24%; top: 0; z-index: 2; transform: rotate(2deg); }
.pd-stack img:nth-child(3) { right: 0; top: 22%; z-index: 3; transform: rotate(7deg); }
.motion .pd-stack img { transition: transform 0.9s cubic-bezier(.2,.7,.2,1); }
.motion .pd-stack:hover img:nth-child(1) { transform: rotate(-9deg) translateX(-10px); }
.motion .pd-stack:hover img:nth-child(3) { transform: rotate(10deg) translateX(10px); }

/* Introduzione con scheda sintetica */
.pd-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 80px;
  padding: 140px 64px;
  background-color: #0B0B0B;
  color: #ffffff;
}
.pd-intro-text {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.3vw, 34px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.pd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.pd-tags a {
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.pd-tags a:hover { border-color: #ffffff; background: #ffffff; color: #0B0B0B; }
.pd-facts { display: grid; gap: 28px; align-content: start; }
.pd-fact dt {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.pd-fact dd {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

/* Sezioni generiche della pagina progetto */
.pd-section { padding: 140px 64px; }
.pd-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: end;
  margin-bottom: 64px;
}
.pd-lead {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--ak-font);
}
.pd-dark .section-title { color: #ffffff; }
.pd-dark .pd-lead { color: rgba(255,255,255,0.78); }
.pd-dark { background-color: #0B0B0B; }
.pd-white { background-color: #FFFFFF; }
.pd-gray { background-color: #F2F2F2; }
.js-bg .pd-white, .js-bg .pd-gray { background-color: transparent; }

/* Elenco delle attività */
.pd-activities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 48px;
  list-style: none;
  counter-reset: act;
}
.pd-activities li {
  counter-increment: act;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 26px 0;
  border-top: 2px solid rgba(11,11,11,0.12);
  font-family: var(--font-display);
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #0B0B0B;
}
.pd-activities li::before {
  content: counter(act, decimal-leading-zero);
  font-size: 15px;
  letter-spacing: 0;
  color: var(--act-color, var(--ak-business));
}
.pd-activities li:nth-child(3n+1) { --act-color: #467C29; }
.pd-activities li:nth-child(3n+2) { --act-color: #23775F; }
.pd-activities li:nth-child(3n+3) { --act-color: var(--ak-marketplace); }
.motion .pd-activities li:nth-child(3n+2) { transition-delay: 0.08s; }
.motion .pd-activities li:nth-child(3n+3) { transition-delay: 0.16s; }

/* Feed: griglia di post */
.pd-feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pd-feed figure { margin: 0; overflow: hidden; background: #d0d0d0; }
.pd-feed img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 0.5s ease; }
.pd-feed figure:hover img { transform: scale(1.04); }
.motion .pd-feed figure:nth-child(3n+2) { transition-delay: 0.1s; }
.motion .pd-feed figure:nth-child(3n+3) { transition-delay: 0.2s; }

/* Videoricette in cornice da telefono */
.pd-phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.pd-phone { margin: 0; }
.pd-phone-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  max-width: 300px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 36px;
  background: #1C1C1E;
  box-shadow: 0 0 0 2px #2C2C2E, 0 40px 80px -30px rgba(65,189,158,0.35);
}
.pd-phone-frame img, .pd-phone-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
}
.pd-play {
  position: absolute;
  left: 50%; top: 50%;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: #0B0B0B;
  font-size: 28px;
}
.pd-phone figcaption {
  max-width: 300px;
  margin: 20px auto 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  color: #ffffff;
}
.pd-phone figcaption span {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.motion .pd-phone:nth-child(2) { transition-delay: 0.12s; }
.motion .pd-phone:nth-child(3) { transition-delay: 0.24s; }

/* Newsletter: finestre che scorrono al passaggio del mouse */
.pd-mails { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.pd-mail { margin: 0; }
.pd-mail-window {
  height: 520px;
  overflow: hidden;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 30px 60px -25px rgba(21,72,123,0.35), 0 0 0 1px rgba(11,11,11,0.06);
}
.pd-mail-window img {
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(0);
  transition: transform 3.5s ease-in-out;
}
.pd-mail:hover .pd-mail-window img { transform: translateY(calc(-100% + 520px)); }
.pd-mail figcaption {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted-foreground);
}

/* Risultati */
.pd-results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pd-result { padding: 40px 28px; background: #ffffff; }
.pd-result strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(40px, 4.5vw, 68px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
}
.pd-result p {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ak-font);
}
.pd-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}
.pd-back:hover { color: #ffffff; }

@media (max-width: 1000px) {
  .pd-hero { grid-template-columns: 1fr; min-height: 0; padding: 56px 16px 72px; gap: 40px; }
  .pd-stack { height: 420px; max-width: 520px; }
  .pd-intro { grid-template-columns: 1fr; gap: 56px; padding: 96px 16px; }
  .pd-section { padding: 96px 16px; }
  .pd-section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
  .pd-activities { grid-template-columns: 1fr 1fr; }
  .pd-phones { grid-template-columns: 1fr; gap: 56px; }
  .pd-mails { grid-template-columns: 1fr; }
  .pd-results { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .pd-stack { height: 340px; }
  .pd-activities { grid-template-columns: 1fr; }
  .pd-feed { grid-template-columns: 1fr 1fr; }
  .pd-mail-window { height: 420px; }
  .pd-mail:hover .pd-mail-window img { transform: none; }
  .pd-mail-window { overflow-y: auto; }
}

/* Progetti: segnaposto immagini, numero in evidenza, livelli di moderazione */
.pd-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 16px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8C8C8C;
  background: repeating-linear-gradient(135deg, #E6E7E9 0 12px, #EEEFF1 12px 24px);
}
.pd-phone-frame .pd-ph { height: 100%; aspect-ratio: auto; border-radius: 28px; background: repeating-linear-gradient(135deg, #2C2C2E 0 12px, #333336 12px 24px); }
.pd-stack .pd-ph {
  position: absolute;
  width: 52%;
  border-radius: 14px;
  box-shadow: 0 30px 60px -20px rgba(21,72,123,0.35);
}
.pd-stack .pd-ph:nth-child(1) { left: 0; top: 12%; transform: rotate(-6deg); }
.pd-stack .pd-ph:nth-child(2) { left: 24%; top: 0; z-index: 2; transform: rotate(2deg); }
.pd-stack .pd-ph:nth-child(3) { right: 0; top: 22%; z-index: 3; transform: rotate(7deg); }

.pd-bigstat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 32px;
  padding: 120px 64px;
  background-color: #FFFFFF;
}
.js-bg .pd-bigstat { background-color: transparent; }
.pd-bigstat strong {
  font-family: var(--font-display);
  font-size: clamp(96px, 18vw, 280px);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.07em;
  padding-right: 0.06em;
}
.pd-bigstat p {
  max-width: 420px;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 40px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #0B0B0B;
}
.pd-bigstat p span {
  display: block;
  margin-top: 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
  color: var(--ak-font);
}

.pd-levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pd-level { padding: 48px 40px; background: #161616; border-top: 4px solid var(--level-color, var(--accent)); }
.pd-level:nth-child(1) { --level-color: var(--ak-education); }
.pd-level:nth-child(2) { --level-color: #8FA6C9; transition-delay: 0.12s; }
.pd-level-num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--level-color);
}
.pd-level h3 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #ffffff;
}
.pd-level p {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
  color: rgba(255,255,255,0.75);
}
@media (max-width: 1000px) {
  .pd-bigstat { padding: 80px 16px; }
  .pd-levels { grid-template-columns: 1fr; }
  .pd-level { padding: 36px 24px; }
}

/* Progetti evento: foto a tutta larghezza, galleria, testo + foto */
.pd-band {
  position: relative;
  height: 80vh;
  min-height: 420px;
  overflow: hidden;
  background: #0B0B0B;
}
.pd-band img {
  position: absolute;
  inset: -10% 0;
  width: 100%;
  height: 120%;
  object-fit: cover;
  transform: translateY(var(--band-shift, 0));
  will-change: transform;
}
.pd-band figcaption {
  position: absolute;
  left: 64px;
  bottom: 40px;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(11,11,11,0.55);
  backdrop-filter: blur(4px);
}
.pd-text {
  max-width: 900px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #0B0B0B;
}
.pd-dark .pd-text { color: #ffffff; }

.pd-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: clamp(140px, 16vw, 230px);
  grid-auto-flow: dense;
  gap: 6px;
  margin-top: 64px;
}
.pd-gallery figure { margin: 0; overflow: hidden; grid-row: span 2; background: #d0d0d0; }
.pd-gallery figure.is-wide { grid-column: span 2; }
.pd-gallery figure.is-tall { grid-row: span 3; }
.pd-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.pd-gallery figure:hover img { transform: scale(1.04); }
.motion .pd-gallery figure:nth-child(2) { transition-delay: 0.1s; }
.motion .pd-gallery figure:nth-child(3) { transition-delay: 0.2s; }

.pd-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.pd-split-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pd-split-photos img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.pd-split-photos img:nth-child(2) { margin-top: 64px; }
.pd-split .section-title { margin-bottom: 32px; }

@media (max-width: 1000px) {
  .pd-band { height: 56vh; }
  .pd-band figcaption { left: 16px; bottom: 16px; }
  .pd-gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; margin-top: 40px; }
  .pd-split { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 720px) {
  .pd-gallery figure.is-wide { grid-column: span 2; }
}
/* Titoli affiancati a un testo: un po' più piccoli, così parole lunghe come "NEWSLETTER" stanno nella colonna */
.pd-section-head .section-title { font-size: clamp(40px, 5.8vw, 92px); }

/* Progetti Digital PR: muro dei brand, scala degli influencer, canali, contenuti quadrati */
.pd-brands {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 28px;
  list-style: none;
  margin-top: 56px;
}
.pd-brands li {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 96px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: #0B0B0B;
  transition: color 0.25s;
}
.pd-brands li:nth-child(even) { color: #C4C7CC; }
.pd-brands li:hover { color: var(--brand-color, var(--ak-business)); }
.pd-brands li:nth-child(3n+1) { --brand-color: var(--ak-business); }
.pd-brands li:nth-child(3n+2) { --brand-color: #23775F; }
.pd-brands li:nth-child(3n+3) { --brand-color: var(--ak-marketplace); }
.pd-brands li.is-more { font-size: clamp(20px, 2.4vw, 34px); color: var(--muted-foreground); letter-spacing: -0.02em; text-transform: none; }

.pd-scale { margin-top: 56px; }
.pd-scale-bar {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #75B049, #41BD9E, #218DAE, #8FA6C9);
  transform-origin: left center;
}
.motion .pd-scale-bar { transform: scaleX(0); transition: transform 1.4s cubic-bezier(.2,.7,.2,1); }
.motion .pd-scale.is-in .pd-scale-bar { transform: scaleX(1); }
.pd-scale-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: clamp(16px, 1.8vw, 24px);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #ffffff;
}
.pd-chipset { margin-top: 48px; }
.pd-chipset h3 {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.pd-chipset ul { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; list-style: none; }
.pd-chipset li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 999px;
}
.pd-chipset li iconify-icon { font-size: 22px; }
.motion .pd-chipset li { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.motion .pd-chipset.is-in li { opacity: 1; transform: none; }
.pd-chipset.is-in li:nth-child(2) { transition-delay: 0.06s; }
.pd-chipset.is-in li:nth-child(3) { transition-delay: 0.12s; }
.pd-chipset.is-in li:nth-child(4) { transition-delay: 0.18s; }
.pd-chipset.is-in li:nth-child(5) { transition-delay: 0.24s; }
.pd-chipset.is-in li:nth-child(6) { transition-delay: 0.30s; }

.pd-feed--square { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pd-feed--square img { aspect-ratio: 1 / 1; }
.pd-feed figcaption {
  padding: 12px 2px 0;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--ak-font);
}
.pd-gray .pd-feed figure, .pd-white .pd-feed figure { background: transparent; }

/* Scheda progetto senza foto: titolo tipografico */
.work-card-type {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 28px;
  background: #0B0B0B;
}
.work-card-type strong {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 60px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}
.work-card-type span {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

@media (max-width: 1000px) {
  .pd-feed--square { grid-template-columns: 1fr 1fr; }
}

/* Riquadri per logo e declinazioni (immagini trasparenti su fondo chiaro) */
.pd-brandcard {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 4;
  padding: 28px;
  background: #F2F2F2;
}
.pd-brandcard img { display: block; width: 100%; height: auto; max-height: 100%; object-fit: contain; aspect-ratio: auto; }
.pd-split-photos .pd-brandcard:nth-child(2) { margin-top: 64px; }

/* =====================================================================
   Pagina AI (riusa la struttura della pagina Brand Lover)
   ===================================================================== */
.ai-mark {
  display: inline-block;
  margin-bottom: 40px;
  font-family: var(--font-display);
  font-size: clamp(96px, 14vw, 220px);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.06em;
  padding-right: 0.08em;
}
.ai-steps .bl-step:nth-child(6) { --step-color: #8FA6C9; }
.ai-tools {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
  padding: 48px 40px;
  background: #0B0B0B;
  border-radius: 14px;
  box-shadow: 0 30px 60px -20px rgba(21,72,123,0.35);
}
.ai-tools .section-kicker { color: var(--ak-education); }
.ai-tools-list { list-style: none; margin-top: 28px; }
.ai-tools-list li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.ai-tool-name {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #ffffff;
}
.ai-tool-use {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
}
.ai-tools-note {
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: rgba(255,255,255,0.55);
}
@media (max-width: 1000px) {
  .ai-tools { position: static; }
}
@media (max-width: 720px) {
  .ai-mark { margin-bottom: 24px; }
  .ai-tools { padding: 36px 24px; }
}

/* =====================================================================
   Pagina Studio
   ===================================================================== */
/* Foto con segnaposto: se l'immagine manca compare il nome del file da caricare */
.st-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  background-color: #DADDE1;
  background-image:
    linear-gradient(rgba(21,72,123,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21,72,123,0.08) 1px, transparent 1px);
  background-size: 32px 32px;
}
.st-photo::before {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ak-corporate);
}
.st-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.st-hero { padding: 96px 64px 64px; }
.st-hero-text { max-width: 1240px; }
.st-hero .section-kicker { margin-bottom: 32px; }
.st-hero-photo { margin-top: 64px; aspect-ratio: 16 / 7; border-radius: 14px; }

.st-services { padding: 140px 64px; background-color: #FFFFFF; }
.st-services .section-title { margin-bottom: 72px; }
.st-list { display: flex; flex-direction: column; gap: 96px; }
.st-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.st-row:nth-child(even) .st-photo { order: 2; }
.st-row .st-photo { aspect-ratio: 4 / 3; border-radius: 14px; }
.st-num {
  display: block;
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--st-color, var(--ak-business));
}
.st-row:nth-child(1) { --st-color: var(--ak-sport); }
.st-row:nth-child(2) { --st-color: #2A8F77; }
.st-row:nth-child(3) { --st-color: var(--ak-marketplace); }
.st-row:nth-child(4) { --st-color: var(--ak-business); }
.st-row:nth-child(5) { --st-color: var(--ak-corporate); }
.st-row:nth-child(6) { --st-color: #8FA6C9; }
.st-row-title {
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 48px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #0B0B0B;
}
.st-row-desc {
  margin-top: 20px;
  max-width: 520px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--ak-font);
}

.st-gallery-section { padding: 140px 64px 0; background-color: #0B0B0B; }
.st-gallery-section .section-title { color: #ffffff; margin-bottom: 72px; }
.st-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 260px;
  gap: 6px;
}
.st-gallery .st-photo { background-color: #1E2124; }
.st-gallery .st-photo::before { color: #8FA6C9; }
.st-g1 { grid-column: span 2; grid-row: span 2; }
.st-g2 { grid-column: span 2; }
.st-g3, .st-g4 { grid-column: span 1; }
.st-g5 { grid-column: span 4; }
.st-g5 { grid-row: span 1; }

.js-bg .st-services { background-color: transparent; }

@media (max-width: 1000px) {
  .st-hero { padding: 72px 16px 48px; }
  .st-hero-photo { aspect-ratio: 4 / 3; margin-top: 48px; }
  .st-services { padding: 96px 16px; }
  .st-services .section-title { margin-bottom: 48px; }
  .st-list { gap: 64px; }
  .st-row { grid-template-columns: 1fr; gap: 28px; }
  .st-row:nth-child(even) .st-photo { order: 0; }
  .st-num { font-size: 44px; }
  .st-gallery-section { padding: 96px 16px 0; }
  .st-gallery-section .section-title { margin-bottom: 48px; }
  .st-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; }
  .st-g1, .st-g5 { grid-column: span 2; }
  .st-g2 { grid-column: span 2; }
}
.st-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: -32px 0 56px; }
.st-facts li {
  padding: 12px 20px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
}
@media (max-width: 1000px) { .st-facts { margin: -16px 0 40px; } .st-facts li { font-size: 11px; padding: 10px 14px; } }

/* Studio — foto reali: formato verticale, gallery a scorrimento */
.st-row { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); }
.st-row .st-photo { aspect-ratio: 4 / 5; }
.st-hero-photo { aspect-ratio: 16 / 8; }
.st-hero-photo img { object-position: center 60%; }
.st-slider img { opacity: 0; transition: opacity 0.9s ease; }
.st-slider img.is-active { opacity: 1; }
.st-arrow {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.85); color: #0B0B0B; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18); transition: background 0.2s, transform 0.2s;
}
.st-arrow--prev { left: 14px; }
.st-arrow--next { right: 14px; }
.st-arrow:hover { background: #ffffff; transform: translateY(-50%) scale(1.08); }
.st-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 700px) { .st-arrow { width: 36px; height: 36px; } .st-arrow--prev { left: 10px; } .st-arrow--next { right: 10px; } }

/* Galleria: quattro verticali + una orizzontale a tutta larghezza */
.st-gallery { grid-auto-rows: auto; }
.st-gallery .st-photo { aspect-ratio: 3 / 4; }
.st-g1, .st-g2, .st-g3, .st-g4 { grid-column: span 1; grid-row: auto; }
.st-g5 { grid-column: 1 / -1; aspect-ratio: 16 / 7 !important; }
@media (max-width: 1000px) {
  .st-row .st-photo { aspect-ratio: 4 / 5; }
  .st-hero-photo { aspect-ratio: 4 / 3; }
  .st-g1, .st-g2 { grid-column: span 1; }
  .st-g5 { grid-column: 1 / -1; aspect-ratio: 16 / 9 !important; }
}

/* =====================================================================
   Home · Progetti in due colonne sfalsate (riferimento: squaremediaagency.it)
   ===================================================================== */
.works-section--home { padding: 120px 48px 120px; min-height: 0; overflow: visible; }
.works-section--home .section-title-bg {
  position: relative; top: auto; left: auto;
  display: block;
  font-size: clamp(110px, 19vw, 300px);
  letter-spacing: -0.045em;
  line-height: 0.8;
  color: rgba(65,67,70,0.1);
  margin: 0 0 -0.12em -0.04em;
  transform-origin: left bottom;
}
.motion .works-section--home .section-title-bg { transform: scale(0.86); opacity: 0.4; transition: transform 1.4s cubic-bezier(.16,1,.3,1), opacity 1.4s ease; }
.motion .works-section--home .section-title-bg.is-in { transform: none; opacity: 1; }

.hw-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.hw-col { display: flex; flex-direction: column; gap: 56px; }
.hw-link { display: block; color: var(--foreground); text-decoration: none; }
.hw-media { position: relative; overflow: hidden; background: #d0d0d0; }
.hw-tall  .hw-media { aspect-ratio: 672 / 774; }
.hw-mid   .hw-media { aspect-ratio: 1 / 1; }
.hw-short .hw-media { aspect-ratio: 672 / 462; }
.hw-xtall .hw-media { aspect-ratio: 2 / 3; }
.hw-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 1s cubic-bezier(.16,1,.3,1);
}
.hw-link:hover .hw-media img { transform: scale(1.05); }

.hw-info { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-top: 20px; }
.hw-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2vw, 30px); letter-spacing: -0.01em; line-height: 1.2; transition: color 0.3s; }
.hw-tags { margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-foreground); }
.hw-arrow {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--border); font-size: 20px; color: var(--foreground);
  transform: rotate(-45deg);
  transition: transform 0.5s cubic-bezier(.16,1,.3,1), background 0.3s, color 0.3s, border-color 0.3s;
}
.hw-link:hover .hw-arrow { transform: none; background: var(--ak-business); border-color: var(--ak-business); color: #fff; }
.hw-link:hover .hw-title { color: var(--ak-business); }
.hw-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }

/* entrata: la seconda colonna arriva un attimo dopo */
.motion .hw-col:nth-child(2) .hw-item.reveal { transition-delay: 0.12s; }
.works-section--home .works-more { margin-top: 80px; }
/* colonna destra leggermente più in basso, per l'effetto sfalsato */
.works-section--home .hw-col:nth-child(2) { padding-top: 120px; }

@media (max-width: 720px) {
  .works-section--home { padding: 72px 16px 72px; }
  .works-section--home .section-title-bg { font-size: 27vw; margin-bottom: 8px; }
  .hw-grid { grid-template-columns: 1fr; }
  .hw-col { gap: 40px; }
  .hw-col + .hw-col { margin-top: 40px; }
  .works-section--home .hw-col:nth-child(2) { padding-top: 0; }
  .hw-tall .hw-media, .hw-xtall .hw-media { aspect-ratio: 4 / 4.4; }
  .hw-info { margin-top: 14px; }
  .hw-arrow { width: 40px; height: 40px; }
}

/* Pagina Progetti: stessa griglia della home, sotto i filtri */
.pj-works { padding: 56px 48px 120px; }
.pj-works .hw-item[hidden] { display: none; }
.pj-works .hw-item.is-entering { animation: pj-in 0.45s ease both; }
.pj-works .pj-empty { grid-column: 1 / -1; }
/* colonna destra leggermente più in basso, per l'effetto sfalsato */
.pj-works .hw-col:nth-child(2) { padding-top: 140px; }
@media (max-width: 720px) { .pj-works { padding: 32px 16px 72px; } .pj-works .hw-col:nth-child(2) { padding-top: 0; } }

/* =====================================================================
   Pagine caso: gallerie per banner orizzontali, locandine e video
   ===================================================================== */
.pd-banners { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.pd-banners--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pd-banners--one { grid-template-columns: 1fr; max-width: 1100px; margin: 0 auto; }
.pd-banners figure, .pd-posters figure, .pd-masonry figure { position: relative; margin: 0; overflow: hidden; }
.pd-banners img, .pd-posters img, .pd-masonry img { display: block; width: 100%; height: auto; transition: transform 0.6s ease; }
.pd-banners figure:hover img, .pd-posters figure:hover img, .pd-masonry figure:hover img { transform: scale(1.03); }
.pd-banners figcaption { margin-top: 14px; font-family: var(--font-display); font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-foreground); }
.pd-dark .pd-banners figcaption { color: #fff; }
.pd-banners figure.is-video .pd-play { top: calc(50% - 18px); }
.pd-posters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; align-items: start; }
.pd-posters figure { box-shadow: 0 30px 60px -30px rgba(21,72,123,0.45); }
.pd-masonry { columns: 3; column-gap: 24px; }
.pd-masonry figure { break-inside: avoid; margin-bottom: 24px; }
.pd-feed--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pd-feed--four img { aspect-ratio: 3 / 4; }
.pd-phones--four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.pd-logo-square { margin: 0; max-width: 460px; justify-self: center; }
.pd-logo-square img { display: block; width: 100%; height: auto; border-radius: 14px; }
@media (max-width: 1000px) {
  .pd-banners--three { grid-template-columns: 1fr 1fr; }
  .pd-posters { grid-template-columns: 1fr 1fr; }
  .pd-masonry { columns: 2; }
  .pd-feed--four, .pd-phones--four { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .pd-banners, .pd-banners--three { grid-template-columns: 1fr; gap: 16px; }
  .pd-masonry { column-gap: 12px; }
  .pd-masonry figure { margin-bottom: 12px; }
  .pd-posters { gap: 12px; }
}

/* =====================================================================
   Pagine caso: video, stories, miniature, prima/dopo, numeri
   ===================================================================== */
.pd-video { margin: 0 0 64px; }
.pd-video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; }
.pd-video figcaption { margin-top: 14px; font-family: var(--font-display); font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; }
.pd-phones--two { grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; gap: 64px; }
.pd-yt { position: relative; aspect-ratio: 16 / 9; margin: 48px 0; background: #0B0B0B; border-radius: 14px; overflow: hidden; }
.pd-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pd-leads { display: grid; gap: 16px; }
.pd-stories { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.pd-stories--four { grid-template-columns: repeat(4, minmax(0, 260px)); justify-content: center; gap: 24px; }
.pd-stories figure, .pd-thumbs figure, .pd-trio figure { margin: 0; overflow: hidden; border-radius: 14px; background: #d0d0d0; }
.pd-stories img { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }
/* miniature dei contenuti: immagini piccole, mostrate a dimensione ridotta per non perdere nitidezza */
.pd-thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 200px)); justify-content: center; gap: 16px; }
.pd-thumbs--five { grid-template-columns: repeat(5, minmax(0, 200px)); }
.pd-thumbs--seven { grid-template-columns: repeat(7, minmax(0, 170px)); }
.pd-thumbs img { display: block; width: 100%; height: auto; }
.pd-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.pd-trio img, .pd-trio video { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.pd-compare { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pd-compare figure { margin: 0; }
.pd-compare img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; }
.pd-compare figcaption { margin-top: 12px; font-family: var(--font-display); font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.7); }
.pd-compare figure:nth-child(even) figcaption { color: var(--accent); }
.pd-results--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pd-dark .pd-result { background: #1C1C1E; }
.pd-dark .pd-result p { color: #fff; }
/* Scheda progetto senza foto (griglia home / Progetti) */
.hw-media--type { display: flex; align-items: flex-end; padding: 32px; background: var(--ak-gradient); }
.hw-media--type span { font-family: var(--font-display); font-weight: 900; font-size: clamp(40px, 6vw, 96px); line-height: 0.9; letter-spacing: -0.05em; text-transform: uppercase; color: #fff; transition: transform 1s cubic-bezier(.16,1,.3,1); }
.hw-link:hover .hw-media--type span { transform: translateY(-6px); }
@media (max-width: 1000px) {
  .pd-stories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pd-stories--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-thumbs, .pd-thumbs--five, .pd-thumbs--seven { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pd-compare { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .pd-phones--two { grid-template-columns: 1fr; gap: 40px; }
  .pd-trio { grid-template-columns: 1fr 1fr; }
  .pd-stories { grid-template-columns: 1fr 1fr; }
  .pd-results--two { grid-template-columns: 1fr; }
}

/* Video YouTube con anteprima cliccabile */
.pd-yt-cover { position: absolute; inset: 0; display: block; color: #fff; text-decoration: none; }
.pd-yt-cover img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity 0.4s, transform 0.8s cubic-bezier(.16,1,.3,1); }
.pd-yt-cover:hover img { opacity: 1; transform: scale(1.03); }
.pd-yt-cover .pd-play { width: 84px; height: 84px; font-size: 34px; }
.pd-yt-label { position: absolute; left: 24px; bottom: 20px; padding: 10px 16px; border-radius: 999px; background: rgba(11,11,11,0.75); font-family: var(--font-display); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }

/* Video in formato feed 4:5 (es. pillole Mercer) */
.pd-phones--feed .pd-phone-frame { aspect-ratio: 4 / 5; max-width: 340px; border-radius: 28px; }
.pd-phones--feed .pd-phone-frame video { border-radius: 20px; }
/* Video orizzontali dentro le griglie di banner (es. PENNYCashback) */
.pd-banners video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.pd-gray .pd-phone figcaption, .pd-white .pd-phone figcaption { color: var(--foreground); }
.pd-phones--feed .pd-phone figcaption { max-width: 340px; }
.pd-results--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .pd-results--three { grid-template-columns: 1fr; } }
.pd-thumbs--even img { aspect-ratio: 4 / 5; object-fit: cover; }
@media (min-width: 721px) { .pd-feed--six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* I numeri dei risultati si rimpiccioliscono se il riquadro è stretto (evita cifre tagliate) */
.pd-result { container-type: inline-size; min-width: 0; }
.pd-result strong { font-size: min(clamp(40px, 4.5vw, 68px), 19cqi); white-space: nowrap; }
/* Due video quadrati affiancati (es. Tecnomat) */
.pd-squares { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.pd-squares figure { margin: 0; }
.pd-squares video { display: block; width: 100%; aspect-ratio: 1 / 1; background: #000; border-radius: 14px; object-fit: cover; }
.pd-squares figcaption { margin-top: 14px; font-family: var(--font-display); font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-foreground); }
.pd-dark .pd-squares figcaption { color: #fff; }
/* Telefono in formato post 4:5 accanto a uno verticale */
.pd-phone--feed .pd-phone-frame { aspect-ratio: 4 / 5; max-width: 340px; }
.pd-phones--two { align-items: start; }
@media (max-width: 720px) { .pd-squares { grid-template-columns: 1fr; } }

/* ===== Banner cookie ===== */
.ck {
  position: fixed; left: 20px; bottom: 20px; z-index: 1000;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 40px); overflow: auto;
  padding: 24px 24px 20px;
  background: #0B0B0B; color: #fff;
  border: 1px solid rgba(255,255,255,0.22); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.28);
  font-family: var(--font-body); font-size: 14px; line-height: 1.55;
  opacity: 0; transform: translateY(16px); transition: opacity 0.35s ease, transform 0.35s ease;
}
.ck.is-open { opacity: 1; transform: none; }
.ck[hidden] { display: none; }
.ck-title { font-family: var(--font-display); font-weight: 900; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; padding-right: 32px; }
.ck-text { color: rgba(255,255,255,0.8); }
.ck-text a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.ck-x {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: #fff; cursor: pointer;
}
.ck-x:hover { background: rgba(255,255,255,0.12); }
.ck-prefs { margin-top: 16px; display: grid; gap: 10px; }
.ck-prefs[hidden] { display: none; }
.ck-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid rgba(255,255,255,0.18); border-radius: 10px; cursor: pointer; }
.ck-opt input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.ck-opt span { color: rgba(255,255,255,0.75); font-size: 13px; }
.ck-opt strong { display: block; color: #fff; font-size: 14px; }
.ck-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ck-btn {
  flex: 1 1 auto; min-height: 42px; padding: 0 16px;
  font-family: var(--font-display); font-weight: 800; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: transparent; border: 1.5px solid #fff; border-radius: 999px; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.ck-btn--main { background: #fff; color: #0B0B0B; }
.ck-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.ck-btn[hidden] { display: none; }
.ck-btn:focus-visible, .ck-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 600px) { .ck { left: 16px; bottom: 16px; padding: 20px 18px 16px; } }

/* Link legali nel footer */
.footer-legal { display: inline-block; margin-top: 6px; }
.footer-legal a, .footer-legal button { color: rgba(255,255,255,0.6); font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.footer-legal a:hover, .footer-legal button:hover { color: #fff; }

/* Pagine legali */
.legal { max-width: 820px; margin: 0 auto; padding: calc(var(--nav-h, 88px) + 64px) 24px 96px; color: var(--foreground); }
.legal h1 { font-family: var(--font-display); font-weight: 900; font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; margin-bottom: 16px; }
.legal .legal-updated { color: var(--muted-foreground); font-size: 14px; margin-bottom: 40px; }
.legal h2 { font-family: var(--font-display); font-weight: 800; font-size: 20px; margin: 40px 0 12px; }
.legal p, .legal li { font-size: 16px; line-height: 1.7; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; margin-top: 8px; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--ak-business); text-decoration: underline; }
.legal table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.legal th { font-family: var(--font-display); font-weight: 800; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.legal .todo { background: #FFF3B0; padding: 0 4px; border-radius: 3px; }
.legal-table-wrap { overflow-x: auto; }

/* Consenso privacy nel modulo */
.form-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--muted-foreground); }
.form-consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.form-consent a { color: var(--ak-business); text-decoration: underline; }

/* ===== Codice etico ===== */
.ce { max-width: 880px; margin: 0 auto; padding: calc(var(--nav-h, 88px) + 64px) 24px 112px; color: var(--foreground); }
.ce-head { padding-bottom: 40px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.ce-kicker { font-family: var(--font-display); font-weight: 800; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.ce-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(40px, 6.4vw, 84px); line-height: 0.95; letter-spacing: -0.035em; text-transform: uppercase; margin: 14px 0 20px; }
.ce-meta { color: var(--muted-foreground); font-size: 15px; }
.ce-head .btn { margin-top: 28px; }
.ce-sec { padding-top: 48px; }
.ce-sec h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 18px; }
.ce-sec h3 { font-family: var(--font-display); font-weight: 800; font-size: 18px; margin: 28px 0 8px; }
.ce-sec p, .ce-sec li { font-size: 17px; line-height: 1.7; }
.ce-sec p + p { margin-top: 12px; }
.ce-lead { font-size: 22px !important; line-height: 1.4 !important; font-weight: 700; color: var(--ak-business); }
.ce-sec a { color: var(--ak-business); text-decoration: underline; text-underline-offset: 2px; }
.ce-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ce-card { padding: 24px; background: var(--surface); border-radius: 14px; }
.ce-card h3 { margin-top: 10px; }
.ce-card p { font-size: 15px; }
.ce-num { font-family: var(--font-display); font-weight: 900; font-size: 34px; line-height: 1; background: var(--ak-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ce-box { margin-top: 24px; padding: 28px 32px; border-radius: 14px; background: #0B0B0B; color: #fff; }
.ce-box-title { font-family: var(--font-display); font-weight: 800; font-size: 20px !important; line-height: 1.3 !important; margin-bottom: 14px; }
.ce-box ol { padding-left: 22px; }
.ce-box li { color: rgba(255,255,255,0.85); }
.ce-box li + li { margin-top: 8px; }
.ce-wb { padding: 32px; border-radius: 14px; border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--ak-gradient) border-box; }
.ce-wb .ce-kicker { margin-bottom: 14px; }
.ce-wb-mail { font-family: var(--font-display); font-weight: 900; font-size: clamp(20px, 3vw, 30px) !important; margin: 16px 0 !important; word-break: break-all; }
.ce-wb-mail a { text-decoration: none; background: var(--ak-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 760px) {
  .ce-cards { grid-template-columns: 1fr; }
  .ce-box, .ce-wb { padding: 24px 20px; }
  .ce-sec p, .ce-sec li { font-size: 16px; }
}

/* Modulo: campo trappola per lo spam (invisibile) e messaggio di errore */
.form-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note.is-error { color: #C0392B; }
.submit-btn:disabled { opacity: 0.6; cursor: wait; }

/* ===== Telefono e schermi verticali: video in apertura senza bande =====
   Il video occupa tutta la larghezza nel suo formato 16:9 (nessun taglio, nessuna banda);
   il claim scende sotto, come sezione normale, e le righe compaiono scorrendo. */
@media (max-aspect-ratio: 1/1) {
  .hero-pin { height: auto; }
  .hero { position: relative; top: 0; height: auto; min-height: 0; display: block; background: #0B0B0B; }
  .hero-video { position: relative; inset: auto; display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transform: none; background: #1D4D7E; }
  .hero-sound { top: calc(100vw * 9 / 16 - 52px); bottom: auto; right: 12px; padding: 8px 12px; opacity: 1; }
  .hero-wipe { position: relative; inset: auto; clip-path: none; padding: 56px 16px 64px; }
  .hero-claim { transform: none; font-size: 11.5vw; }
}

/* ===== Menu a panino su telefono ===== */
.nav-toggle { display: none; }
@media (max-width: 720px) {
  .navbar.has-toggle { flex-wrap: nowrap; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
    width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; background: none; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 26px; height: 2.5px; border-radius: 2px; background: var(--ak-font); transition: transform 0.3s ease, opacity 0.2s ease; }
  .navbar.is-open .nav-toggle span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
  .navbar.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .navbar.is-open .nav-toggle span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
  .nav-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
  .navbar.has-toggle .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; width: auto;
    height: calc(100vh - 56px); height: calc(100dvh - 56px); overflow-y: auto;
    flex-direction: column; justify-content: flex-start; gap: 0;
    padding: 16px 16px 40px; background: #fff; box-shadow: 0 1px 0 var(--border) inset;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  }
  .navbar.has-toggle.is-open .nav-links { opacity: 1; visibility: visible; transform: none; transition: opacity 0.25s ease, transform 0.25s ease; }
  .navbar.has-toggle .nav-link { font-size: 28px; letter-spacing: 0.01em; padding: 18px 0; border-bottom: 1px solid var(--border); }
  .navbar.has-toggle .nav-link.is-current { color: var(--ak-business); border-bottom-color: var(--accent); }
  body.nav-open { overflow: hidden; }
}

/* ===== Contatti su telefono e tablet: titolo, poi il modulo, poi le sedi ===== */
@media (max-width: 1000px) {
  .contact-left { display: contents; }
  .contact-title { order: 1; }
  .contact-right { order: 2; }
  .offices { order: 3; margin-top: 0; }
}

/* ===== Foto a tutto schermo ===== */
.lb-zoomable { cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 2000; background: #0B0B0B; opacity: 0; transition: opacity 0.25s ease; }
.lb.is-on { opacity: 1; }
.lb[hidden] { display: none; }
.lb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 56px 16px; overflow: auto; -webkit-overflow-scrolling: touch; }
.lb-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.lb.is-tall .lb-stage { align-items: flex-start; }
.lb.is-tall .lb-img { max-height: none; width: min(100%, 900px); }
.lb-btn { position: absolute; z-index: 2; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.14); color: #fff; cursor: pointer; transition: background 0.2s; }
.lb-btn:hover { background: rgba(255,255,255,0.28); }
.lb-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lb-close { top: 12px; right: 12px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb.is-single .lb-prev, .lb.is-single .lb-next { display: none; }
.lb-count { position: absolute; top: 22px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.75); font-family: var(--font-display); font-weight: 800; font-size: 12px; letter-spacing: 0.12em; pointer-events: none; }
body.lb-open { overflow: hidden; }
@media (max-width: 720px) { .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; } .lb-prev { left: 16px; } .lb-next { right: 16px; } .lb-stage { padding: 60px 8px 76px; } }
