/* ==========================================================================
   Orbifan – stile base
   Concept: l'orbita. Il satellite fa un giro attorno al "tuo profilo"
   e accende le tre tappe del metodo: analisi, strategia, sponsorizzate.
   ========================================================================== */

/* Font serviti dal sito (niente richieste a Google). Licenza: SIL Open Font License. */
/* latin-ext */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/instrument-sans-latin-ext-a53201.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;
}
/* latin */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/instrument-sans-latin-11aa49.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;
}
/* latin-ext */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/instrument-sans-latin-ext-a53201.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;
}
/* latin */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/instrument-sans-latin-11aa49.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;
}
/* latin-ext */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/instrument-sans-latin-ext-a53201.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;
}
/* latin */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/instrument-sans-latin-11aa49.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;
}
/* latin-ext */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/unbounded-latin-ext-dcd685.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;
}
/* latin */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/unbounded-latin-10e743.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;
}
/* latin-ext */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/unbounded-latin-ext-dcd685.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;
}
/* latin */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/unbounded-latin-10e743.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;
}


:root {
  --ink: #14183A;          /* blu notte: testi, sezioni scure */
  --ink-soft: #4D5378;     /* testi secondari */
  --blue: #3D3BF3;         /* oltremare: azioni, il "profilo" */
  --blue-deep: #2A28C9;    /* hover */
  --sat: #FFC83D;          /* giallo satellite: unico accento caldo */
  --ice: #F2F4FE;          /* fondo pagina */
  --tint: #E6E9FB;         /* sezioni alternate */
  --line: #D6DAF2;         /* bordi e linee */
  --white: #FFFFFF;
  --good: #1D7A4C;
  --warn: #9A5B00;

  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lede: 1.25rem;
  --fs-h3: 1.125rem;
  --fs-h2: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem);
  --fs-h1: clamp(2.1rem, 1.4rem + 3.2vw, 3.9rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --section-y: clamp(4rem, 3rem + 4vw, 7rem);

  --r-pill: 999px;
  --r-panel: 22px;
  --r-small: 8px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ice);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h3 { font-size: var(--fs-h3); font-weight: 500; line-height: 1.3; }

p { margin: 0; }

a { color: inherit; }

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

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem; top: -3rem;
  background: var(--ink); color: var(--white);
  padding: 0.5rem 1rem; border-radius: var(--r-small);
  z-index: 10;
}
.skip:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow { max-width: 48rem; }

/* Segnaposto da definire prima del lancio (prezzi, tempi, durate) */
.tbd {
  background: #FFF1C2;
  outline: 1px dashed #B88A00;
  outline-offset: -1px;
  border-radius: 4px;
  padding: 0 0.25em;
  color: var(--ink);
}

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--r-pill);
  background: var(--blue);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--blue);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }

.btn-small { min-height: 2.5rem; padding: 0.45rem 1.1rem; font-size: 0.95rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(242, 244, 254, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
}
.logo svg { width: 1.9rem; height: 1.9rem; }

.main-nav { display: flex; gap: 1.75rem; margin-left: auto; }
.main-nav a {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink-soft);
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 0.3em; }

/* Menu mobile: il pulsante appare solo sotto 860px */
.menu-btn {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.menu-btn-icon { width: 1rem; height: 0.75rem; position: relative; }
.menu-btn-icon::before,
.menu-btn-icon::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s;
}
.menu-btn-icon::before { top: 0; }
.menu-btn-icon::after { bottom: 0; }
.menu-btn[aria-expanded="true"] .menu-btn-icon::before { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn-icon::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 860px) {
  .header-inner { gap: 0.75rem; }
  .logo { margin-right: auto; }
  .js .menu-btn { display: inline-flex; }

  /* Senza JavaScript il menu resta visibile e va a capo */
  .main-nav { flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-left: 0; }

  .js .main-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    gap: 0;
    background: var(--ice);
    border-bottom: 2px solid var(--ink);
    padding: 0.5rem var(--gutter) 1rem;
  }
  .js .main-nav.is-open { display: flex; }
  .js .main-nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.1rem;
    color: var(--ink);
  }
  .js .main-nav a:last-child { border-bottom: 0; }
}
/* Sui telefoni stretti il pulsante in alto lascia spazio a logo e menu:
   il calcolatore è comunque subito sotto. */
@media (max-width: 480px) {
  .header-inner .btn-small { display: none; }
}

/* ---------- Form "analizza il profilo" ---------- */
.scan-form { margin-top: 2.25rem; max-width: 34rem; }

.scan-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.scan-field {
  display: flex;
  align-items: stretch;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  padding: 0.3rem;
}
.scan-field:focus-within { outline: 3px solid var(--blue); outline-offset: 3px; }

.scan-at {
  display: flex;
  align-items: center;
  padding-left: 1rem;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink-soft);
}

.scan-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.1rem;
  color: var(--ink);
  padding: 0.55rem 0.5rem 0.55rem 0.2rem;
}
.scan-field input:focus { outline: none; }
.scan-field input::placeholder { color: #8C91B5; }

.scan-field .btn { min-height: 2.9rem; flex-shrink: 0; }

.scan-hint { margin-top: 0.75rem; font-size: var(--fs-small); color: var(--ink-soft); }

@media (max-width: 480px) {
  .scan-field { flex-wrap: wrap; border-radius: 18px; }
  .scan-field .btn { width: 100%; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 2rem + 4vw, 6rem) clamp(3.5rem, 2rem + 5vw, 7rem); overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}

.hero h1 { font-size: var(--fs-h1); max-width: 14ch; }

.lede {
  margin-top: 1.5rem;
  font-size: var(--fs-lede);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34rem;
}

/* Orbita del metodo */
.orbit {
  margin: 0;
  width: 100%;
  max-width: 30rem;
  justify-self: center;
}

.orbit-svg { width: 100%; height: auto; overflow: visible; }

.orbit-guide { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 7; }
.orbit-track { fill: none; stroke: var(--line); stroke-width: 2; }

.orbit-path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  transform-box: view-box;
  transform-origin: 200px 200px;
  transform: rotate(-90deg);
}

.orbit-core { fill: var(--blue); }
.orbit-core-label { fill: var(--white); font-family: var(--font-display); font-weight: 500; font-size: 22px; }

.orbit-node { fill: var(--blue); stroke: var(--ink); stroke-width: 3; }
.orbit-label { fill: var(--ink); font-family: var(--font-display); font-weight: 500; font-size: 24px; }

.orbit-sat { transform-box: view-box; transform-origin: 200px 200px; }
.orbit-sat circle { fill: var(--sat); stroke: var(--ink); stroke-width: 3; }

.orbit figcaption {
  margin: 1.25rem auto 0;
  font-size: var(--fs-small);
  color: var(--ink-soft);
  text-align: center;
  max-width: 24rem;
}

/* L'unico momento animato della home: un giro, tre tappe che si accendono. */
@media (prefers-reduced-motion: no-preference) {
  .orbit-path  { animation: orbit-draw 3s linear 0.4s both; }
  .orbit-sat   { animation: orbit-turn 3s linear 0.4s both; }
  .orbit-node  { animation: node-on 0.3s ease-out both; }
  .orbit-label { animation: label-on 0.3s ease-out both; }
  .n1 { animation-delay: 0.9s; }   /* 60° di 360° */
  .n2 { animation-delay: 1.9s; }   /* 180° */
  .n3 { animation-delay: 2.9s; }   /* 300° */
}

@keyframes orbit-draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes orbit-turn { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes node-on    { from { fill: var(--white); } to { fill: var(--blue); } }
@keyframes label-on   { from { fill: #A9AECF; } to { fill: var(--ink); } }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .orbit { max-width: 24rem; margin-top: 1rem; }
}

/* ---------- Sezioni ---------- */
.section { padding-block: var(--section-y); }
.section-tint { background: var(--tint); }
.section-ink { background: var(--ink); color: var(--white); }

.section h2 { font-size: var(--fs-h2); max-width: 22ch; }

.section-intro {
  margin-top: 1rem;
  max-width: 38rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

/* Punti sotto il titolo dell'hero */
.hero-points {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  font-weight: 600;
}
.hero-points li { position: relative; padding-left: 1.6rem; }
.hero-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.3em;
  width: 1rem; height: 1rem;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: radial-gradient(circle, var(--blue) 0 34%, transparent 36%);
}

/* ---------- Calcolatore dell'obiettivo ---------- */
.calc {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--r-panel);
  padding: clamp(1.25rem, 0.8rem + 1.5vw, 2rem);
  box-shadow: 8px 8px 0 var(--ink);
  display: grid;
  gap: 1.4rem;
}

.calc-title { font-size: 1.35rem; }

.calc-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.calc-group legend { padding: 0; margin-bottom: 0.55rem; font-weight: 600; font-size: 0.95rem; }

/* Radio nascosti ma accessibili; lo stile va sullo <span> accanto */
.calc input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.calc label { cursor: pointer; display: block; }
.calc input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.calc input:disabled + span { cursor: not-allowed; opacity: 0.5; }

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--tint);
  border-radius: var(--r-pill);
  padding: 0.25rem;
}
.seg span {
  display: block;
  text-align: center;
  padding: 0.55rem 0.5rem;
  border-radius: var(--r-pill);
  font-weight: 600;
}
.seg input:checked + span { background: var(--ink); color: var(--white); }

.tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.tiers span {
  display: block;
  text-align: center;
  padding: 0.75rem 0.25rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
}
.tiers label:hover span { border-color: var(--ink); }
.tiers input:checked + span { border-color: var(--blue); background: var(--blue); color: var(--white); }

.speeds { display: grid; gap: 0.5rem; }
.speeds span {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
}
.speeds em { font-style: normal; color: var(--ink-soft); font-size: 0.95rem; text-align: right; }
.speeds label:hover input:not(:disabled) + span { border-color: var(--ink); }
.speeds input:checked + span { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }

.calc-result {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.calc-ring { width: 6.5rem; height: 6.5rem; }
.ring-track { fill: none; stroke: var(--tint); stroke-width: 10; }
.ring-fill {
  fill: none;
  stroke: var(--sat);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 90; /* 3 giorni su 30: valore iniziale, poi lo aggiorna il calcolatore */
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
}
@media (prefers-reduced-motion: no-preference) {
  .ring-fill { transition: stroke-dashoffset 0.45s ease-out; }
}
.ring-num { font-family: var(--font-display); font-weight: 700; font-size: 30px; fill: var(--ink); }
.ring-unit { font-size: 13px; fill: var(--ink-soft); }

.calc-summary { font-weight: 600; line-height: 1.4; }
.calc-price { margin-top: 0.35rem; font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; line-height: 1.1; }
.calc-price small { display: block; margin-top: 0.2rem; font-family: var(--font-body); font-weight: 500; font-size: var(--fs-small); color: var(--ink-soft); }

.calc-submit { width: 100%; }
.calc-note { font-size: var(--fs-small); color: var(--ink-soft); text-align: center; margin-top: -0.6rem; }

@media (max-width: 480px) {
  .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc { box-shadow: 5px 5px 0 var(--ink); }
}

/* ---------- Tabella prezzi ---------- */
.price-table {
  width: 100%;
  max-width: 52rem;
  margin-top: 2.5rem;
  border-collapse: collapse;
  font-size: 1.05rem;
}
.price-table th,
.price-table td { padding: 1.1rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
.price-table thead th { font-family: var(--font-display); font-weight: 500; font-size: 0.95rem; border-bottom: 3px solid var(--ink); }
.price-table tbody th { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.price-table strong { font-family: var(--font-display); font-weight: 700; margin-right: 0.35rem; }
.price-table .muted { color: var(--ink-soft); }

.table-note { margin-top: 1.25rem; color: var(--ink-soft); }

@media (max-width: 520px) {
  .price-table th, .price-table td { padding: 0.9rem 0.5rem; font-size: 0.95rem; }
  .price-table strong { display: block; margin: 0; }
}

.facts-more { margin-top: 2rem; color: #DCDFF5; }

/* Analisi gratuita: cosa misura */
.measures-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: start;
}
.measures-grid .btn-row { margin-top: 2rem; }

.measures {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 2rem;
}
.measures li { border-top: 1px solid var(--ink); padding-top: 0.9rem; }
.measures strong { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.measures span { color: var(--ink-soft); font-size: 0.975rem; }

@media (max-width: 860px) {
  .measures-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .measures { grid-template-columns: 1fr; }
}

/* Confronto */
.compare-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}

.table-scroll { overflow-x: auto; }

.compare { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 1rem; }

.compare th,
.compare td { padding: 1rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); }

.compare thead th { font-family: var(--font-display); font-weight: 500; font-size: 0.95rem; }
.compare tbody th { font-weight: 500; color: var(--ink-soft); }
.compare td { font-weight: 600; }

.compare .is-us { background: var(--blue); color: var(--white); border-bottom-color: rgba(255, 255, 255, 0.18); }
.compare thead .is-us { border-radius: var(--r-small) var(--r-small) 0 0; }
.compare tbody tr:last-child .is-us { border-radius: 0 0 var(--r-small) var(--r-small); border-bottom: 0; }

@media (max-width: 860px) {
  .compare-grid { grid-template-columns: 1fr; }
  .compare th, .compare td { padding: 0.85rem 0.7rem; }
}

/* Come lavoriamo: è davvero una sequenza, quindi numerata */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.steps li { counter-increment: step; border-top: 3px solid var(--ink); padding-top: 1.25rem; }

.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  color: var(--blue);
  margin-bottom: 1rem;
}

.steps h3 { margin-bottom: 0.5rem; }
.steps p { color: var(--ink-soft); max-width: 30ch; }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 2.25rem; }
}

/* Impegni */
.promises {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 3rem;
}

.promises li { position: relative; padding-left: 2.5rem; }

/* piccola orbita come marcatore */
.promises li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.1rem;
  width: 1.35rem; height: 1.35rem;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: radial-gradient(circle, var(--blue) 0 36%, transparent 38%);
}

.promises h3 { margin-bottom: 0.4rem; }
.promises p { color: var(--ink-soft); max-width: 38ch; }

@media (max-width: 760px) {
  .promises { grid-template-columns: 1fr; gap: 2rem; }
}

/* Cosa non facciamo */
.section-ink h2 { color: var(--white); }

.facts { list-style: none; margin: 2.25rem 0 0; padding: 0; display: grid; gap: 1.25rem; }

.facts li {
  position: relative;
  padding-left: 1.75rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: #DCDFF5;
}
.facts li strong { color: var(--white); font-weight: 600; }

.facts li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 0.6rem; height: 0.6rem;
  border-radius: 50%;
  background: var(--sat);
}

.section-ink a { color: var(--white); text-underline-offset: 0.2em; }
.section-ink :focus-visible { outline-color: var(--sat); }

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: start;
}

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }

.faq summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 1.25rem 2.5rem 1.25rem 0;
  font-weight: 600;
  font-size: 1.125rem;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  position: absolute;
  right: 0.25rem; top: 50%;
  width: 0.7rem; height: 0.7rem;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-25%) rotate(225deg); }

.faq details p { padding-bottom: 1.4rem; color: var(--ink-soft); max-width: 60ch; }

@media (max-width: 860px) {
  .faq-grid { grid-template-columns: 1fr; }
}

/* ---------- Pagine interne ---------- */
.crumbs { font-size: var(--fs-small); color: var(--ink-soft); margin-bottom: 1.25rem; }
.crumbs a { color: var(--ink-soft); }

.prose-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(1.5rem, 1rem + 4vw, 5rem);
  align-items: start;
}
.prose { max-width: 62ch; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 1rem; }
.prose ul { margin: 1rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.5rem; }
.prose li::marker { color: var(--blue); }
.formula {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-left: 4px solid var(--sat);
  border-radius: 0 var(--r-small) var(--r-small) 0;
}
@media (max-width: 860px) {
  .prose-grid { grid-template-columns: 1fr; }
}

.footer-telegram { margin-top: 0.75rem; }
.footer-telegram a { color: var(--white); }

/* ---------- Strumenti ---------- */
.tool-hero { padding-block: clamp(3rem, 2rem + 3vw, 5rem) 2rem; }
.tool-hero h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.2rem); max-width: 20ch; }
.tool-body { padding-bottom: var(--section-y); }

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  align-items: start;
}
@media (max-width: 860px) {
  .tool-grid { grid-template-columns: 1fr; }
}

.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input {
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--ice);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  width: 100%;
}
.field input:focus { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
}

.field-more summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.field-more[open] summary { margin-bottom: 1rem; }
.field-more .field-row + .field { margin-top: 1rem; }

.form-error {
  color: #A3261B;
  font-weight: 600;
  background: #FDECEA;
  border-radius: var(--r-small);
  padding: 0.7rem 0.9rem;
}

.eng-result:focus { outline: none; }
.eng-empty { padding: 1.5rem 0; color: var(--ink-soft); max-width: 46ch; }
.eng-empty h2 { font-size: 1.25rem; color: var(--ink); margin-bottom: 0.75rem; }
.eng-empty p + p { margin-top: 0.75rem; }

.eng-big { font-family: var(--font-display); font-weight: 700; font-size: clamp(3.5rem, 2.5rem + 4vw, 5.5rem); line-height: 1; margin-top: 0.4rem; }

.eng-metrics {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem 1.5rem;
}
.eng-metrics li { border-top: 1px solid var(--ink); padding-top: 0.75rem; }
.metric-value.metric-small { font-size: 1.5rem; margin-top: 0.2rem; }

.eng-tips-title { font-size: 1.2rem; font-weight: 700; margin: 2.25rem 0 1rem; }

.eng-cta {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--r-panel);
  background: var(--ink);
  color: var(--white);
}
.eng-cta p { font-weight: 600; flex: 1 1 16rem; }
.eng-cta :focus-visible { outline-color: var(--sat); }

.metric-value { font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; line-height: 1.1; }
.metric-label { margin-top: 0.35rem; font-weight: 600; }
.metric-note { margin-top: 0.35rem; font-size: var(--fs-small); color: var(--ink-soft); max-width: 32ch; }

.verdict {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.15rem 0.7rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  font-weight: 600;
  border: 1.5px solid currentColor;
}
.verdict-sopra { color: var(--good); }
.verdict-media { color: var(--blue); }
.verdict-sotto { color: var(--warn); }

@media (max-width: 860px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .metrics { grid-template-columns: 1fr; }
}

.tips { margin: 0; padding: 0; list-style: none; display: grid; gap: 1rem; }
.tips li {
  background: var(--white);
  border-left: 4px solid var(--sat);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--r-small) var(--r-small) 0;
}
.tips strong { display: block; margin-bottom: 0.2rem; }
.tips span { color: var(--ink-soft); }


/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C9CDEB; padding-block: 4rem 2rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}

.logo-footer { color: var(--white); }
.footer-claim { margin-top: 0.75rem; max-width: 26ch; }

.footer-title { font-size: 1rem; font-weight: 500; color: var(--white); margin-bottom: 1rem; }

.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 0.25em; }
.site-footer :focus-visible { outline-color: var(--sat); }

.footer-legal {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--fs-small);
}
.footer-legal p:first-child { max-width: 46rem; }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

/* ---------- Correzioni generali (mobile e ancore) ---------- */
/* L'intestazione è fissa: le ancore (#prezzi, #domande…) non devono finirci sotto */
[id] { scroll-margin-top: 5.5rem; }

/* I radio nascosti restano dentro la loro etichetta (evita salti di scorrimento) */
.calc label { position: relative; }

/* Testi lunghi (link, nomi utente) non devono allargare la pagina */
.prose, .legal, .checkout { overflow-wrap: anywhere; }

/* ---------- Checkout ---------- */
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  align-items: start;
  padding-bottom: var(--section-y);
}

.order-summary {
  position: sticky;
  top: 5.5rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-panel);
  padding: clamp(1.25rem, 0.8rem + 1.5vw, 2rem);
}
.order-summary h2 { font-size: 1.2rem; color: var(--white); }
.order-lines { margin: 1.25rem 0 0; display: grid; gap: 0.7rem; }
.order-lines div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.14); padding-bottom: 0.7rem; }
.order-lines dt { color: #C9CDEB; }
.order-lines dd { margin: 0; font-weight: 600; text-align: right; }
.order-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 1.25rem; }
.order-total span { color: #C9CDEB; }
.order-total strong { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; }
.order-tax { margin-top: 0.4rem; text-align: right; font-size: var(--fs-small); color: #C9CDEB; }
.order-edit { display: inline-block; margin-top: 1.25rem; color: var(--white); font-size: var(--fs-small); font-weight: 600; }
.order-summary :focus-visible { outline-color: var(--sat); }

.checkout-form { display: grid; gap: 1.4rem; }
.checkout-form .calc-title { margin-bottom: -0.4rem; }
.field-hint { font-size: var(--fs-small); color: var(--ink-soft); }
.field input[aria-invalid="true"] { border-color: #A3261B; }

.consents { display: grid; gap: 0.9rem; border: 0; margin: 0; padding: 0; }
.consents legend { font-weight: 600; margin-bottom: 0.6rem; padding: 0; }
.calc .consent, .consent { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; font-size: 0.95rem; cursor: pointer; }
.consent input { width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; accent-color: var(--blue); }

.pay-note {
  font-size: var(--fs-small);
  color: var(--ink-soft);
  text-align: center;
}

.checkout-notice {
  padding: 1.25rem 1.5rem;
  border-radius: var(--r-small);
  border: 2px dashed #B88A00;
  background: #FFF8DE;
}
.checkout-notice h2 { font-size: 1.15rem; font-weight: 500; margin-bottom: 0.4rem; }

@media (max-width: 860px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .order-summary { position: static; order: -1; }
}

/* ---------- Pagine legali ---------- */
.legal { max-width: 46rem; padding-bottom: var(--section-y); }
.legal-meta { color: var(--ink-soft); font-size: var(--fs-small); margin-top: 1rem; }
.legal-draft {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--r-small);
  border: 2px dashed #B88A00;
  background: #FFF8DE;
  font-weight: 500;
}
.legal-toc { margin: 2rem 0 0; padding: 1.25rem 1.5rem 1.25rem 2.75rem; background: var(--white); border-radius: var(--r-small); border: 1px solid var(--line); display: grid; gap: 0.35rem; }
.legal h2 { font-size: 1.3rem; margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.legal h3 { margin-top: 1.5rem; }
.legal p, .legal ul, .legal ol { margin-top: 0.9rem; max-width: 70ch; }
.legal ul, .legal ol { padding-left: 1.3rem; display: grid; gap: 0.4rem; }
.legal table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--line); }
.legal thead th { border-bottom: 2px solid var(--ink); }

.contact-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.25rem; max-width: 40rem; }
.contact-list li { border-top: 1px solid var(--ink); padding-top: 1rem; }
.contact-list strong { display: block; }

.checkout-go { border-style: solid; border-color: var(--blue); background: var(--white); display: grid; gap: 0.75rem; }
.checkout-go strong { overflow-wrap: anywhere; }

/* ---------- Piani (modello B) ---------- */
.seg small { font-weight: 500; font-size: 0.8rem; opacity: 0.75; margin-left: 0.25rem; }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.plans span {
  display: grid;
  gap: 0.15rem;
  text-align: center;
  padding: 0.8rem 0.25rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
}
.plans strong { font-family: var(--font-display); font-weight: 500; font-size: 0.95rem; }
.plans em { font-style: normal; font-size: 0.9rem; color: var(--ink-soft); }
.plans label:hover span { border-color: var(--ink); }
.plans input:checked + span { border-color: var(--blue); background: var(--blue); color: var(--white); }
.plans input:checked + span em { color: var(--white); }

.sources {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
.sources li { border-top: 3px solid var(--ink); padding-top: 1.25rem; }
.sources h3 { margin-bottom: 0.5rem; font-weight: 700; }
.sources p { color: var(--ink-soft); }
@media (max-width: 860px) {
  .sources { grid-template-columns: 1fr; gap: 1.75rem; }
}

.plan-table {
  width: 100%;
  min-width: 34rem;
  margin-top: 2.5rem;
  border-collapse: separate;
  border-spacing: 0;
}
.plan-table th, .plan-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.plan-table thead th { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; border-bottom: 3px solid var(--ink); }
.plan-table thead small { display: block; font-family: var(--font-body); font-weight: 500; font-size: var(--fs-small); color: var(--ink-soft); margin-top: 0.2rem; }
.plan-table tbody th { font-weight: 500; color: var(--ink-soft); width: 28%; }
.plan-table td { font-weight: 600; }
.plan-table .is-us { background: var(--blue); color: var(--white); border-bottom-color: rgba(255, 255, 255, 0.18); }
.plan-table thead .is-us { border-radius: var(--r-small) var(--r-small) 0 0; border-bottom-color: var(--blue); }
.plan-table thead .is-us small { color: #DCDFF5; }
.plan-table tbody tr:last-child .is-us { border-radius: 0 0 var(--r-small) var(--r-small); }
.section-tint .plan-table td:not(.is-us) { background: transparent; }

.steps { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }

.field select {
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--ice);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  width: 100%;
}
.field select:focus { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field select[aria-invalid="true"] { border-color: #A3261B; }

/* Fascia "Nessun abbonamento" in homepage */
.no-sub { background: var(--sat); color: var(--ink); padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.no-sub-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 2rem 4rem; align-items: center; }
.no-sub h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); }
.no-sub p { margin-top: 0.75rem; font-size: 1.125rem; max-width: 38ch; }
.no-sub-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.no-sub-list li { border-top: 3px solid var(--ink); padding-top: 0.9rem; }
.no-sub-list strong { display: block; font-family: var(--font-display); font-weight: 500; margin-bottom: 0.3rem; }
.no-sub-list span { font-size: 0.95rem; }
.no-sub :focus-visible { outline-color: var(--ink); }
@media (max-width: 960px) {
  .no-sub-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .no-sub-list { grid-template-columns: 1fr; gap: 1rem; }
}

/* Riepilogo del calcolatore senza anello */
.calc-result { grid-template-columns: 1fr; }
