/* ==========================================================================
   marozzi.net - Design system
   ========================================================================== */

/* ---------- 1. Token ---------- */
:root {
  color-scheme: light;

  --ink: #0e1a17;
  --ink-soft: #24352f;
  --muted: #5c6f68;
  --bg: #ffffff;
  --bg-soft: #f4f7f5;
  --bg-elev: #ffffff;
  --line: #e2e9e5;
  --line-strong: #cbd6d1;

  --brand: #0d6b57;
  --brand-strong: #095243;
  --brand-soft: #e6f4ef;
  --accent: #b8e986;

  --gradient: linear-gradient(135deg, #0d6b57 0%, #14886c 55%, #2fa27f 100%);

  --shadow-sm: 0 1px 2px rgba(14, 26, 23, .06);
  --shadow-md: 0 10px 30px -12px rgba(14, 26, 23, .18);
  --shadow-lg: 0 30px 60px -30px rgba(14, 26, 23, .35);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --container: 1140px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino,
    "Book Antiqua", Georgia, "Times New Roman", serif;

  --step--1: clamp(.82rem, .8rem + .1vw, .88rem);
  --step-0: clamp(.98rem, .95rem + .15vw, 1.06rem);
  --step-1: clamp(1.1rem, 1.03rem + .35vw, 1.3rem);
  --step-2: clamp(1.35rem, 1.2rem + .7vw, 1.75rem);
  --step-3: clamp(1.7rem, 1.4rem + 1.4vw, 2.4rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.4vw, 3.4rem);
  --step-5: clamp(2.5rem, 1.7rem + 3.6vw, 4.4rem);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

  --ink: #eef4f1;
  --ink-soft: #d6e2dc;
  --muted: #9db0a8;
  --bg: #0a1412;
  --bg-soft: #0f1c19;
  --bg-elev: #12221e;
  --line: #1e322c;
  --line-strong: #2b463e;

  --brand: #4fd1ad;
  --brand-strong: #7ce4c4;
  --brand-soft: #14312a;
  --accent: #b8e986;

  --gradient: linear-gradient(135deg, #0f5e4d 0%, #14886c 55%, #3ec3a0 100%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 14px 34px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 34px 70px -34px rgba(0, 0, 0, .9);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

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

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--brand-strong); }

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

ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- 3. Tipografia ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.015em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); letter-spacing: -.01em; }
h4 { font-size: var(--step-1); }

p { text-wrap: pretty; }
p + p { margin-top: .85em; }

.lead {
  font-size: var(--step-1);
  color: var(--muted);
  line-height: 1.6;
  max-width: 62ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

/* ---------- 4. Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: 800px; }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--soft { background: var(--bg-soft); }

.section-head { max-width: 62ch; }
.section-head .eyebrow { margin-bottom: 1rem; }
.section-head p { margin-top: 1rem; color: var(--muted); }

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.stack-sm > * + * { margin-top: .6rem; }
.stack > * + * { margin-top: 1.15rem; }
.stack-lg > * + * { margin-top: 2rem; }

@media (min-width: 880px) {
  .split--2 { grid-template-columns: 1fr 1fr; }
  .split--aside { grid-template-columns: 1.15fr .85fr; }
  .split--aside-rev { grid-template-columns: .85fr 1.15fr; }
}

/* ---------- 5. Bottoni e link ---------- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .8rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--step-0);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
    background-color .25s var(--ease), border-color .25s var(--ease);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active { transform: translateY(0); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line-strong);
  box-shadow: none;
}

.btn--ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.btn--sm { padding: .55rem 1rem; font-size: var(--step--1); }

.btn svg { width: 1.05em; height: 1.05em; flex: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--brand);
}

.link-arrow::after {
  content: "\2192";
  transition: transform .25s var(--ease);
}

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

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}

.site-header.is-stuck { border-bottom-color: var(--line); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: var(--shadow-sm);
}

.brand__text { display: grid; line-height: 1.2; }
.brand__name { font-weight: 700; font-size: .96rem; letter-spacing: -.01em; }
.brand__role {
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: .2rem; }

.nav__link {
  padding: .5rem .8rem;
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-size: .94rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}

.nav__link:hover { background: var(--bg-soft); color: var(--ink); }

.nav__link[aria-current="page"] {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}

.header-actions { display: flex; align-items: center; gap: .5rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-elev);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease),
    background-color .2s var(--ease);
}

.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; }

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

.nav-toggle { display: none; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 200;
  padding: .6rem 1rem;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 7vw, 5.5rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 130%;
  background:
    radial-gradient(48% 55% at 78% 8%, color-mix(in srgb, var(--brand) 14%, transparent) 0%, transparent 70%),
    radial-gradient(40% 45% at 12% 30%, color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 72%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(70% 60% at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 0%, #000 0%, transparent 78%);
  opacity: .5;
  pointer-events: none;
}

.hero > .container { position: relative; z-index: 1; }

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

@media (min-width: 940px) {
  .hero__inner { grid-template-columns: 1.08fr .92fr; }
}

.hero h1 { margin-top: 1.15rem; }

.hero h1 em {
  font-style: italic;
  color: var(--brand);
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .hero h1 em {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.hero__text { margin-top: 1.4rem; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem .9rem;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--muted);
}

.hero__meta span { display: inline-flex; align-items: center; gap: .45rem; }

.hero__meta svg { width: 1rem; height: 1rem; color: var(--brand); flex: none; }

/* Card profilo */
.profile-card {
  position: relative;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  box-shadow: var(--shadow-lg);
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 45%, transparent), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.profile-card__top {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  flex: none;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: var(--shadow-md);
}

.profile-card__name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.profile-card__role { font-size: var(--step--1); color: var(--muted); }

.status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: .35rem;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand);
}

.status::before {
  content: "";
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}

.profile-card__list {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: .8rem;
  list-style: none;
}

.profile-card__list li {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.profile-card__list svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
  margin-top: .18rem;
  color: var(--brand);
}

.profile-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 1.35rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: .3rem .65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  font-size: .76rem;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ---------- 8. Card e griglie ---------- */
.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.5rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: clamp(1.35rem, 2.5vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  transition: transform .3s var(--ease), border-color .3s var(--ease),
    box-shadow .3s var(--ease);
}

.card--hover:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  box-shadow: var(--shadow-md);
}

.card h3 { font-size: var(--step-1); }
.card p { color: var(--muted); font-size: var(--step--1); }
.card__foot { margin-top: auto; padding-top: .9rem; }

.card__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: .35rem;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}

.card__icon svg { width: 1.35rem; height: 1.35rem; }

.card__num {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: .06em;
}

/* ---------- 9. Banda numeri ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.stats__item {
  padding: 1.5rem clamp(1rem, 2.5vw, 1.75rem);
  background: var(--bg-elev);
}

.stats__value {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--brand);
}

.stats__label {
  margin-top: .5rem;
  font-size: var(--step--1);
  color: var(--muted);
}

/* ---------- 10. Liste con icone ---------- */
.check-list { display: grid; gap: .7rem; list-style: none; padding: 0; }

.check-list li {
  position: relative;
  padding-left: 1.9rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--brand-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d6b57' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: .72rem;
  background-position: center;
  background-repeat: no-repeat;
}

[data-theme="dark"] .check-list li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234fd1ad' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

/* ---------- 11. Timeline ---------- */
.timeline { position: relative; list-style: none; padding: 0; }

.timeline::before {
  content: "";
  position: absolute;
  left: .38rem;
  top: .55rem;
  bottom: .55rem;
  width: 1px;
  background: linear-gradient(to bottom, var(--brand), var(--line) 70%);
}

.timeline__item {
  position: relative;
  padding-left: 2.1rem;
}

.timeline__item + .timeline__item { margin-top: 1.9rem; }

.timeline__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: .5rem;
  width: .8rem;
  height: .8rem;
  border-radius: 50%;
  border: 2px solid var(--brand);
  background: var(--bg);
}

.timeline__date {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
}

.timeline__title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.3;
  margin-top: .25rem;
}

.timeline__desc { margin-top: .3rem; font-size: var(--step--1); color: var(--muted); }

/* ---------- 12. Contenuti editoriali ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.4rem; font-size: var(--step-3); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.9rem; }
.prose p, .prose ul, .prose ol { margin-top: .85rem; color: var(--ink-soft); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: .4rem; }
.prose strong { color: var(--ink); }
.prose a { text-decoration: underline; }

.page-head {
  position: relative;
  padding-block: clamp(2.75rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.page-head h1 { font-size: var(--step-4); margin-top: 1rem; max-width: 34ch; }
.page-head p { margin-top: 1rem; }

/* ---------- 13. FAQ ---------- */
.faq { display: grid; gap: .75rem; }

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  padding: 1.05rem 1.25rem;
  transition: border-color .25s var(--ease);
}

.faq details[open] { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  color: var(--brand);
  transition: transform .25s var(--ease);
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq p { margin-top: .75rem; color: var(--muted); font-size: var(--step--1); }

/* ---------- 14. Contatti ---------- */
.contact-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: .9fr 1.1fr; }
}

.contact-list { display: grid; gap: 1rem; list-style: none; padding: 0; }

.contact-item {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  text-decoration: none;
  color: inherit;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}

a.contact-item:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  transform: translateY(-2px);
}

.contact-item__icon {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}

.contact-item__icon svg { width: 1.15rem; height: 1.15rem; }

.contact-item__label {
  display: block;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-item__value { display: block; margin-top: .1rem; font-weight: 500; }

.form {
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  box-shadow: var(--shadow-md);
}

.form__grid { display: grid; gap: 1.1rem; }

@media (min-width: 620px) {
  .form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
}

.field { display: grid; gap: .4rem; }

.field label {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink);
}

.field .req { color: var(--brand); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .75rem .9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: var(--step-0);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.field__hint { font-size: .78rem; color: var(--muted); }

.checkbox {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  font-size: .86rem;
  color: var(--muted);
}

.checkbox input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: .18rem;
  flex: none;
  accent-color: var(--brand);
}

.form__note { font-size: .78rem; color: var(--muted); }

.form__status {
  display: none;
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
}

.form__status.is-visible { display: block; }
.form__status.is-error {
  background: color-mix(in srgb, #b3261e 12%, var(--bg));
  border: 1px solid color-mix(in srgb, #b3261e 35%, var(--line));
  color: #b3261e;
}
[data-theme="dark"] .form__status.is-error { color: #ffb4ab; }

/* ---------- 15. CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4rem);
  border-radius: var(--radius-lg);
  background: var(--gradient);
  color: #fff;
  text-align: center;
}

.cta::after {
  content: "";
  position: absolute;
  inset: auto -10% -60% 40%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(184, 233, 134, .35), transparent);
  pointer-events: none;
}

.cta h2 { color: #fff; font-size: var(--step-3); }
.cta p { margin-top: .85rem; color: rgba(255, 255, 255, .85); max-width: 52ch; margin-inline: auto; }
.cta .btn { --btn-bg: #fff; --btn-fg: #0d6b57; margin-top: 1.75rem; }
.cta .btn--ghost { --btn-bg: transparent; --btn-fg: #fff; border-color: rgba(255, 255, 255, .45); }
.cta .btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- 16. Footer ---------- */
.site-footer {
  margin-top: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 2rem;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: var(--step--1);
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

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

.footer-brand p { margin-top: .9rem; color: var(--muted); max-width: 34ch; }

.footer-title {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
}

.footer-links { margin-top: .9rem; display: grid; gap: .45rem; list-style: none; padding: 0; }

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s var(--ease);
}

.footer-links a:hover { color: var(--brand); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
}

.footer-bottom p { margin: 0; }

/* ---------- 17. Animazioni ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--delay, 0ms);
}

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

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.hero__inner > * { animation: fade-up .8s var(--ease) both; }
.hero__inner > *:nth-child(2) { animation-delay: .12s; }

/* ---------- 18. Navigazione mobile ---------- */
@media (max-width: 899px) {
  .nav-toggle { display: grid; }

  .nav {
    position: absolute;
    inset: calc(100% + 1px) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    padding: 1rem var(--gutter) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }

  .nav.is-open { display: flex; }

  .nav__link {
    padding: .75rem .9rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }

  .header-actions .btn { display: none; }
}

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

/* ---------- 19. Accessibility / print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .cta, .hero__actions, .form { display: none; }
  body { background: #fff; color: #000; }
}

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

/* ---------- 20. Varianti pagina ---------- */
.badge-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: .75rem !important; }
.mt-2 { margin-top: 1.5rem !important; }
.mt-3 { margin-top: 2.25rem !important; }
.mt-4 { margin-top: 3rem !important; }
.mb-2 { margin-bottom: 1.5rem !important; }
.center { text-align: center; }
.center .lead, .center .section-head { margin-inline: auto; }
