/* ==========================================================================
   Artigiano del Marketing — stile base + header + hero
   Palette: sfondo #f9f6ec · principale #3393b2 · accento #ff8c1e
            testo #035578 · ulteriore #5db0b0
   ========================================================================== */

/* ---------- Font (ospitati in locale, licenza SIL OFL) ---------- */
@font-face {
  font-family: "Passion One";
  src: url("../fonts/passion-one-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Puritan";
  src: url("../fonts/puritan-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Puritan";
  src: url("../fonts/puritan-latin-700-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Variabili ---------- */
:root {
  --bg: #f9f6ec;
  --primary: #3393b2;
  --accent: #ff8c1e;
  --text: #035578;
  --tertiary: #5db0b0;

  /* Varianti pensate per i contrasti (derivano dalla palette):
     --block: blu dei riquadri/fasce con testo bianco (4,6:1; con #3393b2 sarebbe 3,5:1)
     --text-deep: testo sopra l'arancio dei bottoni (5,2:1; con #035578 sarebbe 3,5:1) */
  --block: #2a7f9b;
  --text-deep: #023a52;

  --line: rgba(3, 85, 120, 0.14);

  --font-display: "Passion One", Impact, "Arial Narrow Bold", sans-serif;
  --font-head: "Puritan", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --header-h: 4.5rem;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);

  /* Scala dei titoli: un solo posto dove cambiare le dimensioni di tutto il sito */
  --fs-hero: clamp(2.6rem, 7vw, 5.25rem); /* solo il titolo della home */
  --fs-h1: clamp(2.8rem, 6vw, 4.5rem);      /* H1 delle pagine interne */
  --fs-h2: clamp(2.2rem, 4.2vw, 3.25rem);
  --fs-h3: clamp(1.35rem, 2vw, 1.6rem);
  --fs-h4: 1.2rem;
  --fs-h5: 1.075rem;
  --fs-h6: 1rem;
}

/* ---------- Reset leggero ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}

/* ---------- Titoli ---------- */
/* Colore: tutti i titoli nel colore del testo (#035578, contrasto 7,5:1 sullo sfondo).
   Il blu principale resta per blocchi e dettagli: sul crema ha solo 3,3:1. */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text);
  margin: 0;
}
h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
}
h1 {
  font-size: var(--fs-h1);
  line-height: 0.98;
}
h2 {
  font-size: var(--fs-h2);
  line-height: 1.05;
}
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  font-weight: 700;
  font-style: italic;
  line-height: 1.2;
}
h3 {
  font-size: var(--fs-h3);
}
h4 {
  font-size: var(--fs-h4);
}
h5 {
  font-size: var(--fs-h5);
}
h6 {
  font-size: var(--fs-h6);
}

/* Titoli dentro blocchi colorati (es. card blu): bianco */
.on-primary :is(h1, h2, h3, h4, h5, h6) {
  color: #fff;
}

/* ---------- Utilità ---------- */
html {
  scroll-behavior: smooth;
}
[id] {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  border-radius: 0.4rem;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   HEADER + MENU
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  min-height: var(--header-h);
}

/* Logo */
.brand img {
  display: block;
  width: auto;
  height: 3.1rem;
}
/* (segnaposto non più usato) */
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand__placeholder {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 2px dashed var(--tertiary);
  border-radius: 0.5rem;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Menu */
.nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__list > li > a {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0;
  font-weight: 500;
  font-size: 0.97rem;
  text-decoration: none;
  color: var(--text);
}
.nav__list > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.2rem;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav__list > li > a:hover::after,
.nav__list > li > a:focus-visible::after,
.nav__list > li > a[aria-current]:not([aria-current="false"])::after {
  transform: scaleX(1);
}
.nav__list > li > a:hover {
  color: var(--primary);
}
.nav__list > li > a[aria-current]:not([aria-current="false"]) {
  font-weight: 700;
}

/* Pulsante hamburger (visibile solo sotto 1100px e solo con JS) */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.9rem;
  border: 2px solid var(--text);
  border-radius: 0.6rem;
  background: transparent;
  color: var(--text);
  font: 700 0.95rem/1 var(--font-body);
  cursor: pointer;
}
.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle__icon {
  position: relative;
}
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle__icon::before {
  top: -6px;
}
.nav-toggle__icon::after {
  top: 6px;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__icon {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile / tablet con JS: pannello a tendina */
@media (max-width: 1099.98px) {
  .js .nav-toggle {
    display: inline-flex;
  }
  .js .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -22px rgba(3, 85, 120, 0.45);
    max-height: calc(100svh - var(--header-h));
    overflow-y: auto;
  }
  .js .nav.is-open {
    display: block;
  }
  .js .nav__list {
    flex-direction: column;
    gap: 0;
  }
  .js .nav__list > li + li {
    border-top: 1px solid var(--line);
  }
  .js .nav__list > li > a {
    display: block;
    padding: 0.9rem 0;
    font-size: 1.1rem;
  }
  .js .nav__list > li > a::after {
    bottom: 0.55rem;
    right: auto;
    width: 2.5rem;
  }
  /* senza JS: menu sempre visibile sotto il logo */
  .no-js .nav {
    flex-basis: 100%;
    padding-bottom: 0.75rem;
  }
}


/* ---------- Sottomenu ---------- */
/* Base (telefono/tablet): elenco annidato sotto la voce */
.subpanel__backdrop,
.subpanel__close,
.subpanel__title,
.subpanel__foot {
  display: none;
}
.subpanel__links {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0 0 0.5rem 1rem;
}
.subpanel__links a {
  display: block;
  padding: 0.55rem 0;
  color: var(--text);
  text-decoration: none;
}
.subpanel__links a:hover {
  color: var(--primary);
}

/* Desktop: la voce aperta diventa una barra laterale, il resto sfuma sullo sfondo */
@media (min-width: 1100px) {
  .nav__list {
    flex-wrap: nowrap;
    align-items: stretch;
    height: var(--header-h);
  }
  .nav__list > li > a {
    display: flex;
    align-items: center;
    height: 100%;
    padding-block: 0;
  }
  .nav__list > li > a::after {
    bottom: 1.15rem;
  }
  .nav__list > li > a::before {
    content: "";
    position: absolute;
    left: -1.05rem;
    top: 50%;
    width: 0.55rem;
    height: 0.55rem;
    margin-top: -0.275rem;
    border-radius: 50%;
    background: var(--accent);
    transform: scale(0);
    transition: transform 0.2s ease;
  }
  .has-sub.is-open > a::before {
    transform: scale(1);
  }

  .subpanel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100svh - var(--header-h));
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s;
  }
  .has-sub.is-open > .subpanel,
  .no-js .has-sub:hover > .subpanel,
  .no-js .has-sub:focus-within > .subpanel {
    visibility: visible;
    opacity: 1;
  }
  .subpanel__backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(3, 85, 120, 0.28);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  .subpanel__sheet {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: max(50%, 26rem);
    padding: clamp(5rem, 14vh, 8rem) clamp(2rem, 5vw, 5rem) 2rem;
    background: var(--bg);
    overflow-y: auto;
    transform: translateX(2.5rem);
    transition: transform 0.35s ease;
  }
  .has-sub.is-open .subpanel__sheet,
  .no-js .has-sub:hover .subpanel__sheet,
  .no-js .has-sub:focus-within .subpanel__sheet {
    transform: none;
  }
  .subpanel__title {
    display: block;
    margin: 0 0 1.75rem;
    font-size: 1.4rem;
    font-weight: 500;
  }
  .subpanel__title a {
    color: color-mix(in srgb, var(--text) 62%, var(--bg));
    text-decoration: none;
  }
  .subpanel__title a:hover {
    color: var(--text);
  }
  .subpanel__links {
    padding: 0;
  }
  .subpanel__links a {
    position: relative;
    display: inline-block;
    padding: 0.5rem 0;
    font-size: clamp(1.4rem, 1.9vw, 1.75rem);
    font-weight: 500;
    line-height: 1.25;
  }
  .subpanel__links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.15rem;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
  }
  .subpanel__links a:hover::after,
  .subpanel__links a:focus-visible::after {
    transform: scaleX(1);
  }
  .subpanel__links a:hover {
    color: var(--text);
  }
  .subpanel__foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 2rem;
  }
  .subpanel__foot a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
  }
  .subpanel__foot a:hover {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.25em;
  }
  .subpanel__foot svg {
    display: block;
    width: 1.7rem;
    height: 1.7rem;
  }
  .subpanel__close {
    position: absolute;
    top: 2rem;
    right: clamp(2rem, 5vw, 5rem);
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text);
    cursor: pointer;
  }
  .subpanel__close svg {
    width: 1.7rem;
    height: 1.7rem;
  }
  .no-js .subpanel__close {
    display: none;
  }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  display: grid;
  align-items: center;
  text-align: center;
  min-height: calc(100svh - var(--header-h));
  padding-block: clamp(3.5rem, 10vh, 8rem);
}
.hero__title {
  font-size: var(--fs-hero);
  line-height: 0.95;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
.dot {
  color: var(--accent);
}

/* Effetto evidenziatore: pennarello nel colore ulteriore, dietro la parola */
.hl {
  position: relative;
  z-index: 0;
  white-space: nowrap;
}
.hl::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.05em;
  right: -0.07em;
  bottom: 0.06em;
  height: 0.4em;
  background: var(--tertiary);
  border-radius: 0.06em 0.18em 0.08em 0.2em;
  transform: skewX(-7deg) scaleX(0);
  transform-origin: left center;
  animation: hl-draw 0.75s cubic-bezier(0.6, 0.05, 0.25, 1) 0.35s forwards;
}
@keyframes hl-draw {
  to {
    transform: skewX(-7deg) scaleX(1);
  }
}

.hero__lead {
  max-width: 27em;
  margin: clamp(1.5rem, 3.5vw, 2.5rem) auto 0;
  font-size: clamp(1.2rem, 2.3vw, 1.65rem);
  line-height: 1.45;
}

/* CTA: solo testo con freccia, senza bottone */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  padding-bottom: 0.3rem;
  border-bottom: 3px solid var(--accent);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.cta__arrow {
  width: 1.5em;
  height: 1.5em;
  color: var(--accent);
  transition: transform 0.25s ease;
}
.cta:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.cta:hover .cta__arrow,
.cta:focus-visible .cta__arrow {
  transform: translateX(0.4rem);
}

/* ==========================================================================
   COMPONENTI RIUSABILI
   ========================================================================== */

/* Etichetta di sezione: può essere un vero H2 (utile per la SEO) con aspetto piccolo */
.eyebrow {
  margin: 0 0 0.6rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Frase di titolo con l'aspetto di un H2, ma senza essere un titolo nell'outline */
.display-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.05;
  color: var(--text);
}

/* Testo solo per screen reader */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Bottone pieno (CTA principale nei blocchi colorati) */
.button {
  display: inline-block;
  padding: 1rem 1.9rem;
  border: 2px solid var(--bg);
  border-radius: 0.4rem;
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.button:hover {
  background: #fff;
  border-color: #fff;
  color: var(--text);
}
/* Variante piccola, con freccia */
.button--small {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}
.button__arrow {
  width: 1.25em;
  height: 1.25em;
  transition: transform 0.25s ease;
}
.button--small:hover .button__arrow,
.button--small:focus-visible .button__arrow {
  transform: translateX(0.25rem);
}

/* Variante scura: per sfondi chiari */
.button--dark {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}
.button--dark:hover {
  border-color: var(--block);
  background: var(--block);
  color: #fff;
}

/* Link testuale con freccia (versione discreta della CTA) */
.textlink {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
}
.textlink__arrow {
  width: 1.15em;
  height: 1.15em;
  color: var(--text);
  transition: transform 0.25s ease;
}
.textlink:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}
.textlink:hover .textlink__arrow,
.textlink:focus-visible .textlink__arrow {
  transform: translateX(0.3rem);
}

/* ==========================================================================
   RECENSIONI
   ========================================================================== */
.reviews {
  padding-block: clamp(4rem, 9vw, 7rem);
}
.reviews__grid {
  display: grid;
  gap: 3rem;
}
.reviews__col {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.reviews__text {
  max-width: 32em;
  margin: 1.4rem 0 1.5rem;
}

.review {
  margin: 0;
  padding: clamp(1.5rem, 4vw, 2.8rem);
  background: var(--block);
  color: #fff;
  border-radius: 0.3rem;
}
.review__stars {
  display: flex;
  gap: 0.15rem;
  color: color-mix(in srgb, var(--accent) 78%, #fff);
}
.review__stars svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}
.review__quote {
  margin: 1.1rem 0 1.5rem;
}
.review__quote p {
  margin: 0;
  line-height: 1.7;
}
.review__author {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.95rem;
}
.review__author img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

/* Desktop: due colonne sfalsate come nell'originale */
@media (min-width: 900px) {
  .reviews__grid {
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 3rem);
    align-items: start;
  }
  .reviews__col--offset {
    margin-top: 2rem;
  }
}

/* ==========================================================================
   FASCIA BLU (testo + bottone)
   ========================================================================== */
.band {
  background: var(--block);
  color: #fff;
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.band__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
  text-align: center;
}
.band__text {
  max-width: 58rem;
  margin: 0;
  text-wrap: pretty;
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  line-height: 1.65;
}
.band__text strong {
  font-weight: 700;
}
.band :focus-visible {
  outline-color: #fff;
}


/* ==========================================================================
   CHI SONO (schede)
   ========================================================================== */
.about {
  padding-block: clamp(4rem, 9vw, 7rem);
}
.about__grid {
  display: grid;
  gap: 2.5rem;
}
.about__tabs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  margin-top: 1.25rem;
}
.about__tab {
  position: relative;
  padding: 0.45rem 0;
  border: 0;
  background: none;
  color: color-mix(in srgb, var(--text) 68%, var(--bg));
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease, padding-left 0.25s ease;
}
.about__tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: -0.25rem;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.25s ease;
}
.about__tab:hover {
  color: var(--text);
}
.about__tab[aria-selected="true"] {
  font-weight: 700;
  color: var(--text);
  padding-left: 1.2rem;
}
.about__tab[aria-selected="true"]::before {
  transform: scale(1);
}

.about__stage {
  min-height: 30rem;
}
.about__panel {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  animation: about-in 0.5s ease both;
}
.about__panel[hidden] {
  display: none;
}
@keyframes about-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.about__media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.about__body h3 {
  margin: 0 0 0.75rem;
}
.about__body p {
  max-width: 34em;
  margin: 0 0 1.25rem;
  line-height: 1.7;
}

/* A: quadrante — foto tonda con anello di tacche */
[data-layout="dial"] {
  justify-items: center;
  text-align: center;
}
[data-layout="dial"] .about__media {
  position: relative;
  width: min(100%, 20rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
[data-layout="dial"] .about__media img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0.6rem 0.6rem 0 var(--tertiary);
}
[data-layout="dial"] .about__body p {
  margin-inline: auto;
}

/* B: testo a sinistra, foto ad arco a destra */
[data-layout="arch"] .about__media {
  order: -1;
  width: min(100%, 17rem);
}
[data-layout="arch"] .about__media img {
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 0.4rem 0.4rem;
  box-shadow: 0.8rem 0.8rem 0 var(--tertiary);
}

/* C: foto larga con ombra sfalsata, testo sotto */
[data-layout="wide"] .about__media img {
  aspect-ratio: 16 / 9;
  border-radius: 0.3rem;
  box-shadow: 0.8rem 0.8rem 0 var(--tertiary);
}

/* D: foto quadrata inclinata */
[data-layout="tilt"] .about__media {
  width: min(100%, 17rem);
  padding: 0.5rem;
}
[data-layout="tilt"] .about__media img {
  aspect-ratio: 1;
  border-radius: 0.3rem;
  transform: rotate(-4deg);
  box-shadow: -0.7rem 0.7rem 0 var(--tertiary);
}

@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: 4fr 8fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }
  .about__stage {
    display: grid;
    align-items: center;
  }
  [data-layout="dial"] {
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
  }
  [data-layout="dial"] .about__media {
    width: 17rem;
  }
  [data-layout="dial"] .about__body p {
    margin-inline: 0;
  }
  [data-layout="arch"] {
    grid-template-columns: 1fr auto;
  }
  [data-layout="arch"] .about__media {
    order: 2;
    width: 17rem;
  }
  [data-layout="wide"] {
    grid-template-columns: 1fr;
  }
  [data-layout="tilt"] {
    grid-template-columns: 1fr auto;
    gap: 3rem;
  }
  [data-layout="tilt"] .about__media {
    order: 2;
    width: 17rem;
  }
}

/* Senza JS: tutte le schede visibili in colonna */
.no-js .about__panel[hidden] {
  display: grid;
}
.no-js .about__stage {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}


/* ==========================================================================
   CONSULENZA: ITER A PASSI (si svelano scorrendo, poi restano visibili)
   ========================================================================== */
.process {
  padding-block: clamp(4rem, 9vw, 7rem);
}
.process__grid {
  display: grid;
  gap: 3rem;
}
.hl--static::before {
  animation: none;
  transform: skewX(-7deg) scaleX(1);
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.25rem;
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}
.step:last-child {
  padding-bottom: 0;
}
.step__icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  background: var(--bg);
  color: var(--accent);
}
.step__icon svg {
  width: 2.6rem;
  height: 2.6rem;
}
/* Linea di collegamento: grigia di base, si riempie quando il passo è aperto */
.step::before,
.step::after {
  content: "";
  position: absolute;
  left: 1.75rem;
  top: 4.25rem;
  bottom: 0.75rem;
  width: 2px;
  margin-left: -1px;
}
.step:last-child::before,
.step:last-child::after {
  display: none;
}
.step::before {
  background: var(--line);
}
.step::after {
  background: var(--text);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.9s ease 0.2s;
}
.step.is-open::after {
  transform: scaleY(1);
}
.step__body h3 {
  margin: 0.55rem 0 0.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
}
.step__badge {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--block);
  color: #fff;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.step__body p {
  max-width: 34em;
  margin: 0;
  line-height: 1.7;
}
.step__body .step__note {
  margin-top: 0.8rem;
  font-size: 0.92rem;
  font-style: italic;
}

/* Con JS: i passi non ancora raggiunti restano nascosti (lo spazio è riservato) */
.js .step__icon,
.js .step__body {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .step.is-open .step__icon,
.js .step.is-open .step__body {
  opacity: 1;
  transform: none;
}
.js .step.is-open .step__body {
  transition-delay: 0.12s;
}

@media (min-width: 900px) {
  .process__grid {
    grid-template-columns: 5fr 6fr;
    gap: clamp(2rem, 6vw, 6rem);
    align-items: start;
  }
  .process__intro {
    position: sticky;
    top: calc(var(--header-h) + 3rem);
  }
}


/* ==========================================================================
   PREZZI (card con elenco apribile)
   ========================================================================== */
.pricing {
  padding-block: clamp(4rem, 9vw, 7rem);
}
.pricing__title {
  max-width: 18em;
  margin: 0 auto clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  font-size: var(--fs-h2);
  line-height: 1.05;
  text-wrap: balance;
}
.pricing__grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--block);
  color: #fff;
  border-radius: 0.3rem;
}
.plan h3 {
  margin: 0 0 0.75rem;
  text-align: center;
}
.plan__desc {
  margin: 0 0 1.75rem;
  text-align: center;
  line-height: 1.6;
}
.plan__details {
  border-top: 2px solid var(--tertiary);
}
.plan__details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.plan__details summary::-webkit-details-marker {
  display: none;
}
/* Freccia che si allunga quando la scheda si apre */
.arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 1.5rem;
}
.arrow__shaft {
  display: block;
  width: 2px;
  height: 0.6rem;
  background: currentColor;
  transition: height 0.4s ease;
}
.arrow__head {
  display: block;
  width: 0.85rem;
  height: 0.85rem;
  margin-top: -0.65rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.4s ease;
}
.plan__details summary:hover .arrow__shaft {
  height: 1rem;
}
.plan__details[open] .arrow__shaft {
  height: 1.6rem;
}
.plan__details[open] .arrow__head {
  transform: rotate(225deg);
}
.plan__list {
  list-style: none;
  margin: 0;
  padding: 0 0 1rem;
  animation: plan-in 0.45s ease both;
}
@keyframes plan-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.plan__list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.4rem 0;
  font-size: 0.95rem;
  line-height: 1.45;
}
.plan__list svg {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.12rem;
}
.plan__price {
  margin: 0.5rem 0 1.25rem;
  font-weight: 700;
  font-size: 1.15rem;
  text-align: center;
}
.plan .button {
  margin-top: auto;
  align-self: center;
}
@media (min-width: 900px) {
  .pricing__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* ==========================================================================
   INVITO ALLA CHIACCHIERATA (pannello con QR code)
   ========================================================================== */
.chat {
  padding-block: clamp(2rem, 5vw, 4rem) clamp(4rem, 9vw, 7rem);
}
.chat__panel {
  position: relative;
  display: grid;
  gap: 2rem;
  align-items: center;
  overflow: hidden;
  padding: clamp(2rem, 6vw, 4.5rem);
  border-radius: 1.5rem;
  background: linear-gradient(110deg, var(--text) 0%, var(--block) 100%);
  color: #fff;
}
/* cerchi concentrici decorativi sulla destra */
.chat__panel::before {
  content: "";
  position: absolute;
  right: -12rem;
  top: 50%;
  width: 46rem;
  height: 46rem;
  margin-top: -23rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 246, 236, 0.16) 0 28%, rgba(249, 246, 236, 0.1) 28% 52%, rgba(249, 246, 236, 0.06) 52% 76%, transparent 76%);
  pointer-events: none;
}
.chat__text,
.chat__qr {
  position: relative;
}
.chat__title {
  max-width: 12em;
  margin: 0 0 1.1rem;
  color: #fff;
  font-size: var(--fs-h2);
  line-height: 1.05;
  text-wrap: balance;
}
.chat__dot {
  color: var(--accent);
}
.chat__text p {
  max-width: 28em;
  margin: 0 0 2rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.55;
}
.chat :focus-visible {
  outline-color: #fff;
}
.chat__qr {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.chat__qrbox {
  padding: 1.1rem;
  background: var(--bg);
  border-radius: 1.1rem;
}
.chat__qrbox img {
  display: block;
  width: 10.25rem;
  height: 10.25rem;
}
.chat__pill {
  margin: 0;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
}
/* Il QR serve solo da computer: da telefono basta il bottone */
@media (min-width: 900px) {
  .chat__panel {
    grid-template-columns: 1fr auto;
    gap: 3rem;
  }
  .chat__qr {
    display: flex;
    margin-right: clamp(0rem, 4vw, 4rem);
  }
}


/* ==========================================================================
   SERVIZI (tre modalità di collaborazione)
   ========================================================================== */
.modes {
  padding-block: clamp(4rem, 9vw, 7rem);
}
.modes__intro {
  max-width: 34em;
  margin: 1.4rem 0 clamp(2rem, 5vw, 3rem);
}
.modes__grid {
  display: grid;
  gap: 1.5rem;
}
.mode {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: #fffdf7;
  border: 2px solid var(--text);
  border-radius: 0.6rem;
}
.mode__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-bottom: 0.9rem;
}
.mode__head h3 {
  margin: 0;
}
.mode__badge {
  flex: none;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--block);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mode__badge--off {
  background: #5b6b72;
}
.mode__head + .mode__for {
  border-bottom: 1px solid var(--line);
}
.mode__for {
  margin: 0 0 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
}
.mode__for strong {
  font-weight: 700;
}
.mode__list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}
.mode__list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.4rem 0;
  line-height: 1.45;
}
.mode__list svg {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.1rem;
  color: var(--block);
}
.mode__note {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.5;
}
.modes__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.modes__head .modes__intro {
  margin-bottom: 0;
}
.modes__cta {
  margin-top: 0;
}
@media (min-width: 900px) {
  .modes__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* ==========================================================================
   CTA FINALE (foto + scheda con indirizzo email)
   ========================================================================== */
.finale {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 8vw, 6rem);
  background: var(--text);
}
.finale__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 80% 60%;
}
.finale::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(3, 85, 120, 0.55);
}
.finale__wrap {
  position: relative;
  z-index: 2;
}
.finale__card {
  max-width: 41rem;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  background: var(--bg);
  border-radius: 0.4rem;
}
.finale__card h2 {
  margin: 0 0 1.5rem;
  font-size: var(--fs-h2);
  line-height: 1.05;
  text-wrap: balance;
}
.finale__card p {
  margin: 0 0 1.25rem;
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  line-height: 1.7;
}
.finale__card p:last-child {
  margin-bottom: 0;
}
/* L'email è la CTA: niente bottone, diventa arancione al passaggio */
.finale__mail {
  display: inline-block;
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}
.finale__mail:hover,
.finale__mail:focus-visible {
  color: var(--accent);
}


/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  padding: clamp(3rem, 7vw, 5rem) 0 1.5rem;
  background: var(--text);
  color: var(--bg);
}
.site-footer__grid {
  display: grid;
  gap: 2.5rem;
}
.site-footer__brand img {
  display: block;
  width: auto;
  height: 3.25rem;
}
.site-footer address {
  margin: 1.5rem 0 0;
  font-style: normal;
  line-height: 1.7;
}
.site-footer__head {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tertiary);
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li + li {
  margin-top: 0.55rem;
}
.site-footer a {
  color: var(--bg);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.site-footer a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}
.site-footer :focus-visible {
  outline-color: #fff;
}
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(249, 246, 236, 0.25);
  font-size: 0.9rem;
}
.site-footer__bottom p {
  margin: 0;
}
@media (min-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
    gap: 3rem;
  }
}


/* ==========================================================================
   PAGINE INTERNE: testata blu + CASE HISTORY
   ========================================================================== */
.page-hero {
  padding-block: clamp(4rem, 10vw, 7.5rem);
  background: var(--block);
  color: #fff;
  text-align: center;
}
.page-hero h1 {
  margin: 0 0 1.25rem;
  color: #fff;
  font-size: var(--fs-h1);
  line-height: 1;
}
.page-hero p {
  max-width: 36em;
  margin: 0 auto;
  font-size: clamp(1.1rem, 1.9vw, 1.4rem);
  line-height: 1.55;
  text-wrap: balance;
}

.cases {
  padding-block: clamp(3rem, 8vw, 6rem);
}
.cases__grid {
  display: grid;
  gap: 2.5rem;
}
.cases__tabs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 1rem;
}
.case-tab {
  position: relative;
  padding: 0.5rem 0;
  border: 0;
  background: none;
  color: color-mix(in srgb, var(--text) 66%, var(--bg));
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease, padding-left 0.25s ease;
}
.case-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.25s ease;
}
.case-tab:hover {
  color: var(--text);
}
.case-tab[aria-selected="true"] {
  color: var(--text);
  padding-left: 1.2rem;
}
.case-tab[aria-selected="true"]::before {
  transform: scale(1);
}
.case-tab__tag {
  margin-left: 0.2em;
  font-size: 0.62em;
  font-weight: 500;
  letter-spacing: 0.03em;
  vertical-align: super;
  white-space: nowrap;
}

.case {
  animation: about-in 0.5s ease both;
}
.case[hidden] {
  display: none;
}
.case__tag {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--block);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.case h3 {
  margin: 0 0 1.5rem;
  font-size: var(--fs-h2);
  line-height: 1.1;
}
.case__meta {
  display: grid;
  gap: 1.1rem;
  margin: 0 0 2rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: #fffdf7;
  border: 2px solid var(--text);
  border-radius: 0.6rem;
}
.case__meta dt {
  margin: 0 0 0.15rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.case__meta dd {
  margin: 0;
  line-height: 1.55;
}
.case__sub {
  margin: 0 0 0.9rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.case > p:not(.case__tag) {
  max-width: 38em;
  margin: 0 0 1.15rem;
  line-height: 1.75;
}
.cases__detail {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.case {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

@media (min-width: 900px) {
  .cases__grid {
    grid-template-columns: 6fr 5fr;
    grid-template-areas: "detail nav";
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: start;
  }
  .cases__detail {
    grid-area: detail;
    min-height: 30rem;
  }
  .cases__nav {
    grid-area: nav;
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }
  .case__meta {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   PUBBLICAZIONI
   ========================================================================== */
.teasers {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.teasers__grid {
  display: grid;
  gap: 1.5rem;
}
.teaser {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem);
  text-align: center;
}
.teaser--a {
  background: color-mix(in srgb, var(--tertiary) 30%, var(--bg));
}
.teaser--b {
  background: color-mix(in srgb, var(--accent) 17%, var(--bg));
}
.teaser__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  line-height: 1.05;
  text-wrap: balance;
}
@media (min-width: 800px) {
  .teaser__title {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.1em;
  }
}
.teaser .cta {
  margin-top: 0;
}
.teaser img {
  display: block;
  width: 100%;
  max-width: 28rem;
  height: auto;
  margin-top: clamp(2rem, 4vw, 3rem);
  border-radius: 0.6rem;
}
.teaser img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  max-width: 22rem;
}

.book-feature {
  padding-block: clamp(3rem, 8vw, 6rem);
}
.book-feature__grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.book-feature__text .display-title {
  margin-bottom: 1.5rem;
}
.infobox {
  margin: 0 0 1.75rem;
  padding: 1.1rem 1.4rem;
  background: #fffdf7;
  border: 2px solid var(--text);
  border-radius: 0.6rem;
}
.infobox dt {
  margin: 0 0 0.15rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.infobox dd {
  margin: 0;
  font-weight: 500;
}
.book-feature__text p {
  max-width: 36em;
  margin: 0 0 1.15rem;
  line-height: 1.75;
}
.book-feature__text .button {
  margin-top: 0.75rem;
}
.book-feature__media img {
  display: block;
  width: 100%;
  max-width: 26rem;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  height: auto;
  margin-inline: auto;
  border-radius: 0.6rem;
}

.books {
  padding-block: clamp(3rem, 8vw, 6rem);
}
.books__intro {
  max-width: 34em;
  margin: 1.2rem 0 clamp(2rem, 5vw, 3rem);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.55;
}
.books__grid {
  display: grid;
  gap: 1.5rem;
}
.book {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--block);
  color: #fff;
  border-radius: 0.6rem;
}
.book h3 {
  margin: 0 0 0.75rem;
}
.book p {
  flex: 1 0 auto;
  margin: 0 0 1.5rem;
  line-height: 1.6;
}
.book .button {
  align-self: flex-start;
  margin-bottom: 1.5rem;
}
.book img {
  display: block;
  margin-top: auto;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  height: auto;
  border-radius: 0.5rem;
}

@media (min-width: 800px) {
  .teasers__grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 900px) {
  .book-feature__grid {
    grid-template-columns: 6fr 5fr;
    gap: clamp(2.5rem, 6vw, 6rem);
  }
  .books__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
  .js .step__icon,
  .js .step__body {
    transform: none;
  }
  .step::after {
    transition: none !important;
  }
  .plan__list {
    animation: none;
  }
  .case,
  .about__panel {
    animation: none;
  }
  .hl::before {
    animation: none;
    transform: skewX(-7deg) scaleX(1);
  }
}
.no-js .about__tabs { display: none; }

/* Docenze */
.teach {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 8vw, 6rem);
}
.teach__switch {
  display: flex;
  width: fit-content;
  margin: 0 auto clamp(2.5rem, 6vw, 4rem);
  padding: 0.3rem;
  border: 2px solid var(--text);
  border-radius: 999px;
}
.teach__tab {
  padding: 0.7rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.teach__tab:hover {
  background: color-mix(in srgb, var(--text) 10%, var(--bg));
}
.teach__tab[aria-selected="true"] {
  background: var(--text);
  color: var(--bg);
}
.teach__tab:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.teach__panel > h2 {
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}
.teach__grid {
  display: grid;
  gap: 2.5rem;
}
.teach__title {
  margin: 0 0 0.6rem;
  font-family: "Puritan", sans-serif;
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.1;
}
.teach__sub {
  max-width: 32em;
  margin: 0 0 2rem;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.5;
}
.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  bottom: 0.6rem;
  left: 0.45rem;
  width: 2px;
  background: color-mix(in srgb, var(--text) 30%, var(--bg));
}
.timeline__item {
  position: relative;
  padding: 0 0 1.75rem 2.25rem;
}
.timeline__item:last-child {
  padding-bottom: 0;
}
.timeline__item::before {
  content: "";
  position: absolute;
  top: 0.35rem;
  left: 0;
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
}
.timeline__title {
  margin: 0;
  font-family: "Puritan", sans-serif;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.3;
}
.timeline__note {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text) 78%, var(--bg));
}
.timeline__text {
  max-width: 36em;
  margin: 0.6rem 0 0;
  line-height: 1.7;
}
.timeline details summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}
.timeline details summary::-webkit-details-marker {
  display: none;
}
.timeline details summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 0.2rem;
}
.timeline__chev {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  margin-top: 0.1rem;
  transition: transform 0.2s;
}
.timeline details[open] .timeline__chev {
  transform: rotate(180deg);
}
.timeline details summary:hover .timeline__title {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
.teach__photo {
  margin: 0;
  max-width: 24rem;
}
.teach__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 0.3rem;
  box-shadow: 0.8rem 0.8rem 0 var(--tertiary);
}
@media (min-width: 900px) {
  .teach__grid {
    grid-template-columns: 7fr 4fr;
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
  }
  .teach__photo {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    justify-self: end;
    margin-right: 0.8rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .timeline__chev, .teach__tab, .offer__icon { transition: none; }
}

/* Docenze: Formazione */
.teach__panel--center > .teach__sub {
  max-width: 36em;
  margin: -1.5rem auto clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}
.offer {
  display: grid;
  gap: 1.25rem 1.75rem;
  grid-template-columns: auto 1fr;
  padding-block: clamp(2rem, 5vw, 3rem);
  border-top: 2px solid color-mix(in srgb, var(--text) 18%, var(--bg));
}
.offer:last-child {
  border-bottom: 2px solid color-mix(in srgb, var(--text) 18%, var(--bg));
}
.offer__icon {
  display: grid;
  place-items: center;
  width: clamp(3.4rem, 7vw, 4.6rem);
  aspect-ratio: 1;
  border: 2px solid var(--primary);
  border-radius: 50%;
  color: var(--text);
  transition: border-color 0.2s;
}
.offer:hover .offer__icon,
.offer__icon:hover {
  border-color: var(--accent);
}
.offer__icon svg {
  width: 52%;
  height: 52%;
}
.offer__eyebrow {
  margin: 0 0 0.2rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 78%, var(--bg));
}
.offer__title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  line-height: 1.1;
}
.offer__cols {
  display: grid;
  gap: 1.75rem 3rem;
}
.offer__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
}
.offer__head svg {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
}
.offer__head .offer__check {
  width: 1.4rem;
  height: 1.4rem;
  padding: 0.28rem;
  border-radius: 50%;
  background: var(--block);
  color: #fff;
}
.offer__cols p {
  margin: 0;
  max-width: 30em;
  line-height: 1.7;
}
.offer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.offer__list li {
  position: relative;
  padding: 0 0 0.1rem 2rem;
  line-height: 1.5;
}
.offer__list li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0.5rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--text);
}
@media (min-width: 760px) {
  .offer__cols {
    grid-template-columns: 1fr 1fr;
  }
}

/* Eventi */
.cases--events .case a {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  font-weight: 700;
}
.cases--events .case a:hover {
  color: var(--block);
}
.case__quote {
  max-width: 38em;
  margin: 0 0 1.15rem;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 4px solid var(--tertiary);
}
.case__quote p {
  margin: 0;
  line-height: 1.75;
}
.case__episodes {
  max-width: 38em;
  margin: 0 0 1.15rem;
  padding-left: 1.5rem;
  line-height: 1.6;
}
.case__episodes li {
  margin-bottom: 0.6rem;
  padding-left: 0.3rem;
}
.case-tab--static {
  margin: 0;
  cursor: default;
  font-style: italic;
  color: color-mix(in srgb, var(--text) 66%, var(--bg));
}
@media (min-width: 900px) {
  .cases--events .cases__grid {
    grid-template-columns: 5fr 6fr;
    grid-template-areas: "nav detail";
  }
}

/* Articoli */
.crumbs {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.crumbs li + li::before {
  content: "›";
  margin-right: 0.4rem;
  opacity: 0.8;
}
.crumbs a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.page-hero--article h1 {
  max-width: 20em;
  margin-inline: auto;
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.05;
  text-wrap: balance;
}
.article {
  padding-block: clamp(2.5rem, 7vw, 5rem);
}
.article__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 0.6rem;
  margin: 1.5rem auto 0;
  font-size: 1rem;
  font-weight: 500;
}
.article__lead {
  margin: 0 0 1.75rem;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.55;
  font-weight: 500;
}
.article p,
.article li {
  line-height: 1.8;
}
.article__text > p {
  margin: 0 0 1.2rem;
}
.article h2 {
  margin: 2.75rem 0 1rem;
  font-size: clamp(1.9rem, 3.8vw, 2.6rem);
  line-height: 1.1;
}
.article h3 {
  margin: 2.1rem 0 0.8rem;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  line-height: 1.25;
}
.article ol {
  margin: 0 0 1.4rem;
  padding-left: 1.6rem;
}
.article li {
  margin-bottom: 0.8rem;
  padding-left: 0.3rem;
}
.article li::marker {
  font-weight: 700;
}
.author {
  margin-top: 3rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: #fffdf7;
  border: 2px solid var(--text);
  border-radius: 0.6rem;
}
.author p {
  margin: 0 0 0.75rem;
  line-height: 1.6;
}
.author__eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.author__name {
  font-family: "Puritan", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  font-style: italic;
}
.article__back {
  margin: 2rem 0 0;
}
.articles {
  padding-block: clamp(3rem, 8vw, 6rem);
}
.articles__grid {
  display: grid;
  gap: 1.5rem;
}
.acard {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: #fffdf7;
  border: 2px solid var(--text);
  border-radius: 0.6rem;
}
.acard__title {
  margin: 0 0 0.9rem;
  font-family: "Puritan", sans-serif;
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.2;
}
.acard__title a {
  text-decoration: none;
}
.acard__title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
.acard p {
  margin: 0 0 1.25rem;
  line-height: 1.65;
}
.acard .textlink {
  margin-top: auto;
}
@media (min-width: 800px) {
  .articles__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .articles__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article__wrap {
  display: grid;
  gap: 2rem;
}
.article__text {
  max-width: 44em;
}
.toc {
  order: -1;
  padding: 1.1rem 1.25rem;
  background: #fffdf7;
  border: 2px solid var(--text);
  border-radius: 0.6rem;
}
.toc__title {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc li {
  padding: 0.25rem 0;
  line-height: 1.35;
}
.toc__l3 {
  padding-left: 0.9rem;
  font-size: 0.95rem;
}
.toc a {
  text-decoration: none;
}
.toc a:hover,
.toc a:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
@media (min-width: 1000px) {
  .article__wrap {
    grid-template-columns: minmax(0, 44em) 1fr;
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
  }
  .toc {
    order: 0;
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    max-width: 20rem;
    justify-self: end;
  }
}

.acard__meta {
  margin: 0 0 0.75rem !important;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--text) 78%, var(--bg));
}

/* Banner cookie */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  padding: 0.75rem 1rem;
  max-height: 100vh;
  overflow-y: auto;
}
.consent__box {
  max-width: 62rem;
  margin: 0 auto;
  padding: 1.2rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.5rem;
  background: var(--block);
  color: #fff;
  border-radius: 0.6rem;
  box-shadow: 0 8px 30px rgba(3, 85, 120, 0.35);
}
.consent__title {
  flex: 0 0 100%;
  margin: 0;
  font-family: "Passion One", sans-serif;
  font-size: 1.6rem;
  line-height: 1;
}
.consent__title::after {
  content: ".";
  color: var(--accent);
}
.consent__box p:not(.consent__title) {
  flex: 1 1 22rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}
.consent__box a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
.consent__prefs {
  flex: 0 0 100%;
  display: grid;
  gap: 0.7rem;
}
.consent__prefs[hidden] { display: none; }
.consent__opt {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.4;
}
.consent__opt input {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.15rem;
  accent-color: var(--text-deep);
}
.consent__actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.consent .button--small { gap: 0; }
.consent :focus-visible { outline-color: #fff; }
.site-footer .linklike {
  padding: 0;
  border: 0;
  background: none;
  color: var(--bg);
  font: inherit;
  cursor: pointer;
}
.site-footer .linklike:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

/* Pulsante flottante per gestire i cookie */
.consent-fab {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 150;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 4px 14px rgba(3, 85, 120, 0.3);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.consent-fab:hover { background: var(--block); transform: scale(1.06); }
.consent-fab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .consent-fab { transition: none; } .consent-fab:hover { transform: none; } }
