/* The Dinner Stranger: foglio di stile unico del sito (revisione Layout 2026-11-25).
   Identità allineata all'app dopo il refactoring 2026-11-20 (src/theme/tokens.ts):
   rosso Cherry #E9143A su grigi freddi, mai bianco puro come fondo. Tema scuro predefinito
   (continuità con il sito precedente e con le schermate dell'app in tema scuro), tema chiaro
   automatico con prefers-color-scheme: light. Font di sistema: nessun font esterno.
   Indice: 1 token · 2 base · 3 header e menu · 4 hero e form · 5 sezioni della home ·
   6 pagine interne e documenti · 7 schermate in cornice · 8 lista d'attesa, footer, cookie,
   report · 9 movimento ridotto e stampa. */

/* ═══ 1. TOKEN ═══ */
:root {
  color-scheme: dark light;

  /* colori per ruolo (tema scuro dell'app) */
  --bg:            #1C1C1F;
  --bg-glow:       rgba(233, 20, 58, .16);
  --surface:       #2A2A2E;
  --surface-2:     #232326;
  --border:        #3A3A40;
  --control-border:#8E8E96;
  --text:          #F2F2F4;
  --text-2:        #B4B4BA;
  --accent:        #F87D95;
  --primary:       #E9143A;
  --primary-hover: #C8102E;
  --on-primary:    #FFFFFF;
  --selection:     #4A1622;
  --on-selection:  #F8C3CF;
  --warning:       #FCD34D;
  --warning-bg:    #422006;
  --success:       #86EFAC;
  --header-bg:     rgba(28, 28, 31, .9);
  --overlay:       rgba(0, 0, 0, .6);
  --shadow:        0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.28);
  --shadow-lg:     0 2px 6px rgba(0,0,0,.35), 0 24px 60px rgba(0,0,0,.45);
  --candle-body:   #E7E7EA;
  --candle-core:   #F8C3CF;
  --ember:         #F65A78;

  /* telefono (le schermate sono in tema scuro in entrambi i temi del sito) */
  --phone-bezel:   #0B0B0C;
  --phone-edge:    #4A4A50;
  --phone-screen:  #1C1C1F;
  --phone-text:    #B4B4BA;
  --phone-bar:     #2A2A2E;

  /* tipografia */
  --font-sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", "Noto Serif", serif;
  --fs-xs:   .8125rem;   /* 13: minimo per le informazioni, come nell'app */
  --fs-sm:   .875rem;    /* 14 */
  --fs-md:   1rem;       /* 16 */
  --fs-lg:   1.0625rem;  /* 17 */
  --fs-xl:   1.25rem;    /* 20 */
  --fs-h3:   1.1875rem;  /* 19 */
  --fs-h2:   clamp(1.625rem, 1.2rem + 1.9vw, 2.375rem);
  --fs-h1:   clamp(2rem, 1.35rem + 3vw, 3.25rem);
  --lh-tight: 1.15;
  --lh-body:  1.65;

  /* spazi, raggi, misure */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-7: 32px; --s-8: 40px; --s-9: 56px; --s-10: 80px;
  --r-sm: 8px; --r-md: 12px; --r-card: 14px; --r-lg: 20px; --r-pill: 999px;
  --gutter: 16px;
  --w-text: 720px;
  --w-wide: 1080px;
  --header-h: 60px;
  --touch: 44px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:            #ECEEF2;
    --bg-glow:       rgba(233, 20, 58, .08);
    --surface:       #F7F8FA;
    --surface-2:     #E3E6EB;
    --border:        #DDE0E5;
    --control-border:#6B7280;
    --text:          #1A1C20;
    --text-2:        #565B64;
    --accent:        #C8102E;
    --selection:     #FBDDE4;
    --on-selection:  #1A1C20;
    --warning:       #92400E;
    --warning-bg:    #FEF3C7;
    --success:       #166534;
    --header-bg:     rgba(236, 238, 242, .9);
    --overlay:       rgba(26, 28, 32, .45);
    --shadow:        0 1px 2px rgba(26,28,32,.06), 0 8px 24px rgba(26,28,32,.08);
    --shadow-lg:     0 2px 6px rgba(26,28,32,.08), 0 24px 60px rgba(26,28,32,.18);
    --candle-body:   #3A3D44;
    --candle-core:   #FBDDE4;
  }
}

@media (min-width: 768px) { :root { --gutter: 24px; } }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 90% 55% at 50% -10%, var(--bg-glow) 0%, transparent 70%);
  background-repeat: no-repeat;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main, footer { position: relative; z-index: 1; display: block; }

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; color: var(--text); }
[hidden] { display: none !important; }

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

::selection { background: var(--primary); color: var(--on-primary); }

/* braci (puntini creati da site.js nel #ptcl): solo nel tema scuro, discrete */
#ptcl { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.p {
  position: absolute; bottom: -10px; border-radius: 50%;
  background: var(--ember); opacity: 0;
  animation: rise linear infinite;
}
@keyframes rise {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  10%  { opacity: .32; }
  90%  { opacity: .06; }
  100% { transform: translateY(-110vh) scale(.2); opacity: 0; }
}
@media (prefers-color-scheme: light) { #ptcl { display: none; } }

.skip-link {
  position: absolute; left: var(--s-2); top: -100px; z-index: 10001;
  min-height: var(--touch); display: inline-flex; align-items: center;
  padding: 0 var(--s-4); border-radius: var(--r-sm);
  background: var(--primary); color: var(--on-primary);
  font-weight: 600; font-size: var(--fs-sm); text-decoration: none;
}
.skip-link:focus { top: var(--s-2); }

.center { text-align: center; }

/* candela (logo): colori dai token */
.candle { display: inline-block; flex-shrink: 0; vertical-align: middle; }
.candle-flame { fill: var(--primary); }
.candle-core  { fill: var(--candle-core); }
.candle-body  { fill: var(--candle-body); }
.candle-wick  { fill: var(--bg); opacity: .25; }

/* ═══ 3. HEADER, MENU, LINGUA ═══ */
#site-nav {
  position: sticky; top: 0; z-index: 8000;
  height: var(--header-h);
  display: flex; align-items: center; gap: var(--s-3);
  padding: 0 var(--gutter);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: var(--touch); margin-right: auto;
  font-family: var(--font-serif); font-size: 1.0625rem; letter-spacing: .02em;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.nav-logo .candle { width: 18px; height: 22px; }
.nav-logo:hover { color: var(--text); text-decoration: none; }

#site-nav nav { display: flex; align-items: center; }
.nav-links { display: flex; align-items: center; gap: var(--s-1); list-style: none; }
.nav-links a {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: var(--touch); padding: 0 var(--s-3);
  font-size: var(--fs-sm); font-weight: 500;
  color: var(--text-2); text-decoration: none;
  border-radius: var(--r-sm);
  transition: color .15s, background-color .15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: ''; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 8px;
  height: 2px; border-radius: 2px; background: var(--primary);
}

.nav-actions { display: flex; align-items: center; gap: var(--s-2); }

.nav-cta-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--touch); padding: 0 var(--s-4);
  border-radius: var(--r-pill);
  background: var(--primary); color: var(--on-primary);
  font-size: var(--fs-sm); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color .15s;
}
.nav-cta-btn:hover { background: var(--primary-hover); color: var(--on-primary); text-decoration: none; }

/* lingua */
.lang-switcher { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: var(--touch); min-height: var(--touch); padding: 0 var(--s-3);
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border); border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em;
  transition: color .15s, border-color .15s;
}
.lang-btn:hover { color: var(--text); border-color: var(--control-border); }
.lang-btn svg { width: 15px; height: 15px; }
.lang-chevron { font-size: 10px; line-height: 1; transition: transform .2s var(--ease); }
.lang-switcher.open .lang-chevron { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 9999;
  min-width: 168px; padding: var(--s-1);
  list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s, transform .18s var(--ease), visibility .18s;
}
.lang-switcher.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  min-height: var(--touch); padding: 0 var(--s-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm); color: var(--text); text-decoration: none;
}
.lang-menu a:hover { background: var(--surface-2); }
.lang-menu li.active a { font-weight: 600; }
.lang-menu li.active a::after { content: '\2713'; color: var(--accent); font-weight: 700; }

/* pulsante del menu (solo sotto 960 px). Senza JS è un link al menu del footer;
   site.js lo trasforma in pulsante con aria-expanded e gestione del focus. */
.nav-toggle {
  display: none;
  align-items: center; justify-content: center; gap: 6px;
  min-width: var(--touch); min-height: var(--touch); padding: 0 var(--s-3);
  border: 1px solid var(--border); border-radius: var(--r-pill);
  background: transparent; color: var(--text);
  font-size: var(--fs-xs); font-weight: 600; text-decoration: none;
}
.nav-toggle:hover { border-color: var(--control-border); color: var(--text); text-decoration: none; }
.nav-toggle svg { width: 18px; height: 18px; }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-open { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: block; }

@media (max-width: 959.98px) {
  .nav-toggle { display: inline-flex; }
  #site-nav nav { position: static; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s-2) var(--gutter) var(--s-4);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s, transform .2s var(--ease), visibility .2s;
  }
  #site-nav.menu-open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a {
    display: flex; min-height: 52px; padding: 0 var(--s-2);
    font-size: var(--fs-lg); color: var(--text);
    border-bottom: 1px solid var(--border); border-radius: 0;
  }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav-links a:hover { background: transparent; color: var(--accent); }
  .nav-links a[aria-current="page"]::after { left: auto; right: var(--s-2); top: 50%; bottom: auto; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; }
  .nav-links a[aria-current="page"] { font-weight: 600; }
}
@media (max-width: 599.98px) {
  .lang-btn .lang-label { display: none; }
  .lang-btn { padding: 0; width: var(--touch); }
  .nav-toggle .nav-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .nav-toggle { padding: 0; width: var(--touch); }
  .nav-cta-btn span[aria-hidden] { display: none; }
}
@media (max-width: 399.98px) {
  #site-nav { gap: 6px; padding: 0 10px; }
  .nav-actions { gap: 4px; }
  .nav-logo { font-size: .84375rem; gap: 4px; letter-spacing: 0; min-width: 0; }
  .nav-logo-text { overflow: hidden; text-overflow: ellipsis; }
  .nav-logo .candle { width: 15px; height: 19px; }
  .nav-cta-btn { padding: 0 11px; font-size: var(--fs-xs); }
}
@media (max-width: 339.98px) {
  .nav-logo .nav-logo-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* briciole */
.crumbs {
  max-width: calc(var(--w-text) + 2 * var(--gutter));
  margin: 0 auto; padding: var(--s-5) var(--gutter) 0;
  font-size: var(--fs-xs); color: var(--text-2);
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s-2); }
.crumbs li { display: inline-flex; align-items: center; gap: var(--s-2); }
.crumbs li + li::before { content: '/'; color: var(--control-border); }
.crumbs a { color: var(--text-2); display: inline-flex; align-items: center; min-height: 32px; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text); font-weight: 500; }

/* ═══ 4. HERO E FORM ═══ */
.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: var(--s-9) var(--gutter) var(--s-9);
}
@media (min-width: 768px) { .hero { padding-top: var(--s-10); padding-bottom: var(--s-10); } }

.prelancio-badge {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 32px; padding: 0 var(--s-4);
  margin-bottom: var(--s-7);
  border-radius: var(--r-pill);
  background: var(--selection); color: var(--on-selection);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em;
}
.prelancio-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(233, 20, 58, .5);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(233, 20, 58, .55); }
  70%  { box-shadow: 0 0 0 8px rgba(233, 20, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(233, 20, 58, 0); }
}

.hero-flame { display: block; margin-bottom: var(--s-3); }
.hero-flame .candle { width: 30px; height: 38px; margin: 0 auto; }
.brand {
  font-family: var(--font-serif); font-size: var(--fs-sm);
  letter-spacing: .32em; text-transform: uppercase;
  color: var(--text-2); margin-bottom: var(--s-5);
}
.hook {
  max-width: 15em;
  font-family: var(--font-serif); font-size: var(--fs-h1); font-weight: 400;
  line-height: var(--lh-tight); letter-spacing: -.01em;
  color: var(--text); margin-bottom: var(--s-5);
  text-wrap: balance;
}
.hero-desc {
  max-width: 34em;
  font-size: clamp(1rem, .95rem + .3vw, 1.125rem); line-height: 1.6;
  color: var(--text-2); margin-bottom: var(--s-7);
  text-wrap: pretty;
}
.hero-secondary {
  margin-top: var(--s-7);
  font-family: var(--font-serif); font-style: italic;
  font-size: var(--fs-lg); color: var(--text-2);
}

/* form lista d'attesa (stessi id e campi; qui solo aspetto) */
.form-group { width: 100%; max-width: 480px; margin: 0 auto var(--s-3); text-align: left; }
.form-label {
  display: block; margin-bottom: var(--s-2);
  font-size: var(--fs-sm); font-weight: 600; color: var(--text);
}
.form-wrap { display: flex; flex-direction: column; gap: var(--s-2); width: 100%; }
input[type=email] {
  width: 100%; min-height: 52px; padding: 0 var(--s-4);
  font-size: var(--fs-md); color: var(--text);
  background: var(--surface);
  border: 1px solid var(--control-border); border-radius: var(--r-md);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
input[type=email]::placeholder { color: var(--text-2); opacity: 1; }
input[type=email]:hover { border-color: var(--text-2); }
input[type=email]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--selection); }
input[type=email]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn-submit {
  min-height: 52px; padding: 0 var(--s-6);
  border: 0; border-radius: var(--r-md);
  background: var(--primary); color: var(--on-primary);
  font-size: var(--fs-md); font-weight: 600; white-space: nowrap;
  transition: background-color .15s, transform .1s;
}
.btn-submit:hover:not(:disabled) { background: var(--primary-hover); }
.btn-submit:active:not(:disabled) { transform: translateY(1px); }
.btn-submit:disabled { opacity: .55; cursor: not-allowed; }
@media (min-width: 480px) {
  .form-wrap { flex-direction: row; }
  .form-wrap input[type=email] { flex: 1; min-width: 0; }
}

.form-micro, .form-legal {
  width: 100%; max-width: 480px; margin: 0 auto var(--s-2);
  font-size: var(--fs-xs); line-height: 1.5; color: var(--text-2); text-align: left;
}
.form-legal a { color: var(--text-2); text-decoration: underline; }
.form-legal a:hover { color: var(--text); }
.form-msg, .form-error-inline {
  display: none; width: 100%; max-width: 480px; margin: var(--s-2) auto 0;
  font-size: var(--fs-sm); line-height: 1.5; text-align: left;
}
.form-msg { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); }
.form-msg.ok { color: var(--success); background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-md); }
.form-msg.err, .form-error-inline { color: var(--warning); }
.footer-payoff { text-align: center; color: var(--text); font-family: var(--font-serif, Georgia, serif); font-size: var(--fs-sm); margin: var(--s-3) auto var(--s-2); }
/* 2026-11-30: invito a passare parola dopo l'iscrizione */
.share-box { width: 100%; max-width: 480px; margin: var(--s-3) auto 0; text-align: center; }
.share-title { font-size: var(--fs-sm, .95rem); color: var(--text); margin: 0 0 var(--s-2); }
.share-row { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; }
.share-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-4); border-radius: var(--r-md); border: 1px solid var(--control-border); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-sm, .95rem); cursor: pointer; text-decoration: none; }
.share-btn:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.share-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-msg.err { background: var(--warning-bg); }
.form-error-inline:focus { outline: none; }

/* ═══ 5. SEZIONI DELLA HOME ═══ */
.section { padding: var(--s-9) var(--gutter); }
@media (min-width: 768px) { .section { padding-top: var(--s-10); padding-bottom: var(--s-10); } }
.section-inner { max-width: var(--w-text); margin: 0 auto; }
.divider {
  max-width: var(--w-wide); margin: 0 auto;
  border: 0; border-top: 1px solid var(--border);
}
.section-label, .page-brand {
  display: flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-4);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.section-label::before, .page-brand::before {
  content: ''; width: 24px; height: 2px; border-radius: 2px; background: var(--primary); flex-shrink: 0;
}
.center .section-label, .section-label.center { justify-content: center; }
.section-title {
  font-family: var(--font-serif); font-size: var(--fs-h2); font-weight: 400;
  line-height: var(--lh-tight); letter-spacing: -.005em;
  color: var(--text); margin-bottom: var(--s-4);
  text-wrap: balance;
}
.section-title em { font-style: italic; color: var(--accent); }
.section-sub {
  max-width: 36em; margin-bottom: var(--s-8);
  font-size: var(--fs-lg); color: var(--text-2);
}
.center .section-sub { margin-left: auto; margin-right: auto; }
.what-body {
  max-width: 38em; margin: 0 auto var(--s-4);
  font-size: var(--fs-lg); color: var(--text-2);
  text-wrap: pretty;
}

.more-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--touch); margin-top: var(--s-5);
  font-size: var(--fs-md); font-weight: 600; color: var(--accent);
  text-decoration: none;
}
.more-link span[aria-hidden] { transition: transform .2s var(--ease); }
.more-link:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.more-link:hover span[aria-hidden] { transform: translateX(3px); }

/* fatti brevi */
.facts {
  list-style: none; display: grid; gap: var(--s-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  margin: var(--s-7) auto 0; text-align: left;
}
.facts li {
  padding: var(--s-5); border-radius: var(--r-card);
  background: var(--surface); border: 1px solid var(--border);
  font-size: var(--fs-sm); line-height: 1.55; color: var(--text-2);
}
.facts strong {
  display: block; margin-bottom: var(--s-1);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
}

/* passi */
.steps { display: flex; flex-direction: column; }
.step { display: flex; align-items: flex-start; gap: var(--s-4); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--accent); color: var(--accent);
  font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--bg);
}
.step-body { padding-top: 7px; }
.step-body h3 {
  font-size: var(--fs-h3); font-weight: 600; line-height: 1.3;
  color: var(--text); margin-bottom: var(--s-1);
}
.step-body p { font-size: var(--fs-md); color: var(--text-2); }
.step-divider { width: 1.5px; height: 28px; margin: 6px 0 6px 19px; background: var(--border); }

/* elenco puntato della home */
.section-list { list-style: none; display: flex; flex-direction: column; gap: var(--s-3); }
.section-list li { position: relative; padding-left: 28px; font-size: var(--fs-lg); color: var(--text-2); }
.section-list li::before {
  content: ''; position: absolute; left: 4px; top: .62em;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--accent);
}

/* sicurezza */
.safety-list { display: grid; gap: var(--s-3); }
.safety-item {
  display: flex; align-items: flex-start; gap: var(--s-4);
  padding: var(--s-5); border-radius: var(--r-card);
  background: var(--surface); border: 1px solid var(--border);
}
.safety-ico {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: var(--selection); color: var(--accent);
}
.safety-ico svg { width: 22px; height: 22px; }
.safety-item h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; color: var(--text); margin: 2px 0 var(--s-1); }
.safety-item p { font-size: var(--fs-md); color: var(--text-2); }

/* FAQ (apertura gestita da site.js) */
.faq-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; min-height: 56px; padding: var(--s-4) 0;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  background: none; border: 0; text-align: left;
  font-size: var(--fs-lg); font-weight: 600; line-height: 1.4; color: var(--text);
}
.faq-q:hover { color: var(--accent); }
.faq-q .chevron {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface); color: var(--accent); font-size: 15px; line-height: 1;
  transition: transform .25s var(--ease), background-color .15s;
}
.faq-q.open .chevron { transform: rotate(180deg); background: var(--selection); }
.faq-a {
  max-height: 0; overflow: hidden;
  font-size: var(--fs-md); color: var(--text-2); line-height: var(--lh-body);
  transition: max-height .35s var(--ease), padding .35s var(--ease);
}
.faq-a.open { max-height: 80rem; padding-bottom: var(--s-5); }
.faq-a p + p { margin-top: var(--s-3); }

/* home, ≥ 960 px: «Come funziona» a due colonne con la schermata accanto ai passi */
@media (min-width: 960px) {
  .page-home #come-funziona .section-inner {
    max-width: var(--w-wide);
    display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: var(--s-10);
    align-items: start;
  }
  .page-home #come-funziona .section-inner > * { grid-column: 1; }
  .page-home #come-funziona .shot { grid-column: 2; grid-row: 1 / span 5; margin: 0; max-width: none; align-self: center; }
}

/* ═══ 6. PAGINE INTERNE E DOCUMENTI ═══ */
.page-header {
  max-width: calc(var(--w-text) + 2 * var(--gutter));
  margin: 0 auto; padding: var(--s-7) var(--gutter) var(--s-6);
}
.page-title {
  font-family: var(--font-serif); font-size: var(--fs-h1); font-weight: 400;
  line-height: var(--lh-tight); letter-spacing: -.01em; color: var(--text);
  text-wrap: balance;
}
.page-lead {
  max-width: 36em; margin-top: var(--s-4);
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); line-height: 1.6; color: var(--text-2);
  text-wrap: pretty;
}
.page-date { margin-top: var(--s-3); font-size: var(--fs-xs); color: var(--text-2); }

.doc {
  max-width: calc(var(--w-text) + 2 * var(--gutter));
  margin: 0 auto; padding: var(--s-4) var(--gutter) var(--s-9);
}
.doc > * + * { margin-top: var(--s-4); }
.doc h2 {
  margin-top: var(--s-9); margin-bottom: 0;
  padding-top: var(--s-6); border-top: 1px solid var(--border);
  font-family: var(--font-serif); font-size: clamp(1.375rem, 1.2rem + .8vw, 1.75rem); font-weight: 400;
  line-height: 1.25; color: var(--text);
}
.doc h2:first-child { margin-top: var(--s-4); }
.doc h3 { margin-top: var(--s-6); font-size: var(--fs-h3); font-weight: 600; line-height: 1.35; color: var(--text); }
.doc p, .doc li { font-size: var(--fs-md); color: var(--text-2); line-height: 1.7; }
.doc .lead { font-size: var(--fs-lg); color: var(--text); }
.doc ul, .doc ol { list-style: none; display: flex; flex-direction: column; gap: var(--s-2); }
.doc ul > li { position: relative; padding-left: 24px; }
.doc ul > li::before {
  content: ''; position: absolute; left: 4px; top: .7em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.doc ol { counter-reset: doc-ol; }
.doc ol > li { position: relative; padding-left: 40px; counter-increment: doc-ol; min-height: 28px; }
.doc ol > li::before {
  content: counter(doc-ol); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--selection); color: var(--on-selection);
  font-size: var(--fs-xs); font-weight: 700; line-height: 1;
}
.doc a { color: var(--accent); }
.doc strong { color: var(--text); }

.highlight-box, .warning-box, .rule-block {
  padding: var(--s-5); border-radius: var(--r-card);
  background: var(--surface); border: 1px solid var(--border);
}
.highlight-box { border-left: 4px solid var(--primary); }
.highlight-box p, .warning-box p, .rule-block p { margin: 0; color: var(--text); }
.highlight-box p + p, .warning-box p + p, .rule-block p + p { margin-top: var(--s-2); }
.warning-box { background: var(--warning-bg); border-color: transparent; border-left: 4px solid var(--warning); }
.warning-box p, .warning-box strong { color: var(--warning); }
.rule-block + .rule-block { margin-top: var(--s-2); }

.rights-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--s-3); }
.right-card { padding: var(--s-4); border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); }
.right-card strong { display: block; margin-bottom: var(--s-1); font-size: var(--fs-sm); color: var(--text); }
.right-card span { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.55; }

/* prezzo */
.price-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: var(--s-7) var(--s-5); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.price-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--primary); }
.price-card .price {
  font-family: var(--font-serif); font-size: clamp(2.5rem, 2rem + 2.5vw, 3.5rem);
  line-height: 1; color: var(--text); font-variant-numeric: tabular-nums;
}
.price-card .price-note { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--text-2); }

/* tabelle */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: var(--r-card); border: 1px solid var(--border); background: var(--surface);
}
.doc table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.doc th {
  padding: var(--s-3) var(--s-4); text-align: left; vertical-align: bottom;
  background: var(--surface-2); color: var(--text);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.doc td {
  padding: var(--s-3) var(--s-4); vertical-align: top;
  color: var(--text-2); line-height: 1.55;
  border-top: 1px solid var(--border);
}
.doc td:first-child { color: var(--text); }
.doc th, .doc td { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.cta-section input[type=email] { background: var(--bg); }
@media (max-width: 479.98px) {
  .doc th, .doc td { padding: var(--s-3); }
}

/* collegamenti in fondo */
.doc .more-links { display: flex; flex-wrap: wrap; gap: 0 var(--s-6); margin-top: var(--s-8); }
.doc .more-links .more-link { margin-top: 0; }

/* 404 */
.page-notfound .page-header, .page-notfound .doc { text-align: center; }
.page-notfound .page-brand { justify-content: center; }
.page-notfound .page-lead { margin-left: auto; margin-right: auto; }
.notfound-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin-bottom: var(--s-6); }
.notfound-links a {
  display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 var(--s-5);
  border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-weight: 500; text-decoration: none;
}
.notfound-links a:first-child { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.notfound-links a:hover { border-color: var(--control-border); }
.notfound-links a:first-child:hover { background: var(--primary-hover); }

/* ═══ 7. SCHERMATE DELL'APP IN CORNICE DI TELEFONO ═══
   {{shot:chiave}} genera figure.shot > (picture > img | div.shot-ph) + figcaption.
   La cornice è sul primo figlio; lo schermo arrotondato è l'immagine o il segnaposto. */
.shot { width: 100%; max-width: 260px; margin: var(--s-8) auto; text-align: center; }
.shot > picture, .shot > .shot-ph, .shot > img {
  position: relative; display: block; width: 100%;
  padding: 9px; border-radius: 40px;
  background: var(--phone-bezel);
  box-shadow: 0 0 0 1.5px var(--phone-edge), var(--shadow-lg);
}
.shot img { width: 100%; height: auto; border-radius: 31px; background: var(--phone-screen); }
.shot > picture::after {
  /* isola della fotocamera sopra la barra di stato */
  content: ''; position: absolute; top: 19px; left: 50%; transform: translateX(-50%);
  width: 28%; height: 18px; border-radius: 12px; background: var(--phone-bezel);
}
.shot figcaption {
  max-width: 30em; margin: var(--s-5) auto 0;
  font-size: var(--fs-sm); line-height: 1.55; color: var(--text-2);
  text-wrap: pretty;
}
/* segnaposto finché manca il file: uno schermo scuro con l'ossatura di una scheda dell'app */
.shot > .shot-ph { overflow: hidden; }
.shot > .shot-ph::before {
  /* schermo: isola, titolo e sottotitolo */
  content: ''; position: absolute; inset: 9px; border-radius: 31px;
  background-color: var(--phone-screen);
  background-image:
    linear-gradient(var(--phone-bezel), var(--phone-bezel)),
    linear-gradient(#3A3A40, #3A3A40),
    linear-gradient(var(--phone-bar), var(--phone-bar));
  background-size: 28% 18px, 58% 12px, 36% 9px;
  background-position: 50% 10px, 18px 58px, 18px 80px;
  background-repeat: no-repeat;
}
.shot > .shot-ph::after {
  /* due schede dell'app (la seconda è l'ombra copiata della prima), con etichetta rossa */
  content: ''; position: absolute; left: 27px; right: 27px; top: 112px; height: 148px;
  border-radius: 16px;
  background-color: var(--phone-bar);
  background-image:
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(#3A3A40, #3A3A40),
    linear-gradient(#3A3A40, #3A3A40),
    linear-gradient(#3A3A40, #3A3A40);
  background-size: 34% 8px, 78% 9px, 64% 9px, 70% 9px;
  background-position: 16px 18px, 16px 46px, 16px 66px, 16px 86px;
  background-repeat: no-repeat;
  box-shadow: 0 160px 0 0 var(--phone-bar);
}
.shot > .shot-ph span {
  position: absolute; left: 27px; right: 27px; bottom: 36px; z-index: 1;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; line-height: 1.4;
  color: var(--phone-text);
}

/* ═══ 8. LISTA D'ATTESA, SCARICA L'APP, FOOTER, COOKIE, REPORT ═══ */
.cta-section {
  width: calc(100% - 2 * var(--gutter)); max-width: 720px;
  margin: var(--s-6) auto 0; padding: var(--s-8) var(--s-5);
  text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
@media (min-width: 768px) { .cta-section { padding: var(--s-9) var(--s-8); } }
.cta-section h2 {
  font-family: var(--font-serif); font-size: var(--fs-h2); font-weight: 400;
  line-height: var(--lh-tight); color: var(--text); margin-bottom: var(--s-3);
  text-wrap: balance;
}
.cta-section h2 em { font-style: italic; color: var(--accent); }
.cta-section > p { max-width: 32em; margin: 0 auto var(--s-6); font-size: var(--fs-lg); color: var(--text-2); }
.cta-form-wrap { display: flex; flex-direction: column; align-items: center; }

/* blocco futuro "Scarica l'app" (nascosto finché APP_LIVE=false) */
.app-download { max-width: 480px; margin: 0 auto var(--s-8); padding-bottom: var(--s-8); border-bottom: 1px solid var(--border); }
.app-download-title { font-family: var(--font-serif); font-size: var(--fs-h2); font-weight: 400; color: var(--text); margin-bottom: var(--s-3); }
.app-download p { color: var(--text-2); }
.app-download-row { display: flex; flex-wrap: wrap; gap: var(--s-5); align-items: center; justify-content: center; margin-top: var(--s-5); }
.app-badges { display: flex; flex-direction: column; gap: var(--s-2); }
.store-badge {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 var(--s-6);
  border-radius: var(--r-md); background: var(--text); color: var(--bg);
  font-weight: 600; text-decoration: none;
}
.store-badge:hover { opacity: .9; text-decoration: none; }
.app-qr { width: 132px; height: 132px; padding: var(--s-2); border-radius: var(--r-md); background: #FFFFFF; }

footer {
  margin-top: var(--s-9);
  padding: var(--s-8) var(--gutter) var(--s-8);
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  text-align: center;
  font-size: var(--fs-xs); color: var(--text-2);
}
footer > * { max-width: var(--w-wide); margin-left: auto; margin-right: auto; }
.footer-social { display: flex; justify-content: center; gap: var(--s-2); margin-bottom: var(--s-4); }
.footer-social a {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: var(--touch); padding: 0 var(--s-4);
  border-radius: var(--r-pill); border: 1px solid var(--border);
  color: var(--text); font-size: var(--fs-sm); font-weight: 500; text-decoration: none;
}
.footer-social a:hover { border-color: var(--control-border); }
.footer-social svg { width: 16px; height: 16px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--s-1); margin-bottom: var(--s-4); }
.footer-links a {
  display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 var(--s-3);
  font-size: var(--fs-sm); color: var(--text); text-decoration: none; border-radius: var(--r-sm);
}
.footer-links a:hover { text-decoration: underline; }
.footer-company { max-width: 46em; margin-bottom: var(--s-2); line-height: 1.6; }
.footer-company a { color: var(--text-2); }
.footer-company a:hover { color: var(--text); }
.footer-copy { margin-top: var(--s-3); }

#cookie-banner {
  position: fixed; left: var(--s-3); right: var(--s-3); bottom: var(--s-3); z-index: 9999;
  max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3) var(--s-5);
  padding: var(--s-4) var(--s-5);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(calc(100% + 24px));
  transition: transform .4s var(--ease);
}
#cookie-banner.visible { transform: none; }
#cookie-banner p { flex: 1 1 260px; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-2); }
#cookie-banner a { color: var(--accent); }
.cookie-btns { display: flex; gap: var(--s-2); flex: 0 0 auto; }
.cookie-btn {
  min-height: var(--touch); padding: 0 var(--s-5);
  border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600;
  transition: background-color .15s, border-color .15s;
}
/* Accetta e Rifiuta con pari evidenza (linee guida del Garante): stesso stile */
.cookie-btn, .cookie-btn-accept, .cookie-btn-reject, .cookie-btn-prefs { background: transparent; color: var(--text); border: 1px solid var(--control-border); }
.cookie-btn:hover, .cookie-btn-accept:hover, .cookie-btn-reject:hover, .cookie-btn-prefs:hover { background: var(--surface-2); }
#cookie-banner:not(.visible) { visibility: hidden; transition: transform .4s var(--ease), visibility 0s .4s; }
.cookie-prefs { flex: 1 0 100%; display: grid; gap: var(--s-3); }
.cookie-prefs[hidden] { display: none; }
.cookie-opt { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; }
.cookie-opt input { margin-top: .25em; width: 1.1em; height: 1.1em; flex: 0 0 auto; accent-color: var(--primary); }
.cookie-opt strong { color: var(--text); }
.cookie-prefs .cookie-btn { justify-self: start; }
.footer-link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.footer-link-btn:hover { text-decoration: underline; }
@media (max-width: 479.98px) {
  .cookie-btns { width: 100%; }
  .cookie-btn { flex: 1; padding: 0 var(--s-2); }
}

/* report visite (solo staff con ?admin=tds) */
#report-btn {
  position: fixed; bottom: var(--s-5); left: var(--s-5); z-index: 9000;
  display: none; align-items: center; justify-content: center;
  width: var(--touch); height: var(--touch); border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--accent);
  box-shadow: var(--shadow);
}
#report-btn svg { display: block; }
#report-modal {
  display: none; position: fixed; inset: 0; z-index: 10000;
  align-items: flex-end; justify-content: center;
  background: var(--overlay);
}
#report-modal.open { display: flex; }
.report-panel {
  width: 100%; max-width: 680px; max-height: 85vh; overflow-y: auto;
  padding: var(--s-7) var(--s-6) var(--s-8);
  background: var(--surface); border: 1px solid var(--border); border-bottom: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.report-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-6); }
.report-title { font-size: var(--fs-xl); font-weight: 600; color: var(--text); }
.report-close {
  width: var(--touch); height: var(--touch); border-radius: 50%;
  background: var(--surface-2); border: 0; color: var(--text); font-size: 16px;
}
.report-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); margin-bottom: var(--s-6); }
.report-stat { padding: var(--s-4) var(--s-3); text-align: center; border-radius: var(--r-md); background: var(--surface-2); }
.report-stat-n { display: block; margin-bottom: var(--s-1); font-size: 1.75rem; font-weight: 600; color: var(--text); }
.report-stat-l { font-size: var(--fs-xs); color: var(--text-2); }
.report-h { margin-bottom: var(--s-3); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.report-block { margin-bottom: var(--s-6); }
.report-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-2); }
.report-row span:last-child { color: var(--text); font-weight: 500; }
.report-bar-wrap { height: 6px; margin: var(--s-1) 0 var(--s-3); border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.report-bar { height: 100%; border-radius: var(--r-pill); background: var(--primary); }
.report-clear { min-height: var(--touch); margin-top: var(--s-4); background: none; border: 0; color: var(--text-2); font-size: var(--fs-sm); text-decoration: underline; }
@media (max-width: 599.98px) { .report-stats { grid-template-columns: repeat(2, 1fr); } }

/* ═══ 8b. GUIDE (articoli e indice) ═══ */
.guide-cover { margin: 0; }
.guide-cover img, .guide-card-img img { display: block; width: 100%; height: auto; border-radius: var(--r-card); border: 1px solid var(--border); }
.toc { padding: var(--s-4) var(--s-5); border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
.toc-title { margin-bottom: var(--s-3); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.doc .toc ol { gap: var(--s-1); }
.doc .toc li { font-size: var(--fs-sm); min-height: 0; }
.doc .toc a { display: inline-block; padding: 4px 0; }
.guide h2[id], .guide h3 { scroll-margin-top: calc(var(--header-h) + var(--s-4)); }
.guide-list { list-style: none; display: grid; gap: var(--s-6); }
.doc .guide-list > li { padding-left: 0; }
.doc .guide-list > li::before { content: none; }
.guide-card { display: flex; flex-direction: column; gap: var(--s-3); }
.guide-card h2 { margin: 0; padding: 0; border: 0; font-size: var(--fs-xl); line-height: 1.3; }
.guide-card h2 a { color: var(--text); text-decoration: none; }
.guide-card h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.guide-card-meta { font-size: var(--fs-xs); color: var(--text-2); }

/* ═══ 9. MOVIMENTO RIDOTTO E STAMPA ═══ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  #ptcl { display: none; }
}

@media print {
  #site-nav, #cookie-banner, #report-btn, #ptcl, .skip-link, .cta-section, .footer-social { display: none !important; }
  body { background: #FFFFFF; color: #000000; }
  .faq-a { max-height: none; }
  a { color: inherit; }
}
