/* Cenazen: stile condiviso. Token in design-system/cenazen/MASTER.md */
:root {
  /* Scala di movimento transitions-dev */
  --duration-stagger: 40ms;
  --duration-micro: 80ms;
  --duration-quick: 150ms;
  --duration-fast: 250ms;
  --duration-medium: 350ms;
  --duration-slow: 400ms;
  --duration-very-slow: 500ms;
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: ease-in-out;
  --ease-out: ease-out;
  --ease-bounce: cubic-bezier(0.34, 1.36, 0.64, 1);
  --distance-micro: 4px;
  --distance-base: 8px;
  --distance-medium: 12px;
  --blur-small: 2px;
  --blur-medium: 3px;
  --blur-large: 8px;
  --acc-expand: var(--duration-fast);
  --acc-collapse: var(--duration-fast);
  --acc-chevron: var(--duration-fast);
  --acc-ease: var(--ease-smooth-out);
  --stagger-dur: var(--duration-very-slow);
  --stagger-distance: var(--distance-medium);
  --stagger-stagger: 90ms;
  --stagger-blur: var(--blur-medium);
  --stagger-ease: var(--ease-smooth-out);

  /* Colori */
  --bg: #F7F5EF;
  --surface: #FFFFFF;
  --ink: #1F2A22;
  --ink-soft: #5B6A5E;
  --line: #E1E3DA;
  --tint: #E8EEE5;
  --accent: #4F7158;
  --sage-light: #DCE6DA;
  --cta: #B3381F;
  --cta-dark: #9A2F19;
  --accent-ink: #FFFFFF;
  --focus: #1F2A22;

  /* Forme */
  --r-ctl: 10px;
  --r-card: 18px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgba(29,38,32,.06), 0 8px 24px rgba(29,38,32,.06);

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --wrap: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(38px, 9vw, 64px); font-weight: 800; }
h2 { font-size: clamp(28px, 6.4vw, 42px); font-weight: 750; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.lead { font-size: 19px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.small { font-size: 16px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; letter-spacing: .02em;
  color: var(--accent);
}

/* Barra superiore */
.top { position: sticky; top: 0; z-index: 20; background: rgba(251,248,243,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.logo span { color: var(--accent); }

/* Bottoni */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  border-radius: var(--r-pill); border: 2px solid transparent;
  font: 600 17px/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform var(--duration-quick) var(--ease-out), background-color var(--duration-quick) var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--cta); color: #fff; }
.btn-primary:hover { background: var(--cta-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--tint); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-block { width: 100%; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* Sezioni */
section { padding: 64px 0; }
.tint { background: var(--tint); }
.section-head { max-width: 640px; margin-bottom: 32px; display: grid; gap: 12px; }

/* Hero */
.hero { padding: 28px 0 48px; }
.hero-grid { display: grid; gap: 28px; }
.hero-copy { display: grid; gap: 18px; }
.hero-cta { display: grid; gap: 12px; margin-top: 6px; }
.hero-note { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 15px; color: var(--ink-soft); }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note i { color: var(--accent); font-size: 18px; }
.hero-media { position: relative; border-radius: var(--r-card); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; left: 12px; bottom: 12px; right: 12px;
  background: var(--surface); border-radius: 14px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow);
  font-size: 15px;
}
.hero-badge strong { display: block; font-family: var(--font-display); font-size: 17px; }
.hero-badge i { font-size: 26px; color: var(--accent); }

/* Citazioni dei clienti */
.quotes { display: grid; gap: 12px; }
.quote {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 18px 20px; display: grid; gap: 8px;
}
.quote p { font-family: var(--font-display); font-size: 20px; font-weight: 600; line-height: 1.25; }
.quote cite { font-style: normal; font-size: 14px; color: var(--ink-soft); }

/* Passi */
.steps { display: grid; gap: 14px; counter-reset: step; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.step-n {
  width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--bg);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 18px;
}
.step h3 { margin-bottom: 4px; }

/* Lista con spunte */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.checks i { color: var(--accent); font-size: 22px; line-height: 1.2; }

/* Card */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; box-shadow: var(--shadow); }
.grid-2 { display: grid; gap: 16px; }

/* Demo settimana */
.week { display: grid; gap: 10px; }
.day {
  display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
}
.day-name { font-family: var(--font-display); font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.day-dish { font-weight: 600; }
.day-meta { font-size: 14px; color: var(--ink-soft); }
.day.free { background: transparent; border-style: dashed; }

.list-tool { display: grid; gap: 16px; }
.portions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.portions button {
  min-width: 52px; min-height: 44px; border-radius: var(--r-pill); border: 2px solid #857D73;
  background: var(--surface); font: 600 16px var(--font-body); color: var(--ink); cursor: pointer;
}
.portions button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.aisle h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin: 4px 0 6px; }
.item { display: flex; align-items: center; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--line); cursor: pointer; }
.item input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 0; }
.item .q { margin-left: auto; white-space: nowrap; padding-left: 8px; color: var(--ink-soft); font-variant-numeric: tabular-nums; font-size: 15px; }
.item input:checked ~ .n { text-decoration: line-through; color: var(--ink-soft); }
.cost-note { font-size: 14px; color: var(--ink-soft); background: var(--tint); border-radius: 12px; padding: 10px 12px; }

/* Confronto */
.compare { display: grid; gap: 10px; }
.compare-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.compare-row strong { display: block; }
.compare-row .price { font-family: var(--font-display); font-weight: 700; text-align: right; white-space: nowrap; }
.compare-row.us { border: 2px solid var(--accent); }
.compare-row.us .price { color: var(--accent); }

/* Bonus */
.bonus { display: grid; gap: 12px; }
.bonus .card { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 18px; }
.bonus i { font-size: 30px; color: var(--accent); }

/* Garanzia */
.guarantee { display: grid; gap: 16px; align-items: center; }
.seal {
  width: 112px; height: 112px; border-radius: 50%; border: 3px solid var(--accent); color: var(--accent);
  display: grid; place-items: center; text-align: center; font-family: var(--font-display); font-weight: 800; line-height: 1.05;
}
.seal span { font-size: 30px; display: block; }

/* Box prezzo */
.offer { border: 2px solid var(--ink); }
.offer .price-big { font-family: var(--font-display); font-weight: 800; font-size: 56px; line-height: 1; letter-spacing: -0.03em; }
.offer .price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.addons { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 15px; color: var(--ink-soft); }

/* FAQ: transitions-dev 21 accordion */
.faq { display: grid; gap: 10px; }
.t-acc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.t-acc-head {
  width: 100%; min-height: 56px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: none; border: 0; font: 600 17px/1.3 var(--font-body); color: var(--ink); text-align: left; cursor: pointer; border-radius: 14px;
}
.t-acc-chevron svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.t-acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--acc-collapse) var(--acc-ease); }
.t-acc[data-open="true"] .t-acc-panel { grid-template-rows: 1fr; transition: grid-template-rows var(--acc-expand) var(--acc-ease); }
.t-acc-panel-inner { overflow: hidden; opacity: 0; filter: blur(var(--blur-small)); transition: opacity var(--acc-collapse) var(--acc-ease), filter var(--acc-collapse) var(--acc-ease); }
.t-acc[data-open="true"] .t-acc-panel-inner { opacity: 1; filter: blur(0); transition: opacity var(--acc-expand) var(--acc-ease), filter var(--acc-expand) var(--acc-ease); }
.t-acc-panel-inner > div { padding: 0 16px 16px; color: var(--ink-soft); }
.t-acc-chevron { display: inline-flex; transform: scaleY(1); transform-origin: center; transition: transform var(--acc-chevron) var(--acc-ease); }
.t-acc-chevron path { vector-effect: non-scaling-stroke; }
.t-acc[data-open="true"] .t-acc-chevron { transform: scaleY(-1); }
@media (prefers-reduced-motion: reduce) { .t-acc-panel, .t-acc-panel-inner, .t-acc-chevron { transition: none !important; } }

/* Hero reveal: transitions-dev 18 texts reveal */
.t-stagger-line { display: block; }
.js .t-stagger-line { opacity: 0; transform: translateY(var(--stagger-distance)); filter: blur(var(--stagger-blur));
  transition: opacity var(--stagger-dur) var(--stagger-ease), transform var(--stagger-dur) var(--stagger-ease), filter var(--stagger-dur) var(--stagger-ease); }
.js .t-stagger-line--2 { transition-delay: var(--stagger-stagger); }
.js .t-stagger-line--3 { transition-delay: calc(var(--stagger-stagger) * 2); }
.js .t-stagger.is-shown .t-stagger-line { opacity: 1; transform: translateY(0); filter: blur(0); }
@media (prefers-reduced-motion: reduce) { .t-stagger-line { transition: none !important; opacity: 1; transform: none; filter: none; } }

/* Barra CTA fissa su telefono */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  transform: translateY(110%); transition: transform var(--duration-medium) var(--ease-smooth-out);
}
.sticky-cta.is-on { transform: translateY(0); }
.sticky-cta .small { line-height: 1.25; }
@media (prefers-reduced-motion: reduce) { .sticky-cta { transition: none; } }

/* Form */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; }
.field input[type="text"], .field input[type="email"] {
  min-height: 52px; padding: 0 14px; border-radius: var(--r-ctl); border: 2px solid #857D73; background: var(--surface);
  font: 400 17px var(--font-body); color: var(--ink);
}
.field input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: 14px; color: var(--ink-soft); align-items: start; }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); }
.form-error { color: var(--accent); font-size: 14px; font-weight: 600; min-height: 1em; }

/* Successo: transitions-dev 10 success check (versione ridotta) */
.success { display: none; text-align: center; gap: 14px; justify-items: center; padding: 8px 0; }
.success.is-on { display: grid; }
.success-check {
  width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 36px;
}
/* Visibile anche senza script: l'entrata è un'animazione che parte solo quando il blocco si apre. */
.success.is-on .success-check { animation: spunta var(--duration-very-slow) var(--ease-bounce) both; }
@keyframes spunta { from { opacity: 0; transform: scale(0.6); filter: blur(var(--blur-large)); } to { opacity: 1; transform: scale(1); filter: blur(0); } }
@media (prefers-reduced-motion: reduce) { .success.is-on .success-check { animation: none; } }

/* Piede */
footer { padding: 40px 0 120px; font-size: 14px; color: var(--ink-soft); border-top: 1px solid var(--line); }
footer .wrap { display: grid; gap: 8px; }
.preview-flag { display: inline-block; background: var(--ink); color: var(--bg); border-radius: var(--r-pill); padding: 4px 12px; font-size: 13px; font-weight: 600; }

/* Desktop */
@media (min-width: 860px) {
  section { padding: 96px 0; }
  .hero { padding: 56px 0 80px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; }
  .hero-cta { grid-auto-flow: column; justify-content: start; }
  .quotes { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 24px; }
  .bonus { grid-template-columns: 1fr 1fr; }
  .guarantee { grid-template-columns: auto 1fr; gap: 28px; }
  .sticky-cta { display: none; }
  footer { padding-bottom: 48px; }
}

/* Correzioni dopo la critica */
@media (max-width: 859px) { .bar-on .top-cta { visibility: hidden; } }
[data-more] { justify-self: start; }
.hero-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow); }
.hero-form .form { gap: 12px; }
.item .n { display: flex; flex-direction: column; padding: 6px 0; }
.item .buy { font-size: 13px; color: var(--ink-soft); }

/* Pagine di testo: venditore, termini, privacy */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(32px, 7vw, 46px); margin-bottom: 16px; }
.prose h2 { font-size: 24px; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--ink); }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 12px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.table-wrap { overflow-x: auto; margin: 8px 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose table:has(th:nth-child(4)) { min-width: 640px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--tint); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }
[hidden] { display: none !important; }
.logo img { display:block; height: 28px; width: auto; }
.section-head { align-content: start; }
footer .preview-flag { justify-self: start; }

/* Zone da toccare di almeno 44 px senza cambiare l'aspetto: il padding allarga l'area, il margine negativo lascia il testo dov'è. */
.logo { display: inline-flex; align-items: center; min-height: 44px; }
footer a, .src a { display: inline-block; padding: 15px 4px; margin: -15px -4px; }

/* Link dentro i testi e le tabelle: l'area toccabile sale a 44 px in altezza senza spostare le righe. */
.prose a, main p a:not(.btn), main li a:not(.btn) { padding: 13px 1px; }
.prose td, .prose th { font-size: 16px; }
footer a { min-width: 44px; text-align: center; }
footer .social i { margin-right: 4px; vertical-align: -2px; }
