/* ===========================================================================
   b-brave — concept di restyling

   Un foglio di stile solo. L’ordine di lettura è
   anche l’ordine della cascata, quindi niente !important e nessuna regola
   più specifica di due classi.

     1. Variabili        5. Bottoni, chip e card
     2. Font e reset     6. Moduli
     3. Testo            7. Footer
     4. Header e menu    8. Blocchi di pagina
   =========================================================================== */

/* --- 1. variabili ----------------------------------------------------------
   Ogni valore usato nel sito nasce qui.

   --c-brand riempie, --c-brand-text scrive: il rosso pieno su fondo scuro sta
   a 3.5:1 e non passerebbe il contrasto minimo, quindi sul lato scuro la
   variabile di testo è schiarita.
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  /* superfici */
  --c-surface-1:   light-dark(#FAF7F5, #16100F); /* pagina */
  --c-surface-0:   light-dark(#FFFFFF, #1C1816); /* card */
  --c-surface-2:   light-dark(#F6EEEC, #251B1A); /* fasce alternate */
  --c-surface-3:   light-dark(#EDE0DD, #2E2221); /* usato di rado */
  --c-surface-ink: light-dark(#1C1917, #221D1A); /* fascia scura */

  /* testo */
  --c-text:        light-dark(#1C1917, #F2EDE7);
  --c-text-muted:  light-dark(#57514D, #B4AAA2);
  --c-text-subtle: light-dark(#706862, #968C85);
  --c-text-invert: light-dark(#FAF8F5, #F2EDE7);

  /* il rosso del marchio */
  --c-brand:        #C4323D;                       /* fisso, mai tematizzato */
  --c-brand-strong: light-dark(#A32832, #D1424D);  /* hover e click */
  --c-brand-deep:   #7E1F27;
  --c-brand-text:   light-dark(#A32832, #E8737C);  /* il rosso quando fa da testo */
  --c-brand-tint:   light-dark(#F9EAEB, #2A1618);
  --c-brand-tint-2: light-dark(#F0D4D6, #3A1D20);

  /* filetti e focus */
  --c-border:        light-dark(#E8DCD8, #322726);
  --c-border-strong: light-dark(#D6C6C1, #403332);
  --c-focus:         light-dark(#7E1F27, #FFD9DC);

  /* tipografia */
  --font-sans: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "Cascadia Mono", "Consolas", monospace;

  --fs-2xs:  0.75rem;
  --fs-xs:   clamp(0.8125rem, 0.79rem + 0.10vw, 0.875rem);
  --fs-sm:   clamp(0.875rem,  0.85rem + 0.12vw, 0.9375rem);
  --fs-base: clamp(1rem,      0.96rem + 0.18vw, 1.0625rem);
  --fs-md:   clamp(1.0625rem, 1.00rem + 0.30vw, 1.1875rem);
  --fs-lg:   clamp(1.25rem,   1.15rem + 0.45vw, 1.5rem);
  --fs-xl:   clamp(1.5rem,    1.37rem + 0.58vw, 1.875rem);
  --fs-2xl:  clamp(1.875rem,  1.70rem + 0.77vw, 2.375rem);
  --fs-3xl:  clamp(2.25rem,   1.99rem + 1.15vw, 3rem);
  --fs-hero: clamp(2.5rem,    2.07rem + 1.92vw, 3.75rem);

  --lh-tight:   1.06;
  --lh-heading: 1.15;
  --lh-lead:    1.55;
  --lh-body:    1.65;

  --ls-hero:    -0.025em;
  --ls-heading: -0.015em;
  --ls-label:    0.12em;

  --measure:        68ch;

  /* spaziature */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  --section-y:        clamp(3.5rem, 2rem + 6vw, 7.5rem);
  --container:        1200px;
  --container-narrow: 760px;
  --gutter:           clamp(1.25rem, 0.8rem + 2vw, 3rem);
  --header-h:         4.5rem;

  /* angoli e ombre */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* ombre calde, non grigio-blu: sul fondo avorio stanno meglio.
     in scuro un'ombra non si vede, quindi diventa un filetto */
  --sh-2: light-dark(0 2px 4px rgba(28, 25, 23, 0.04), 0 0 0 1px #2E2825),
          light-dark(0 12px 28px -10px rgba(28, 25, 23, 0.14), 0 0 0 0 transparent);
  --sh-brand: 0 8px 24px -8px rgba(196, 50, 61, 0.35);

  /* transizioni */
  --t-fast: 140ms cubic-bezier(0.2, 0.6, 0.3, 1);
  --t-base: 240ms cubic-bezier(0.2, 0.6, 0.3, 1);
  --t-slow: 520ms cubic-bezier(0.16, 1, 0.3, 1);

  /* livelli */
  --z-header: 100;
  --z-skip:   300;
}

[data-theme="light"] { color-scheme: light; }
[data-theme="dark"]  { color-scheme: dark; }

/* --- 2. font e reset ----------------------------------------------------- */
/* --- font ------------------------------------------------------------------
   Stanno dentro il progetto scaricati invece di arrivare da Google: il sito funziona
   offline e non fa nessuna richiesta a terzi.
   */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-variable-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Mono";
  src: url("../fonts/dm-mono-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* reset */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--sp-5);
}

@media (min-width: 900px) {
  html { scroll-padding-top: calc(var(--header-h) + var(--sp-5)); }
}

body,
h1, h2, h3, h4, p,
figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul[class], ol[class] {
  padding: 0;
  list-style: none;
}

body {
  min-height: 100vh;
  background: var(--c-surface-1);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button { background: none; }

/* testo */

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { text-wrap: pretty; }

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.18em;
}

a:hover { text-decoration-color: currentColor; }

strong { font-weight: 700; }

::selection {
  background: var(--c-brand);
  color: #fff;
}

.lead {
  max-width: var(--measure);
  font-size: var(--fs-md);
  line-height: var(--lh-lead);
  color: var(--c-text-muted);
}

.label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-brand-text);
}

.accent { color: var(--c-brand-text); }

/* --- 3. testo, accessibilità e impalcatura ------------------------------- */

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: var(--sp-3);
  left: var(--sp-3);
  z-index: var(--z-skip);
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-brand);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--r-sm);
  transform: translateY(-200%);
  transition: transform var(--t-fast);
}

.skip-link:focus-visible { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .btn,
  .card,
  .chip { border: 1px solid ButtonBorder; }
}

/* impalcatura */

.container {
  width: min(100% - var(--gutter) * 2, var(--container));
  margin-inline: auto;
}

.container--narrow { max-width: var(--container-narrow); }

.band { padding-block: var(--section-y); }

.band--soft { background: var(--c-surface-2); }

.band--ink {
  background: var(--c-surface-ink);
  color: var(--c-text-invert);
  --c-text: var(--c-text-invert);
  --c-text-muted: #B4AAA2;
  --c-border: #332C28;
  --c-brand-text: #E8737C;
}

.band--brand {
  background: var(--c-brand);
  color: #fff;
  --c-text: #fff;
  --c-text-muted: rgba(255, 255, 255, 0.82);
  --c-border: rgba(255, 255, 255, 0.28);
}

.cards {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.stack > * + * { margin-top: var(--sp-4); }

/* il filetto rosso a sinistra del titolo sfora di 24px sotto il blocco:
   "Go the extra mile" preso alla lettera */
.section-head {
  position: relative;
  max-width: var(--measure);
  padding-left: var(--sp-5);
  margin-bottom: var(--sp-7);
}

.section-head::before {
  content: "";
  position: absolute;
  inset-block: 0 -24px;
  left: 0;
  width: 3px;
  background: var(--c-brand);
}

.section-head > * + * { margin-top: var(--sp-3); }

/* comparsa allo scroll: agganciata a html.js */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* --- 4. logo, header e menu ---------------------------------------------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  flex: none;
  white-space: nowrap;
  text-decoration: none;
  color: var(--c-text);
}

/* il logo ufficiale: il principale sugli sfondi chiari, il negativo su
   quelli scuri (piede della pagina e intestazione nel tema scuro) */
.logo__img {
  display: block;
  width: auto;
  height: 2.25rem;
}

.logo__img--dark { display: none; }

[data-theme="dark"] .logo__img--light { display: none; }
[data-theme="dark"] .logo__img--dark { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo__img--light { display: none; }
  :root:not([data-theme="light"]) .logo__img--dark { display: block; }
}

/* header */

.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--c-surface-1);
  border-top: 4px solid var(--c-brand);
  border-bottom: 1px solid transparent;
  transition: border-bottom-color var(--t-base), background-color var(--t-base);
}

@supports (backdrop-filter: blur(12px)) {
  .header {
    background: color-mix(in srgb, var(--c-surface-1) 88%, transparent);
    backdrop-filter: blur(12px);
  }
}

.header.is-scrolled { border-bottom-color: var(--c-border); }

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: var(--header-h);
}

.header__nav { margin-left: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.nav-list a {
  position: relative;
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  padding-block: var(--sp-2);
  color: var(--c-text-muted);
  transition: color var(--t-fast);
}

.nav-list a:hover { color: var(--c-text); }

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--c-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}

.nav-list a:hover::after,
.nav-list a[aria-current="page"]::after { transform: scaleX(1); }

.nav-list a[aria-current="page"] { color: var(--c-text); }

.header__tools {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-left: auto;
}

/* selettore lingua */

.lang {
  display: inline-flex;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  padding: 2px;
}

/* sono link alla stessa pagina nell'altra lingua, non bottoni */
.lang a {
  display: inline-block;
  text-decoration: none;
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--c-text-subtle);
  transition: background-color var(--t-fast), color var(--t-fast);
}

.lang a[aria-current="true"] {
  background: var(--c-brand);
  color: #fff;
}

/* chiaro / scuro */

.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  cursor: pointer;
  color: var(--c-text-muted);
  transition: color var(--t-fast), border-color var(--t-fast);
}

.theme-toggle:hover {
  color: var(--c-text);
  border-color: var(--c-border-strong);
}

.theme-toggle svg { width: 1.05rem; height: 1.05rem; }
.theme-toggle .icon-moon { display: none; }

[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* --- header compatto -------------------------------------------------------
   Sotto i 900px il menu non si nasconde dietro un bottone: va a capo sotto il
   logo e resta sempre visibile. Cinque voci più il pulsante stanno in due
   righe, e non serve JavaScript per raggiungerle.
   -------------------------------------------------------------------------- */

@media (min-width: 900px) {
  .nav-list__cta { display: none; }
}

@media (max-width: 899px) {
  /* due righe di intestazione fissate su un telefono sono troppe */
  .header {
    position: static;
    border-bottom-color: var(--c-border);
  }

  .header__inner {
    flex-wrap: wrap;
    gap: var(--sp-4);
    min-height: 3.5rem;
  }

  .header__nav {
    position: relative;
    order: 3;
    width: 100%;
    margin-left: 0;
    border-top: 1px solid var(--c-border);
  }

  /* la sfumatura a destra dice che il menu continua oltre il bordo */
  .header__nav::after {
    content: "";
    position: absolute;
    inset-block: 1px 0;
    right: 0;
    width: var(--sp-5);
    pointer-events: none;
    background: linear-gradient(to right, transparent, var(--c-surface-1));
  }

  /* una riga sola che scorre di lato: se le voci non entrano si trascinano,
     non vanno a capo */
  .nav-list {
    flex-wrap: nowrap;
    gap: var(--sp-4);
    padding-block: var(--sp-1);
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .nav-list::-webkit-scrollbar { display: none; }

  .nav-list li {
    flex: none;
    scroll-snap-align: start;
  }


  .nav-list a {
    display: block;
    padding-block: 0.7rem;
    font-size: var(--fs-xs);
    white-space: nowrap;
    color: var(--c-text);
  }

  .nav-list a[aria-current="page"] { color: var(--c-brand-text); }

  .nav-list__cta a {
    padding: 0.45rem 0.9rem;
    font-size: var(--fs-2xs);
  }

  .nav-list__cta a::after { display: none; }

  .header__tools .header__cta { display: none; }
}

/* --- 5. bottoni, chip e card --------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.75rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-fast), border-color var(--t-fast),
              color var(--t-fast), transform var(--t-fast);
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--c-brand);
  color: #fff;
  box-shadow: var(--sh-brand);
}

.btn--primary:hover { background: var(--c-brand-strong); }

.btn--ghost {
  border-color: var(--c-border-strong);
  color: var(--c-text);
}

.btn--ghost:hover {
  border-color: var(--c-text);
  background: var(--c-surface-0);
}

.btn--light {
  background: #fff;
  color: var(--c-brand-deep);
}

.btn--light:hover { background: rgba(255, 255, 255, 0.88); }

.btn--lg {
  padding: 0.95rem 1.8rem;
  font-size: var(--fs-base);
}

.btn__arrow { transition: transform var(--t-base); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* link con la freccia che scorre */

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--c-brand-text);
  text-decoration: none;
}

.link-arrow svg {
  width: 1rem;
  height: 1rem;
  transition: transform var(--t-base);
}

.link-arrow:hover svg { transform: translateX(4px); }

/* chip e tag */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-surface-0);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast),
              background-color var(--t-fast);
}

.chip:hover {
  border-color: var(--c-brand);
  color: var(--c-text);
}

.chip[aria-pressed="true"] {
  background: var(--c-brand);
  border-color: var(--c-brand);
  color: #fff;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--c-brand-tint-2);
  border-radius: var(--r-xs);
  background: var(--c-brand-tint);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-brand-text);
}

/* card */

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-6);
  background: var(--c-surface-0);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  transition: border-color var(--t-base), transform var(--t-base),
              box-shadow var(--t-base);
}

.card--hover:hover {
  border-color: var(--c-brand);
  transform: translateY(-4px);
  box-shadow: var(--sh-2);
}

.card__num {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: var(--ls-label);
  color: var(--c-brand-text);
}

.card__icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--c-brand);
}

.card h3 { font-size: var(--fs-lg); }

.card p {
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-lead);
}

.card ul {
  display: grid;
  gap: var(--sp-2);
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.card ul li {
  position: relative;
  padding-left: var(--sp-4);
}

.card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-brand);
}

/* --- 6. moduli ----------------------------------------------------------- */

.form { display: grid; gap: var(--sp-5); }

.form[hidden],
.form__success[hidden] { display: none; }

.form__row { display: grid; gap: var(--sp-5); }

@media (min-width: 560px) {
  .form__row--2 { grid-template-columns: 1fr 1fr; }
}

.field { display: grid; gap: var(--sp-2); }

.field label {
  font-size: var(--fs-sm);
  font-weight: 600;
}

.field .optional {
  font-weight: 400;
  color: var(--c-text-subtle);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--c-surface-0);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-tint);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: var(--c-brand); }

.field__error {
  font-size: var(--fs-xs);
  color: var(--c-brand-text);
  min-height: 1.1em;
}

.field--check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: var(--sp-3);
}

.field--check input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.25rem;
  accent-color: var(--c-brand);
}

.field--check label {
  font-weight: 400;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.form__summary {
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--c-brand);
  border-radius: var(--r-md);
  background: var(--c-brand-tint);
  font-size: var(--fs-sm);
}

.form__summary[hidden] { display: none; }

.form__summary p {
  font-weight: 600;
  margin-bottom: var(--sp-2);
}

.form__summary ul {
  display: grid;
  gap: var(--sp-1);
  padding-left: var(--sp-5);
}

.form__success {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-7);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-surface-0);
  text-align: center;
}

.form__success > svg {
  width: 2.5rem;
  height: 2.5rem;
  margin-inline: auto;
  color: var(--c-brand);
}

.form__note {
  margin-top: var(--sp-4);
  max-width: 48ch;
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--c-text-subtle);
}

/* nel riquadro centrato (Lavora con noi → LinkedIn) anche la nota sta al centro */
.form__success .form__note { margin-inline: auto; }

/* invio non riuscito: stesso tono degli errori sui campi */
.form__error {
  margin-top: var(--sp-3);
  max-width: 48ch;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-brand-text);
}

.form__error[hidden] { display: none; }

/* mentre il modulo aspetta il server */
.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* --- 7. footer ----------------------------------------------------------- */

.footer { padding-block: var(--sp-8) var(--sp-6); }

.footer__grid {
  display: grid;
  gap: var(--sp-7);
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .footer__grid { grid-template-columns: 1.6fr 1fr 1fr; }
}

.footer .logo__img { height: 2.5rem; }

.footer__tagline {
  margin-top: var(--sp-4);
  max-width: 34ch;
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
}

.footer h2 {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-4);
}

.footer__links {
  display: grid;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
}

.footer__links a { text-decoration: none; }
.footer__links a:hover { color: var(--c-brand-text); }

.footer__social {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.footer__social a {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  color: var(--c-text-muted);
  transition: color var(--t-fast), border-color var(--t-fast);
}

.footer__social a:hover {
  color: var(--c-brand-text);
  border-color: var(--c-brand-text);
}

.footer__social svg { width: 1.05rem; height: 1.05rem; }

.footer__legal {
  margin-top: var(--sp-8);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--c-border);
  display: grid;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  line-height: 1.7;
  color: var(--c-text-muted);
}

.footer__legal a { color: inherit; }
.footer__legal a:hover { color: var(--c-brand-text); }

@media (min-width: 900px) {
  .footer__legal {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

/* Privacy e Cookie policy: il testo standard di WordPress, in colonna stretta */
.legal h2 {
  margin: var(--sp-7) 0 var(--sp-3);
  font-size: var(--fs-xl);
}

.legal h2:first-child { margin-top: 0; }

.legal h3 {
  margin: var(--sp-5) 0 var(--sp-2);
  font-size: var(--fs-lg);
}

.legal p,
.legal ul,
.legal ol {
  margin: 0 0 var(--sp-4);
  line-height: 1.7;
}

.legal ul,
.legal ol { padding-left: 1.25rem; }

.legal a { color: var(--c-brand-text); }

/* --- 8. blocchi di pagina ------------------------------------------------ */

/* testata usata da tutte le pagine tranne la home */
.page-hero {
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) clamp(2.5rem, 2rem + 3vw, 4rem);
  border-bottom: 1px solid var(--c-border);
}

.page-hero__inner { max-width: 46rem; }
.page-hero h1 { margin-block: var(--sp-3) var(--sp-4); }

.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  margin-top: var(--sp-6);
  font-size: var(--fs-sm);
}

.anchor-nav a {
  text-decoration: none;
  color: var(--c-text-muted);
  border-bottom: 1px solid var(--c-border-strong);
  padding-bottom: 2px;
  transition: color var(--t-fast), border-color var(--t-fast);
}

.anchor-nav a:hover {
  color: var(--c-text);
  border-color: var(--c-brand);
}

.section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--sp-5);
  max-width: none;
}

.section-head--split > * + * { margin-top: 0; }

/* la fascia rossa che chiude ogni pagina */
.statement { text-align: center; }
.statement h2 { font-size: var(--fs-2xl); }
.statement p {
  max-width: 52ch;
  margin: var(--sp-5) auto var(--sp-7);
  color: var(--c-text-muted);
  font-size: var(--fs-md);
}

.manifesto { text-align: center; }

.manifesto blockquote p {
  font-size: var(--fs-xl);
  line-height: 1.4;
  letter-spacing: var(--ls-heading);
  text-wrap: balance;
}

.manifesto__claim {
  margin-top: var(--sp-6);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-brand-text);
}

.closing { text-align: center; }
.closing .lead { margin: var(--sp-4) auto var(--sp-7); }

/* home */

.hero { padding-block: clamp(2.5rem, 1rem + 6vw, 6rem) clamp(3rem, 2rem + 5vw, 6.5rem); }

.hero__inner {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 7fr 5fr; }
}

.hero h1 {
  font-size: var(--fs-hero);
  letter-spacing: var(--ls-hero);
  margin-block: var(--sp-4) var(--sp-5);
}

.hero h1 em { font-style: normal; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-7);
}

.hero__sectors { margin-top: var(--sp-8); }
.hero__sectors .label { margin-bottom: var(--sp-3); }

/* altezza riservata: scegliendo un settore la pagina non salta */
.hero__note {
  margin-top: var(--sp-4);
  max-width: 48ch;
  min-height: 3.2em;
  font-size: var(--fs-sm);
  line-height: var(--lh-lead);
  color: var(--c-text-muted);
}

/* la rete dell'hero, disegnata a partire dal marchio */

.graph {
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
  color: var(--c-brand);
  overflow: visible;
}

.graph__halo {
  fill: var(--c-brand-tint);
}

.graph__ring {
  fill: none;
  stroke: var(--c-border-strong);
  stroke-width: 1;
  stroke-dasharray: 3 7;
}

.graph__edges { stroke-width: 1.5; }

.graph__edges g,
.graph__nodes g { transition: opacity var(--t-base); }

.js .graph__edges line {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: graph-draw 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.js .graph__nodes circle {
  opacity: 0;
  animation: graph-pop 0.5s ease-out 0.5s forwards;
}

.graph .g-health line   { animation-delay: 0.15s; }
.graph .g-finance line  { animation-delay: 0.3s; }
.graph .g-manufacturing line { animation-delay: 0.45s; }

@keyframes graph-draw { to { stroke-dashoffset: 0; } }
@keyframes graph-pop  { to { opacity: 1; } }

.graph .is-pulsing { animation: graph-pop 0.5s ease-out 0.5s forwards, graph-pulse 3.2s ease-in-out 1.2s infinite; }

@keyframes graph-pulse {
  0%, 100% { r: 6.5; }
  50%      { r: 8.5; }
}

/* spengo solo gli altri due invece di spegnere tutto e riaccendere: così non
   ci sono due regole che litigano sullo stesso elemento */
.graph[data-highlight="health"] :is(.g-finance, .g-manufacturing),
.graph[data-highlight="finance"] :is(.g-health, .g-manufacturing),
.graph[data-highlight="manufacturing"] :is(.g-health, .g-finance) { opacity: 0.14; }

@media (prefers-reduced-motion: reduce) {
  .js .graph__edges line { stroke-dashoffset: 0; animation: none; }
  .js .graph__nodes circle { opacity: 1; animation: none; }
}

/* le card dei settori tengono gli elenchi allineati in basso */
.cards--sectors .card { gap: var(--sp-4); }
.cards--sectors .card ul { margin-top: auto; padding-top: var(--sp-2); }

/* elenco delle competenze */

.capabilities { display: grid; gap: var(--sp-7); }

@media (min-width: 900px) {
  .capabilities {
    grid-template-columns: 5fr 7fr;
    gap: var(--sp-9);
    align-items: start;
  }
  .capabilities__head {
    position: sticky;
    top: calc(var(--header-h) + var(--sp-7));
  }
}

.cap-list { display: grid; }

.cap-list li { border-top: 1px solid var(--c-border); }
.cap-list li:last-child { border-bottom: 1px solid var(--c-border); }

.cap-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: var(--sp-4);
  row-gap: var(--sp-1);
  padding-block: var(--sp-5);
  text-decoration: none;
  transition: padding-left var(--t-base);
}

.cap-list a:hover { padding-left: var(--sp-3); }

.cap-list__num {
  grid-column: 1;
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--c-text-subtle);
}

.cap-list__name {
  grid-column: 2;
  grid-row: 1;
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: var(--ls-heading);
}

.cap-list__desc {
  grid-column: 2;
  grid-row: 2;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.cap-list svg {
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--c-brand);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--t-base), transform var(--t-base);
}

.cap-list a:hover svg,
.cap-list a:focus-visible svg {
  opacity: 1;
  transform: none;
}

/* la striscia dei fatti */

.proof {
  display: grid;
  gap: var(--sp-6);
  border-top: 1px solid var(--c-border);
  padding-top: var(--sp-6);
}

@media (min-width: 760px) {
  .proof { grid-template-columns: repeat(3, 1fr); gap: var(--sp-7); }
}

.proof__key {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-brand-text);
  margin-bottom: var(--sp-3);
}

.proof__val {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: var(--lh-lead);
}

.post h3 { font-size: var(--fs-lg); }

/* --- blocchi usati dalle pagine interne  */

.tick-list {
  display: grid;
  gap: var(--sp-3);
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.tick-list li {
  position: relative;
  padding-left: var(--sp-6);
}

.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 12px;
  height: 7px;
  border-left: 1.5px solid var(--c-brand);
  border-bottom: 1.5px solid var(--c-brand);
  transform: rotate(-45deg);
}

.outcome {
  margin-top: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  background: var(--c-brand-tint);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
}

.outcome .label { display: block; margin-bottom: var(--sp-1); }

.chip-row--static { margin-top: var(--sp-4); }

/* i diagrammi  un solo spessore, una sola palette */

.diagram { width: 100%; }

.diagram__lane {
  fill: none;
  stroke: var(--c-border-strong);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
}

.diagram__node {
  fill: var(--c-surface-0);
  stroke: var(--c-text-subtle);
  stroke-width: 1.5;
}

.diagram__flow {
  fill: none;
  stroke: var(--c-text-subtle);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.diagram__accent {
  fill: var(--c-brand);
  stroke: var(--c-brand);
  stroke-width: 1.5;
}

.diagram__label {
  fill: var(--c-text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.company-data {
  display: grid;
  gap: var(--sp-4);
  font-size: var(--fs-sm);
}

.company-data > div {
  display: grid;
  gap: var(--sp-1);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--c-border);
}

.company-data > div:last-child { border-bottom: 0; padding-bottom: 0; }

.company-data dt {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-text-subtle);
}

.company-data dd { margin: 0; }

/* accordion con <details>: funziona anche senza JavaScript */

.accordion {
  border-top: 1px solid var(--c-border);
}

.accordion__item { border-bottom: 1px solid var(--c-border); }

.accordion__item summary {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: var(--sp-4);
  padding-block: var(--sp-5);
  cursor: pointer;
  list-style: none;
}

.accordion__item summary::-webkit-details-marker { display: none; }

.accordion__title {
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: var(--ls-heading);
}

.accordion__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-subtle);
}

.accordion__item summary svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--c-brand);
  transition: transform var(--t-base);
}

.accordion__item[open] summary svg { transform: rotate(180deg); }

.accordion__body {
  display: grid;
  gap: var(--sp-6);
  padding-bottom: var(--sp-6);
}

@media (min-width: 760px) {
  .accordion__body { grid-template-columns: 1fr 1fr; gap: var(--sp-7); }
}

.accordion__body h3 {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-brand-text);
  margin-bottom: var(--sp-4);
}

/* passaggi numerati, con il filetto rosso quando serve */

.steps {
  display: grid;
  gap: var(--sp-6);
  padding: 0;
  list-style: none;
  counter-reset: none;
}

@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--sp-7); }
}

.step {
  position: relative;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--c-border);
}

.step__num {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-label);
  color: var(--c-brand-text);
  margin-bottom: var(--sp-3);
}

.step h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-3);
}

.step p {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: var(--lh-lead);
}

.steps--line .step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background: var(--c-brand);
}

/* cosa facciamo */

.solutions {
  display: grid;
  gap: var(--sp-9);
}

.solution {
  display: grid;
  gap: var(--sp-6);
  align-items: center;
}

@media (min-width: 900px) {
  .solution { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .solution--reverse .solution__text { order: 2; }
}

.solution__text > * + * { margin-top: var(--sp-4); }
.solution__text h3 { font-size: var(--fs-xl); }
.solution__text > p { color: var(--c-text-muted); }

.solution__figure {
  padding: var(--sp-5);
  background: var(--c-surface-0);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
}

/* chi siamo */

.about,
.territory {
  display: grid;
  gap: var(--sp-7);
}

@media (min-width: 900px) {
  .about { grid-template-columns: 7fr 4fr; gap: var(--sp-9); align-items: start; }
  .territory { grid-template-columns: 6fr 5fr; gap: var(--sp-9); align-items: center; }
}

.about__text p { color: var(--c-text-muted); }

.about__id {
  padding: var(--sp-6);
  background: var(--c-surface-0);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
}

.about__id .label { margin-bottom: var(--sp-5); }

.territory p { color: var(--c-text-muted); }
.territory .link-arrow { margin-top: var(--sp-6); }
.territory__figure { max-width: 24rem; margin-inline: auto; }

/* competenze */

.areas { display: grid; gap: var(--sp-7); }

@media (min-width: 900px) {
  .areas { grid-template-columns: 4fr 8fr; gap: var(--sp-9); align-items: start; }
  .areas__nav {
    position: sticky;
    top: calc(var(--header-h) + var(--sp-6));
  }
}

.areas__nav ol {
  display: grid;
  gap: var(--sp-1);
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.areas__nav a {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  text-decoration: none;
  color: var(--c-text-muted);
  transition: background-color var(--t-fast), color var(--t-fast);
}

.areas__nav a span:first-child {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--c-text-subtle);
}

.areas__nav a:hover { color: var(--c-text); background: var(--c-surface-2); }

.areas__nav a[aria-current="true"] {
  background: var(--c-brand-tint);
  color: var(--c-brand-text);
  font-weight: 600;
}

.areas__nav a[aria-current="true"] span:first-child { color: var(--c-brand-text); }

.areas__list { display: grid; gap: var(--sp-8); }

.area {
  padding-bottom: var(--sp-8);
  border-bottom: 1px solid var(--c-border);
  scroll-margin-top: calc(var(--header-h) + var(--sp-6));
}

.areas__list .area:last-child { border-bottom: 0; padding-bottom: 0; }

.area h2 { margin-block: var(--sp-3) var(--sp-4); }
.area .lead { margin-bottom: var(--sp-5); }

/* insights */

.filters { margin-bottom: var(--sp-7); }
.filters .label { margin-bottom: var(--sp-3); }

.post-list {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--c-surface-0);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  transition: border-color var(--t-base), transform var(--t-base),
              box-shadow var(--t-base);
}

.post-card:hover {
  border-color: var(--c-brand);
  transform: translateY(-4px);
  box-shadow: var(--sh-2);
}

.post-card[hidden] { display: none; }

@media (min-width: 900px) {
  .post-card--featured {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: stretch;
  }
  .post-card--featured .post-card__cover { flex: 0 0 46%; }
  .post-card--featured .post-card__body { padding: var(--sp-8); }
  .post-card--featured h2 { font-size: var(--fs-xl); }
}

.post-card__cover { background: var(--c-surface-2); }

.cover { width: 100%; height: 100%; display: block; }
.cover__bg { fill: var(--c-surface-2); }

.cover__art {
  fill: none;
  stroke: var(--c-brand);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.55;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-6);
}

.post-card h2 {
  font-size: var(--fs-lg);
  letter-spacing: var(--ls-heading);
}

.post-card p {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: var(--lh-lead);
}

.post-card__meta {
  margin-top: auto;
  padding-top: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-subtle);
}

/* lavora con noi */

.accordion__item summary:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: -2px;
}

@media (max-width: 559px) {
  .accordion__item summary { grid-template-columns: 1fr auto; }
  .accordion__meta { grid-column: 1; grid-row: 2; }
}

/* contatti */

.channels {
  display: grid;
  gap: var(--sp-6);
  border-top: 1px solid var(--c-border);
  padding-top: var(--sp-6);
}

@media (min-width: 760px) {
  .channels { grid-template-columns: repeat(3, 1fr); gap: var(--sp-7); }
}

.channel .label { margin-bottom: var(--sp-3); }

.channel__value {
  display: block;
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: var(--ls-heading);
  text-decoration: none;
  color: var(--c-text);
}

a.channel__value:hover { color: var(--c-brand-text); }

.channel__value--sm { font-size: var(--fs-lg); }
.channel__value + .channel__value { margin-top: var(--sp-2); }

.channel__note,
.channel .link-arrow { margin-top: var(--sp-3); }

.channel__note {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.contact-grid { display: grid; gap: var(--sp-8); }

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 7fr 5fr; gap: var(--sp-9); align-items: start; }
}

.contact-map .label { margin-bottom: var(--sp-4); }

.map {
  width: 100%;
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-6);
}

.map__bg { fill: var(--c-surface-2); }
.map__blocks { fill: var(--c-surface-0); }

.map__roads {
  fill: none;
  stroke: var(--c-surface-3);
  stroke-width: 10;
}

.map__pin { fill: var(--c-brand); }
.map__pin-dot { fill: var(--c-surface-0); }
