/* Ristoboost landing — design system "Organic" (Caprasimo + Figtree, pill shapes,
   rounded panels) with the "Arancio & Blu notte" palette (option 3c of the wireframe).
   One recurring object carries the page: the restaurant receipt. It prints in the
   hero and it prints the visitor's own yearly bill in the calculator.

   Color is semantic, never decorative:
   - navy  (--color-text)   text and the calculator panel
   - cream (--color-bg)     page background; white (--color-paper) receipts, fields, cards
   - orange (accent ramp)   ONLY money lost to the booking apps
   - blue  (accent-2 ramp)  ONLY Ristoboost / what you keep / what to do,
                            including every primary button (.btn-primary)
   Every color comes from the tokens below; retune the palette here. */

:root {
  --color-bg: #F3EEE6;
  --color-text: #0D1838;
  --color-paper: #FFFFFF;
  --color-accent: #FF5B14;
  --color-accent-2: #2D63F0;

  --color-neutral-100: #e8e3dd;
  --color-neutral-200: #dcd9d5;
  --color-neutral-300: #cac7c7;
  --color-neutral-400: #a3a3a9;
  --color-neutral-500: #8c8e98;
  --color-neutral-600: #747886;
  --color-neutral-700: #575c70;
  --color-neutral-800: #363f57;
  --color-neutral-900: #242d49;

  --color-accent-100: #ffebe3;
  --color-accent-200: #ffd8c7;
  --color-accent-300: #ffb595;
  --color-accent-400: #ff844f;
  --color-accent-500: #FF5B14;
  --color-accent-600: #d94d11;
  --color-accent-700: #a63b0d;
  --color-accent-800: #802e0a;
  --color-accent-900: #592007;

  --color-accent-2-100: #e6ecfd;
  --color-accent-2-200: #cddafb;
  --color-accent-2-300: #a1b9f8;
  --color-accent-2-400: #628af4;
  --color-accent-2-500: #2D63F0;
  --color-accent-2-600: #2654cc;
  --color-accent-2-700: #1d409c;
  --color-accent-2-800: #173278;
  --color-accent-2-900: #102354;

  --font-heading: "Caprasimo", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  /* Receipt printer type — used only on the receipts */
  --font-receipt: ui-monospace, Menlo, Consolas, monospace;

  --shadow-sm: 0 2px 6px #0D183822;
  --shadow-md: 0 10px 24px #0D183826;
  --shadow-lg: 0 20px 44px #0D183833;
  --color-loss: #D21F1F;

  --wrap: 1200px;
  --pad: 64px;
  --tap: 52px; /* minimum touch target for primary controls */
}

/* ── Base ─────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--color-accent-2-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-2-800); }
button { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--color-accent-2-500); outline-offset: 3px; }
::selection { background: rgba(45, 99, 240, .25); }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 16px; }

.wrap { width: 100%; max-width: var(--wrap); margin-left: auto; margin-right: auto; padding-left: var(--pad); padding-right: var(--pad); }

.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: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--color-text); color: var(--color-bg);
  padding: 12px 20px; border-radius: 999px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 16px; color: var(--color-bg); }

.tel-link { color: inherit; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; }
.tel-link:hover { color: var(--color-accent-2-700); }

/* ── Buttons: one primary style, used by every call to action ─────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 16px/1.2 var(--font-body); text-decoration: none; white-space: nowrap;
  padding: 12px 24px;
  transition: background-color .15s ease, transform .12s ease, box-shadow .12s ease;
}
.btn-lg { min-height: 64px; font-size: 18px; padding: 20px 32px; }
.btn-block { width: 100%; }

/* Primary buttons behave like a till key: a solid edge underneath that compresses when pressed */
.btn-primary {
  background: var(--color-accent-2-500); color: #fff;
  box-shadow: 0 5px 0 var(--color-accent-2-800), 0 14px 26px #2D63F04D;
}
.btn-primary:hover {
  background: var(--color-accent-2-600); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--color-accent-2-800), 0 18px 32px #2D63F059;
}
.btn-primary:active {
  background: var(--color-accent-2-700); color: #fff;
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--color-accent-2-800), 0 4px 10px #2D63F040;
}
.btn-primary:disabled { transform: none; cursor: progress; }

/* Shared type */
.h-section { font-size: 52px; line-height: 1.02; letter-spacing: -.01em; text-wrap: balance; }
.lead { font-size: 18px; line-height: 1.6; color: var(--color-neutral-800); }

/* ── Receipt (shared by hero and calculator) ──────────────────────────── */

.receipt { filter: drop-shadow(0 2px 2px rgba(13, 24, 56, .08)) drop-shadow(0 24px 36px rgba(13, 24, 56, .22)); }
.receipt-paper {
  background: var(--color-paper);
  padding: 30px 28px 22px;
  font-family: var(--font-receipt); font-size: 14px; color: var(--color-text);
  display: flex; flex-direction: column; gap: 10px;
}
.receipt-title { text-align: center; font-weight: 700; letter-spacing: .08em; }
.receipt-meta { text-align: center; font-size: 12px; color: var(--color-neutral-700); }
.receipt-rule { border-top: 2px dashed var(--color-neutral-300); margin: 6px 0; }
.receipt-row { display: flex; justify-content: space-between; gap: 16px; }
.receipt-row > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.receipt-row--fee { color: var(--color-loss); }
.receipt-total { font-weight: 700; font-size: 18px; }
.receipt-total s { position: relative; text-decoration: none; }
.receipt-total s::after {
  content: ""; position: absolute; left: -4px; right: -4px; top: 50%;
  height: 3px; margin-top: -1px; background: var(--color-loss); border-radius: 2px;
  transform-origin: left center;
}
.receipt-foot { font-size: 11px; color: var(--color-neutral-700); text-align: center; margin-top: 8px; }
.receipt-edge {
  height: 14px;
  background: radial-gradient(circle at 9px 0, transparent 8px, var(--color-paper) 8.5px) repeat-x;
  background-size: 18px 14px;
}

.stamp {
  position: absolute;
  border-radius: 50%;
  background: var(--color-accent-2-500); color: #fff;
  transform: rotate(-12deg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  box-shadow: inset 0 -6px 0 #0000001F, 0 6px 0 var(--color-accent-2-800), 0 22px 40px #0D183859;
  outline: 3px dashed rgba(255, 255, 255, .55); outline-offset: -12px;
  text-align: center;
}
.stamp-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.stamp-value { font-family: var(--font-heading); font-size: 46px; line-height: 1; }
.stamp-note { font-size: 13px; font-weight: 600; }

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero { position: relative; overflow: hidden; }
.hero-inner { position: relative; max-width: var(--wrap); margin-left: auto; margin-right: auto; }

.nav {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 24px; padding-bottom: 24px;
}
.nav-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; text-decoration: none; color: var(--color-text); }
.nav-brand:hover { color: var(--color-text); }
.nav-brand-name { font-family: var(--font-heading); font-size: 26px; line-height: 1; letter-spacing: -.01em; }
.nav-brand img { display: block; width: 66px; height: 48px; }
.nav-brand:hover img { transform: rotate(-6deg); }
.nav-brand img { transition: transform .2s ease; }
.nav-actions { display: flex; gap: 28px; align-items: center; }
.nav-phone {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px;
  color: var(--color-text); font-size: 17px; font-weight: 700; text-decoration: none;
}
.nav-phone:hover { color: var(--color-accent-2-700); text-decoration: underline; text-decoration-thickness: 2px; }
.nav-phone svg, .nav-phone-icon svg { width: 20px; height: 20px; flex: none; }
.nav-phone-icon { display: none; }

.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
  padding-top: 48px; padding-bottom: 72px;
}
.hero-copy { display: flex; flex-direction: column; gap: 26px; }
.hero-title { font-size: 66px; line-height: .98; letter-spacing: -.02em; text-wrap: balance; }
.hero-title-loss { color: var(--color-loss); white-space: nowrap; }
.hero-body { font-size: 20px; line-height: 1.55; max-width: 520px; text-wrap: pretty; }
.hero-cta { display: flex; align-items: center; gap: 20px; margin-top: 4px; }
.hero-cta-note b { color: var(--color-text); }
.hero-cta-note { font-size: 15px; line-height: 1.4; color: var(--color-neutral-800); }
.hero-call { font-size: 17px; color: var(--color-neutral-800); margin-top: -6px; }

.hero-visual { position: relative; display: flex; justify-content: center; padding: 20px 0 110px; }
/* One soft circle behind the receipt: it frames the receipt as the focal point.
   Centered on the receipt (the visual has 20px top / 90px bottom padding). */
.hero-blob {
  position: absolute; left: 50%; top: calc(50% - 35px);
  width: 480px; height: 480px; border-radius: 50%;
  background: var(--color-accent-2-100);
  transform: translate(-50%, -50%);
}
.receipt--hero { width: 330px; transform: rotate(3deg); }
.stamp--hero { left: 0; left: max(0px, calc(50% - 235px)); bottom: 0; width: 170px; height: 170px; }

/* The one orchestrated moment: the receipt prints, the total gets struck out,
   then the Ristoboost stamp lands on it. */
@media (prefers-reduced-motion: no-preference) {
  .receipt--hero { animation: receipt-print 1.1s cubic-bezier(.3, .7, .2, 1) .25s backwards; }
  .receipt--hero .receipt-total s::after { animation: strike .35s ease-out 1.45s backwards; }
  .stamp--hero { animation: stamp-in .45s cubic-bezier(.2, 1.4, .4, 1) 1.9s backwards; }
  /* Visual hook: once the stamp lands, the main button "knocks" twice to invite the click */
  .hero-cta .btn-primary { animation: knock .9s ease-out 2.5s; }
}
@keyframes knock {
  0%, 100% { transform: translateY(0); box-shadow: 0 5px 0 var(--color-accent-2-800), 0 14px 26px #2D63F04D, 0 0 0 0 #2D63F066; }
  20% { transform: translateY(4px); box-shadow: 0 1px 0 var(--color-accent-2-800), 0 4px 10px #2D63F040, 0 0 0 0 #2D63F066; }
  40% { transform: translateY(-3px); box-shadow: 0 8px 0 var(--color-accent-2-800), 0 18px 32px #2D63F059, 0 0 0 10px #2D63F033; }
  60% { transform: translateY(4px); box-shadow: 0 1px 0 var(--color-accent-2-800), 0 4px 10px #2D63F040, 0 0 0 16px #2D63F01A; }
  80% { transform: translateY(-1px); box-shadow: 0 6px 0 var(--color-accent-2-800), 0 14px 26px #2D63F04D, 0 0 0 22px #2D63F000; }
}
@keyframes receipt-print {
  from { clip-path: inset(0 -60px 100% -60px); transform: translateY(-40px) rotate(3deg); }
  to   { clip-path: inset(-60px -60px -80px -60px); transform: translateY(0) rotate(3deg); }
}
@keyframes strike { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes stamp-in {
  from { opacity: 0; transform: rotate(-30deg) scale(1.7); }
  to   { opacity: 1; transform: rotate(-12deg) scale(1); }
}

.proof { position: relative; border-top: 2px solid var(--color-neutral-200); }
.proof-list { display: flex; flex-wrap: wrap; gap: 12px 56px; align-items: baseline; padding-top: 22px; padding-bottom: 22px; font-size: 16px; }
.proof-list b { font-family: var(--font-heading); font-weight: 400; font-size: 28px; margin-right: .3em; }

/* ── Rounded panels (calculator, form) ────────────────────────────────── */

.panel {
  position: relative; overflow: hidden;
  width: calc(100% - 48px); max-width: calc(var(--wrap) - 48px); margin-left: auto; margin-right: auto;
  border-radius: 40px; padding: 88px var(--pad);
}

/* ── Calcolatore ──────────────────────────────────────────────────────── */

.calc { background: var(--color-text); color: var(--color-bg); margin-top: 48px; margin-bottom: 96px; }
/* On navy the lighter blue keeps the focus ring clearly visible */
.calc :focus-visible { outline-color: var(--color-accent-2-300); }
.calc-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 72px; align-items: start;
}
.calc-title { font-size: 52px; line-height: 1.02; letter-spacing: -.01em; text-wrap: balance; }
.calc-intro { font-size: 18px; line-height: 1.55; color: var(--color-neutral-300); margin-top: 14px; max-width: 46ch; }

.calc-form { display: flex; flex-direction: column; margin-top: 36px; }
.calc-field {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center;
  padding-top: 18px; padding-bottom: 18px; border-top: 2px solid rgba(255, 255, 255, .1);
}
.calc-field:last-child { border-bottom: 2px solid rgba(255, 255, 255, .1); }
.calc-field label { display: block; font-size: 18px; font-weight: 700; line-height: 1.3; }
.calc-hint { font-size: 15px; line-height: 1.4; color: var(--color-neutral-300); margin-top: 4px; }

.stepper { display: flex; align-items: center; gap: 8px; }
.stepper-btn {
  width: var(--tap); height: var(--tap); flex: none; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: transparent; color: var(--color-bg);
  border: 2px solid rgba(255, 255, 255, .5);
  font-size: 26px; font-weight: 600; line-height: 1;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
  touch-action: manipulation;
}
.stepper-btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .8); }
.stepper-btn:active { background: var(--color-accent-2-500); border-color: var(--color-accent-2-500); transform: scale(.88); }
.stepper-input {
  width: 4.2em; height: var(--tap); padding: 0; margin: 0;
  font: 700 24px var(--font-body); color: var(--color-bg); text-align: center;
  background: rgba(255, 255, 255, .07); border: 2px solid transparent; border-radius: 16px;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-input:hover { background: rgba(255, 255, 255, .11); }
.stepper-input:focus { background: rgba(255, 255, 255, .14); border-color: var(--color-accent-2-300); }
.stepper-input:focus-visible { outline: none; }

.calc-controls, .calc-out { min-width: 0; }
.calc-out { display: flex; flex-direction: column; gap: 40px; }
.calc-receipt-wrap { position: relative; padding-right: 12px; }
.receipt--calc { transform: rotate(-1.5deg); filter: drop-shadow(0 22px 34px rgba(0, 0, 0, .35)); }
.receipt--calc .receipt-paper { padding: 28px 26px 20px; }
.receipt-total-label { font-weight: 700; letter-spacing: .06em; margin-top: 2px; }
.receipt-big {
  font-family: var(--font-heading); font-size: 52px; line-height: 1; letter-spacing: -.02em;
  color: var(--color-loss); font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.receipt-big.is-long { font-size: 40px; }
.receipt-big.is-xlong { font-size: 30px; }
.receipt-month { font-family: var(--font-body); font-size: 16px; color: var(--color-neutral-800); }
.stamp--calc { right: -14px; bottom: -34px; width: 124px; height: 124px; outline-offset: -9px; }
.stamp--calc .stamp-kicker { font-size: 11px; letter-spacing: .04em; }
.stamp--calc .stamp-value { font-size: 36px; }
.stamp--calc .stamp-note { font-size: 12px; }

/* Answers the visitor's change: the new total gets a brief highlight */
@media (prefers-reduced-motion: no-preference) {
  .receipt-big.is-updated { animation: total-tick .4s ease-out; }
}
@keyframes total-tick {
  from { background: #FDE4E4; }
  to   { background: transparent; }
}

.calc-action { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.calc-action-note { font-size: 18px; font-weight: 600; line-height: 1.45; color: var(--color-bg); max-width: 32ch; }

/* ── Cosa cambia ──────────────────────────────────────────────────────── */

.features { padding-top: 112px; padding-bottom: 112px; display: flex; flex-direction: column; gap: 96px; }
.features-title { max-width: 620px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.feature-copy { display: flex; flex-direction: column; gap: 16px; }
.feature-title { font-size: 40px; line-height: 1.05; }
.feature-body { font-size: 18px; line-height: 1.6; max-width: 440px; }

/* Before / after: two short lines, today in grey, Ristoboost in bold with a blue dot */
.change {
  display: flex; flex-direction: column; gap: 10px; max-width: 470px;
  margin-top: 6px; padding-top: 18px; border-top: 2px dashed var(--color-neutral-300);
}
.change-row { display: flex; align-items: baseline; gap: 12px; }
.change dt { flex: none; width: 9.5em; font-size: 15px; font-weight: 700; line-height: 1.4; }
.change dd { min-width: 0; font-size: 17px; line-height: 1.45; }
.change dt::before {
  content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  margin-right: 8px; vertical-align: -1px;
}
.change-row--before { color: var(--color-neutral-700); }
.change-row--before dt::before { box-shadow: inset 0 0 0 2px var(--color-neutral-400); }
.change-row--after { color: var(--color-text); }
.change-row--after dd { font-weight: 700; }
.change-row--after dt::before { background: var(--color-accent-2-500); }

.feature-panel {
  height: 340px; border-radius: 32px; background: var(--color-accent-2-100);
  display: flex; align-items: center; justify-content: center;
}

.mini-card {
  background: #fff; border-radius: 22px; padding: 20px; box-shadow: var(--shadow-md);
  display: flex; flex-direction: column;
}
.mini-place { width: 300px; gap: 10px; }
.mini-photo {
  display: block; width: 100%; height: 120px; object-fit: cover;
  border-radius: 14px; background: var(--color-neutral-200);
}
.mini-place-name { font-weight: 700; font-size: 17px; }
.mini-place-meta { font-size: 13px; color: var(--color-neutral-700); }
.mini-place-btn {
  background: var(--color-accent-2-500); color: #fff; border-radius: 999px; padding: 12px;
  text-align: center; font-weight: 700; font-size: 15px;
}
.mini-place-fee { font-size: 12px; text-align: center; color: var(--color-accent-2-800); font-weight: 700; }

.mini-chat { width: 310px; display: flex; flex-direction: column; gap: 10px; }
.bubble { font-size: 14px; }
.bubble--in {
  align-self: flex-start; max-width: 250px; background: #fff;
  border-radius: 20px 20px 20px 6px; padding: 14px 16px; line-height: 1.45; box-shadow: var(--shadow-sm);
}
.bubble-link { display: block; color: var(--color-accent-2-700); font-weight: 700; margin-top: 6px; text-decoration: underline; }
.bubble--out {
  align-self: flex-end; background: var(--color-accent-2-500); color: #fff;
  border-radius: 20px 20px 6px 20px; padding: 12px 16px;
}
.mini-toast {
  align-self: center; background: var(--color-text); color: var(--color-bg);
  border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 700; margin-top: 6px;
}

.mini-campaign { width: 320px; gap: 12px; }
.mini-campaign-to { font-size: 12px; font-weight: 700; color: var(--color-neutral-700); }
.mini-campaign-msg { font-size: 15px; line-height: 1.5; background: var(--color-bg); border-radius: 14px; padding: 12px; }
.mini-campaign-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--color-neutral-700); }
.mini-campaign-send {
  background: var(--color-text); color: var(--color-bg); border-radius: 999px;
  padding: 9px 16px; font-size: 14px; font-weight: 700;
}

/* ── Come si parte ────────────────────────────────────────────────────── */

/* Results: two proof numbers right after the promise */
.results { padding-top: 112px; }
.calc + .results { padding-top: 0; }
.results-title { margin-bottom: 40px; }
.results-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.result {
  background: var(--color-paper); border-radius: 32px; padding: 36px 40px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 5px 0 var(--color-accent-2-100), var(--shadow-md);
}
.result-n { font-family: var(--font-heading); font-size: 64px; line-height: 1; color: var(--color-accent-2-700); white-space: nowrap; }
.result-t { font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--color-text); text-wrap: balance; }
.result-d { font-size: 17px; line-height: 1.55; color: var(--color-neutral-800); }
.results-note { margin-top: 20px; font-size: 15px; color: var(--color-neutral-700); }

.steps { background: var(--color-paper); padding-top: 112px; padding-bottom: 112px; }
.steps-title { max-width: 720px; }
.steps-list {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px;
  margin-top: 64px;
}
/* The dashed line joining the steps — the same perforation as the receipt */
.steps-list::before {
  content: ""; position: absolute; top: 33px; left: 34px;
  right: calc((100% - 80px) / 3 - 34px);
  border-top: 3px dashed var(--color-neutral-300);
}
.step { position: relative; display: flex; flex-direction: column; gap: 22px; }
.step-num {
  width: 68px; height: 68px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-heading); font-size: 32px; line-height: 1;
  background: var(--color-accent-2-500); color: #fff;
  box-shadow: 0 0 0 8px var(--color-paper);
}
.step-title { font-size: 28px; line-height: 1.1; margin-bottom: 10px; text-wrap: balance; }
.step-copy p { font-size: 18px; line-height: 1.55; color: var(--color-neutral-800); max-width: 34ch; }
.steps-cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 56px; }
.steps-cta p { font-size: 16px; color: var(--color-neutral-800); }

/* ── Storie ───────────────────────────────────────────────────────────── */

.stories { padding-top: 120px; padding-bottom: 96px; }
.stories-title { margin-bottom: 48px; }
.story { display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: center; }
.story-portrait { position: relative; }
.story-photo {
  aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--color-neutral-200);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 13px; color: var(--color-neutral-700); padding: 40px;
}
.story-photo img { width: 100%; height: 100%; object-fit: cover; }
.story-badge {
  position: absolute; right: -8px; bottom: 12px;
  background: var(--color-accent-2-500); color: #fff; border-radius: 999px;
  padding: 10px 18px; font-weight: 700; font-size: 16px;
}
.story-copy { display: flex; flex-direction: column; gap: 20px; }
.story-quote { font-family: var(--font-heading); font-size: 44px; line-height: 1.12; letter-spacing: -.01em; text-wrap: pretty; }
.story-who { font-size: 17px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 80px; }
.stat { border-radius: 32px; background: var(--color-paper); padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.stat-n { font-family: var(--font-heading); font-size: 52px; line-height: 1; color: var(--color-accent-2-700); }
.stat-t { font-size: 17px; font-weight: 600; }
.stat-who { font-size: 15px; color: var(--color-neutral-700); }

/* ── FAQ ──────────────────────────────────────────────────────────────── */

.faq { padding-top: 40px; padding-bottom: 120px; display: grid; grid-template-columns: 380px 1fr; gap: 64px; }
.faq-intro { display: flex; flex-direction: column; gap: 16px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { border-radius: 24px; background: transparent; transition: background-color .15s ease; }
.faq-item:hover, .faq-item.is-open { background: var(--color-paper); }
.faq-q { font: inherit; }
.faq-q button {
  width: 100%; min-height: 72px; display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 20px 26px; border: 0; background: none; border-radius: 24px; cursor: pointer; text-align: left;
  font: 700 19px/1.35 var(--font-body); color: var(--color-text);
}
.faq-icon {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--color-text); color: var(--color-bg);
  display: flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1;
}
.faq-a { padding: 0 26px 22px; margin-top: -10px; }
.faq-a p { font-size: 18px; line-height: 1.6; max-width: 560px; color: var(--color-neutral-800); }

/* ── Form (#contatti) ─────────────────────────────────────────────────── */

.cta { background: var(--color-accent-2-100); }
.cta-title { font-size: 72px; line-height: .98; letter-spacing: -.02em; max-width: 760px; text-wrap: balance; }
.cta-body { font-size: 20px; line-height: 1.55; margin-top: 20px; max-width: 560px; }
.cta-savings {
  display: inline-block; margin-top: 20px;
  background: var(--color-paper); border-radius: 18px; padding: 14px 20px;
  font-size: 18px; box-shadow: var(--shadow-sm);
}
/* Money lost to the apps: the one orange word in the form panel */
.cta-savings b { color: var(--color-loss); }

.cta-form {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 16px; margin-top: 36px;
}
.cta-field label, .cta-slots legend { display: block; font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--color-text); }
.cta-optional { font-weight: 500; color: var(--color-neutral-700); }
.cta-input {
  width: 100%; min-width: 0; height: 60px;
  background: var(--color-paper); border: 2px solid var(--color-neutral-600); border-radius: 999px;
  padding: 0 22px; font: 500 18px var(--font-body); color: var(--color-text);
  caret-color: var(--color-accent-2-600);
}
.cta-input:hover { border-color: var(--color-accent-2-300); }
.cta-input:focus { border-color: var(--color-accent-2-600); }
.cta-input:focus-visible { outline: 3px solid var(--color-accent-2-600); outline-offset: 2px; }
.cta-input[aria-invalid="true"] { border-color: var(--color-text); border-width: 3px; }
.cta-field-error { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding-left: 4px; font-size: 15px; font-weight: 700; color: var(--color-text); }
/* Error marker: a filled navy "!" so the state reads without relying on color */
.cta-field-error::before {
  content: "!"; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%;
  display: grid; place-items: center; background: var(--color-text); color: var(--color-paper); font-size: 13px; line-height: 1;
}

/* Anti-spam field: off screen, only bots fill it in */
.cta-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cta-slots { grid-column: 1 / -1; border: 0; padding: 0; min-width: 0; }
.cta-slots legend { padding: 0; }
.cta-slot-options { display: flex; flex-wrap: wrap; gap: 10px; }
.slot { position: relative; cursor: pointer; }
.slot input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.slot span {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px;
  padding: 12px 20px; border-radius: 999px; border: 2px solid var(--color-neutral-600);
  background: var(--color-paper); font-size: 16px; font-weight: 600;
  transition: background-color .15s ease;
}
.slot span::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 2px solid var(--color-neutral-600); background: var(--color-paper);
}
.slot:hover span { border-color: var(--color-accent-2-300); }
.slot input:checked + span { background: var(--color-text); border-color: var(--color-text); color: var(--color-bg); }
.slot input:checked + span::before { border-color: var(--color-bg); background: var(--color-accent-2-500); box-shadow: inset 0 0 0 3px var(--color-text); }
.slot input:focus-visible + span { outline: 3px solid var(--color-accent-2-600); outline-offset: 3px; }

.cta-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.cta-submit { min-width: 220px; }
.cta-submit:disabled { opacity: .6; cursor: progress; }
.cta-fine { font-size: 15px; color: var(--color-text); }
.cta-privacy { grid-column: 1 / -1; font-size: 15px; line-height: 1.5; color: var(--color-text); }
.cta-privacy a { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; }

.cta-thanks {
  margin-top: 36px; max-width: 680px;
  background: var(--color-paper); border-radius: 32px; padding: 28px 32px;
  font-size: 19px; line-height: 1.5; box-shadow: var(--shadow-sm);
}
.cta-thanks-title { font-family: var(--font-heading); font-size: 32px; line-height: 1.1; margin-bottom: 8px; }
.cta-fix {
  margin-top: 14px; padding: 8px 0; min-height: 48px; border: 0; background: none; cursor: pointer;
  font-size: 16px; font-weight: 700; color: var(--color-accent-2-700);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.cta-fix:hover { color: var(--color-accent-2-900); }
.cta-alt { margin-top: 28px; font-size: 17px; color: var(--color-text); }

/* ── Footer ───────────────────────────────────────────────────────────── */

.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap;
  padding-top: 40px; padding-bottom: 40px; font-size: 15px; color: var(--color-neutral-700);
}
.footer-brand img { display: block; width: 55px; height: 40px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--color-accent-2-700); text-decoration: underline; }

/* Sticky mobile CTA — hidden on desktop */
.sticky-cta { display: none; }

/* ══ Responsive ═══════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
  :root { --pad: 40px; }
  .hero-title { font-size: 58px; }
  .h-section, .calc-title { font-size: 44px; }
  .faq { grid-template-columns: 300px 1fr; gap: 48px; }
  .feature { gap: 48px; }
  .calc-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; }
  .calc-field { grid-template-columns: minmax(0, 1fr); }
  .story-quote { font-size: 36px; }
  .cta-title { font-size: 60px; }
  .result { padding: 32px; }
  .result-n { font-size: 50px; }
}

@media (max-width: 820px) {
  :root { --pad: 20px; }
  body { padding-bottom: 88px; }

  /* Nav: brand, icon-only phone button, Chiamatemi */
  .nav { padding-top: 16px; padding-bottom: 16px; }
  .nav-brand img { width: 55px; height: 40px; }
  .nav-brand { gap: 8px; }
  .nav-brand-name { font-size: 22px; }
  .nav-actions { gap: 10px; }
  .nav-phone { display: none; }
  .nav-phone-icon {
    display: grid; place-items: center; flex: none;
    width: 48px; height: 48px; border-radius: 50%;
    border: 2px solid var(--color-text); color: var(--color-text);
  }
  .nav-phone-icon:hover { color: var(--color-accent-2-700); border-color: var(--color-accent-2-700); }

  /* Hero: message and CTA first (they must fit the first screen), then the receipt */
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 20px; padding-top: 20px; padding-bottom: 48px; }
  .hero-copy { display: contents; }
  .hero-title { order: 2; font-size: 40px; line-height: 1.02; }
  .hero-visual { order: 8; padding: 20px 0 90px; }
  .receipt--hero { width: 280px; }
  /* Smaller circle so it stays behind the receipt */
  .hero-blob { width: 320px; height: 320px; top: calc(50% - 35px); }
  .hero-body { order: 4; font-size: 18px; }
  .hero-cta { order: 5; flex-direction: column; align-items: stretch; gap: 12px; }
  .hero-cta .btn { width: 100%; }
  .hero-cta-note { text-align: center; }
  .hero-cta-note br { display: none; }
  .hero-call { order: 6; font-size: 16px; margin-top: 0; text-align: center; }
  /* Stamp sits below the receipt so the struck-out total stays readable */
  .stamp--hero { left: auto; right: 0; bottom: -20px; width: 140px; height: 140px; }
  .stamp--hero .stamp-kicker { font-size: 11px; }
  .stamp--hero .stamp-value { font-size: 38px; }
  .proof-list { gap: 8px 28px; padding-top: 18px; padding-bottom: 18px; }
  .proof-list b { font-size: 24px; }

  .h-section, .calc-title { font-size: 36px; }
  .lead { font-size: 17px; }

  .panel { width: calc(100% - 24px); border-radius: 32px; padding: 52px 20px; }

  /* Calculator: controls, then the printed receipt */
  .calc { margin-top: 32px; margin-bottom: 64px; }
  .calc-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .calc-intro { font-size: 17px; }
  .calc-form { margin-top: 24px; }
  .calc-field { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 16px; padding-bottom: 16px; }
  .calc-field label { font-size: 17px; }
  .stepper { justify-content: space-between; }
  .stepper-input { flex: 1; width: 0; min-width: 0; }
  .calc-receipt-wrap { padding-right: 0; }
  .stamp--calc { right: -4px; bottom: -40px; }
  .receipt--calc .receipt-month { padding-right: 60px; }
  .calc-action { align-items: stretch; }
  .calc-action .btn { width: 100%; }

  /* Cosa cambia: text first, then the visual */
  .features { padding-top: 72px; padding-bottom: 72px; gap: 64px; }
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature--flip .feature-copy { order: -1; }
  .feature-title { font-size: 30px; }
  .feature-body { font-size: 17px; }
  .change dt { width: 8.6em; font-size: 14px; }
  .change dd { font-size: 16px; }
  .feature-panel { height: 300px; border-radius: 24px; }
  .mini-place, .mini-chat, .mini-campaign { width: min(300px, 82%); }

  /* Steps: vertical, the dashed line runs down the left */
  .steps { padding-top: 72px; padding-bottom: 72px; }
  .results { padding-top: 72px; }
  .results-list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .result { padding: 28px 24px; border-radius: 24px; }
  .result-n { font-size: 48px; }
  .result-t { font-size: 18px; }
  .steps-list { grid-template-columns: 1fr; gap: 32px; margin-top: 40px; }
  .steps-list::before { top: 30px; bottom: 30px; left: 29px; right: auto; border-top: 0; border-left: 3px dashed var(--color-neutral-300); }
  .step { flex-direction: row; gap: 18px; }
  .step-num { width: 60px; height: 60px; font-size: 28px; }
  .step-title { font-size: 24px; margin-top: 12px; }
  .step-copy p { font-size: 17px; }
  .steps-cta { margin-top: 40px; }
  .steps-cta .btn { width: 100%; }
  .steps-cta p { width: 100%; text-align: center; }

  .stories { padding-top: 72px; padding-bottom: 64px; }
  .story { grid-template-columns: 1fr; gap: 32px; }
  .story-portrait { width: 240px; }
  .story-photo { padding: 28px; }
  .story-quote { font-size: 28px; }
  .stats { grid-template-columns: 1fr; gap: 12px; margin-top: 48px; }
  .stat { padding: 24px; border-radius: 24px; }
  .stat-n { font-size: 44px; }

  .faq { grid-template-columns: 1fr; gap: 28px; padding-top: 24px; padding-bottom: 72px; }
  .faq-q button { font-size: 17px; padding: 18px 20px; }
  .faq-a { padding: 0 20px 18px; margin-top: -8px; }
  .faq-a p { font-size: 17px; }

  .cta-title { font-size: 42px; }
  .cta-body { font-size: 18px; }
  .cta-form { grid-template-columns: 1fr; }
  .cta-slot-options { flex-direction: column; }
  .slot span { width: 100%; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-submit { width: 100%; }
  .cta-thanks { padding: 24px; border-radius: 24px; }

  .footer { flex-direction: column; align-items: flex-start; }

  .sticky-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(243, 238, 230, .94);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--color-neutral-200);
    transition: transform .25s ease, visibility .25s;
  }
  .sticky-cta .btn { min-height: 56px; font-size: 18px; }
  .sticky-cta.is-hidden { transform: translateY(110%); visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-cta, .faq-item, .btn, .stepper-btn, .slot span, .nav-brand img { transition: none; }
  .btn-primary:hover, .btn-primary:active, .stepper-btn:active { transform: none; }
}

/* ── Legal pages (privacy, cookie) ───────────────────────────────────── */
.legal-nav { border-bottom: 1px solid var(--color-neutral-300); }
.legal { max-width: 760px; padding-top: 56px; padding-bottom: 96px; }
.legal h1 { font-size: 52px; line-height: 1.02; letter-spacing: -.01em; margin-bottom: 12px; }
.legal-updated { font-size: 15px; color: var(--color-neutral-700); margin-bottom: 40px; }
.legal h2 { font-size: 26px; line-height: 1.15; margin: 44px 0 12px; }
.legal p, .legal li { font-size: 18px; line-height: 1.65; color: var(--color-neutral-800); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; margin-top: 10px; display: grid; gap: 6px; }
.legal ul { list-style: disc; }
.legal-box { background: var(--color-paper); border-radius: 24px; padding: 24px 28px; margin-top: 12px; }
.legal-box p { margin: 0; }
.legal-back { display: inline-block; margin-top: 48px; font-weight: 700; }
@media (max-width: 820px) {
  .legal { padding-top: 32px; padding-bottom: 72px; }
  .legal h1 { font-size: 38px; }
  .legal h2 { font-size: 22px; }
  .legal p, .legal li { font-size: 17px; }
}
.nowrap { white-space: nowrap; }

/* ── Reviews (Trustpilot): 3 cards in a row, a swipeable carousel on phones ── */
.reviews-wrap { margin-top: 40px; }
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.review { display: flex; }
.review figure {
  flex: 1; display: flex; flex-direction: column; gap: 14px;
  background: var(--color-paper); border-radius: 32px; padding: 32px;
  box-shadow: 0 5px 0 var(--color-accent-2-100), var(--shadow-md);
}
.review-stars { display: flex; gap: 4px; }
.review-stars span { width: 26px; height: 26px; display: grid; place-items: center; background: #00B67A; border-radius: 4px; }
.review-stars svg { width: 18px; height: 18px; fill: #fff; }
.review-quote { display: grid; gap: 8px; }
.review-title { font-family: var(--font-heading); font-size: 24px; line-height: 1.15; color: var(--color-text); text-wrap: balance; }
.review-quote p:not(.review-title) { font-size: 17px; line-height: 1.6; color: var(--color-neutral-800); }
.review--short .review-title { font-size: 36px; line-height: 1.05; }
.review-who { margin-top: auto; padding-top: 6px; font-size: 16px; color: var(--color-neutral-800); }
.reviews-link { margin-top: 20px; font-size: 16px; }
.reviews-link a { font-weight: 700; }
.reviews:focus-visible { outline: 3px solid var(--color-accent-2-600); outline-offset: 6px; border-radius: 32px; }
.proof-link { color: inherit; text-decoration: none; }
.proof-link:hover { color: var(--color-accent-2-700); text-decoration: underline; }
@media (max-width: 1100px) {
  .review figure { padding: 28px; }
}
@media (max-width: 820px) {
  .reviews-wrap { margin-top: 24px; margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); }
  .reviews {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 4px var(--pad) 16px; scroll-padding-left: var(--pad); scroll-padding-right: var(--pad);
    scrollbar-width: none;
  }
  .reviews::-webkit-scrollbar { display: none; }
  /* 85% width so the next card peeks in and says "swipe" */
  .review { flex: 0 0 85%; scroll-snap-align: start; }
  .review figure { padding: 24px; border-radius: 24px; }
  .review-title { font-size: 22px; }
  .reviews-link { padding-left: var(--pad); padding-right: var(--pad); margin-top: 8px; }
}

/* ── WhatsApp button ─────────────────────────────────────────────────── */
.wa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25D366; color: #fff;
  box-shadow: 0 5px 0 #128C4B, 0 14px 28px #0D183840;
  transition: transform .15s ease, box-shadow .15s ease, bottom .25s ease;
}
.wa-float svg { width: 34px; height: 34px; fill: currentColor; }
.wa-float:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 7px 0 #128C4B, 0 18px 32px #0D18384D; }
.wa-float:active { transform: translateY(4px); box-shadow: 0 1px 0 #128C4B, 0 4px 10px #0D183833; }
.wa-float:focus-visible { outline: 3px solid var(--color-accent-2-600); outline-offset: 4px; }
/* A soft ring every few seconds, so it gets noticed without moving the page */
.wa-float::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 #25D36699; pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .wa-float::after { animation: wa-ring 6s ease-out 1s infinite; }
}
@keyframes wa-ring {
  0% { box-shadow: 0 0 0 0 #25D36699; }
  20%, 100% { box-shadow: 0 0 0 18px #25D36600; }
}
@media (max-width: 820px) {
  .wa-float { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 58px; height: 58px; }
  /* Stay above the sticky "Chiamatemi" bar when it is visible */
  .sticky-cta:not(.is-hidden) ~ .wa-float { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* Small phones: logo + name + "Chiamatemi" must fit one row. The phone icon goes:
   the number stays reachable from the hero, the WhatsApp button and the sticky bar. */
@media (max-width: 440px) {
  .nav-phone-icon { display: none; }
  .nav-brand img { width: 44px; height: 32px; }
  .nav-brand { gap: 6px; }
  .nav-brand-name { font-size: 20px; }
  .nav .btn { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 350px) {
  .nav-brand-name { font-size: 18px; }
  .nav .btn { padding-left: 14px; padding-right: 14px; font-size: 15px; }
}

.cta-trial { margin-top: 10px; font-size: 18px; line-height: 1.5; color: var(--color-text); }
.cta-trial b { color: var(--color-accent-2-700); }

/* Hero text always paints above the decorative circle */
.hero-title, .hero-body, .hero-cta, .hero-call { position: relative; z-index: 1; }
