:root {
  --ink: #222222;
  --text: #333333;
  --muted: #6b6b6b;
  --rule: #1a1a1a;
  --bg: #ffffff;
  --pad: clamp(1.25rem, 5vw, 6rem);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
}
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--pad); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(3rem, 6vw, 5.5rem);
}
.kicker, .label {
  font-size: clamp(0.8rem, 1vw, 1.02rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--ink);
}
.kicker span { margin: 0 0.6em; }
h1 {
  margin-top: clamp(1.5rem, 3vw, 2.75rem);
  font-weight: 300;
  font-size: clamp(3rem, 6.4vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.lead {
  margin-top: clamp(1.75rem, 3.5vw, 3rem);
  font-size: clamp(1.25rem, 1.85vw, 1.85rem);
  line-height: 1.2;
  color: var(--ink);
  max-width: 34ch;
}
.body {
  margin-top: clamp(1.5rem, 2.5vw, 2.25rem);
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  line-height: 1.75;
  max-width: 44em;
}
.body strong { font-weight: 600; color: #111; }
.short-rule {
  width: 3.2rem; height: 0; border: 0;
  border-top: 1.5px solid var(--rule);
  margin: clamp(2rem, 3.5vw, 3rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}
.position { font-size: clamp(0.95rem, 1.2vw, 1.15rem); }
.photo { width: 100%; aspect-ratio: 665 / 788; object-fit: cover; }

/* ---------- Sezioni loghi ---------- */
.section-rule { border: 0; border-top: 1.5px solid var(--rule); }
.logos-section { padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2.5rem, 5vw, 4.5rem); }
.label { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.grid {
  list-style: none;
  display: grid;
  align-items: center;
  justify-items: center;
  row-gap: clamp(1.5rem, 3vw, 2.75rem);
}
.grid li { width: 100%; display: flex; justify-content: center; align-items: center; container-type: inline-size; }
.grid img { height: 3rem; width: auto; max-width: 92%; object-fit: contain; }
@supports (height: 1cqw) { .grid img { height: calc(var(--h, 25) * 1cqw); } }
.brands { grid-template-columns: repeat(6, 1fr); }
.awards { grid-template-columns: repeat(8, 1fr); }

/* ---------- Pulsanti ---------- */
.cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  padding: clamp(3rem, 7vw, 6.5rem) 0 clamp(4rem, 8vw, 7rem);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16rem;
  height: 4.1rem;
  border: 1.5px solid #8a8a8a;
  color: #5a5a5a;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* ---------- Animazioni in dissolvenza ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js .reveal.visible { opacity: 1; transform: none; }
.js .photo.reveal { transform: none; transition-duration: 1.4s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .photo-wrap { max-width: 560px; }
  .brands { grid-template-columns: repeat(4, 1fr); }
  .awards { grid-template-columns: repeat(4, 1fr); }
}
/* ---------- Smartphone ---------- */
@media (max-width: 560px) {
  .kicker { font-size: 0.7rem; letter-spacing: 0.1em; white-space: nowrap; }
  .kicker span { margin: 0 0.35em; }
  .brands { grid-template-columns: repeat(3, 1fr); }
  .cta { gap: 1rem; }
  .btn { width: 100%; max-width: 20rem; height: 3.6rem; }
}

/* ---------- Link discreti a fondo pagina ---------- */
.more {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2rem;
  padding: 0 0 clamp(3rem, 6vw, 5rem);
  margin-top: calc(-1 * clamp(1.5rem, 4vw, 3.5rem));
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}
.more a { color: #8a8a8a; text-decoration: none; }
.more a:hover, .more a[aria-current] { color: var(--ink); }
.more a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Pagine secondarie ---------- */
.page-head { max-width: 60rem; }
.page-head h1 { font-size: clamp(2.6rem, 5.4vw, 5.2rem); }
.page-head .lead { max-width: 40ch; }
.prose { max-width: 46em; font-size: clamp(0.95rem, 1.2vw, 1.12rem); line-height: 1.75; }
.prose p + p, .prose p + h3, .prose ul + p { margin-top: 1.1em; }
.prose h3 { font-size: clamp(1.1rem, 1.5vw, 1.35rem); font-weight: 400; color: var(--ink); line-height: 1.3; margin-bottom: 0.4em; }
.prose strong { font-weight: 600; color: #111; }
.prose a { color: var(--ink); text-underline-offset: 0.2em; }
.blocks { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 6vw, 6rem); max-width: 72rem; }
.blocks .prose { max-width: none; }

/* elenco con anno a sinistra (percorso, premi, giurie) */
.rows { list-style: none; max-width: 64rem; }
.rows li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.25rem 2rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid #dddddd;
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  line-height: 1.7;
}
.rows li:first-child { padding-top: 0; }
.rows li:last-child { border-bottom: none; }
.rows .when { color: var(--muted); }
.rows h3 { font-size: clamp(1.05rem, 1.4vw, 1.25rem); font-weight: 400; color: var(--ink); line-height: 1.35; }
.rows p { margin-top: 0.3rem; }
.rows .award-list { list-style: none; margin-top: 0.5rem; color: var(--text); }
.rows .award-list li { display: block; padding: 0.1rem 0; border: 0; font-size: inherit; }

@media (max-width: 760px) {
  .blocks { grid-template-columns: 1fr; }
  .rows li { grid-template-columns: 1fr; }
}
.rows .role { color: var(--muted); margin-top: 0.1rem; }

/* ---------- Intestazione pagine secondarie ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 0;
}
.site-name { font-size: clamp(1.05rem, 1.4vw, 1.3rem); font-weight: 400; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.site-name:hover { text-decoration: none; opacity: 0.7; }
.top-links { list-style: none; display: flex; gap: 1.75rem; font-size: 0.9rem; letter-spacing: 0.04em; }
.top-links a { color: var(--muted); text-decoration: none; }
.top-links a:hover { color: var(--ink); }
.topbar a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* apertura con foto, come in home */
.page-hero {
  display: grid;
  grid-template-columns: 1fr 0.62fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem);
}
.page-hero .page-head { padding: 0 0 clamp(0rem, 2vw, 1.5rem); }

/* ---------- Invito a richiedere CV o colloquio ---------- */
.contact-cta {
  text-align: center;
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem);
}
.cta-title {
  font-weight: 300;
  font-size: clamp(1.9rem, 3.6vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 20ch;
  margin: 0 auto;
}
.contact-cta > p { max-width: 34em; margin: 1.5rem auto 0; font-size: clamp(0.95rem, 1.2vw, 1.12rem); }
.cta-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.25rem 2.5rem; margin-top: clamp(2rem, 4vw, 3rem); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #fff; color: var(--ink); }
.contact-cta .cta-alt { font-size: 0.9rem; color: var(--muted); margin-top: 2rem; }
.cta-alt a { color: var(--ink); text-underline-offset: 0.2em; }
.contact-cta + .more { margin-top: 0; }

@media (max-width: 960px) {
  .page-hero { grid-template-columns: 1fr; align-items: start; }
  .page-hero .photo-wrap { max-width: 460px; }
}
@media (max-width: 560px) {
  .top-links { gap: 1.1rem; font-size: 0.85rem; }
  .cta-buttons .btn { width: 100%; max-width: 20rem; height: 3.6rem; }
  .cta-buttons { gap: 1rem; }
}
@media (max-width: 560px) {
  .page-hero .photo { aspect-ratio: 4 / 3; object-position: 50% 40%; }
}

/* ---------- Home: più respiro tra le sezioni ---------- */
.home .hero { padding-bottom: clamp(4.5rem, 9vw, 8.5rem); }
.home .logos-section { padding: clamp(4rem, 8.5vw, 8rem) 0; }
.home .label { margin-bottom: clamp(2.75rem, 5.5vw, 5rem); }
.home .contact-cta { padding-top: clamp(4.5rem, 10vw, 9rem); padding-bottom: clamp(3rem, 6vw, 5rem); }

/* ---------- Link discreti più distanziati ---------- */
.contact-cta + .more { margin-top: clamp(2rem, 5vw, 4rem); }
.more { gap: 0.75rem 3rem; padding-bottom: clamp(4rem, 7vw, 6rem); }
@media (max-width: 560px) { .more { gap: 0.9rem 2rem; } }

/* ---------- Premi raggruppati per award ---------- */
.festivals { columns: 2; column-gap: clamp(3rem, 7vw, 7rem); max-width: 72rem; }
.festival {
  break-inside: avoid;
  padding: 2.25rem 0 2.5rem;
  border-top: 1px solid #dddddd;
}
.festival-icon { display: flex; align-items: center; height: 3.4rem; margin-bottom: 1.1rem; }
.festival-icon img { height: 100%; width: auto; max-width: 9rem; object-fit: contain; object-position: left center; }
.festival-icon.no-icon { display: none; }
.festival h3 { margin-bottom: 0.2rem; font-size: clamp(1.1rem, 1.5vw, 1.35rem); font-weight: 500; color: var(--ink); line-height: 1.3; }
.festival .count { font-size: 0.85rem; letter-spacing: 0.06em; color: var(--muted); margin-top: 0.15rem; }
.award-items { list-style: none; margin-top: 1rem; font-size: clamp(0.92rem, 1.05vw, 1rem); line-height: 1.55; }
.award-items li { padding: 0.28rem 0; }
.award-items .lvl { color: var(--ink); }
.award-items .cat { color: var(--muted); }
.award-items .times { color: var(--ink); font-size: 0.85em; margin-left: 0.15rem; }
@media (max-width: 760px) { .festivals { columns: 1; } }
.award-items .year { color: var(--muted); }

/* ---------- Menu principale ---------- */
.topbar-home { justify-content: flex-end; }
.menu-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem clamp(1.5rem, 2.6vw, 2.75rem);
  font-size: clamp(0.74rem, 0.85vw, 0.86rem);
  letter-spacing: 0.14em;
}
.menu-list a { color: var(--ink); text-decoration: none; padding: 0.35rem 0; background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .35s ease; }
.menu-list a:hover { background-size: 100% 1px; }
.menu-list a:focus-visible, .menu-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.menu-toggle {
  display: none;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0.5rem 0;
  cursor: pointer;
  position: relative;
  z-index: 60;
}
.home .hero { padding-top: clamp(2rem, 4.5vw, 4rem); }
.contact-cta { padding-bottom: clamp(4.5rem, 9vw, 8rem); }
.home .contact-cta { padding-bottom: clamp(4.5rem, 9vw, 8rem); }

/* menu a schermo intero su smartphone e tablet piccoli */
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .menu-list {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: #ffffff;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    gap: 1.6rem;
    padding: 0 var(--pad);
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility 0s linear .35s;
  }
  .menu-open .menu-list { opacity: 1; visibility: visible; transition: opacity .35s ease; }
  .menu-open .menu-toggle { position: fixed; top: clamp(1.5rem, 3vw, 2.5rem); right: var(--pad); }
  .menu-open { overflow: hidden; }
}

/* ---------- Home: payoff e menu sulla stessa riga ---------- */
.topbar-home { justify-content: space-between; align-items: baseline; }
.home .hero { grid-template-columns: 1fr 0.74fr; padding-top: clamp(2.25rem, 4.5vw, 4rem); }
.home .hero h1 { margin-top: 0; }
@media (max-width: 960px) {
  .home .hero { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topbar-home { flex-wrap: wrap; }
  .topbar-home .kicker { order: 2; flex-basis: 100%; margin-top: 1.25rem; }
  .home .hero { padding-top: 1.5rem; }
}
.topbar-home .menu { margin-left: auto; }
@media (min-width: 861px) {
  .menu-list { font-size: clamp(0.66rem, 0.7vw, 0.74rem); }
}
.rows p:not(.role) + p { margin-top: 0.85rem; }
.grid img, .festival-icon img { filter: grayscale(1); }

/* ---------- Loghi ad area visiva uguale ----------
   --r = proporzione larghezza/altezza del logo (dal file ritagliato)
   --A = area di riferimento; --s = correzione ottica del singolo logo */
.grid { --A: 820; }
@supports (width: calc(sqrt(4) * 1px)) {
  .grid img.sized {
    height: auto;
    max-width: none;
    width: min(calc(sqrt(var(--A) * var(--r)) * var(--s, 1) * 1cqw), 82cqw, calc(var(--r) * 40cqw));
  }
}

/* Loghi award: area visiva uguale (home e pagina Awards) */
.grid.awards { --A: 1900; }
@supports (width: calc(sqrt(4) * 1px)) {
  .grid.awards img.sized { width: min(calc(sqrt(var(--A) * var(--r)) * var(--s, 1) * 1cqw), 88cqw, calc(var(--r) * 62cqw)); }
  .festival-icon { height: 4.2rem; }
  .festival-icon img.sized {
    height: auto;
    max-width: none;
    width: min(calc(sqrt(15 * var(--r)) * var(--s, 1) * 1rem), 13rem, calc(var(--r) * 4.2rem));
  }
}

/* Testo letto da Google e dai lettori di schermo ma non mostrato (nome dell'award sotto il logo) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.festival { position: relative; }
.festival-icon { margin-bottom: 1.25rem; }

/* ---------- Home: riga degli award ----------
   Primo logo allineato a sinistra con il titolo, ultimo a filo destro,
   spazi uguali tra un logo e l'altro (colonne "auto" distribuite). */
.grid.awards {
  --cols: 8;
  container-type: inline-size;
  grid-template-columns: repeat(var(--cols), auto);
  justify-content: space-between;
  justify-items: center;
}
.grid.awards li { container-type: normal; width: auto; }
@supports (width: calc(sqrt(4) * 1px)) {
  .grid.awards img.sized {
    width: min(calc(sqrt(var(--A) * var(--r)) * var(--s, 1) * 1cqw / var(--cols)),
               calc(88cqw / var(--cols)),
               calc(var(--r) * 62cqw / var(--cols)));
  }
}
@media (max-width: 960px) {
  .grid.awards { --cols: 4; }
}

/* Logo Robilant dentro la riga "Current position" */
.company-logo { display: inline-block; height: 1.9em; width: auto; vertical-align: -0.62em; margin: 0 0.15em; }

/* ---------- Home: griglia dei brand ----------
   Righe indipendenti: primo logo allineato al titolo, ultimo a filo destro,
   spazi uguali tra i loghi della stessa riga. */
.grid.brands {
  --cols: 6;
  container-type: inline-size;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  row-gap: 0;
}
.grid.brands li { container-type: normal; width: auto; padding: clamp(1rem, 2.2vw, 2rem) 0; }
.grid.brands li.row-break { flex-basis: 100%; height: 0; padding: 0; display: none; }
.grid.brands li.row-break.b6 { display: block; }
@supports (width: calc(sqrt(4) * 1px)) {
  .grid.brands img.sized {
    width: min(calc(sqrt(var(--A) * var(--r)) * var(--s, 1) * 1cqw / var(--cols)),
               calc(82cqw / var(--cols)),
               calc(var(--r) * 40cqw / var(--cols)));
  }
}
@media (max-width: 960px) {
  .grid.brands { --cols: 3; }
  .grid.brands li.row-break { display: block; }
}

/* ---------- Home: griglia dei brand, versione a colonne ----------
   Colonne larghe quanto il loro logo più largo, distribuite con spazi uguali:
   prima colonna allineata al titolo, ultima a filo destro, loghi incolonnati. */
.grid.brands {
  display: grid;
  grid-template-columns: repeat(var(--cols), auto);
  justify-content: space-between;
  justify-items: center;
  row-gap: clamp(1.75rem, 3.5vw, 3.25rem);
}
.grid.brands li { padding: 0; }
.grid.brands li:nth-child(6n+1) { justify-content: flex-start; justify-self: start; }
.grid.brands li:nth-child(6n) { justify-content: flex-end; justify-self: end; }
@media (max-width: 960px) {
  .grid.brands li:nth-child(6n+1), .grid.brands li:nth-child(6n) { justify-content: center; justify-self: center; }
  .grid.brands li:nth-child(3n+1) { justify-content: flex-start; justify-self: start; }
  .grid.brands li:nth-child(3n) { justify-content: flex-end; justify-self: end; }
}
/* Ultima colonna dei brand: loghi centrati sullo stesso asse (il più largo resta a filo destro) */
.grid.brands li:nth-child(6n) { justify-content: center; justify-self: center; }
@media (max-width: 960px) {
  .grid.brands li:nth-child(3n) { justify-content: center; justify-self: center; }
}
/* Tutte le colonne dei brand centrate sul proprio asse:
   il logo più largo della prima colonna resta allineato a "SELECTED", quello dell'ultima a filo destro */
.grid.brands li:nth-child(6n+1) { justify-content: center; justify-self: center; }
@media (max-width: 960px) {
  .grid.brands li:nth-child(3n+1) { justify-content: center; justify-self: center; }
}
.body + .body { margin-top: 0.9em; }

/* Primato Webby: nota sotto il premio (pagina Awards) e sotto il titolo dei premi (home) */
.award-items .award-note { display: block; margin-top: 0.15rem; font-size: 0.88em; font-weight: 500; color: var(--ink); }
.label:has(+ .label-note) { margin-bottom: 0.7rem; }
.label-note { margin-bottom: clamp(2.75rem, 5.5vw, 5rem); font-size: clamp(0.92rem, 1.05vw, 1.02rem); color: var(--muted); }

/* ---------- Menu: pagina corrente sottolineata ---------- */
.menu-list a[aria-current="page"] { background-size: 100% 1px; }

/* Nome nella barra della home: nascosto su desktop e in cima alla pagina */
.home-name { display: none; }
.kicker-mobile { display: none; }

/* ---------- Smartphone: barra che si nasconde scorrendo giù e ricompare scorrendo su ---------- */
@media (max-width: 860px) {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--bg);
    margin: 0 calc(-1 * var(--pad));
    padding: 1rem var(--pad);
    align-items: center;
    transition: transform .35s ease, box-shadow .35s ease;
  }
  .is-scrolled .topbar { box-shadow: 0 1px 0 #e4e4e4; }
  .nav-hidden .topbar { transform: translateY(-100%); }
  .menu-open .topbar { transform: none; box-shadow: none; }

  /* home: il payoff passa sopra il nome, il nome compare nella barra solo dopo aver scorso */
  .topbar-home .kicker { display: none; }
  .kicker-mobile { display: block; margin-bottom: 0.25rem; }
  .home-name { display: block; opacity: 0; transition: opacity .3s ease; pointer-events: none; }
  .is-scrolled .home-name { opacity: 1; pointer-events: auto; }
  .home .hero { padding-top: clamp(1.5rem, 4vw, 2.5rem); }
  .home .hero h1 { margin-top: clamp(1.5rem, 3vw, 2.75rem); }
}
@media (max-width: 560px) {
  .topbar-home .kicker { order: 0; flex-basis: auto; margin-top: 0; }
}

/* ---------- Barra identica in tutte le pagine ----------
   Payoff (home) e nome (pagine interne) occupano la stessa altezza,
   così il menu resta esattamente nella stessa posizione passando da una pagina all'altra. */
.topbar { align-items: center; }
.topbar > .kicker,
.topbar > .site-name { line-height: 2rem; height: 2rem; white-space: nowrap; }
.menu-list a { line-height: 1.6; }
