/* =========================================================================
   NienteDaFare — foglio di stile unico.
   CSS locale, nessun font remoto, nessuna dipendenza.
   Light / dark via prefers-color-scheme + override manuale [data-theme].
   ========================================================================= */

:root {
  color-scheme: light dark;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "Yu Gothic UI", Meiryo, "Noto Sans CJK JP", sans-serif;

  /* palette — light */
  --bg: #fbfaf8;
  --bg-elev: #ffffff;
  --bg-sunken: #f2f0ec;
  --text: #16151a;
  --text-soft: #545261;
  --text-faint: #615f6a;
  --border: #e7e3dc;
  --border-strong: #d7d2c8;
  --accent: #5b4bd6;
  --accent-strong: #4a3ac2;
  --accent-contrast: #ffffff;
  --accent-tint: #efedfb;
  --warn-bg: #fdf4e3;
  --warn-border: #efd9a8;
  --warn-text: #7a5b12;
  --focus: #1d4ed8;
  --shadow: 0 1px 2px rgba(20, 18, 28, 0.04), 0 8px 30px rgba(20, 18, 28, 0.06);
  --shadow-lg: 0 2px 6px rgba(20, 18, 28, 0.06), 0 24px 60px rgba(20, 18, 28, 0.1);

  --radius: 14px;
  --radius-lg: 22px;
  --wrap: 68rem;
  --step: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0f;
    --bg-elev: #15151c;
    --bg-sunken: #101017;
    --text: #f3f2f7;
    --text-soft: #bcb9c8;
    --text-faint: #9a96a6;
    --border: #26242f;
    --border-strong: #35323f;
    --accent: #a99cff;
    --accent-strong: #bcb2ff;
    --accent-contrast: #16121f;
    --accent-tint: #1c1930;
    --warn-bg: #2a2313;
    --warn-border: #4d3f1c;
    --warn-text: #e8cf92;
    --focus: #93b4ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 34px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.35), 0 30px 70px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --bg: #0b0b0f;
  --bg-elev: #15151c;
  --bg-sunken: #101017;
  --text: #f3f2f7;
  --text-soft: #b6b3c2;
  --text-faint: #85818f;
  --border: #26242f;
  --border-strong: #35323f;
  --accent: #a99cff;
  --accent-strong: #bcb2ff;
  --accent-contrast: #16121f;
  --accent-tint: #1c1930;
  --warn-bg: #2a2313;
  --warn-border: #4d3f1c;
  --warn-text: #e8cf92;
  --focus: #93b4ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 34px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.35), 0 30px 70px rgba(0, 0, 0, 0.5);
}

/* ---------- reset essenziale ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* le ancore (#contribute, #grazie…) non finiscono sotto l'header sticky */
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 680;
  margin: 0;
  text-wrap: balance;
  overflow-wrap: break-word;
}

p {
  margin: 0;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-strong);
}

img,
svg {
  max-width: 100%;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- helper ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 0.6rem + 2.5vw, 2.5rem);
}

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease;
}

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-faint);
  margin-bottom: 0.9rem;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.brand-mark {
  color: var(--accent);
  flex: none;
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  list-style: none;
}

.nav-list a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 550;
  font-size: 0.95rem;
}

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

.nav-cta {
  color: var(--accent) !important;
  font-weight: 650 !important;
}

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

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 1.9rem;
  padding-inline: 0.5rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
}

.lang-switch a:hover {
  color: var(--text);
}

.lang-switch a[aria-current="page"] {
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: var(--shadow);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.3rem;
  padding-inline: 0.7rem;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

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

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun,
.theme-toggle[data-mode="dark"] .icon-sun {
  display: none;
}

.theme-toggle[data-mode="dark"] .icon-moon {
  display: inline;
}

.theme-toggle-label {
  text-transform: capitalize;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-sunken);
  cursor: pointer;
  position: relative;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1.1rem;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transform: translateX(-50%);
}

.nav-toggle-bar {
  top: 50%;
  transform: translate(-50%, -50%);
}

.nav-toggle-bar::before {
  top: -6px;
}
.nav-toggle-bar::after {
  top: 6px;
}

/* ---------- bottoni ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 640;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--accent-strong);
  color: var(--accent-contrast);
}

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

.btn-ghost:hover {
  background: var(--bg-sunken);
  color: var(--text);
}

.btn-lg {
  padding: 1rem 1.8rem;
  font-size: 1.05rem;
}

.btn-xl {
  padding: 1.15rem 2.2rem;
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.2rem);
  font-weight: 680;
}

.btn-arrow {
  flex: none;
  transition: transform 0.14s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* pulsante che sembra un link (condivisione inline) */
.link-button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--accent);
  font-weight: 640;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.link-button:hover {
  color: var(--accent-strong);
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(2.5rem, 1rem + 7vw, 7.5rem) clamp(2.25rem, 1.5rem + 6vw, 5rem);
}

.hero-inner {
  max-width: 46rem;
}

.hero-title {
  font-size: clamp(2rem, 1.15rem + 4.4vw, 3.9rem);
  font-weight: 720;
}

.hero-subtitle {
  margin-top: 1.2rem;
  font-size: clamp(1.1rem, 1rem + 0.7vw, 1.4rem);
  color: var(--text-soft);
  max-width: 38rem;
}

.hero-lead {
  margin-top: 1rem;
  font-size: 1.02rem;
  font-weight: 560;
  color: var(--text);
  max-width: 36rem;
}

.hero-actions {
  margin-top: 1.9rem;
}

.hero-microcopy {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--text-faint);
}

/* ---------- sezioni ---------- */

.section {
  padding-block: clamp(2.75rem, 1.6rem + 6vw, 5rem);
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.1rem);
}

.section-lead {
  margin-top: 0.8rem;
  color: var(--text-soft);
  max-width: 40rem;
}

/* ---------- card contributo ---------- */

.section-contribute {
  background: var(--bg-sunken);
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.4rem, 1rem + 3vw, 2.75rem);
}

.contribute-card {
  max-width: 44rem;
  margin-inline: auto;
  border-top: 3px solid var(--accent);
}

.card-title {
  font-size: clamp(1.4rem, 1.15rem + 1.4vw, 2rem);
}

.card-lead {
  margin-top: 0.7rem;
  color: var(--text-soft);
}

.config-warning {
  margin-top: 1.2rem;
  padding: 0.85rem 1rem;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

/* ---------- importi rapidi ---------- */

.preset-group {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.7rem;
}

.preset {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem;
  min-height: 4.75rem;
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease,
    background-color 0.14s ease;
}

.preset:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  color: var(--text);
}

.preset.is-selected {
  border-color: var(--accent);
  background: var(--accent-tint);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}

.preset-badge {
  align-self: flex-start;
  max-width: 100%;
  margin-bottom: 0.2rem;
  padding: 0.12rem 0.55rem;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-contrast);
  background: var(--accent);
  border-radius: 999px;
}

.preset-amount {
  font-size: 1.25rem;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.preset-tagline {
  font-size: 0.82rem;
  color: var(--text-faint);
  line-height: 1.35;
}

.amounts-humor {
  margin-top: 0.9rem;
  font-size: 0.88rem;
  color: var(--text-faint);
}

/* ---------- importo libero ---------- */

.custom-form {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}

.custom-label {
  display: block;
  font-weight: 640;
}

.custom-hint {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.custom-row {
  margin-top: 0.7rem;
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.custom-prefix {
  display: inline-flex;
  align-items: center;
  padding-inline: 0.9rem;
  background: var(--bg-sunken);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-weight: 640;
  color: var(--text-soft);
}

.custom-input {
  flex: 1 1 8rem;
  min-width: 0;
  padding: 0.8rem 1rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.custom-input::placeholder {
  color: var(--text-faint);
}

.custom-input[aria-invalid="true"] {
  border-color: #c0392b;
}

.custom-row .btn {
  flex: 0 0 auto;
}

.custom-error {
  margin-top: 0.7rem;
  color: #b23b2e;
  font-size: 0.9rem;
  font-weight: 560;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .custom-error {
    color: #ff9d92;
  }
}

:root[data-theme="dark"] .custom-error {
  color: #ff9d92;
}

/* ---------- pay-box (riepilogo + CTA di pagamento) ---------- */

.pay-box {
  margin-top: 1.6rem;
  padding: 1.3rem;
  background: var(--accent-tint);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: var(--radius);
}

.pay-summary {
  font-size: 1.05rem;
  font-weight: 560;
}

.btn-pay {
  margin-top: 0.9rem;
  width: 100%;
}

.pay-trust {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.calc-line {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.calc-disclaimer {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.pay-foot {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.8rem;
}

.currency-note {
  color: var(--text-faint);
}

.pay-return {
  color: var(--text-soft);
  font-weight: 560;
  white-space: nowrap;
}

/* ---------- come funziona ---------- */

.steps {
  margin-top: 2rem;
  list-style: none;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  counter-reset: step;
}

.step {
  padding: 1.4rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-title {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.step p {
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* ---------- cosa ricevi ---------- */

.section-nothing {
  text-align: center;
}

.nothing-inner {
  max-width: 40rem;
}

.nothing-big {
  margin-top: 1.2rem;
  font-size: clamp(2rem, 1.3rem + 3.4vw, 3.2rem);
  font-weight: 740;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.nothing-body {
  margin-top: 1rem;
  color: var(--text-soft);
}

.nothing-reassure {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-faint);
}

/* ---------- roadmap ---------- */

.roadmap {
  margin-top: 1.8rem;
  list-style: none;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.roadmap-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.2rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.roadmap-q {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.roadmap-body {
  font-weight: 560;
}

.roadmap-note {
  margin-top: 1.2rem;
  font-size: 0.9rem;
  color: var(--text-faint);
}

/* ---------- FAQ ---------- */

.faq {
  margin-top: 1.8rem;
  display: grid;
  gap: 0.6rem;
}

.faq-item {
  padding: 1.2rem 1.3rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.faq-item dt {
  font-weight: 660;
}

.faq-item dd {
  margin: 0.4rem 0 0;
  color: var(--text-soft);
  font-size: 0.96rem;
}

/* ---------- seconda CTA ---------- */

.section-cta2 {
  background: var(--bg-sunken);
}

.cta2-inner {
  max-width: 40rem;
}

.cta2-body {
  margin-top: 0.8rem;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.cta2-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.cta2-other {
  margin-top: 0.7rem;
  font-size: 0.9rem;
}

.cta2-other a {
  color: var(--text-soft);
  font-weight: 560;
}

.cta2-share {
  margin-top: 1.4rem;
  font-size: 0.9rem;
  color: var(--text-faint);
}

.share-status {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  font-weight: 560;
  color: var(--accent-strong);
}

/* ---------- blocco "grazie" (ritorno da PayPal) ---------- */

.section-thanks {
  background: var(--accent-tint);
  text-align: center;
}

.thanks-inner {
  max-width: 38rem;
}

.thanks-big {
  margin-top: 0.8rem;
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.3rem);
  font-weight: 720;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.thanks-body {
  margin-top: 0.9rem;
  color: var(--text-soft);
}

.thanks-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

.section-thanks .share-status {
  color: var(--text-soft);
}

/* ---------- CTA fissa mobile ---------- */

.sticky-cta {
  display: none;
}

@media (max-width: 720px) {
  .sticky-cta:not([hidden]) {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 0.6rem 0;
    background: color-mix(in srgb, var(--bg-elev) 94%, transparent);
    backdrop-filter: saturate(140%) blur(10px);
    border-top: 1px solid var(--border-strong);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(130%);
    transition: transform 0.24s ease;
  }

  .sticky-cta.is-visible {
    transform: translateY(0);
  }

  .sticky-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
  }

  .sticky-cta-text {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .sticky-cta .btn {
    flex: 1 1 auto;
    padding-block: 0.75rem;
    text-align: center;
  }
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem;
  background: var(--bg-sunken);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 550;
}

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

.footer-disclaimer {
  font-size: 0.9rem;
  color: var(--text-soft);
  max-width: 44rem;
}

.footer-meta {
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ---------- pagine documentali (privacy / sicurezza / 404) ---------- */

.section-doc {
  min-height: 60vh;
}

.doc {
  max-width: 42rem;
}

.doc-title {
  font-size: clamp(1.8rem, 1.3rem + 2.4vw, 2.6rem);
}

.doc-lead {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--text-soft);
}

.doc-subtitle {
  margin-top: 2rem;
  font-size: 1.15rem;
}

.doc-list {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.7rem;
  padding-left: 1.1rem;
}

.doc-list li {
  color: var(--text-soft);
}

.doc-note {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-faint);
}

.doc-back {
  margin-top: 2rem;
}

.section-404 {
  display: flex;
  align-items: center;
}

/* ---------- pagina root di reindirizzamento ---------- */

.root-redirect {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.root-langs {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  list-style: none;
  flex-wrap: wrap;
}

.root-langs a {
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

/* ---------- microanimazione d'ingresso (una sola, all'apertura pagina) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-inner > * {
    animation: rise-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .hero-inner > *:nth-child(2) { animation-delay: 0.04s; }
  .hero-inner > *:nth-child(3) { animation-delay: 0.08s; }
  .hero-inner > *:nth-child(4) { animation-delay: 0.12s; }
  .hero-inner > *:nth-child(n + 5) { animation-delay: 0.16s; }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
    order: 3;
  }

  .site-nav {
    position: fixed;
    inset: 4rem 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
    padding: 1.4rem clamp(1.1rem, 0.6rem + 2.5vw, 2.5rem) 2rem;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-140%);
    transition: transform 0.22s ease;
    visibility: hidden;
  }

  .site-nav.is-open {
    transform: translateY(0);
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }

  .nav-list a {
    font-size: 1.05rem;
  }

  .nav-tools {
    justify-content: space-between;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (min-width: 861px) {
  .site-nav {
    visibility: visible !important;
    transform: none !important;
  }
}

@media (max-width: 600px) {
  .cta2-actions .btn,
  .thanks-actions .btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 480px) {
  .custom-row {
    flex-wrap: wrap;
  }

  .custom-input {
    flex: 1 1 6rem;
  }

  .custom-row .btn {
    flex: 1 1 100%;
    margin-top: 0.2rem;
  }

  .preset-group {
    grid-template-columns: repeat(2, 1fr);
  }

  .preset {
    min-height: 4.25rem;
  }

  .pay-foot {
    justify-content: flex-start;
  }
}
