/* Vivaix: sistema visivo (colori, tipografia, header, pulsanti, sezioni, footer) */
:root {
  --bg: #fbf9f4;            /* avorio caldo */
  --surface: #ffffff;
  --surface-2: #f4f1e8;     /* fascia calda */
  --ink: #17251c;
  --deep: #0b3a26;          /* verde profondo del logo, per titoli */
  --muted: #5d6a60;
  --line: rgb(23 37 28 / .1);
  --line-2: rgb(23 37 28 / .2);
  --green: #05663f;         /* verde della V del logo */
  --green-hover: #04512f;
  --green-vivid: #1f8f58;   /* accenti piccoli, focus */
  --green-tint: #e5f0e9;
  --yellow: #f2be1a;
  --coral: #dc5a3a;          /* puntine del logo: decorazioni */
  --coral-ink: #b3452a;      /* corallo leggibile su avorio */
  --coral-tint: #fbe9e3;
  --action: var(--green);
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --shadow: 0 1px 2px rgb(23 37 28 / .04), 0 10px 30px -18px rgb(23 37 28 / .22);
  --shadow-hover: 0 2px 4px rgb(23 37 28 / .05), 0 18px 40px -20px rgb(23 37 28 / .3);
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-text: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 500;
  --nav-h: 72px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font-text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--green-vivid); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight); color: var(--deep); letter-spacing: -0.012em; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.2vw, 78px); line-height: 1.02; margin: 0 0 20px; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 3.8vw, 48px); line-height: 1.08; margin: 0 0 16px; }
h3 { font-size: 22px; line-height: 1.25; margin: 0 0 8px; }
p { margin: 0 0 1em; }
em.bot, .bot { font-family: var(--font-display); font-style: italic; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 300; background: var(--deep); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); text-decoration: none; }
.skip-link:focus { top: 12px; }
.t-small { font-size: 14px; line-height: 1.5; }
.t-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.muted { color: var(--muted); }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--ink); max-width: 60ch; }

/* link con sottolineatura che si disegna */
.link, button.link { color: var(--green); font-weight: 500; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .25s ease, color .15s; padding: 0 0 1px; border: 0; cursor: pointer; font: inherit; }
.link:hover, button.link:hover { color: var(--green-hover); background-size: 0 1px; background-position: 100% 100%; }
.link--arrow::after { content: "→"; display: inline-block; margin-left: 6px; transition: transform .2s ease; }
.link--arrow:hover::after { transform: translateX(3px); }

/* pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--r-sm);
  border: 1px solid transparent; font: 500 15px/1 var(--font-text); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .18s, border-color .18s, color .18s, transform .12s, box-shadow .18s; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-hover); box-shadow: 0 6px 16px -8px rgb(5 102 63 / .55); }
.btn--secondary { background: var(--surface); color: var(--deep); border-color: var(--line-2); }
.btn--secondary:hover { border-color: var(--deep); }
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* header */
.nav { position: sticky; top: 0; z-index: 100; background: rgb(251 249 244 / .9); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.nav__bar { display: flex; align-items: center; gap: 32px; height: var(--nav-h); }
.nav__logo { display: block; flex: none; }
.nav__logo img { display: block; height: 34px; width: auto; }
.nav__panel { display: flex; align-items: center; gap: 24px; flex: 1; min-width: 0; }
.nav__links { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.nav__link { position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 12px; font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; border-radius: var(--r-sm); transition: color .15s; }
.nav__link::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 1.5px; background: var(--green-vivid); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.nav__link:hover { color: var(--deep); }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__toggle { display: none; width: 44px; height: 44px; margin-left: auto; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--deep); cursor: pointer; align-items: center; justify-content: center; }
.nav__toggle svg { width: 20px; height: 20px; }
.nav__toggle .i-chiudi { display: none; }
.nav.is-open .nav__toggle .i-apri { display: none; }
.nav.is-open .nav__toggle .i-chiudi { display: block; }
@media (max-width: 959px) {
  :root { --nav-h: 64px; }
  .nav__bar { gap: 12px; }
  .nav__logo img { height: 30px; }
  .nav__toggle { display: inline-flex; }
  .nav.is-open { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .nav__panel { display: none; }
  .nav.is-open .nav__panel { display: grid; align-content: start; gap: 20px; position: fixed; left: 0; right: 0; top: var(--nav-h); bottom: 0; overflow-y: auto;
    padding: 8px var(--gutter) calc(28px + env(safe-area-inset-bottom)); background: var(--bg); }
  .nav__links { display: grid; gap: 0; margin: 0; }
  .nav__link { height: 56px; font-size: 18px; padding: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__link::after { display: none; }
  .nav__actions { display: grid; }
  .nav__actions .btn { width: 100%; min-height: 52px; }
  html.nav-aperto, html.nav-aperto body { overflow: hidden; }
}

/* sezioni */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section--tint { background: var(--surface-2); }
.section--line { border-top: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head p { color: var(--muted); font-size: 18px; line-height: 1.55; margin: 0; }
.section-head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.section-head--row > div { max-width: 720px; }

/* footer */
.footer { background: var(--deep); color: #e6ebe2; padding: 64px 0 32px; }
.footer a { color: #e6ebe2; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgb(255 255 255 / .14); }
.footer__brand img { height: 32px; width: auto; display: block; background: var(--bg); padding: 8px 12px; border-radius: var(--r-sm); box-sizing: content-box; }
.footer__lede { margin: 16px 0 0; max-width: 34ch; font-family: var(--font-display); font-size: 20px; line-height: 1.35; color: #fff; }
.footer h3 { font-family: var(--font-text); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #b9c6b6; margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.footer__legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; font-size: 13px; color: #b9c6b6; }
.footer__legal a { color: #b9c6b6; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 767px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__top > :first-child { grid-column: 1 / -1; }
}

/* ingresso discreto dell'hero */
@keyframes vx-su { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.entra > * { animation: vx-su .7s cubic-bezier(.2, .7, .2, 1) both; }
.entra > :nth-child(2) { animation-delay: .06s; } .entra > :nth-child(3) { animation-delay: .12s; }
.entra > :nth-child(4) { animation-delay: .18s; } .entra > :nth-child(5) { animation-delay: .24s; } .entra > :nth-child(6) { animation-delay: .3s; }

/* pulsante account nel menu */
.nav__ruolo { color: var(--muted); font-weight: 400; }
