/* ==========================================================================
   MilkTaxi | Edulica, landing page (v2, linguaggio visivo di edulica.it)
   Firma: foto virate in Deep Blue, titoli Abril bianchi/corallo, cornici corallo,
   badge circolare col pittogramma a cavallo delle sezioni, latte che "esplode".
   Regola forme: bottoni = pill, card/foto = 24-32px, input = 12px, badge = cerchio.
   ========================================================================== */

@font-face { font-family: "Abril Fatface"; src: url("../assets/fonts/AbrilFatface-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/Poppins-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/Poppins-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/Poppins-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/Poppins-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --deep-blue: #1a3d6b;
  --cornflower: #3d85c9;
  --sky: #8fd4fc;
  --pastel: #c4e8fa;
  --mandarin: #eb5945;
  --coral: #ff7063;
  --white: #ffffff;

  --navy-ink: #122d52;      /* Deep Blue scurito per profondità */
  --mist: #eaf6fd;
  --text: #22466f;
  --mandarin-dark: #c9402e;
  --line: #5f7ea6;

  --font-display: "Abril Fatface", Georgia, "Times New Roman", serif;
  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-h1: clamp(2.4rem, 1.3rem + 3vw, 3.7rem);
  --fs-h2: clamp(2.2rem, 1.3rem + 3vw, 4rem);
  --fs-h3: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem);
  --fs-lead: clamp(1.075rem, 1rem + .35vw, 1.3rem);

  --gutter: 20px;
  --section: clamp(84px, 7vw + 40px, 160px);
  --r-card: 28px;
  --r-input: 12px;
  --frame: 5px;

  --shadow: 0 24px 60px -28px rgba(18, 45, 82, .45);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --header-h: 68px;

  --pat-dark: url("../assets/img/pattern-pittogramma-scuro.svg");
  --pat-light: url("../assets/img/pattern-pittogramma-chiaro.svg");
  --pat-drops: url("../assets/img/pattern-gocce.svg");
  color-scheme: light;
}
@media (min-width: 768px) { :root { --gutter: 32px; --header-h: 76px; } }
@media (min-width: 1024px) { :root { --gutter: 48px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 1rem; line-height: 1.4; color: var(--text); background: var(--white); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3 { margin: 0; color: var(--deep-blue); font-weight: 400; font-family: var(--font-display); line-height: 1; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
em { font-style: normal; }
.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); position: relative; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 8px; }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 999px; background: var(--deep-blue); color: var(--white); text-decoration: none; }
.skip-link::before { content: "\2193"; font-size: 1.25rem; }
.skip-link:focus { top: 12px; }

/* ---------- Bottoni ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 58px; padding: 15px 32px; border: 0; border-radius: 999px;
  font-family: var(--font-body); font-size: 1.1875rem; font-weight: 700; line-height: 1.2; /* 19px bold: testo grande WCAG */
  text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn-primary { background: var(--mandarin); color: var(--white); box-shadow: none; }
.btn-primary::after { content: ""; width: 10px; height: 10px; border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor; transform: rotate(45deg); margin-left: 2px; transition: transform .25s var(--ease); flex: none; }
.btn-primary:hover { background: var(--mandarin-dark); }
.btn-primary:hover::after { transform: translateX(3px) rotate(45deg); }
.btn-primary:active { background: var(--mandarin-dark); }
.btn-block { width: 100%; }
@media (min-width: 1024px) { .btn { white-space: nowrap; } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); transition: box-shadow .3s var(--ease); }
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(18, 45, 82, .45); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand img { width: 140px; }
@media (min-width: 768px) { .brand img { width: 168px; } }
.nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 48px; height: 48px; padding: 12px; margin-right: -12px; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--deep-blue); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.site-nav { position: fixed; inset: var(--header-h) 0 auto 0; background: var(--white); border-top: 1px solid var(--pastel); box-shadow: var(--shadow); padding: 8px var(--gutter) 28px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s; }
.site-nav.is-open { transform: none; opacity: 1; visibility: visible; }
.site-nav a { display: block; padding: 14px 0; line-height: 1.2; font-size: .95rem; font-weight: 600; letter-spacing: .08em; text-decoration: none; color: var(--deep-blue); border-bottom: 1px solid var(--mist); }
.site-nav .nav-cta { margin-top: 16px; border: 0; border-radius: 999px; text-align: center; background: var(--mandarin); color: var(--white); padding: 16px 24px; font-weight: 700; }
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .site-nav { position: static; transform: none; opacity: 1; visibility: visible; background: none; border: 0; box-shadow: none; padding: 0; }
  .site-nav ul { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 28px); }
  .site-nav a { padding: 8px 0; border: 0; font-size: .78rem; letter-spacing: .1em; position: relative; white-space: nowrap; }
  .site-nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--mandarin); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
  .site-nav a:not(.nav-cta):hover::after { transform: scaleX(1); }
  .site-nav .nav-cta { margin: 0; padding: 12px 22px; font-size: .8rem; }
  .site-nav .nav-cta:hover { background: var(--mandarin-dark); }
}

/* ---------- Motivi condivisi ---------- */
/* Foto virate in blu, come l'hero del sito */
.photo-duo, .hero-bg { position: absolute; inset: 0; z-index: -2; background: var(--deep-blue); overflow: hidden; }
.photo-duo img, .hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.15); mix-blend-mode: luminosity; opacity: .38; }
.photo-duo::after, .hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(26, 61, 107, .92) 0%, rgba(26, 61, 107, .55) 55%, rgba(26, 61, 107, .2) 100%); }
.photo-duo--deep::after { background: linear-gradient(180deg, rgba(18, 45, 82, .85), rgba(26, 61, 107, .7)); }

/* Cornice corallo per le foto, come le card del sito */
.frame-coral { border: var(--frame) solid var(--mandarin); border-radius: var(--r-card); overflow: hidden; background: var(--mandarin); }
.frame-coral img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--r-card) - var(--frame)); }

/* Badge circolare con pittogramma a cavallo delle sezioni */
.picto-badge { position: absolute; left: 50%; z-index: 5; display: grid; place-items: center; width: 92px; height: 92px; margin-left: -46px; border-radius: 50%; background: var(--white); box-shadow: 0 10px 30px -12px rgba(18, 45, 82, .5); }
.picto-badge img { width: 52px; height: auto; }
/* centrato sulla linea corallo di 5px che separa le sezioni */
.picto-badge--top { top: -48.5px; }
.picto-badge--ring { text-decoration: none; }
.hero > .picto-badge--ring { bottom: -48.5px; }
.picto-badge--ring::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 3px dashed var(--mandarin); }
@media (prefers-reduced-motion: no-preference) {
  .picto-badge--ring::before { animation: spin 22s linear infinite; }
  .picto-badge--ring:hover img { animation: nudge .9s var(--ease) infinite alternate; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes nudge { to { transform: translateY(5px); } }

/* Etichetta di sezione (usata una volta: BENEFICI) */
.kicker { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-body); font-size: .85rem; font-weight: 700; letter-spacing: .18em; line-height: 1.2; color: var(--mandarin); }
.kicker-drop { width: 16px; height: 16px; background: var(--sky); border-radius: 50% 0 50% 50%; transform: rotate(-45deg); }

/* ---------- Altezza minima: ogni sezione occupa almeno la viewport ---------- */
main > section { min-height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; justify-content: center; } /* 100vh meno l'header fisso: la sezione si vede per intero */

/* ---------- HERO ---------- */
.hero { position: relative; isolation: isolate; overflow-x: clip; color: var(--white); padding-block: clamp(32px, 3.5vw, 64px) clamp(88px, 8vw, 130px); border-bottom: 5px solid var(--mandarin); }
.hero-bg::after { background: linear-gradient(100deg, rgba(26, 61, 107, .96) 0%, rgba(26, 61, 107, .82) 45%, rgba(26, 61, 107, .45) 100%); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; }
.hero-title { color: var(--white); font-size: var(--fs-h1); line-height: 1; letter-spacing: -.005em; max-width: 20ch; }
.hero-title em { color: var(--coral); }
.lead { font-size: var(--fs-lead); line-height: 1.4; color: #e4f1fb; max-width: 38ch; margin: 20px 0 0; }
.sticker {
  margin: 24px 0 28px; padding: 12px 22px 12px 18px;
  display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 .35em;
  background: var(--white); color: var(--deep-blue); border-radius: 16px;
  font-weight: 600; font-size: 1.05rem; line-height: 1.2;
  transform: rotate(-2.5deg); box-shadow: 0 16px 34px -16px rgba(0, 0, 0, .55);
  position: relative;
}
.sticker::before { content: ""; position: absolute; left: -10px; top: -10px; width: 26px; height: 26px; background: var(--sky); border-radius: 50% 0 50% 50%; transform: rotate(-45deg); }
.sticker strong { font-family: var(--font-display); font-weight: 400; font-size: 1.9em; line-height: 1; color: var(--mandarin); }

.hero-stage { position: relative; display: grid; place-items: center; min-height: 320px; }
.hero-splash { position: absolute; width: 118%; max-width: none; left: -6%; top: 50%; transform: translateY(-48%) rotate(-8deg); opacity: .95; pointer-events: none; }
.hero-product { position: relative; width: min(78%, 460px); filter: drop-shadow(0 34px 30px rgba(8, 22, 44, .55)); }

@media (max-width: 899px) {
  .hero-splash { width: 96%; left: 2%; }
  .hero-stage { margin-top: 8px; }
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.08fr .92fr; gap: 24px; }
  .hero-stage { min-height: 520px; }
  .hero-product { width: min(92%, 520px); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .9s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation: rise-tilt .9s var(--ease) .16s both; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .hero-splash { animation: splash-in 1.4s var(--ease) .1s both, splash-float 7s ease-in-out 1.5s infinite; }
  .hero-product { animation: product-in 1.1s var(--ease) .25s both, product-float 5.5s ease-in-out 1.35s infinite; }
}
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes rise-tilt { from { opacity: 0; transform: translateY(20px) rotate(-2.5deg); } to { opacity: 1; transform: rotate(-2.5deg); } }
@keyframes splash-in { from { opacity: 0; transform: translateY(-48%) rotate(-30deg) scale(.7); } to { opacity: .95; transform: translateY(-48%) rotate(-8deg) scale(1); } }
@keyframes product-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-16px) rotate(-1.2deg); } }
@keyframes splash-float { 0%, 100% { transform: translateY(-48%) rotate(-8deg) scale(1); } 50% { transform: translateY(-51%) rotate(-5deg) scale(1.025); } }
@keyframes product-in { from { opacity: 0; transform: translateY(50px) scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- PROBLEMA ---------- */
/* Titolo a tutta larghezza, poi riga 50/50 testo + foto orizzontale */
.problem { padding-block: clamp(110px, 13vh, 160px) clamp(96px, 12vh, 150px); position: relative; }
.problem-grid { display: grid; gap: 32px; }
.problem-title { line-height: 1; }
.problem-title span { display: block; }
.pt-1 { font-size: clamp(1.5rem, 1.05rem + 1.35vw, 2.3rem); line-height: 1; margin-bottom: .4em; }
.pt-2, .pt-3 { font-size: clamp(2.5rem, 1.35rem + 3.6vw, 4.6rem); line-height: 1; }
.pt-2 { color: var(--mandarin); }
.pt-3 { color: var(--deep-blue); }
.problem-media { aspect-ratio: 4 / 3; transform: rotate(1.5deg); box-shadow: var(--shadow); }
.problem-copy { font-size: var(--fs-lead); line-height: 1.4; }
.problem-copy p { margin: 0; }
.op { font-weight: 600; color: var(--mandarin-dark); }
.problem-risk {
  margin-top: 32px !important; position: relative;
  display: flex; align-items: center; gap: 18px;
  padding: 22px 28px 22px 22px; border-radius: 20px;
  background: var(--deep-blue); color: var(--white);
  font-size: var(--fs-lead); font-weight: 600; line-height: 1.2;
}
.problem-risk::before {
  content: "!"; flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--mandarin);
  font-family: var(--font-display); font-size: 1.35rem; line-height: 1;
}
@media (min-width: 768px) {
  /* testi a sinistra (titolo + paragrafo + box), immagine a destra centrata sull'intero blocco */
  .problem-grid { grid-template-columns: 1.12fr .88fr; column-gap: clamp(40px, 6vw, 96px); row-gap: clamp(28px, 3vw, 40px); align-items: start; }
  .problem-title { grid-column: 1; grid-row: 1; }
  .problem-copy { grid-column: 1; grid-row: 2; }
  .problem-media { grid-column: 2; grid-row: 1 / 3; align-self: stretch; aspect-ratio: auto; min-height: 420px; }
  .problem-media img { height: 100%; }
  .pt-2, .pt-3 { font-size: clamp(2.3rem, 1rem + 2.9vw, 3.6rem); }
}

/* ---------- SVOLTA ---------- */
.turn { position: relative; isolation: isolate; color: var(--white); padding-block: clamp(110px, 10vw, 170px) clamp(90px, 9vw, 150px); overflow-x: clip; }
.photo-duo--fixed img { display: none; }
/* sfondo fisso standard: foto virata in blu con background-attachment: fixed (sui dispositivi touch scorre normalmente) */
.photo-duo--fixed {
  background-color: var(--deep-blue);
  background-image: linear-gradient(rgba(26, 61, 107, .5), rgba(26, 61, 107, .5)), var(--duo-img);
  background-size: cover; background-position: center;
  background-attachment: fixed; background-blend-mode: normal, luminosity;
}
.turn .photo-duo--fixed { --duo-img: url("../assets/img/b1-dosaggio.webp"); }
.testimonials .photo-duo--fixed { --duo-img: url("../assets/img/testimonianze-sfondo.webp"); }
@media (hover: none) { .photo-duo--fixed { background-attachment: scroll; } }
.turn .photo-duo::after { background: linear-gradient(90deg, rgba(26, 61, 107, .96) 0%, rgba(26, 61, 107, .8) 50%, rgba(26, 61, 107, .45) 100%); }
.turn-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.turn-title { color: var(--white); font-size: clamp(2.6rem, 1.3rem + 4.6vw, 5.4rem); line-height: 1; max-width: 13ch; }
.turn-text { font-size: var(--fs-lead); line-height: 1.4; color: #e4f1fb; max-width: 40ch; margin: 0; }

/* ---------- BENEFICI: percorso + immagine sticky ---------- */
.benefits { padding-block: var(--section); background: var(--white); position: relative; }
.benefits::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 520px; background: linear-gradient(var(--mist), transparent); z-index: 0; }
.benefits .container { z-index: 1; }
.benefits-grid { margin-top: clamp(28px, 4vw, 56px); display: grid; gap: 40px; }

.bf-sticky { display: none; }
.route { --rail: 34px; --dot: 20px; position: relative; padding-left: var(--rail); display: grid; gap: clamp(64px, 8vw, 120px); }
.route-line { position: absolute; left: calc(var(--dot) / 2 - 2px); top: 8px; bottom: 8px; width: 4px; border-radius: 4px; background: var(--pastel); overflow: hidden; }
.route-line::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--cornflower), var(--mandarin)); transform-origin: top; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .route-line::after { animation: route-fill linear both; animation-timeline: view(); animation-range: contain 0% contain 100%; }
  }
}
@keyframes route-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.stop { position: relative; }
.stop::before { content: ""; position: absolute; left: calc(var(--rail) * -1); top: 6px; width: var(--dot); height: var(--dot); border-radius: 50%; background: var(--white); border: 4px solid var(--pastel); transition: border-color .4s var(--ease), background-color .4s var(--ease), transform .4s var(--ease); z-index: 1; }
.stop.is-reached::before { border-color: var(--mandarin); background: var(--white); transform: scale(1.2); }
.stop.is-current::before { background: var(--mandarin); box-shadow: 0 0 0 6px rgba(235, 89, 69, .18); }
.stop h3 { font-size: var(--fs-h3); line-height: 1; margin-bottom: .5em; max-width: 20ch; }
.stop-lead { font-size: var(--fs-lead); font-weight: 500; color: var(--deep-blue); line-height: 1.4; }
.stop-result { margin-top: 1.4em; padding: 20px 24px; line-height: 1.2; border-radius: 20px; border: 2px solid var(--cornflower); background: var(--mist); color: var(--deep-blue); }
.stop-result strong { color: var(--mandarin); font-family: var(--font-display); font-weight: 400; font-size: 1.35em; }
.stop-media { margin-bottom: 26px; border: var(--frame) solid var(--mandarin); border-radius: var(--r-card); overflow: hidden; }
.stop-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mix-claim { margin-top: 1.4em; font-family: var(--font-display); font-size: clamp(2.2rem, 1.3rem + 2.6vw, 3.6rem); line-height: 1; color: var(--mandarin); }
.mix-claim span { display: inline-block; margin-top: .45em; line-height: 1.2; font-family: var(--font-body); font-size: var(--fs-lead); font-weight: 700; color: var(--deep-blue); }
.steps { margin-top: 1.4em; display: grid; gap: 12px; counter-reset: s; }
.steps br { display: none; }
.step { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 16px; background: var(--mist); font-weight: 600; color: var(--deep-blue); line-height: 1.2; position: relative; }
.step::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--cornflower); background: var(--white); }
.step:not(.step--last)::after { content: ""; position: absolute; left: 24px; top: calc(50% + 10px); height: calc(50% + 2px); width: 2px; background: var(--cornflower); opacity: .45; }
.step--last { background: var(--deep-blue); color: var(--white); }
.step--last::before { border-color: var(--mandarin); background: var(--mandarin); }
.stop--end .btn { margin-top: 12px; }

@media (min-width: 1024px) {
  .benefits-grid { grid-template-columns: 1fr 1fr; gap: 88px; align-items: start; }
  .bf-sticky { --bf-h: min(calc(100vh - var(--header-h) - 80px), 720px); display: block; position: sticky; top: calc(var(--header-h) + 40px); height: var(--bf-h); }
  .bf-frame { position: relative; height: 100%; border: 6px solid var(--mandarin); border-radius: 36px; overflow: hidden; background: var(--deep-blue); box-shadow: var(--shadow); }
  .bf-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .7s var(--ease), transform 1.2s var(--ease); }
  .bf-frame img.is-active { opacity: 1; transform: none; }

  .route { --rail: 64px; --dot: 24px; gap: 0; }
  .stop { min-height: 74vh; display: flex; flex-direction: column; justify-content: center; padding-block: 48px; }
  .stop::before { top: 50%; margin-top: calc(var(--dot) / -2); }
  .stop-media { display: none; }
}

/* ---------- CONFIGURAZIONI ----------
   Sfondo azzurro a tutta larghezza con pattern gocce appena percettibile (azzurro su azzurro).
   Card: cornice corallo, foto prodotto di edulica.it/milktaxi, fascia blu con la capienza. */
.configs { padding-block: var(--section); background: #e6f4fc url("../assets/img/pattern-gocce-soft.svg") 0 0 / 112px 112px; }
.configs-head { text-align: center; }
.configs-head h2 { font-size: min(var(--fs-h2), calc((100vw - 2 * var(--gutter)) / 14.5)); line-height: 1; color: var(--mandarin); white-space: nowrap; }
.configs-head p { margin-top: 12px; font-size: var(--fs-lead); font-weight: 600; line-height: 1.2; color: var(--deep-blue); }

.configs-list {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 78%); gap: 16px; align-items: end;
  margin: clamp(40px, 5vw, 64px) calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 8px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.configs-list::-webkit-scrollbar { display: none; }
.config {
  scroll-snap-align: center; display: flex; flex-direction: column;
  border: var(--frame) solid var(--mandarin); border-radius: 30px; overflow: hidden; background: var(--white);
  box-shadow: 0 20px 40px -30px rgba(26, 61, 107, .45);
  transition: transform .35s var(--ease);
}
.config:hover { transform: translateY(-6px); }
/* stessa altezza per tutte le aree prodotto; prodotto in scala per capienza su un piano comune */
.config-img { display: flex; align-items: flex-end; justify-content: center; height: clamp(250px, 24vw, 330px); padding: 18px 18px 14px; background: var(--white); }
.config-img img { width: auto; max-width: 100%; object-fit: contain; }
.config--100 .config-img img { height: 82%; }
.config--150 .config-img img { height: 88%; }
.config--260 .config-img img { height: 100%; }
.config-size {
  display: block; padding: 18px 16px 20px; background: var(--deep-blue); color: var(--white);
  font-family: var(--font-display); font-size: clamp(2.4rem, 1.6rem + 2.2vw, 3.4rem); line-height: 1; text-align: center;
}
.configs-cta { margin-top: clamp(36px, 4vw, 56px); display: flex; justify-content: center; }
@media (min-width: 768px) {
  .configs-list { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); max-width: 1040px; margin-inline: auto; padding: 0; overflow: visible; gap: clamp(18px, 2.4vw, 32px); }
}

/* ---------- PROMO: il biglietto ---------- */
.promo {
  position: relative; isolation: isolate; padding-block: var(--section); overflow-x: clip;
  /* manto del vitello virato in blu, come la sezione finale di edulica.it/milktaxi */
  background:
    linear-gradient(180deg, rgba(18, 45, 82, .35) 0%, rgba(26, 61, 107, .2) 45%, rgba(10, 30, 62, .6) 100%),
    var(--deep-blue) url("../assets/img/manto-blu.webp") center / cover no-repeat;
}
.promo-fx { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.promo-splash { position: absolute; z-index: -1; width: clamp(320px, 42vw, 640px); right: -8vw; top: -6%; opacity: .95; transform: rotate(24deg); pointer-events: none; will-change: transform; }
.promo-splash--bl { right: auto; top: auto; left: -9vw; bottom: -8%; width: clamp(280px, 36vw, 560px); transform: rotate(204deg); }
@media (prefers-reduced-motion: no-preference) {
  .promo-splash { animation: splash-tr 8s ease-in-out infinite; }
  .promo-splash--bl { animation: splash-bl 9.5s ease-in-out -3s infinite; }
}
@keyframes splash-tr {
  0%, 100% { transform: translate(0, 0) rotate(24deg) scale(1); }
  50% { transform: translate(-18px, 22px) rotate(31deg) scale(1.05); }
}
@keyframes splash-bl {
  0%, 100% { transform: translate(0, 0) rotate(204deg) scale(1); }
  50% { transform: translate(20px, -18px) rotate(196deg) scale(1.06); }
}
.ticket { --notch: 26px; position: relative; display: grid; border-radius: 32px; filter: drop-shadow(0 40px 50px rgba(6, 18, 38, .5)); }
.ticket-stub { position: relative; padding: clamp(32px, 5vw, 64px); background: var(--mandarin); color: var(--white); border-radius: 32px 32px 0 0; overflow: hidden; }
.ticket-stub::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50% 0 50% 50%; transform: rotate(-45deg); background: var(--coral); opacity: .55; }
.ticket-body { position: relative; padding: clamp(32px, 5vw, 64px); background: var(--white); color: var(--text); border-radius: 0 0 32px 32px; }
/* perforazione */
.ticket-body::before { content: ""; position: absolute; left: 30px; right: 30px; top: -2px; border-top: 4px dotted rgba(26, 61, 107, .25); }
.promo-stamp { display: inline-block; margin-bottom: 26px; padding: 10px 18px; border: 2.5px dashed rgba(255, 255, 255, .9); border-radius: 999px; font-size: .85rem; font-weight: 700; letter-spacing: .18em; line-height: 1.2; position: relative; z-index: 1; }
.ticket-stub { container-type: inline-size; }
/* corpo legato alla larghezza del biglietto: "Il tuo MilkTaxi, con" resta sempre su una riga */
.promo h2 { position: relative; z-index: 1; color: var(--white); font-size: clamp(1.4rem, 10cqi, 3.2rem); line-height: 1; }
.promo-lead { display: block; white-space: nowrap; }
.promo-months { display: block; margin: .06em 0 .04em; font-size: 2.3em; line-height: 1; white-space: nowrap; color: var(--white); text-shadow: 0 6px 0 rgba(26, 61, 107, .25); }
.promo-strong { font-size: var(--fs-lead); font-weight: 600; color: var(--deep-blue); line-height: 1.4; }
.promo-strong mark { background: none; color: var(--mandarin-dark); font-weight: 700; }
.promo-claim { margin-top: 1.4em; font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.3rem); line-height: 1; color: var(--deep-blue); }
.promo-claim span { color: var(--mandarin); }
.ticket-body .btn { margin-top: 26px; }
@media (min-width: 1024px) {
  .ticket { grid-template-columns: 1fr 1.15fr; max-width: 1120px; margin-inline: auto; }
  .ticket-stub { border-radius: 32px 0 0 32px; display: flex; flex-direction: column; justify-content: center; }
  .ticket-body { border-radius: 0 32px 32px 0; }
  .ticket-body::before { left: -2px; right: auto; top: 30px; bottom: 30px; border-top: 0; border-left: 4px dotted rgba(26, 61, 107, .25); }
}

/* tacche del biglietto come veri ritagli trasparenti (desktop) */
@media (min-width: 1024px) {
  .ticket-stub {
    -webkit-mask: radial-gradient(circle var(--notch) at 100% 0, transparent 97%, #000 100%) top / 100% 51% no-repeat,
                  radial-gradient(circle var(--notch) at 100% 100%, transparent 97%, #000 100%) bottom / 100% 51% no-repeat;
            mask: radial-gradient(circle var(--notch) at 100% 0, transparent 97%, #000 100%) top / 100% 51% no-repeat,
                  radial-gradient(circle var(--notch) at 100% 100%, transparent 97%, #000 100%) bottom / 100% 51% no-repeat;
  }
  .ticket-body {
    -webkit-mask: radial-gradient(circle var(--notch) at 0 0, transparent 97%, #000 100%) top / 100% 51% no-repeat,
                  radial-gradient(circle var(--notch) at 0 100%, transparent 97%, #000 100%) bottom / 100% 51% no-repeat;
            mask: radial-gradient(circle var(--notch) at 0 0, transparent 97%, #000 100%) top / 100% 51% no-repeat,
                  radial-gradient(circle var(--notch) at 0 100%, transparent 97%, #000 100%) bottom / 100% 51% no-repeat;
  }
}

/* ---------- GARANZIA ---------- */
.guarantee { position: relative; padding-block: calc(var(--section) + 10px) var(--section); background: var(--white); }
.guarantee-grid { display: grid; gap: 44px; }
.guarantee-media { aspect-ratio: 4 / 3; transform: rotate(-2deg); box-shadow: var(--shadow); }
.guarantee-body h2 { font-size: var(--fs-h2); line-height: 1; color: var(--mandarin); margin-bottom: clamp(28px, 4vw, 44px); max-width: 12ch; }
.guarantee-list { counter-reset: g; display: grid; gap: 20px; }
.guarantee-list li { counter-increment: g; position: relative; display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding: 26px 26px 26px 22px; border: 2px solid var(--cornflower); border-radius: 24px; background: var(--white); transition: border-color .35s var(--ease), background-color .35s var(--ease), transform .35s var(--ease); }
.guarantee-list li:hover { border-color: var(--mandarin); background: #fffaf9; }
.guarantee-list li::before { content: counter(g); display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--mandarin); color: var(--white); font-family: var(--font-display); font-size: 1.7rem; line-height: 1; box-shadow: 0 8px 18px -8px rgba(235, 89, 69, .8); }
.guarantee-list p { font-size: 1.06rem; line-height: 1.2; margin: 0; }
@media (min-width: 1024px) {
  .guarantee-grid { grid-template-columns: 5fr 7fr; gap: 88px; align-items: center; }
  .guarantee-media { aspect-ratio: 4 / 5; }
}

/* Garanzia: effetti allo scroll */
.guarantee-media img { transform: scale(1.14); transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  /* titolo che si "scopre" da sinistra */
  .js .guarantee-body h2[data-reveal] { opacity: 1; transform: none; clip-path: inset(-.2em 100% -.3em 0); transition: clip-path 1.1s var(--ease); }
  .js .guarantee-body h2[data-reveal].is-in { clip-path: inset(-.2em -.2em -.3em 0); }
  /* box che entrano da destra, in sequenza */
  .js .guarantee-list li[data-reveal] { transform: translateX(56px); }
  .js .guarantee-list li[data-reveal].is-in { transform: none; }
  .js .guarantee-list li:nth-child(2)[data-reveal] { transition-delay: .18s; }
  /* bollino che "si stampa" */
  .js .guarantee-list li[data-reveal]::before { transform: scale(.3) rotate(-120deg); opacity: 0; transition: transform .8s cubic-bezier(.34, 1.56, .64, 1) .25s, opacity .4s ease .25s; }
  .js .guarantee-list li[data-reveal].is-in::before { transform: none; opacity: 1; }
  .js .guarantee-list li:nth-child(2)[data-reveal]::before { transition-delay: .45s; }
  .js .guarantee-list li.is-in:hover { transform: translateX(-6px); }
}
/* immagine legata allo scroll: la cornice si raddrizza entrando, la foto scorre dentro (parallax) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .guarantee-media { animation: g-tilt linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
    .guarantee-media img { animation: g-parallax linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  }
}
@keyframes g-tilt { from { transform: translateY(60px) rotate(-8deg) scale(.92); opacity: .2; } to { transform: rotate(-2deg); opacity: 1; } }
@keyframes g-parallax { from { transform: scale(1.14) translateY(-6%); } to { transform: scale(1.14) translateY(6%); } }

/* ---------- TESTIMONIANZE ---------- */
.testimonials { position: relative; isolation: isolate; padding-block: var(--section); overflow-x: clip; }

.testimonials h2 { color: var(--coral); font-size: var(--fs-h2); line-height: 1; max-width: 16ch; margin: 0 auto clamp(36px, 4vw, 56px); text-align: center; }
/* Reel Instagram: carosello a slide singola (1 / 2 / 4 visibili), comandi sotto */
.reels-carousel { --per: 1; --gap: 16px; max-width: 1180px; margin-inline: auto; }
@media (min-width: 640px) { .reels-carousel { --per: 2; --gap: 20px; } }
@media (min-width: 1024px) { .reels-carousel { --per: 4; --gap: 24px; } }
.reels-viewport { overflow: hidden; padding: 10px 0 18px; margin: -10px 0 -18px; touch-action: pan-y; cursor: grab; }
.reels-viewport.is-dragging { cursor: grabbing; }
.reels { display: flex; gap: var(--gap); transition: transform .65s cubic-bezier(.22, .9, .25, 1); will-change: transform; }
.reels-viewport.is-dragging .reels { transition: none; }
.reel-slide { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); min-width: 0; transition: opacity .5s var(--ease); }
.reel-slide.is-out { opacity: .35; }
.reel {
  position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden;
  background: var(--deep-blue); color: var(--white); text-decoration: none; -webkit-user-drag: none;
  box-shadow: 0 30px 50px -28px rgba(0, 0, 0, .7), 0 0 0 1px rgba(143, 212, 252, .25);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.reel img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: transform .8s var(--ease); }
.reel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 45, 82, .15) 0%, rgba(18, 45, 82, 0) 35%, rgba(18, 45, 82, 0) 55%, rgba(12, 32, 62, .9) 100%); pointer-events: none; }
.reel-play {
  position: absolute; left: 50%; top: 50%; z-index: 1; width: 66px; height: 66px; margin: -33px 0 0 -33px;
  border-radius: 50%; background: rgba(255, 255, 255, .95);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, .22), 0 12px 28px -8px rgba(0, 0, 0, .55);
  transition: transform .4s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.reel-play::after { content: ""; position: absolute; left: 54%; top: 50%; transform: translate(-50%, -50%); border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent var(--deep-blue); transition: border-color .3s var(--ease); }
.reel-cta {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px;
  border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: .85rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.reel-cta svg { flex: none; width: 16px; height: 16px; }
.reel:hover, .reel:focus-visible { transform: translateY(-6px); box-shadow: 0 36px 56px -26px rgba(0, 0, 0, .75), 0 0 0 2px var(--coral); }
.reel:hover img { transform: scale(1.06); }
.reel:hover .reel-play { transform: scale(1.08); background: var(--mandarin); box-shadow: 0 0 0 10px rgba(235, 89, 69, .25), 0 12px 28px -8px rgba(0, 0, 0, .55); }
.reel:hover .reel-play::after { border-left-color: var(--white); }
.reel:hover .reel-cta { background: var(--mandarin); border-color: var(--mandarin); }

/* barra comandi */
.reels-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: clamp(28px, 3vw, 40px); }
.reels-btn {
  position: relative; flex: none; width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
  background: transparent; border: 2px solid rgba(255, 255, 255, .55); color: var(--white);
  transition: background-color .25s var(--ease), border-color .25s var(--ease), opacity .25s var(--ease);
}
.reels-btn:hover:not(:disabled) { background: var(--mandarin); border-color: var(--mandarin); }
.reels-btn:disabled { opacity: .3; cursor: default; }
.reels-btn--prev::before, .reels-btn--next::before { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor; }
.reels-btn--next::before { transform: translate(-65%, -50%) rotate(45deg); }
.reels-btn--prev::before { transform: translate(-35%, -50%) rotate(-135deg); }
/* indicatore: un segmento per video, evidenziati quelli visibili */
.reels-dots { display: flex; align-items: center; gap: 6px; padding: 0 6px; }
.reels-dot { position: relative; width: 26px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.reels-dot::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 5px; margin-top: -2.5px; border-radius: 3px; background: rgba(255, 255, 255, .28); transition: background-color .35s var(--ease), transform .35s var(--ease); }
.reels-dot.is-visible::before { background: rgba(255, 255, 255, .9); }
.reels-dot.is-current::before { background: var(--coral); transform: scaleY(1.4); }
.reels-dot:hover::before { background: var(--coral); }
@media (max-width: 480px) { .reels-dot { width: 18px; } .reels-controls { gap: 10px; } }

/* Finestra video */
.reel-dialog { width: min(420px, 92vw); max-height: 92vh; padding: 0; border: 0; border-radius: 24px; background: var(--white); overflow: visible; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .7); }
.reel-dialog::backdrop { background: rgba(10, 26, 50, .82); backdrop-filter: blur(4px); }
.reel-frame { aspect-ratio: 9 / 16; max-height: 88vh; border-radius: 24px; overflow: hidden; }
.reel-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.reel-close { position: absolute; top: -18px; right: -18px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--mandarin); cursor: pointer; box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .5); }
.reel-close::before, .reel-close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 2.5px; background: var(--white); border-radius: 2px; transform: translate(-50%, -50%) rotate(45deg); }
.reel-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
@media (max-width: 520px) { .reel-close { top: 8px; right: 8px; } }

/* ---------- CONTATTI ---------- */
.contact { position: relative; padding-block: var(--section); background: #e6f4fc url("../assets/img/pattern-gocce-soft.svg") 0 0 / 112px 112px; overflow-x: clip; }
.contact-grid { display: grid; gap: 44px; }
.contact-head h2 { font-size: clamp(2rem, 1.3rem + 2vw, 3.1rem); line-height: 1; max-width: 14ch; }
.contact-sub { margin-top: .3em; font-family: var(--font-display); font-size: clamp(2.4rem, 1.5rem + 2.8vw, 3.9rem); line-height: 1; color: var(--mandarin); }
.contact-media { position: relative; margin-top: 32px; width: min(100%, 340px); }
.contact-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 6px solid var(--white); box-shadow: 0 0 0 5px var(--mandarin), var(--shadow); }
.contact-form { display: grid; gap: 20px; position: relative; background: var(--white); border-radius: 32px; padding: clamp(26px, 4vw, 52px); box-shadow: 0 40px 70px -34px rgba(18, 45, 82, .55); border-top: 8px solid var(--mandarin); }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: .95rem; font-weight: 600; line-height: 1.2; color: var(--deep-blue); }
.field input, .field textarea { width: 100%; font: inherit; font-size: 1rem; line-height: 1.4; color: var(--deep-blue); background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-input); padding: 14px 16px; min-height: 56px; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:hover, .field textarea:hover { border-color: var(--deep-blue); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cornflower); box-shadow: 0 0 0 4px rgba(61, 133, 201, .25); }
.field input.is-invalid, .field textarea.is-invalid { border-color: var(--mandarin-dark); background: #fff6f4; box-shadow: 0 0 0 3px rgba(201, 64, 46, .15); }
.contact-form .btn { margin-top: 6px; }
@media (min-width: 768px) {
  .contact-form { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .field--full { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; }
  .contact-head { position: sticky; top: calc(var(--header-h) + 32px); }
}

/* form Zoho inserito senza contenitore: solo adattamento dell'iframe alla colonna */
#zf_div_G2xEShfoJYMcaKGPHDQ_LmJa4q_TRTD6EaSDAecWzZM iframe { display: block; max-width: 100%; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep-blue); color: #dcebf7; border-top: 5px solid var(--mandarin); padding-block: clamp(48px, 5vw, 72px) 28px; font-size: .95rem; line-height: 1.4; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; text-underline-offset: .2em; }
.footer-grid { display: grid; gap: 32px; }
.footer-brand img { width: 160px; }
.footer-info { font-style: normal; display: grid; gap: 14px; }
.footer-info p { margin: 0; }
.footer-info strong { color: var(--white); font-weight: 600; }
.footer-label { margin: 0 0 12px; font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--sky); line-height: 1.2; }
.footer-social ul { display: flex; gap: 12px; }
.footer-social a { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid rgba(196, 232, 250, .45); color: var(--white); transition: background-color .25s var(--ease), border-color .25s var(--ease); }
.footer-social a:hover { background: var(--mandarin); border-color: var(--mandarin); text-decoration: none; }
.footer-social svg { width: 20px; height: 20px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(196, 232, 250, .18); font-size: .85rem; color: #b9d3ea; }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: auto 1fr auto; column-gap: clamp(40px, 6vw, 96px); align-items: start; }
  .footer-info { grid-template-columns: auto auto; justify-content: start; column-gap: 48px; }
}
@media (max-width: 1023px) { .site-footer { padding-bottom: 104px; } } /* spazio per la sticky CTA mobile */

/* ---------- Sticky CTA mobile ---------- */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); box-shadow: 0 -10px 30px -18px rgba(18, 45, 82, .5); transform: translateY(110%); transition: transform .35s var(--ease); }
.sticky-cta.is-visible { transform: none; }
.sticky-cta .btn { min-height: 50px; padding: 12px 20px; font-size: 1.0625rem; background: var(--mandarin-dark); } /* 17px bold su #c9402e: contrasto 4.9:1 */
@media (min-width: 1024px) { .sticky-cta { display: none; } }

/* ---------- Reveal allo scroll (solo se JS attivo) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .problem-media[data-reveal].is-in { transform: rotate(1.5deg); }
  .js .guarantee-media[data-reveal].is-in { transform: rotate(-2deg); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Laptop con viewport bassa: titolo hero più compatto per tenere la CTA sopra la piega */
@media (min-width: 900px) and (max-height: 760px) {
  .hero { padding-top: 24px; }
  .hero-title { font-size: 3.3rem; }
  .lead { margin-top: 16px; }
  .sticker { margin: 18px 0 22px; }
}

/* ---------- Rifiniture mobile (< 768px) ---------- */
@media (max-width: 767px) {
  /* Configurazioni: card una sotto l'altra, niente scorrimento orizzontale */
  .configs-list {
    grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr;
    max-width: 340px; margin: 32px auto 0; padding: 0; gap: 20px; overflow: visible;
  }
  .config-img { height: 230px; }
  .config-size { font-size: 2.4rem; padding: 14px 16px 16px; }

  /* Garanzia: tutto centrato */
  .guarantee-body { text-align: center; }
  .guarantee-body h2 { margin-inline: auto; }
  .guarantee-list li { grid-template-columns: 1fr; justify-items: center; gap: 14px; padding: 26px 22px; }
  .guarantee-list li::before { width: 54px; height: 54px; font-size: 1.5rem; }
  .guarantee-media { max-width: 420px; margin-inline: auto; }

  /* CTA finale: testi centrati, foto proporzionata ai testi */
  .contact-head { text-align: center; }
  .contact-head h2 { margin-inline: auto; }
  .contact-media { width: min(58%, 210px); margin: 26px auto 0; }
  .contact-media img { border-width: 5px; box-shadow: 0 0 0 4px var(--mandarin), var(--shadow); }
  .contact-grid { gap: 32px; }
}

/* ==========================================================================
   THANK YOU PAGE (grazie.html)
   ========================================================================== */
.ty-back { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--deep-blue); text-decoration: none; padding: 10px 0; }
.ty-back::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.ty-back:hover { color: var(--mandarin-dark); }

/* conferma */
.ty-hero {
  position: relative; isolation: isolate; overflow-x: clip; color: var(--white);
  min-height: calc(100vh - var(--header-h)); display: flex; align-items: center;
  padding-block: clamp(48px, 7vh, 96px);
  background:
    linear-gradient(100deg, rgba(18, 45, 82, .92) 0%, rgba(26, 61, 107, .7) 55%, rgba(26, 61, 107, .35) 100%),
    var(--deep-blue) url("../assets/img/manto-blu.webp") center / cover no-repeat;
  border-bottom: 5px solid var(--mandarin);
}
.ty-hero-grid { display: grid; gap: 32px; align-items: center; }
.ty-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; }
.ty-check {
  display: grid; place-items: center; width: 84px; height: 84px; margin-bottom: 28px;
  border-radius: 50%; background: var(--white); color: var(--mandarin);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, .16), 0 18px 36px -14px rgba(0, 0, 0, .55);
}
.ty-check svg path { stroke-dasharray: 40; stroke-dashoffset: 0; }
.ty-title { color: var(--white); font-size: clamp(2.6rem, 1.4rem + 3.6vw, 4.6rem); line-height: 1; }
.ty-title em { display: inline-block; margin-top: .15em; font-size: .62em; color: var(--coral); }
.ty-name:not(:empty)::before { content: ", "; }
.ty-copy .lead { margin-top: 22px; }
.ty-copy .sticker { margin: 26px 0 30px; }
.ty-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-ghost { background: transparent; color: var(--white); border: 2px solid rgba(255, 255, 255, .7); }
.btn-ghost:hover { background: var(--white); color: var(--deep-blue); }
.ty-stage { min-height: 300px; }
@media (min-width: 900px) {
  .ty-hero-grid { grid-template-columns: 1.1fr .9fr; }
  .ty-stage { min-height: 480px; }
}
@media (max-width: 899px) { .ty-stage .hero-product { width: min(62%, 300px); } }
@media (prefers-reduced-motion: no-preference) {
  .ty-check { animation: ty-pop .7s cubic-bezier(.34, 1.56, .64, 1) .1s both; }
  .ty-check svg path { stroke-dashoffset: 40; animation: ty-draw .6s var(--ease) .55s forwards; }
  .ty-copy > :not(.ty-check) { animation: rise .9s var(--ease) both; }
  .ty-copy > .ty-title { animation-delay: .25s; }
  .ty-copy > .lead { animation-delay: .35s; }
  .ty-copy > .sticker { animation: rise-tilt .9s var(--ease) .45s both; }
  .ty-copy > .ty-actions { animation-delay: .55s; }
}
@keyframes ty-pop { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ty-draw { to { stroke-dashoffset: 0; } }

/* prossimi passi */
.ty-steps { padding-block: var(--section); background: var(--white); }
.ty-steps h2 { text-align: center; font-size: var(--fs-h2); color: var(--mandarin); }
.ty-steps-list { counter-reset: st; position: relative; display: grid; gap: 28px; margin-top: clamp(40px, 5vw, 64px); }
.ty-steps-list li { counter-increment: st; position: relative; text-align: center; padding: 0 12px; }
.ty-steps-list li::before {
  content: counter(st); position: relative; z-index: 1; display: grid; place-items: center;
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--mandarin); color: var(--white); font-family: var(--font-display); font-size: 1.8rem; line-height: 1;
  box-shadow: 0 0 0 8px var(--white), 0 0 0 10px var(--pastel);
}
.ty-steps-list h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.2rem; line-height: 1.2; margin-bottom: 8px; }
.ty-steps-list p { max-width: 30ch; margin: 0 auto; }
@media (min-width: 768px) {
  .ty-steps-list { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  /* linea del percorso che unisce i tre passi */
  .ty-steps-list::before { content: ""; position: absolute; top: 32px; left: 16.66%; right: 16.66%; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--cornflower), var(--mandarin)); }
}
.ty-help {
  max-width: 720px; margin: clamp(44px, 5vw, 64px) auto 0; padding: 24px 28px; text-align: center;
  border-radius: 24px; background: var(--mist); border: 2px solid var(--pastel); line-height: 1.2;
}
.ty-help p { margin: 0; }
.ty-help p:first-child { font-family: var(--font-display); font-size: 1.6rem; color: var(--deep-blue); margin-bottom: 12px; }
.ty-help-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; font-weight: 600; }
.ty-help-links a { color: var(--mandarin-dark); text-decoration: none; }
.ty-help-links a:hover { color: var(--deep-blue); }

/* nel frattempo: reel */
.ty-video { padding-block: var(--section); background: #e6f4fc url("../assets/img/pattern-gocce-soft.svg") 0 0 / 112px 112px; text-align: center; }
.ty-video h2 { font-size: var(--fs-h2); color: var(--deep-blue); max-width: 18ch; margin-inline: auto; }
.ty-video-sub { margin: 14px 0 0; font-size: var(--fs-lead); font-weight: 500; color: var(--deep-blue); }
.ty-reels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 1080px; margin: clamp(32px, 4vw, 52px) auto 0; text-align: left; }
@media (min-width: 900px) { .ty-reels { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
@media (max-width: 480px) { .ty-reels .reel-cta { font-size: .72rem; padding: 8px; gap: 5px; } .ty-reels .reel-play { width: 52px; height: 52px; margin: -26px 0 0 -26px; } }
.ty-video-cta { margin-top: clamp(32px, 4vw, 48px); }
/* nella thank you page solo la conferma occupa lo schermo; le altre sezioni seguono il contenuto */
.page-thanks main > section:not(.ty-hero) { min-height: 0; }
.page-thanks .ty-steps, .page-thanks .ty-video { padding-block: clamp(72px, 8vw, 120px); }
/* foto Problema: punto focale sul MilkTaxi (a destra in basso nello scatto) */
.problem-media img { object-position: 82% 60%; }

/* logo Holm&Laue accanto a Edulica nell'header */
.brand-hl { width: 64px; height: auto; margin-right: auto; margin-left: 18px; padding-left: 18px; border-left: 1px solid var(--pastel); box-sizing: content-box; }
@media (min-width: 768px) { .brand-hl { width: 80px; } }

/* Problema: la foto non determina più l'altezza delle righe (niente spazio vuoto tra titolo e testo) */
@media (min-width: 768px) {
  .problem-grid { row-gap: 28px; }
  .problem-media { position: relative; min-height: 0; }
  .problem-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
}
