/* ============================================================
   MARA FAMILY · Casa Famiglia per Anziani · Formello (RM)
   Palette: verde bottiglia su bianco puro, accento ambra.
   Tipografia: Young Serif (display) + Nunito Sans (testo).
   Raggi: pillole per gli interattivi, 16px superfici, 10px campi.
   Motion: solo transform/opacity, IntersectionObserver, niente
   listener di scroll, tutto spento con prefers-reduced-motion.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* colore (riferimenti OKLCH in DESIGN.md) */
  --bg: #FFFFFF;
  --ink: #152822;
  --body: #3D5249;
  --verde: #1F5B43;
  --verde-hover: #174834;
  --verde-scuro: #0F2E22;
  --verde-vivo: #2E7A58;
  --ambra: #9C5A17;
  --ambra-chiara: #E8A04C;
  --velo: #F0F5F1;
  --linea: #D9E4DC;
  --errore: #A93226;

  /* tipografia */
  --serif: "Young Serif", Georgia, serif;
  --sans: "Nunito Sans", "Segoe UI", system-ui, sans-serif;

  /* ritmo */
  --sezione: clamp(4.5rem, 9vw, 7.5rem);
  --raggio-superficie: 16px;
  --raggio-campo: 10px;

  /* movimento */
  --uscita: cubic-bezier(0.16, 1, 0.3, 1);
  --ombra: 0 14px 40px -18px rgb(15 46 34 / 0.35);

  /* scala z */
  --z-nav: 100;
  --z-menu: 90;
  --z-skip: 110;
}

/* ---------- Reset essenziale ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;   /* niente ingrandimento testo iOS in landscape */
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  font-family: var(--sans);
  font-size: 1.125rem;            /* 18px: il pubblico include settantenni */
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgb(31 91 67 / 0.14);  /* highlight tap in tinta brand */
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--verde); text-underline-offset: 3px; }
a:hover { color: var(--verde-hover); }
button { font: inherit; cursor: pointer; }
input, textarea { font: inherit; }
ul, ol { padding: 0; }
[hidden] { display: none !important; }

::selection { background: var(--verde); color: #fff; }

:focus-visible {
  outline: 3px solid var(--ambra);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Tipografia ---------- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.12; }
h3 { font-size: 1.3rem; line-height: 1.25; }
p { text-wrap: pretty; max-width: 65ch; }
strong { color: var(--ink); font-weight: 700; }

/* ---------- Utilità ---------- */
.container {
  width: min(100% - 2.5rem, 72rem);
  margin-inline: auto;
}
.container--stretto { max-width: 50rem; }
.container--prosa  { max-width: 46rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: var(--z-skip);
  background: var(--verde-scuro); color: #fff;
  padding: 0.75rem 1.25rem; border-radius: 999px;
  font-weight: 700; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: #fff; }

.kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ambra); font-weight: 800; font-size: 1rem;
}
.kicker::before {
  content: ""; width: 26px; height: 2px;
  background: var(--ambra); border-radius: 2px;
}

.icona { width: 26px; height: 26px; flex: none; color: var(--ambra); }
.icona--grande { width: 34px; height: 34px; }

.ambra { color: var(--ambra); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; min-height: 48px;            /* target tattile ≥44px */
  padding: 0.7rem 1.5rem; border-radius: 999px;
  font-weight: 800; font-size: 1.05rem; text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.25s var(--uscita), background-color 0.25s var(--uscita),
              border-color 0.25s var(--uscita), box-shadow 0.25s var(--uscita);
}
.btn--lg { padding: 0.9rem 1.9rem; font-size: 1.1rem; }
.btn--solid { background: var(--verde); color: #fff; }
.btn--solid:hover { background: var(--verde-hover); color: #fff; transform: translateY(-2px); box-shadow: var(--ombra); }
.btn--ghost { border-color: rgb(255 255 255 / 0.85); color: #fff; }
.btn--ghost:hover { background: rgb(255 255 255 / 0.16); color: #fff; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

/* ============================================================
   BARRA DI NAVIGAZIONE
   ============================================================ */
#nav-sentinel { position: absolute; top: 0; height: 1px; width: 1px; }

.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
  transition: box-shadow 0.3s var(--uscita), border-color 0.3s var(--uscita);
}
.nav--scrolled {
  border-color: var(--linea);
  box-shadow: 0 10px 30px -22px rgb(15 46 34 / 0.45);
}
.nav__inner {
  width: min(100% - 2.5rem, 72rem); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; height: 72px;
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  text-decoration: none; color: var(--ink);
}
.nav__mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--verde); color: #fff;
  font-family: var(--serif); font-size: 1.45rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  padding-top: 2px;
}
.nav__name { font-family: var(--serif); font-size: 1.35rem; }
.nav__name em { font-style: normal; color: var(--verde); }

.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 700;
  padding: 0.5rem 0.1rem; position: relative;
}
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2.5px; background: var(--ambra); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--uscita);
}
.nav__links a:not(.btn):hover::after,
.nav__links a:not(.btn):focus-visible::after { transform: scaleX(1); }

.nav__toggle {
  display: none; flex-direction: column; justify-content: center; gap: 6px;
  width: 48px; height: 48px; padding: 10px;
  background: none; border: 0; border-radius: 12px;
}
.nav__toggle span {
  display: block; height: 2.5px; border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--uscita), opacity 0.2s;
}

/* menu mobile (il breakpoint alto tiene la barra desktop su una sola riga) */
@media (max-width: 1080px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed; inset: 72px 0 0 0; z-index: var(--z-menu);
    flex-direction: column; justify-content: center; gap: 0.5rem;
    overflow-y: auto; overscroll-behavior: contain;
    padding: 2rem max(1.5rem, env(safe-area-inset-left)) max(2rem, env(safe-area-inset-bottom)) max(1.5rem, env(safe-area-inset-right));
    background: var(--verde-scuro);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.35s var(--uscita), transform 0.35s var(--uscita), visibility 0s 0.35s;
  }
  .nav--aperto .nav__links {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 0.35s var(--uscita), transform 0.35s var(--uscita);
  }
  .nav__links a:not(.btn) {
    color: #fff; font-family: var(--serif); font-size: 1.7rem; font-weight: 400;
    padding: 0.55rem 1rem; border-radius: 12px;   /* riga d'ingombro più ampia per il tap */
  }
  .nav__links .nav__cta { margin-top: 0.8rem; }
  .nav--aperto .nav__toggle span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
  .nav--aperto .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav--aperto .nav__toggle span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  min-height: clamp(560px, calc(100dvh - 72px), 880px);
  display: flex; align-items: flex-end;
}
.hero__media, .hero__media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero__media img { object-fit: cover; object-position: 50% 42%; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgb(8 28 20 / 0.78) 0%, rgb(8 28 20 / 0.25) 45%, rgb(8 28 20 / 0.05) 70%),
    linear-gradient(105deg, rgb(8 28 20 / 0.55) 0%, rgb(8 28 20 / 0.12) 55%, transparent 75%);
}
.hero__content {
  position: relative; padding-block: clamp(3rem, 7vh, 5.5rem);
  color: #fff;
}
.hero__title {
  font-size: clamp(3rem, 7.5vw, 5.5rem);
  line-height: 1.04; color: #fff; max-width: 12ch;
}
.hero__line { display: block; padding-bottom: 0.06em; }
.hero__title .evidenzia {
  font-style: normal; position: relative; display: inline-block;
}
/* sottolineatura ambra che si "stende" dopo il caricamento
   (visibile da subito quando le animazioni sono disattivate) */
.hero__title .evidenzia::after {
  content: ""; position: absolute; left: 0.02em; right: 0.02em; bottom: 0.02em;
  height: 0.12em; border-radius: 99px;
  background: var(--ambra-chiara);
  transform-origin: left;
}
.hero__sub {
  margin-top: 1.4rem; max-width: 38ch;
  font-size: clamp(1.15rem, 1.6vw, 1.3rem); line-height: 1.6;
  color: rgb(255 255 255 / 0.94);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

/* coreografia di ingresso (si spegne con reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
  .hero__media img { animation: kenburns 9s var(--uscita) both; }
  .hero__title .hero__line { animation: riga-su 0.9s var(--uscita) both; }
  .hero__title .hero__line:nth-child(2) { animation-delay: 0.12s; }
  .hero__sub { animation: emergere 0.8s var(--uscita) 0.45s both; }
  .hero__actions { animation: emergere 0.8s var(--uscita) 0.6s both; }
  .hero__title .evidenzia::after { animation: stendi 0.7s var(--uscita) 1.05s both; }
}
@keyframes kenburns { from { transform: scale(1.07); } to { transform: scale(1); } }
@keyframes riga-su {
  from { opacity: 0; transform: translateY(0.7em); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes emergere {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes stendi { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ============================================================
   MANIFESTO
   ============================================================ */
.manifesto { padding-block: var(--sezione); text-align: center; }
.manifesto__testo {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  line-height: 1.3; color: var(--ink);
  max-width: none;
}
.manifesto__nota { margin: 1.5rem auto 0; font-size: 1.05rem; }

/* ============================================================
   LA CASA (split con foto sovrapposte)
   ============================================================ */
.casa { padding-block: 0 var(--sezione); }
.casa__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 5vw, 5rem); align-items: center;
}
.casa__media { position: relative; padding-bottom: 4.5rem; padding-right: 3rem; }
.casa__foto { border-radius: var(--raggio-superficie); box-shadow: var(--ombra); }
.casa__foto-piccola {
  position: absolute; right: 0; bottom: 0;
  width: min(42%, 240px); border-radius: var(--raggio-superficie);
  border: 6px solid #fff; box-shadow: var(--ombra);
}
.casa__testo h2 { margin-bottom: 1.2rem; }
.casa__testo p + p { margin-top: 0.9rem; }
.casa__punti {
  list-style: none; margin-top: 1.8rem;
  display: grid; gap: 1.1rem;
}
.casa__punti li {
  display: flex; gap: 0.9rem; align-items: flex-start;
  padding-top: 1.1rem; border-top: 1px solid var(--linea);
}

/* ============================================================
   SERVIZI (bento asimmetrico: 3 celle foto + 3 celle testo)
   ============================================================ */
.servizi { background: var(--velo); padding-block: var(--sezione); }
.sezione-testata { max-width: 38rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.sezione-testata h2 { margin-top: 0.7rem; }

.bento {
  display: grid; gap: 14px;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(205px, auto);
  grid-template-areas:
    "a a a b b b"
    "a a a c c c"
    "d d e e f f";
}
.bento__cella:nth-child(1) { grid-area: a; }
.bento__cella:nth-child(2) { grid-area: b; }
.bento__cella:nth-child(3) { grid-area: c; }
.bento__cella:nth-child(4) { grid-area: d; }
.bento__cella:nth-child(5) { grid-area: e; }
.bento__cella:nth-child(6) { grid-area: f; }

.bento__cella {
  position: relative; overflow: hidden;
  border-radius: var(--raggio-superficie);
}
.bento__cella--testo {
  background: #fff; padding: 1.6rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  border: 1px solid var(--linea);
}
.bento__cella--testo h3 { margin-top: 0.2rem; }
.bento__cella--testo p { font-size: 1.02rem; }

.bento__cella--foto img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--uscita);
}
.bento__cella--foto:hover img { transform: scale(1.045); }
.bento__velo {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgb(8 28 20 / 0.84) 0%, rgb(8 28 20 / 0.32) 52%, transparent 75%);
}
.bento__contenuto {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 1.5rem; color: #fff;
}
.bento__contenuto h3 { color: #fff; }
.bento__contenuto p {
  margin-top: 0.35rem; font-size: 1rem; line-height: 1.5;
  color: rgb(255 255 255 / 0.92);
}

@media (max-width: 1024px) {
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "a a"
      "b c"
      "d f"
      "e e";
  }
  .bento__cella--grande { min-height: 320px; }
}
@media (max-width: 640px) {
  .bento {
    grid-template-columns: 1fr;
    grid-template-areas: "a" "b" "c" "d" "e" "f";
  }
  .bento__cella--foto { min-height: 280px; }
}

/* ============================================================
   LA GIORNATA (timeline verticale)
   ============================================================ */
.giornata { padding-block: var(--sezione); }
.giornata__titolo { margin-bottom: 0.8rem; }
.giornata__lead { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }

.timeline {
  --rail-x: 92px;
  list-style: none; position: relative;
  display: grid; gap: clamp(1.8rem, 4vw, 2.6rem);
}
.timeline::before {
  content: ""; position: absolute;
  left: var(--rail-x); top: 8px; bottom: 8px; width: 2px;
  background: var(--linea);
  transform: scaleY(0); transform-origin: top;
  transition: transform 1.3s var(--uscita);
}
.timeline.in-view::before { transform: scaleY(1); }

.timeline__tappa { position: relative; padding-left: calc(var(--rail-x) + 34px); }
.timeline__tappa::before {
  content: ""; position: absolute;
  left: calc(var(--rail-x) - 5.5px); top: 10px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--ambra); border: 2.5px solid #fff;
  box-shadow: 0 0 0 1.5px var(--ambra);
}
.timeline__ora {
  position: absolute; left: 0; top: 4px; width: 68px;
  text-align: right;
  font-weight: 800; color: var(--verde); font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.timeline__corpo h3 { margin-bottom: 0.25rem; }
.timeline__corpo p { font-size: 1.05rem; }

@media (max-width: 560px) {
  .timeline { --rail-x: 64px; }
  .timeline__ora { width: 46px; font-size: 0.95rem; }
  .timeline__tappa { padding-left: calc(var(--rail-x) + 24px); }
}

/* ============================================================
   LE VOCI (banda verde scuro)
   ============================================================ */
.voci { background: var(--verde-scuro); color: #fff; padding-block: var(--sezione); }
.voci__titolo { color: #fff; margin-bottom: clamp(2rem, 4vw, 3rem); }
.voci__griglia {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.voce { border-top: 2px solid rgb(255 255 255 / 0.18); padding-top: 1.6rem; }
.voce p {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.45; color: #fff;
}
.voce footer { margin-top: 1.2rem; display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.voce cite { font-style: normal; font-weight: 800; color: #fff; }
.voce footer span { color: var(--ambra-chiara); font-size: 1rem; }

/* ============================================================
   IL PERCORSO (3 passi, sequenza reale)
   ============================================================ */
.percorso { padding-block: var(--sezione); }
.percorso h2 { margin-bottom: clamp(2rem, 4vw, 3rem); }
.passi {
  list-style: none; counter-reset: passo;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
}
.passo__numero {
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--velo); color: var(--verde);
  font-family: var(--serif); font-size: 1.5rem;
  margin-bottom: 1rem;
}
.passo h3 { margin-bottom: 0.4rem; }
.passo p { font-size: 1.05rem; }
.passo a { font-weight: 700; }

/* ============================================================
   CONTATTI
   ============================================================ */
.contatti { background: var(--velo); padding-block: var(--sezione); }
.contatti__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem); align-items: center;
}
.contatti h2 { margin-top: 0.7rem; }
.contatti__lead { margin-top: 0.8rem; max-width: 48ch; }

/* Telefono: l'azione principale della sezione */
.telefono {
  display: inline-flex; align-items: center; gap: 1.1rem;
  margin-top: 1.9rem; padding: 1.1rem 1.5rem;
  background: #fff; border: 1.5px solid var(--linea);
  border-radius: var(--raggio-superficie); text-decoration: none;
  color: var(--ink); box-shadow: var(--ombra);
  transition: transform 0.25s var(--uscita), border-color 0.25s var(--uscita);
}
.telefono:hover { transform: translateY(-2px); border-color: var(--verde); }
.telefono:active { transform: translateY(0) scale(0.99); }
.telefono__icona {
  display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--verde); color: #fff;
}
.telefono__icona svg { width: 24px; height: 24px; }
.telefono__testo { display: grid; gap: 0.1rem; }
.telefono__eti { font-size: 0.98rem; color: var(--body); }
.telefono__num {
  font-family: var(--serif); font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  line-height: 1.1; color: var(--verde); letter-spacing: -0.01em;
}

.recapiti { list-style: none; display: grid; gap: 1.3rem; margin-top: 2rem; }
.recapiti li { display: flex; gap: 0.9rem; align-items: flex-start; }
.recapiti strong { font-size: 1.05rem; }
.recapiti a { font-weight: 700; }

.btn--ghost-verde {
  margin-top: 2rem; border-color: var(--verde); color: var(--verde);
  background: transparent;
}
.btn--ghost-verde:hover {
  background: var(--verde); color: #fff;
  transform: translateY(-2px); box-shadow: var(--ombra);
}

.mappa {
  border-radius: var(--raggio-superficie); overflow: hidden;
  border: 1px solid var(--linea); background: #fff;
  box-shadow: var(--ombra);
}
.mappa iframe { display: block; width: 100%; height: clamp(360px, 48vh, 460px); border: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--verde-scuro); color: rgb(255 255 255 / 0.88); }
.footer a { color: #fff; }
.footer a:hover { color: var(--ambra-chiara); }
.footer__grid {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2.5rem; padding-block: 3.5rem 2.5rem;
}
.footer__brand p { margin-top: 1rem; font-size: 1rem; line-height: 1.7; }
.nav__brand--footer { color: #fff; }
.nav__brand--footer .nav__name em { color: var(--ambra-chiara); }
.nav__brand--footer .nav__mark { background: rgb(255 255 255 / 0.12); }
.footer__nav { display: grid; gap: 0.6rem; align-content: start; }
.footer__nav a { text-decoration: none; font-weight: 600; width: fit-content; }
.footer__nav a:hover { text-decoration: underline; }
.footer__recapiti { font-style: normal; line-height: 1.8; font-size: 1rem; }
.footer__base { border-top: 1px solid rgb(255 255 255 / 0.14); padding-block: 1.4rem; }
.footer__base p { font-size: 0.95rem; }

/* ============================================================
   REVEAL SU SCROLL
   (attivi solo con JS; senza JS tutto è visibile da subito)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.75s var(--uscita), transform 0.75s var(--uscita);
    transition-delay: calc(var(--d, 0) * 90ms);
  }
  html.js [data-reveal].is-visible { opacity: 1; transform: none; }
  html.js [data-reveal-delay="1"] { --d: 1; }
  html.js [data-reveal-delay="2"] { --d: 2; }
  html.js [data-reveal-delay="3"] { --d: 3; }
  html.js [data-reveal-delay="4"] { --d: 4; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .casa__grid, .contatti__grid { grid-template-columns: 1fr; }
  .casa__media { max-width: 540px; }
  .voci__griglia { grid-template-columns: 1fr; gap: 2.5rem; }
  .passi { grid-template-columns: 1fr; max-width: 34rem; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 84px; }
  .nav__inner { height: 64px; }
  .nav__links { inset: 64px 0 0 0; }
  .nav__name { font-size: 1.2rem; }
  .hero { min-height: calc(100dvh - 64px); }
  .hero__actions .btn { width: 100%; }
  .telefono { width: 100%; }
  .mappa iframe { height: 300px; }

  /* un filo d'aria in più sotto il giardino sovrapposto, su schermi stretti */
  .casa__media { padding-right: 2rem; padding-bottom: 3.5rem; margin-inline: auto; }
}

/* ============================================================
   BARRA DI CHIAMATA MOBILE + IGIENE TOUCH
   Tutto vincolato a mobile / solo-touch: il layout desktop
   resta identico (qui display:none, env() = 0 sul desktop).
   ============================================================ */
.callbar { display: none; }

@media (max-width: 768px) {
  .callbar {
    display: flex; gap: 0.6rem; align-items: stretch;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-nav);
    padding: 0.65rem max(0.9rem, env(safe-area-inset-right))
             max(0.65rem, env(safe-area-inset-bottom)) max(0.9rem, env(safe-area-inset-left));
    background: var(--bg);
    border-top: 1px solid var(--linea);
    box-shadow: 0 -10px 30px -20px rgb(15 46 34 / 0.5);
    transform: translateY(125%);                 /* nascosta finché non serve */
    transition: transform 0.4s var(--uscita);
  }
  .callbar.is-on { transform: none; }            /* compare dopo l'hero */
  .callbar.is-hidden { transform: translateY(125%); }  /* via durante il menu */

  .callbar__btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 0.55rem; min-height: 54px; border-radius: 999px;
    font-weight: 800; font-size: 1.12rem; text-decoration: none;
    border: 2px solid transparent;
    transition: transform 0.2s var(--uscita);
  }
  .callbar__btn:active { transform: scale(0.97); }
  .callbar__btn svg { width: 22px; height: 22px; flex: none; }
  .callbar__btn--call { flex: 2.4; background: var(--verde); color: #fff; }
  .callbar__btn--map  { flex: 1; background: #fff; color: var(--verde); border-color: var(--verde); }
}

/* Su touch niente stati hover "appiccicati" dopo il tap (il desktop usa hover:hover) */
@media (hover: none) {
  .btn--solid:hover       { background: var(--verde); transform: none; box-shadow: none; }
  .btn--ghost:hover       { background: transparent; transform: none; }
  .btn--ghost-verde:hover { background: transparent; color: var(--verde); transform: none; box-shadow: none; }
  .telefono:hover         { transform: none; border-color: var(--linea); }
  .bento__cella--foto:hover img { transform: none; }
}

/* ============================================================
   REDUCED MOTION: spegne ogni animazione residua
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
