/* ============================================================
   Judgy — sito vetrina

   Direzione: "la scheda tecnica". La pagina misura, etichetta e
   quota, e dice anche cosa Judgy non fa. Niente ornamenti, niente
   scenografie disegnate in CSS: l'unico oggetto bordato e' quello che
   contiene una fotografia. Le illustrazioni di #workflow, che fotografie
   non sono, restano senza cornice.

   Due marcatori portano informazione, non decorano:
     arancio --judgy = piano Base      verde --pro = piano Pro
   Il verde compare solo dove si parla del Pro. Se lo si usa altrove,
   il lettore smette di poterlo leggere a colpo d'occhio.

   CHI CARICA QUESTO FOGLIO (prima di cancellare un selettore,
   guarda qui):
     - index.html                 il sito
     - terms.html, privacy.html, refund.html, cookies.html,
       legal.html, delete-account.html        blocco .legal-*
     - terms-2026-08-31.html      Termini CONGELATI: i loro byte
       sostengono un termsSha256 gia' scritto. Il file non si tocca,
       ma si disegna con questo foglio — .legal-*, .brand,
       .brand-logo e .skip-link devono sopravvivere.
     - cookie-consent.js          inietta .cookie-* su ognuna delle
       pagine sopra, e usa .button / .button-solid / .button-ghost
     - functions/src/gate.ts      la schermata password. "/styles.css"
       e' in GUEST_EXACT, quindi un visitatore senza cookie riceve
       QUESTO foglio; il suo <style> inline consuma --paper, --ink,
       --ink-soft, --rule, --judgy e --judgy-deep. Rinominarne uno
       scolora la lock screen senza far fallire alcun test.

   I woff2 di Caveat e IBM Plex Mono restano su disco anche se qui
   non sono piu' registrati: assets/fonts/menu-fonts.css li serve ai
   temi del menu ospite sotto alias "Menu ...".
   ============================================================ */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("assets/fonts/figtree-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;

  /* superfici */
  --paper: #fffcf7;
  --paper-sunk: #f7f1e6;
  --card: #ffffff;
  --card-edge: #eee5d4;

  /* inchiostro */
  --ink: #211d16;
  --ink-soft: #6e6659;
  --ink-faint: #8d8474;
  --cream: #f4efe2; /* testo sul fondo scuro del footer */

  /* filetti */
  --rule: #ddd3bf;
  --track-off: #e6dcc8; /* binario dell'interruttore cookie, spento */

  /* i due marcatori di piano */
  --judgy: #f15a24;
  --judgy-deep: #c53e0e;
  --judgy-tint: #faeee4;
  --pro: #1e4433;

  /* tipografia */
  --display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --t-xs: 0.79rem;
  --t-sm: 0.92rem;
  --t-lg: clamp(1.06rem, 0.99rem + 0.32vw, 1.2rem);
  --t-h3: clamp(1.14rem, 1.04rem + 0.45vw, 1.34rem);
  --t-h2: clamp(1.8rem, 1.36rem + 2vw, 2.6rem);
  --t-h1: clamp(2.3rem, 1.55rem + 3.4vw, 3.7rem);

  /* spazio */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --section-y: clamp(72px, 9vw, 136px);
  --gutter: clamp(20px, 5vw, 40px);

  /* misure */
  --max: 1120px;
  --max-text: 66ch;
  --header-h: 72px;
  --radius: 10px;
  --r-sm: 6px;
  --r-lg: 16px;

  /* elevazione — due sole, e la seconda solo per il menu a tendina */
  --shadow-1: 0 1px 2px rgba(46, 36, 20, 0.05);
  --shadow-2: 0 18px 44px rgba(46, 36, 20, 0.14);

  /* piani */
  --z-header: 100;
  --z-nav: 200;
  --z-skip: 300;
  --z-cookie: 900;

  /* moto */
  --dur-1: 160ms;
  --dur-2: 280ms;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- base ---------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* la pagina non scorre in orizzontale sui touch: `clip`, dove
     supportato, non crea un contenitore di scroll; `hidden` e' il ripiego */
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  overflow-x: hidden;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

h1,
h2,
h3,
p,
dl,
dd,
ul,
ol {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: var(--t-h1);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--t-h2);
  line-height: 1.06;
}

h3 {
  font-size: var(--t-h3);
  line-height: 1.24;
}

.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;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: var(--z-skip);
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-sm);
  font-weight: 600;
  transform: translateY(-64px);
  transition: transform var(--dur-1) var(--ease);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
  padding: 0 var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--card-edge);
  transition: box-shadow var(--dur-2) var(--ease);
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(46, 36, 20, 0.09);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
}

.brand-logo {
  display: block;
  width: 104px;
  height: auto;
  overflow: visible;
}

.brand-logo .logo-orange {
  fill: var(--judgy);
}

.brand-logo .logo-black {
  fill: var(--ink);
}

.site-nav {
  justify-self: center;
  display: flex;
  gap: clamp(6px, 1.6vw, 22px);
}

.site-nav a {
  padding: 6px 4px;
  color: var(--ink-soft);
  font-size: var(--t-sm);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--judgy);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 180ms var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:last-of-type {
  transform: translateY(-3.5px) rotate(-45deg);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-family: var(--body);
  font-size: var(--t-sm);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease),
    color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}

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

.button-solid {
  background: var(--judgy);
  color: var(--ink);
}

.button-solid:hover,
.button-solid:focus-visible {
  background: #ff7a44;
}

.button-ghost {
  border-color: var(--rule);
  color: var(--ink);
  background: transparent;
}

.button-ghost:hover,
.button-ghost:focus-visible {
  border-color: var(--ink);
}

.button-quiet {
  padding: 0 2px;
  min-height: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 700;
  border: 0;
  border-bottom: 2px solid var(--rule);
  border-radius: 0;
}

.button-quiet:hover,
.button-quiet:focus-visible {
  border-bottom-color: var(--judgy);
}

.button-large {
  min-height: 50px;
  padding: 0 24px;
  font-size: 1rem;
}

/* ---------- impalcatura delle sezioni ---------- */

.section-shell {
  width: min(calc(100% - (var(--gutter) * 2)), var(--max));
  margin: 0 auto;
}

main > section {
  padding-block: var(--section-y);
}

main > section + section {
  border-top: 1px solid var(--card-edge);
}

section[id] {
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.section-heading {
  max-width: var(--max-text);
  margin-bottom: clamp(36px, 5vw, 60px);
}

.section-sub {
  margin-top: var(--s-4);
  color: var(--ink-soft);
  font-size: var(--t-lg);
}

/* Nota di servizio: piccola, grigia, mai in grassetto. E' il posto in
   cui la pagina dichiara i limiti di cio' che ha appena mostrato. */
.fine {
  margin-top: var(--s-4);
  max-width: var(--max-text);
  color: var(--ink-faint);
  font-size: var(--t-xs);
  line-height: 1.5;
}

.fine a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

/* Il titolo attraversa tutte e due le colonne: e' una frase lunga, e stretto
   in mezza pagina si spezzava in cinque righe da tre parole. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(32px, 5vw, 64px);
  row-gap: clamp(28px, 4vw, 48px);
  align-items: start;
  padding-block: clamp(48px, 7vw, 92px) var(--section-y);
}

.hero > h1 {
  grid-column: 1 / -1;
  max-width: 24ch;
}

/* Figlio di griglia: senza min-width:0 una parola lunga (un indirizzo, il nome
   di un piatto) allarga la colonna oltre la sua frazione e sfonda il layout. */
.hero-copy {
  min-width: 0;
}

.hero-lede {
  max-width: 44ch;
  color: var(--ink-soft);
  font-size: var(--t-lg);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-5);
  margin-top: var(--s-6);
}

.hero-terms {
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--card-edge);
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: var(--t-sm);
}

.hero-terms b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hero-shot {
  margin: 0;
}

.hero-shot img {
  width: 100%;
  border: 1px solid var(--card-edge);
  border-radius: var(--r-lg);
}

.hero-shot figcaption {
  margin-top: var(--s-3);
  color: var(--ink-faint);
  font-size: var(--t-xs);
}

/* I due marcatori di piano, dichiarati in un posto solo: arancio = Base,
   verde = Pro. Li consumano le colonne di #features e le celle di #workflow.
   Se un giorno il verde cambia, cambia in tutte e due insieme — ed e'
   l'unica cosa che le due sezioni hanno in comune. */

[data-plan="base"] {
  --marker: var(--judgy);
}

[data-plan="pro"] {
  --marker: var(--pro);
}

/* ---------- i due piani, affiancati ---------- */

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.plan {
  padding-block: var(--s-6) var(--s-2);
  border-top: 3px solid var(--marker, var(--rule));
}

.plan[data-plan="base"] {
  padding-right: clamp(24px, 4vw, 56px);
}

.plan[data-plan="pro"] {
  padding-left: clamp(24px, 4vw, 56px);
  border-left: 1px solid var(--card-edge);
}

.plan-kind {
  color: var(--marker);
  font-size: var(--t-sm);
  font-weight: 700;
}

.plan-name {
  margin-top: var(--s-1);
}

.plan-price {
  margin-top: var(--s-5);
  color: var(--ink-soft);
  font-size: var(--t-sm);
}

.plan-amount {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.9rem, 1.45rem + 1.9vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.plan-gist {
  margin-top: var(--s-5);
  color: var(--ink-soft);
}

.plan-list {
  list-style: none;
  margin-top: var(--s-6);
  padding: 0;
}

.plan-list li {
  padding-block: var(--s-3);
  border-top: 1px solid var(--card-edge);
}

.plan-list li:first-child {
  border-top: 0;
}

.plan-list b {
  display: block;
  font-weight: 600;
}

.plan-list span {
  display: block;
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: var(--t-sm);
}

/* L'unica superficie incassata della pagina: il posto in cui ogni
   colonna dichiara il proprio limite. */
.plan-limit {
  margin-top: var(--s-6);
  padding: var(--s-4) var(--s-5);
  background: var(--paper-sunk);
  border-radius: var(--r-sm);
  color: var(--ink-soft);
  font-size: var(--t-sm);
}

.plan-limit b {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- come funziona: lo stesso tavolo, due volte ----------

   Non e' la tabella dei piani ribaltata. #features confronta CIO' CHE SI
   COMPRA in due colonne divise da un filetto verticale; qui si confronta
   COME VA IL SERVIZIO, e i filetti girano di 90 gradi: separano i momenti,
   non i piani. Dentro un momento le due celle non hanno filetto in mezzo,
   perche' sono la stessa scena disegnata due volte.

   Il marcatore e' quello dei piani, riusato tale e quale: filetto da 3px in
   cima ed etichetta nel suo colore. Nessun terzo schema da imparare. */

.moments {
  list-style: none;
  padding: 0;
}

.moment + .moment {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--card-edge);
}

.moment-head {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  margin-bottom: clamp(22px, 3vw, 34px);
}

.moment-head h3 {
  min-width: 0;
}

.moment-n {
  flex: none;
  color: var(--ink-faint);
  font-family: var(--display);
  font-size: var(--t-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.moment-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

/* Anatomia identica a quella di una colonna di #features, rimpicciolita:
   filetto marcatore, etichetta del piano, contenuto. */
.moment-side {
  min-width: 0;
  margin: 0;
  padding-top: var(--s-4);
  border-top: 3px solid var(--marker, var(--rule));
}

.moment-plan {
  margin-bottom: var(--s-3);
  color: var(--marker, var(--ink-soft));
  font-size: var(--t-sm);
  font-weight: 700;
}

/* Queste non sono fotografie ma illustrazioni stampate nell'inchiostro del
   piano: niente cornice. Il fondo carta piu' scuro le tiene insieme se un
   file esce di un'ombra diverso dagli altri. */
.moment-side img {
  width: 100%;
  background: var(--paper-sunk);
  border-radius: var(--radius);
}

.moment-side figcaption {
  margin-top: var(--s-4);
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: var(--t-sm);
}

/* La nota di servizio chiude l'elenco, non l'ultima didascalia: da vicino
   i 16px standard la incollavano alla riga sopra. */
.moments + .fine {
  margin-top: clamp(28px, 4vw, 40px);
}

/* ---------- supporti fisici ---------- */

.carriers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.carrier {
  padding: clamp(20px, 2.6vw, 30px);
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}

/* Stessa proporzione nelle due card, cosi' i titoli sotto si allineano anche
   se una foto e' dentro la cornice quotata e l'altra no. */
.carrier img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.carrier h3 {
  margin-top: var(--s-5);
}

.carrier p {
  margin-top: var(--s-3);
  color: var(--ink-soft);
}

.carrier-specs {
  margin-top: var(--s-5);
  font-size: var(--t-sm);
}

.carrier-specs div {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  padding-block: var(--s-2);
  border-top: 1px solid var(--card-edge);
}

.carrier-specs dt {
  color: var(--ink-soft);
}

.carrier-specs dd {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Lo spazio per le quote e' riservato in ENTRAMBE le card, anche in quella
   dell'adesivo che quote non ne ha: e' l'unico modo perche' le due immagini
   restino della stessa misura e i titoli sotto si allineino. */
.carrier-media {
  margin: 0;
  padding-right: 46px;
  padding-bottom: 38px;
}

/* Il disegno quotato. Le quote misurano la CORNICE, non i pixel
   dell'oggetto: restano vere qualunque foto ci si metta dentro, e
   restano nitide perche' sono testo, non pittura. */
.spec-frame {
  position: relative;
}

.dim {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.dim b {
  position: relative;
  padding: 0 6px;
  background: var(--card);
  font-weight: 600;
}

.dim i {
  position: absolute;
  background: var(--rule);
}

.dim i::before,
.dim i::after {
  content: "";
  position: absolute;
  background: var(--rule);
}

/* larghezza — sotto l'immagine */
.dim-w {
  left: 0;
  right: 46px;
  bottom: 10px;
  height: 12px;
}

.dim-w i {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
}

.dim-w i::before,
.dim-w i::after {
  top: -5px;
  width: 1px;
  height: 11px;
}

.dim-w i::before {
  left: 0;
}

.dim-w i::after {
  right: 0;
}

/* altezza — a destra dell'immagine */
.dim-h {
  top: 0;
  bottom: 38px;
  right: 16px;
  width: 12px;
}

.dim-h i {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.dim-h i::before,
.dim-h i::after {
  left: -5px;
  width: 11px;
  height: 1px;
}

.dim-h i::before {
  top: 0;
}

.dim-h i::after {
  bottom: 0;
}

.dim-h b {
  writing-mode: vertical-rl;
  padding: 6px 0;
}

/* spessore — richiamo con pallino e linea di riferimento */
.dim-t {
  top: 13%;
  left: clamp(10px, 4%, 30px);
  justify-content: flex-start;
}

.dim-t i {
  position: static;
  display: block;
  flex: none;
  width: 30px;
  height: 1px;
}

.dim-t i::before {
  left: 0;
  top: -2.5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Immagini di supporto, non protagoniste: a piena larghezza la loro grande
   area vuota mangiava mezzo schermo. Stessa proporzione forzata, perche' una
   arriva in 16:9 e l'altra in 4:3. L'hero mostra l'espositore in una sala
   vera; qui tocca all'adesivo, cosi' entrambi i supporti si vedono in uso. */
.carriers-extra {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 36px);
  margin-top: clamp(28px, 4vw, 44px);
}

.carriers-extra figure {
  margin: 0;
}

.carriers-extra img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--card-edge);
  border-radius: var(--r-lg);
}

.carriers-extra figcaption {
  margin-top: var(--s-3);
  color: var(--ink-faint);
  font-size: var(--t-xs);
}

/* ---------- prezzi ---------- */

.price-rows {
  max-width: 760px;
  border-top: 1px solid var(--rule);
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-5);
  padding-block: var(--s-5);
  border-bottom: 1px solid var(--card-edge);
}

.price-what b {
  display: block;
  font-weight: 600;
}

.price-what span {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: var(--t-sm);
}

.price-amount {
  flex: none;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.45rem, 1.2rem + 1.1vw, 1.95rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-align: right;
}

.price-amount small {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: var(--t-sm);
  font-weight: 400;
  letter-spacing: 0;
}

/* Gli accessori non hanno un prezzo di listino: la riga lo dice con
   le parole, non con una cifra inventata. */
.price-amount.is-quote {
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0;
  white-space: normal;
}

/* Come si compra davvero. E' la sezione che rende il sito una scheda
   tecnica invece di una brochure: dice anche cosa non c'e'. */
.how-buy {
  list-style: none;
  margin-top: clamp(40px, 5vw, 64px);
  padding: 0;
  display: grid;
  gap: var(--s-4);
  max-width: var(--max-text);
}

.how-buy li {
  position: relative;
  padding-left: var(--s-5);
  color: var(--ink-soft);
}

.how-buy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 9px;
  height: 1px;
  background: var(--judgy);
}

.how-buy b {
  color: var(--ink);
  font-weight: 600;
}

.price-cta {
  margin-top: clamp(36px, 4vw, 52px);
}

/* ---------- domande ---------- */

.faq-list {
  border-top: 1px solid var(--rule);
}

.faq-item {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(12px, 3vw, 48px);
  padding-block: clamp(22px, 3vw, 32px);
  border-bottom: 1px solid var(--card-edge);
}

.faq-item p {
  color: var(--ink-soft);
}

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

.site-footer {
  padding: clamp(56px, 8vw, 88px) 0 30px;
  background: var(--ink);
  color: var(--cream);
}

.footer-shell {
  width: min(calc(100% - (var(--gutter) * 2)), var(--max));
  margin: 0 auto;
}

.footer-brand {
  display: grid;
  gap: var(--s-3);
  max-width: 46ch;
  margin-bottom: var(--s-6);
}

.footer-brand .brand-logo {
  width: 116px;
}

.site-footer .brand-logo .logo-black {
  fill: var(--cream);
}

.footer-brand p {
  color: rgba(244, 239, 226, 0.66);
  font-size: var(--t-sm);
}

.footer-contact a {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
  color: var(--judgy);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 26px 0 32px;
  border-top: 1px solid rgba(244, 239, 226, 0.16);
  border-bottom: 1px solid rgba(244, 239, 226, 0.16);
  font-size: 0.9rem;
}

.legal-links a {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-links a:hover,
.legal-links a:focus-visible {
  color: var(--judgy);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 22px;
  color: rgba(244, 239, 226, 0.6);
  font-size: 0.88rem;
}

/* ---------- adattamento ---------- */

@media (max-width: 1020px) {
  .site-header {
    grid-template-columns: auto 1fr auto auto;
  }

  .nav-toggle {
    display: flex;
    order: 3;
  }

  .header-actions {
    order: 2;
    justify-self: end;
  }

  .site-nav {
    position: absolute;
    top: calc(var(--header-h) + 8px);
    left: 16px;
    right: 16px;
    z-index: var(--z-nav);
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    background: var(--card);
    border: 1px solid var(--card-edge);
    border-radius: var(--radius);
    box-shadow: var(--shadow-2);
  }

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

  .site-nav a {
    padding: 12px 10px;
    border-bottom: 0;
    border-radius: var(--r-sm);
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    background: var(--judgy-tint);
  }

  .hero {
    grid-template-columns: 1fr;
  }

  /* In colonna unica l'ordine diventa titolo, fotografia, testo: la foto
     spiega di che oggetto si parla prima che il testo lo descriva. */
  .hero > h1 {
    order: -2;
    max-width: none;
  }

  .hero-shot {
    order: -1;
  }
}

@media (max-width: 780px) {
  body {
    font-size: 16px;
  }

  /* I piani smettono di essere due colonne e diventano due blocchi:
     il filetto verticale sparisce, il marcatore in cima resta. */
  .plans,
  .moment-pair,
  .carriers,
  .carriers-extra,
  .faq-item {
    grid-template-columns: 1fr;
  }

  /* Impilate, le due celle di un momento hanno bisogno della stessa aria
     che si danno i due piani qui sotto. */
  .moment-pair {
    row-gap: var(--s-6);
  }

  /* In colonna unica i due marcatori da 3px diventano larghi quanto la
     pagina e prendono il sopravvento sul filetto che divide i momenti: la
     gerarchia si rovescia. Qui il divisorio si scurisce per restare quello
     che separa di piu'. */
  .moment + .moment {
    border-top-color: var(--rule);
  }

  .plan[data-plan="base"] {
    padding-right: 0;
    padding-bottom: var(--s-6);
  }

  .plan[data-plan="pro"] {
    padding-left: 0;
    border-left: 0;
    margin-top: var(--s-6);
  }

  .faq-item {
    gap: var(--s-2);
  }
}

@media (max-width: 430px) {
  .hero-actions {
    gap: var(--s-4);
  }

  /* Solo il bottone pieno si allarga: .button-quiet e' un link sottolineato,
     e a tutta larghezza sembrerebbe un secondo bottone. */
  .hero-actions .button-solid {
    width: 100%;
  }

  .hero-actions .button-quiet {
    align-self: start;
  }

  .price-row {
    flex-direction: column;
    gap: var(--s-3);
  }

  .price-amount {
    text-align: left;
  }
}

/* ---------- moto ridotto ---------- */

@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;
  }
}

/* ---------- legal pages (terms, privacy, cookies, legal notice) ---------- */

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-h);
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  border-bottom: 1px solid var(--card-edge);
}

.legal-home-link {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 600;
}

.legal-home-link:hover,
.legal-home-link:focus-visible {
  color: var(--judgy-deep);
}

.legal-page {
  width: min(calc(100% - 40px), 840px);
  margin: 0 auto;
  padding: clamp(34px, 6vw, 60px) 0 clamp(70px, 9vw, 110px);
}

.legal-page h1 {
  font-size: clamp(2.1rem, 4.6vw, 3rem);
  margin-bottom: 12px;
}

.legal-updated {
  margin-bottom: 36px;
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 0.88rem;
}

.legal-page h2 {
  margin: 46px 0 12px;
  font-size: clamp(1.3rem, 2.4vw, 1.55rem);
  line-height: 1.18;
}

.legal-page h3 {
  margin: 28px 0 8px;
}

.legal-page p {
  margin: 0 0 14px;
  font-size: 0.98rem;
}

.legal-page ul,
.legal-page ol {
  margin: 0 0 16px;
  padding-left: 24px;
  display: grid;
  gap: 8px;
  font-size: 0.98rem;
}

.legal-page a {
  color: var(--judgy-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-page a:hover,
.legal-page a:focus-visible {
  color: var(--judgy);
}

.legal-notice-box {
  margin: 18px 0 22px;
  padding: 18px 20px;
  background: var(--judgy-tint);
  border: 1px solid var(--card-edge);
  border-left: 4px solid var(--judgy);
  border-radius: var(--radius);
}

.legal-notice-box p {
  margin: 0;
  font-weight: 600;
}

.legal-table-wrap {
  margin: 0 0 16px;
  overflow-x: auto;
}

.legal-page table {
  width: 100%;
  min-width: 620px;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-collapse: collapse;
  font-size: 0.92rem;
}

.legal-page th,
.legal-page td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--card-edge);
  text-align: left;
  vertical-align: top;
}

.legal-page th {
  background: var(--paper-sunk);
  font-weight: 700;
}

.legal-page address {
  margin: 0 0 14px;
  font-style: normal;
  font-size: 0.98rem;
}

.legal-footer {
  border-top: 1px solid var(--rule);
  padding: 24px 0 34px;
}

.legal-footer-shell {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.legal-footer a {
  color: var(--ink);
  font-weight: 600;
}

.legal-footer a:hover,
.legal-footer a:focus-visible {
  color: var(--judgy-deep);
}

@media (max-width: 720px) {
  .legal-footer-shell {
    flex-direction: column;
  }
}

/* ============================================================
   Cookie consent banner (markup injected by cookie-consent.js)
   — a little comment card pinned to the corner of the table.
   ============================================================ */

.cookie-banner {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: var(--z-cookie);
  width: min(430px, calc(100vw - 40px));
}

/* the .button display rules would otherwise defeat the hidden attribute */
.cookie-banner [hidden] {
  display: none !important;
}

.cookie-card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  box-shadow: 0 20px 48px rgba(33, 29, 22, 0.24);
  overflow: hidden;
  outline: none;
  animation: cookie-rise 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cookie-card::before {
  /* awning stripe in brand orange */
  content: "";
  display: block;
  height: 7px;
  background: repeating-linear-gradient(
    -45deg,
    var(--judgy) 0 12px,
    var(--judgy-tint) 12px 24px
  );
}

@keyframes cookie-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-card {
    animation: none;
  }
}

.cookie-body {
  padding: 18px 20px 20px;
}

.cookie-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.cookie-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cookie-close {
  flex: none;
  margin-right: -6px;
  border: 0;
  background: none;
  padding: 2px 6px;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}

.cookie-close:hover,
.cookie-close:focus-visible {
  color: var(--judgy-deep);
}

.cookie-text {
  margin: 8px 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.cookie-text a {
  color: var(--judgy-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-prefs {
  margin-top: 14px;
  border-top: 1px dashed var(--rule);
  padding-top: 4px;
}

.cookie-groups {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cookie-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
}

.cookie-group + .cookie-group {
  border-top: 1px dashed var(--rule);
}

.cookie-group-copy {
  display: grid;
  gap: 2px;
}

.cookie-group-name {
  font-weight: 700;
  font-size: 0.92rem;
}

.cookie-group-desc {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.cookie-always-on {
  flex: none;
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--judgy-deep);
  background: var(--judgy-tint);
  border-radius: 999px;
  padding: 4px 10px;
}

.cookie-switch {
  position: relative;
  flex: none;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.cookie-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.cookie-slider {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--track-off);
  border-radius: 999px;
  transition: background 160ms ease;
}

.cookie-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--card);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(33, 29, 22, 0.3);
  transition: transform 160ms ease;
}

.cookie-switch input:checked + .cookie-slider {
  background: var(--judgy);
}

.cookie-switch input:checked + .cookie-slider::after {
  transform: translateX(20px);
}

.cookie-switch input:focus-visible + .cookie-slider {
  outline: 2px solid var(--judgy);
  outline-offset: 2px;
}

.cookie-note {
  margin: 10px 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.cookie-actions .button {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.9rem;
}

.cookie-customize {
  margin-left: auto;
  border: 0;
  background: none;
  padding: 4px 0;
  font-family: var(--body);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cookie-customize:hover,
.cookie-customize:focus-visible {
  color: var(--judgy-deep);
}

/* footer "Cookie Preferences" trigger, styled like its sibling links */
.cookie-prefs-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.cookie-prefs-link:hover,
.cookie-prefs-link:focus-visible {
  color: var(--judgy-deep);
}

.legal-links .cookie-prefs-link {
  text-align: left;
  color: var(--cream);
  font-size: inherit;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-links .cookie-prefs-link:hover,
.legal-links .cookie-prefs-link:focus-visible {
  color: var(--judgy);
}

@media (max-width: 560px) {
  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }

  .cookie-actions .button {
    flex: 1 1 auto;
  }
}
