/* Palette e tipografia riprese dal tema di www.tenderbrain.it (dist/app.css):
   teal 69 141 154, teal scuro 48 121 134, navy 30 58 64, fondi 244 250 251 / 228 245 248,
   Josefin Sans, bottoni maiuscoli con raggio 8px. */
:root {
  --teal: #458d9a;
  --teal-scuro: #307986;
  --teal-chiaro: #6eb3c0;
  --teal-pallido: #afd9e1;
  --navy: #1e3a40;
  --fondo: #f4fafb;
  --fondo-2: #e4f5f8;
  --carta: #ffffff;
  --quasi-bianco: #fbfdfe;
  --linea: #d8d9e0;
  --linea-tenue: #eff0f3;
  --tenue: #80828d;
  --arancio: #fd4d21;
  --ok: #1f8a5a;
  --ok-fondo: #e3f5ec;
  --male: #c0392b;
  --male-fondo: #fdecea;
  --attesa: #8a6d00;
  --ombra: 0 4px 12px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --raggio: 8px;
  --contenuto: 960px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Josefin Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--navy);
  background: var(--fondo);
}
a { color: var(--teal-scuro); }
a:hover { color: var(--navy); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 700; margin: 0; }
[hidden] { display: none !important; }
.solo-largo { display: none; }

/* --- fascia ambiente --------------------------------------------------- */
.ambiente {
  background: var(--arancio); color: #fff; text-align: center;
  font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; padding: .3rem .625rem;
}

/* --- header ------------------------------------------------------------ */
.header {
  position: relative; z-index: 10;
  background: var(--carta);
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.header__inner {
  max-width: 1200px; margin: 0 auto; height: 5.625rem; padding: 0 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.header__logo img { width: 11.5rem; height: auto; }
.header__nav { display: flex; align-items: center; gap: 1.5rem; }
.header__nav a { text-decoration: none; color: var(--navy); font-weight: 600; }
.header__nav a:not(.button):hover { color: var(--teal); }
.header__nav a:not(.button) { display: none; }

/* --- cover / hero ------------------------------------------------------ */
.cover {
  position: relative; overflow: hidden;
  background: linear-gradient(to bottom, var(--teal), var(--navy));
  color: #fff; text-align: center;
  padding: 3rem 1rem 6.5rem;
}
.cover__bg { position: absolute; top: 50%; transform: translateY(-50%); opacity: .55; pointer-events: none; }
.cover__bg-left { left: 0; height: 420px; margin-left: -8rem; }
.cover__bg-right { right: 0; height: 460px; margin-right: -8rem; }
.cover__content { position: relative; max-width: 760px; margin: 0 auto; }
.cover__kicker {
  margin: 0 0 .75rem; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--teal-pallido);
}
.cover h1 { font-size: 2rem; line-height: 1.2; }
.cover__sub { margin: 1.25rem 0 0; font-size: 1.05rem; opacity: .92; }

/* --- struttura --------------------------------------------------------- */
.main {
  max-width: var(--contenuto); margin: -4rem auto 4rem; padding: 0 1rem;
  position: relative; z-index: 2;
}

/* passi */
.passi {
  list-style: none; margin: 0 0 1.25rem; padding: .9rem 1rem;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem .5rem;
  background: var(--carta); border-radius: var(--raggio); box-shadow: var(--ombra);
}
.passi__item { display: flex; align-items: center; gap: .55rem; color: var(--tenue); font-size: .85rem; min-width: 0; }
.passi__n {
  flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--linea-tenue); color: var(--tenue); font-weight: 700; font-size: .85rem; padding-top: .1em;
}
.passi__t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.passi__item.attivo { color: var(--navy); font-weight: 600; }
.passi__item.attivo .passi__n { background: var(--teal); color: #fff; }
.passi__item.fatto .passi__n { background: var(--ok-fondo); color: var(--ok); }
.passi__item.fatto .passi__n { font-size: 0; }
.passi__item.fatto .passi__n::before { content: "✓"; font-size: .85rem; }

/* scheda */
.scheda {
  background: var(--carta); border-radius: var(--raggio); box-shadow: var(--ombra);
  padding: 1.75rem 1.25rem 2rem;
}
.scheda__titolo { font-size: 1.5rem; color: var(--teal-scuro); line-height: 1.2; }
.scheda__titolo--spazio { margin-top: 2.25rem; }
.scheda__intro { margin: .6rem 0 1.25rem; color: #3f5a60; }
.scheda--ok { border-top: 6px solid var(--ok); text-align: center; }
.scheda--ok .riepilogo { justify-content: center; }
.scheda--male { border-top: 6px solid var(--male); }
.spunta {
  width: 4rem; height: 4rem; margin: 0 auto 1rem; border-radius: 50%;
  background: var(--ok-fondo); color: var(--ok); font-size: 2rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* piani */
.piani { display: grid; grid-template-columns: 1fr; gap: .9rem; }
.piani__stato { margin: 0; color: var(--tenue); }
.piano {
  position: relative; display: block; cursor: pointer;
  border: 2px solid var(--linea); border-radius: var(--raggio);
  padding: 1.1rem 1.1rem 1.1rem 3rem; background: var(--quasi-bianco);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.piano:hover { border-color: var(--teal-chiaro); }
.piano input { position: absolute; left: 1.1rem; top: 1.35rem; width: 1.15rem; height: 1.15rem; accent-color: var(--teal); margin: 0; }
.piano:has(input:checked) { border-color: var(--teal); background: var(--fondo-2); box-shadow: 0 0 0 3px rgba(69,141,154,.18); }
.piano:has(input:focus-visible) { outline: 2px solid var(--navy); outline-offset: 2px; }
.piano__nome { font-weight: 700; font-size: 1.15rem; color: var(--navy); text-transform: uppercase; letter-spacing: .04em; }
.piano__prezzo { margin-top: .25rem; font-size: 1.6rem; font-weight: 700; color: var(--teal-scuro); line-height: 1.1; }
.piano__prezzo small { font-size: .85rem; font-weight: 400; color: var(--tenue); }
.piano__credito { margin-top: .5rem; font-size: .9rem; color: #3f5a60; }
.piano__credito strong { color: var(--navy); }

/* form */
.campo { margin-top: 1.1rem; }
.campo--stretto { max-width: 16rem; }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.campo__hint { display: block; font-weight: 400; font-size: .82rem; color: var(--tenue); margin-top: .1rem; }
input:not([type=radio]) {
  width: 100%; height: 3.25rem; padding: .3rem .9rem 0; font: inherit; color: var(--navy);
  border: 1px solid var(--linea); border-radius: var(--raggio); background: #fff;
}
input:not([type=radio]):focus { outline: 2px solid var(--teal); outline-offset: -1px; border-color: transparent; }
input.non-valido { border-color: var(--male); }
input.codice { letter-spacing: .4em; font-size: 1.4rem; text-align: center; padding-left: .4em; }
.riga { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
.legale { font-size: .85rem; color: var(--tenue); margin: 1.25rem 0 0; }
.nota { font-size: .9rem; color: var(--tenue); margin: 1.25rem 0 0; }
.azioni { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* bottoni (come .button del sito: h 3.75rem, maiuscolo, raggio 8) */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 3.75rem; padding: .2rem 1.5rem 0; border: 0; border-radius: var(--raggio);
  background: var(--teal); color: var(--quasi-bianco);
  font: inherit; font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: background .15s, color .15s;
}
.button:hover { background: var(--navy); color: #fff; }
.button:disabled, .button[aria-disabled="true"] { opacity: .5; cursor: default; pointer-events: none; }
.button--light { background: var(--fondo); color: var(--teal); }
.button--light:hover { background: var(--fondo-2); color: var(--navy); }
.header__cta { height: 3rem; padding: .15rem 1.25rem 0; font-size: .9rem; }

/* esiti */
.esito { margin-top: .6rem; font-size: .92rem; min-height: 1.2em; }
.esito:empty { display: none; }
.esito.ok { color: var(--ok); }
.esito.male { color: var(--male); background: var(--male-fondo); padding: .6rem .9rem; border-radius: var(--raggio); }
.esito.attesa { color: var(--attesa); }
.esito.attesa::before {
  content: ""; display: inline-block; width: .8em; height: .8em; margin-right: .5em; vertical-align: -.1em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: gira 1s linear infinite;
}
@keyframes gira { to { transform: rotate(360deg); } }

/* riepilogo */
.riepilogo {
  display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0 0 .5rem;
  padding: 1rem 1.1rem; background: var(--fondo); border-radius: var(--raggio); font-size: .98rem;
}
.riepilogo dt { color: var(--tenue); }
.riepilogo dd { margin: 0; font-weight: 600; word-break: break-word; }

/* --- footer ------------------------------------------------------------ */
.footer { background: var(--navy); color: #fff; padding: 2.5rem 1rem; }
.footer__inner { max-width: 1200px; margin: 0 auto; display: grid; gap: 1.25rem; text-align: center; justify-items: center; }
.footer__logo { width: 14rem; }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.25rem; font-size: .9rem; }
.footer__nav a { color: #fff; text-decoration: none; }
.footer__nav a:hover { text-decoration: underline; color: #fff; }
.footer__copy { margin: 0; font-size: .85rem; opacity: .8; }

/* --- desktop ----------------------------------------------------------- */
@media (min-width: 720px) {
  .solo-largo { display: inline; }
  .header__inner { height: 7.5rem; }
  .header__logo img { width: 16rem; }
  .header__nav a:not(.button) { display: inline; }
  .cover { padding: 4.5rem 1rem 8rem; }
  .cover h1 { font-size: 3rem; line-height: 1.15; }
  .cover__bg-left { height: 650px; margin-left: -1.25rem; }
  .cover__bg-right { height: 700px; margin-right: -1.25rem; }
  .main { margin-top: -5rem; }
  .scheda { padding: 2.5rem 2.5rem 2.75rem; }
  .scheda__titolo { font-size: 1.85rem; }
  .passi { padding: 1.1rem 1.5rem; grid-template-columns: repeat(4, 1fr); }
  .passi__item { font-size: .95rem; }
  .piani { grid-template-columns: repeat(3, 1fr); }
  .piano { padding: 1.25rem 1.25rem 1.25rem 3.1rem; }
  .riga { grid-template-columns: 1fr 1fr; }
  .footer__inner { grid-template-columns: auto 1fr; align-items: center; text-align: left; justify-items: start; }
  .footer__nav { justify-content: flex-end; justify-self: end; }
  .footer__copy { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .esito.attesa::before { animation: none; }
}
