/* Tecno Consulenza: foglio del sito, caricato dopo i fogli del kit grafico (assets/system.css e seguenti).
   Contiene: il font in locale, la palette assegnata dalla skill (swap-pastels, Hanken Grotesk),
   il CSS di pagina (logo, form, banner cookie, pagine legali). I file del kit non si modificano. */

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/hanken-grotesk-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/hanken-grotesk-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* palette e font come li stampa start.mjs (non modificare a mano) */
:root {
  --p-bg: #c3d7e5; --p-surface: #d0e0eb; --p-ink: #141414; --p-muted: #4a5068;
  --p-accent: #0f5257; --p-accent-ink: #ffffff; --p-action: #0f5257; --p-action-ink: #ffffff;
  --p-inv-bg: #141414; --p-inv-surface: #1e1f20; --p-inv-ink: #c3d7e5; --p-inv-muted: #808b94;
  --p-inv-accent: #c3d7e5; --p-inv-accent-ink: #141414; --p-inv-action: #c3d7e5; --p-inv-action-ink: #141414;
  --font-display: "Hanken Grotesk", system-ui, sans-serif;
  --font-text: "Hanken Grotesk", system-ui, sans-serif;
  --display-weight: 400;
  --display-tracking: -0.03em;
  --display-tracking-xl: -0.038em;
}

/* ---------- servizi in home: la lista accanto alla foto che cambia (peek-list) */
#servizi .rows__name a { text-decoration: none; }
#servizi .rows__name a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- form di contatto (contatti.html): stessi campi del kit, gestiti da forms.js */
.form--contatti .field--full { grid-column: 1 / -1; }
.form--contatti .field__hint { font-weight: 400; color: var(--muted); }
.field--check { display: flex; align-items: flex-start; gap: var(--s-3); font-weight: 400; font-size: var(--t-body); }
.field--check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--action); }
.field--check .field__error { flex-basis: 100%; }
.field--check { flex-wrap: wrap; }
.hp-field { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form__status[data-tone="ok"] { color: var(--action); font-weight: 500; }
.form__status[data-tone="err"] { color: var(--error, #9b2c2c); font-weight: 500; }
.form__note { font-size: var(--t-small); color: var(--muted); }
.form__note a, .field--check a { text-decoration: underline; text-underline-offset: 3px; }
.contact-card { background: var(--p-surface); border-radius: var(--r-lg); padding: var(--s-7); }
@media (max-width: 639px) { .contact-card { padding: var(--s-5); } }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-5); }
.contact-list dt, .contact-list .t-label { color: var(--muted); }
.contact-list a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }

/* ---------- pagine legali: testo lungo, fuori dalla regola "una sezione per schermo" */
.legal { padding-block: calc(var(--nav) + var(--s-9)) var(--s-9); }
.legal .wrap > * { max-width: 72ch; }
.legal h1 { font: var(--display-weight) var(--t-h2)/1.1 var(--font-display); letter-spacing: var(--display-tracking); margin: 0 0 var(--s-6); }
.legal h2 { font: 500 var(--t-lead)/1.3 var(--font-text); margin: var(--s-7) 0 var(--s-3); }
.legal p, .legal li { font-size: var(--t-body); line-height: 1.7; }
.legal ul { padding-left: 1.2em; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal table { width: 100%; max-width: 72ch; border-collapse: collapse; margin: var(--s-5) 0; font-size: var(--t-small); }
.legal th, .legal td { border-bottom: 1px solid var(--line); padding: var(--s-3) var(--s-2); text-align: left; vertical-align: top; }
.legal th { font-weight: 500; }
.legal .table-scroll { overflow-x: auto; }

/* griglia del form di contatto (non usa la classe .form del kit, che system.js gestirebbe al posto di forms.js) */
.form--contatti { --error: color-mix(in oklab, #d92d20 72%, var(--ink)); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.form--contatti > .field--full, .form--contatti > p { grid-column: 1 / -1; }
.form--contatti .field__error { color: var(--error); font-weight: 500; margin: 0; }
.form--contatti .form__status:empty { display: none; }
@media (max-width: 639px) { .form--contatti { grid-template-columns: minmax(0, 1fr); } }

/* sei servizi con una riga di testo ciascuno: oltre uno schermo sotto i 1280px, quindi due schermi
   (la foto prende lo spazio che resta, .frame--fill) */
@media (min-width: 640px) and (max-width: 1023px) {
  #servizi { --h: 2; }
  #servizi .frame--fill { flex: none; height: auto; aspect-ratio: 1 / 1; }
  #non-profit .frame--split { --ratio: 56.25%; }
  .closing__cta > .close__media { min-height: 120px; }
}
@media (max-width: 639px) {
  #servizi { --hm: 2; }
  #servizi .frame--fill { flex: none; height: auto; aspect-ratio: 16 / 9; }
  #servizi .grid.fill { flex: 0 0 auto; min-height: auto; }
  .footer__contacts { justify-items: stretch; }
  .footer__contacts a { width: 100%; }
  #non-profit .frame--split { --ratio: 56.25%; }
}
/* 1024-1279 (un portatile basso): la riga sotto il titolo dei servizi non ci sta nello schermo */
@media (min-width: 1024px) and (max-width: 1279px) { #servizi .section-head p { display: none; } }
/* telefono: il nome dell'azione principale è lungo; il bottone resta nel menu a tutto schermo e nell'hero */
@media (max-width: 639px) {
  .nav:not(.is-open) .nav__actions { display: none; }
  .nav:not(.is-open) .nav__actions + .nav__toggle { margin-left: auto; }
}

/* righe dei servizi in home: il nome è un link, alto 44px per il dito */
#servizi .rows__name a { position: relative; }
#servizi .rows__name a::before { content: ""; position: absolute; inset: -12px -4px; }
/* contatti nel footer: telefono e email su una riga, a capo su telefono */
.footer__contacts { display: grid; justify-items: start; font-size: var(--t-lead); }
.footer__contacts a { display: inline-flex; align-items: center; min-height: 44px; }
.footer__address a { text-decoration: none; }
.footer__address a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
/* footer-visit: la riga dei link segue subito i contatti (lo spazio lo dà già .closing__links) */
.footer--visit .footer__nav { margin-top: 0; }
/* contatti: elenco senza rientro, casella del consenso accanto al suo testo */
.contact-list { margin-top: var(--s-6); }
.contact-list > div { display: grid; gap: var(--s-1); }
.contact-list dd { margin: 0; font-size: var(--t-lead); }
.field--check label { flex: 1 1 0; min-width: 0; font-weight: 400; }

/* logo: la scritta del logo attuale (due righe), nel menu e nel footer */
.nav__logo img.logo { height: 40px; width: auto; display: block; }
@media (max-width: 639px) { .nav__logo img.logo { height: 34px; } }
.footer .nav__logo img.logo { height: 44px; }

/* verifica Turnstile: di solito resta invisibile; se chiede un clic compare qui, sopra il bottone */
.ts-box:empty { display: none; }
.ts-box { min-height: 0; }
.legal code { font-size: 0.92em; overflow-wrap: anywhere; }
.legal-list { display: grid; gap: var(--s-5); margin: var(--s-5) 0; }
.legal-list dt { font-weight: 500; font-size: var(--t-body); }
.legal-list dd { margin: var(--s-2) 0 0; font-size: var(--t-body); line-height: 1.7; }

/* ---------- banner e preferenze cookie (cookie-consent.js) */
#cookie-banner {
  position: fixed; z-index: 30; left: var(--s-4); right: var(--s-4); bottom: var(--s-4);
  max-width: 560px; margin-left: auto;
  background: var(--p-bg); color: var(--p-ink); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  padding: var(--s-5);
}
#cookie-banner[hidden] { display: none; }
#cookie-banner p { font-size: var(--t-small); line-height: 1.5; margin: 0 0 var(--s-4); }
#cookie-banner a { text-decoration: underline; text-underline-offset: 3px; }
.cookie-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.cookie-actions .btn { flex: 1 1 auto; }
#cookie-modal {
  width: min(560px, calc(100% - 32px)); max-height: calc(100svh - 32px); overflow: auto;
  background: var(--p-bg); color: var(--p-ink); border: 0; border-radius: var(--r-lg); padding: var(--s-6);
}
#cookie-modal::backdrop { background: rgb(20 20 20 / .55); }
#cookie-modal h2 { font: var(--display-weight) var(--t-h3)/1.2 var(--font-display); margin: 0 0 var(--s-3); }
#cookie-modal h3 { font: 500 var(--t-body)/1.4 var(--font-text); margin: 0; }
#cookie-modal p { font-size: var(--t-small); line-height: 1.5; margin: var(--s-2) 0 0; }
.cookie-cat { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-4);
  border-top: 1px solid var(--line); padding: var(--s-4) 0; }
.cookie-cat input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--p-action); }
.cookie-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-3); margin-top: var(--s-4); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; min-height: 44px; }
@media (max-width: 639px) {
  #cookie-banner { left: var(--s-3); right: var(--s-3); bottom: var(--s-3); padding: var(--s-4); }
  .cookie-actions { gap: var(--s-2) var(--s-3); }
  .cookie-actions .btn { height: 44px; padding-inline: var(--s-3); }
}
/* modulo Contatti senza consenso per Turnstile: avviso con il bottone per attivarlo */
.ts-gate { background: var(--p-surface); border: 1px solid var(--line-strong); border-radius: var(--r-md, 8px);
  padding: var(--s-4); font-size: var(--t-small); line-height: 1.5; }
.ts-gate[hidden] { display: none; }
.ts-gate .btn { margin-top: var(--s-3); }
