/* Homepage H: la superficie resta una sola; il rilievo segna ciò che si preme,
   le linee incise collegano lo studio alle sue entità e le fasi del metodo. */

:root {
  --bg-alt: var(--plate);                  /* stessa superficie del metodo nella pagina GEN-D CODE */
  --line: rgba(120, 110, 96, .42);          /* linea incisa */
  --line-hi: rgba(255, 255, 255, .9);       /* il bordo illuminato dell'incisione */
  --line-on: var(--ink);
  --hub: 112px;
  --hub-h: 112px;
}

.home { --sh-ease: cubic-bezier(.4, 0, .2, 1); }

/* Pulsanti sotto la hero: ombra proporzionata a un oggetto piccolo e poco sollevato. L'alone chiaro arriva a circa 12 px,
   meno dello spazio che li separa dalla foto, così non ci sale sopra; l'ombra scura resta corta e scende in basso a destra */
.h-hero {
  --raised-hero-btn: -4px -4px 8px var(--hi), 6px 7px 14px var(--lo), -1px -1px 2px var(--hi), 1px 2px 3px var(--lo);
  --raised-hero-cta: -4px -4px 8px var(--hi), 6px 7px 14px var(--accent-lo), -1px -1px 2px var(--hi), 1px 2px 3px var(--accent-lo);
}

.home > section { max-width: 1680px; margin: 0 auto; padding: 0 var(--pad) var(--section); }
.home h2 { max-width: 16em; }

/* Linea incisa: un solco scuro con il suo filo di luce sotto; si accende nel colore pieno */
.h-groove, .h-branch::before, .h-branch::after, .h-card::before {
  content: "";
  position: absolute;
  background: var(--line);
  box-shadow: 1px 1px 0 var(--line-hi);
  transition: background .35s;
}

/* ------------------------------------------------------------------ Apertura */
/* La veduta di Monaco in panorama: titolo e frase sulla foto, i due accessi in rilievo sotto a destra.
   Il contenitore del testo usa le righe della sezione (subgrid): riga 1 la foto, riga 2 gli accessi. */
.h-hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px var(--gap);
  padding-top: clamp(12px, 2.4vh, 32px);
}
.h-hero-content { display: grid; grid-column: 1 / -1; grid-row: 1 / 3; grid-template-rows: subgrid; grid-template-columns: 1fr auto auto; column-gap: 16px; z-index: 1; }
.h-hero-main { grid-column: 1 / -1; grid-row: 1; align-self: end; z-index: 1; padding: clamp(48px, 4.4vw, 72px); container-type: inline-size; }
.h-hero h1 { color: #fff; font-size: clamp(4.4rem, 7.2cqi, 7rem); line-height: 1; letter-spacing: -.05em; text-wrap: balance; }
.h-hero h1 .h-l1 { display: block; white-space: nowrap; }
.h-hero .lead { color: #fff; font-size: 1.2rem; margin-top: clamp(16px, 2.4vh, 24px); max-width: 30em; }
.h-hero-photo {
  grid-column: 1 / -1; grid-row: 1;
  margin: 0; position: relative; min-height: clamp(460px, min(calc(100svh - var(--header) - 140px), 44vw), 760px);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--raised);
}
.h-hero-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; filter: var(--photo); }
.h-hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(13, 20, 37, .88), rgba(13, 20, 37, .48) 55%, rgba(13, 20, 37, .04)); }
.h-hero-cta, .h-hero-about {
  grid-row: 2; justify-self: start;
  flex: none;
  display: flex; align-items: center; gap: 22px;
  min-height: 64px;
  padding: 10px 10px 10px 24px;
  border-radius: calc(var(--radius) - 8px);
  text-decoration: none;
  transition: box-shadow .3s, background .3s;
}
.h-hero-cta { grid-column: 2; justify-content: space-between; flex-direction: row; text-align: left; background: var(--accent); color: var(--on-accent); box-shadow: var(--raised-hero-cta); }
.h-cta-label { min-width: 0; flex: 1; text-align: center; font-size: clamp(1rem, 1.4vw, 1.3rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; white-space: nowrap; }
.h-cta-arrow { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: color-mix(in srgb, var(--on-accent) 12%, transparent); transition: transform .3s; }
.h-hero-cta .h-cta-arrow { background: var(--accent); box-shadow: var(--inset-accent); }
.h-cta-arrow svg { display: block; }
.cta-short { display: none; }
.h-hero-cta:hover { background: var(--accent-hover); box-shadow: -5px -5px 10px var(--hi), 8px 9px 18px var(--accent-lo), -1px -1px 2px var(--hi), 1px 2px 3px var(--accent-lo); }
.h-hero-cta:active { box-shadow: inset 4px 4px 12px rgba(0, 0, 0, .35); }
.h-hero-about { grid-column: 3; justify-content: space-between; flex-direction: row; text-align: left; color: var(--ink); box-shadow: var(--raised-hero-btn); }
.h-hero-about .h-cta-arrow { background: var(--bg); box-shadow: var(--inset-sm); }
.h-hero .h-cta-label { flex: none; text-align: left; font-size: 1.05rem; }
.h-hero .h-cta-arrow { width: 44px; height: 44px; border-radius: 14px; }
.h-hero-about:hover { box-shadow: -5px -5px 10px var(--hi), 8px 9px 18px var(--lo), -1px -1px 2px var(--hi), 1px 2px 3px var(--lo); }
.h-hero-about:active { box-shadow: var(--inset); }
.h-hero-cta:focus-visible, .h-hero-about:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* ------------------------------------------------------------------ Lo studio */
.h-studio { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 680px); justify-content: center; column-gap: clamp(36px, 4.5vw, 64px); row-gap: 36px; align-items: center; }
.h-studio-photo { grid-column: 1; width: 100%; max-width: 320px; aspect-ratio: 4 / 5; }
.h-studio-photo > img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-position: 45% 50%; }
.h-studio-text { grid-column: 2; max-width: 680px; }
.h-studio-text .lead { margin-top: 24px; max-width: 30em; }
.h-more { margin-top: clamp(28px, 4vh, 40px); }
.h-studio-cta {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius-btn);
  background: var(--bg); color: var(--ink);
  box-shadow: var(--raised);
  text-decoration: none;
  transition: box-shadow .3s, background .3s, translate .3s;
}
.h-studio-cta .h-cta-label {
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--ink);
  white-space: nowrap;
}
.h-studio-cta .h-cta-arrow {
  flex: none; display: grid; place-items: center;
  width: auto; height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transition: transform .3s;
}
.h-studio-cta .h-cta-arrow svg { display: block; width: 20px; height: 20px; }
.h-studio-cta .h-cta-arrow svg path { stroke-width: 1.8px; }
.h-studio-cta:hover { box-shadow: -13px -13px 26px var(--hi), 15px 15px 32px var(--lo), -1px -1px 2px var(--hi), 2px 2px 4px var(--lo); }
.h-studio-cta:active { box-shadow: var(--inset); translate: 0 1px; }
.h-studio-cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* ------------------------------------------------------------------ Le tre entità */
.h-entities { container: servizi / inline-size; }
.h-entities-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.h-entities-heading .h-hub { flex: none; --hub: 112px; min-height: 72px; }
@container servizi (min-width: 860px) {
  .h-entities-heading { flex-direction: column; gap: 24px; margin-bottom: 0; text-align: center; }
  .h-entities-heading h2 { order: -1; }
}
.h-entities .h-map-box { margin-top: 0; }
.h-map-box { container: mappa / inline-size; }
.h-map { position: relative; display: flow-root; }
.h-branches { position: relative; }

.h-hub { display: flex; align-items: center; justify-content: center; width: var(--hub); min-height: var(--hub); }
.h-hub svg { width: var(--hub); height: auto; overflow: visible; fill: var(--ink); filter: drop-shadow(-3px -3px 3px var(--relief-hi)) drop-shadow(5px 5px 5px var(--relief-lo)); }

.h-card {
  position: relative;
  display: grid;
  text-decoration: none;
  color: var(--text);
  padding: 12px;
  transition: box-shadow .3s;
}
.h-card:hover { box-shadow: -13px -13px 26px var(--hi), 15px 15px 32px var(--lo), -1px -1px 2px var(--hi), 2px 2px 4px var(--lo); }
.h-card:active { box-shadow: var(--inset); }
.h-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.h-card-photo { display: block; overflow: hidden; border-radius: calc(var(--radius) - 12px); box-shadow: var(--inset-sm); }
.h-card-photo img { width: 100%; height: 100%; object-fit: cover; filter: var(--photo); }
.h-card-text { display: block; padding: 22px 14px 14px; }
.h-card-text { container-type: inline-size; }
/* il nome intero su una riga finché ci sta; nei riquadri stretti va a capo dopo ARPER */
.h-card-name { display: block; font-family: var(--serif); font-size: clamp(1.3rem, 9.5cqi, 1.9rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); text-wrap: balance; }
.h-card-desc { display: block; margin-top: 14px; text-wrap: pretty; }
/* l'azione della card: freccia in un quadrato in basso a destra, si riempie quando la card è scelta */
.h-card-text { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; column-gap: 16px; }
.h-card-name { grid-column: 1 / -1; }
.h-card-desc { grid-column: 1; align-self: start; }
.h-card-go {
  grid-column: 2; grid-row: 2;
  align-self: end;
  margin-top: 14px;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--inset-sm);
  transition: background .3s, color .3s, box-shadow .3s;
}
.h-card-go svg { display: block; transition: transform .3s; }
.h-card:hover .h-card-go, .h-card:focus-visible .h-card-go { background: var(--accent); color: var(--on-accent); box-shadow: var(--inset-accent); }
.h-card-photo img { transition: transform .6s cubic-bezier(.2, .6, .2, 1); }
.h-card:hover .h-card-photo img { transform: scale(1.03); }

/* Schema verticale (telefono e tablet in piedi): tronco a sinistra, un ramo per entità */
.h-map { --tx: 10px; --off: 18px; --pt: 22px; --ny: 46px; }
.h-stem, .h-rail { display: none; }
.h-branch { position: relative; padding: var(--pt) 0 0 calc(var(--tx) + var(--off)); }
.h-branch::before { left: calc(var(--tx) - 1px); top: 0; width: 2px; height: calc(var(--pt) + var(--ny)); }
.h-branch::after { left: var(--tx); top: calc(var(--pt) + var(--ny) - 1px); width: var(--off); height: 2px; }
.h-card::before { left: calc(-1 * var(--off) - 1px); top: var(--ny); bottom: 0; width: 2px; }
.h-branch:last-child .h-card::before { display: none; }
.h-map { --ny: 56px; }
.h-card { grid-template-columns: 92px minmax(0, 1fr); align-items: start; padding: 10px; }
.h-card-photo { aspect-ratio: 1; border-radius: 14px; }
.h-card-text { padding: 4px 2px 2px 14px; }
.h-card-text .h-card-name { font-size: clamp(1.15rem, 7.4cqi, 1.4rem); }
.h-card-desc { margin-top: 8px; font-size: .92rem; line-height: 1.5; }
.h-card-go { width: 34px; height: 34px; margin-top: 0; border-radius: 11px; }
/* telefono: la freccia sulla riga del nome, la descrizione prende tutta la larghezza */
.h-card-text .h-card-name { grid-column: 1; grid-row: 1; align-self: center; }
.h-card-text .h-card-go { grid-column: 2; grid-row: 1; align-self: start; }
.h-card-text .h-card-desc { grid-column: 1 / -1; grid-row: 2; }
.h-card-go svg { width: 18px; height: 18px; }

/* accensione del percorso fino all'entità scelta */
.h-branch:has(.h-card:hover, .h-card:focus-visible)::after,
.h-branch:has(.h-card:hover, .h-card:focus-visible)::before,
.h-branch:has(~ .h-branch .h-card:hover, ~ .h-branch .h-card:focus-visible)::before,
.h-branch:has(~ .h-branch .h-card:hover, ~ .h-branch .h-card:focus-visible) .h-card::before { background: var(--line-on); }

@container mappa (min-width: 520px) {
  .h-map { --ny: 64px; --tx: 16px; --off: 24px; }
  .h-card-photo { border-radius: calc(var(--radius) - 12px); }
  .h-card-text .h-card-name { font-size: clamp(1.3rem, 9.5cqi, 1.9rem); }
  .h-card-desc { margin-top: 14px; font-size: 1rem; line-height: 1.6; }
  .h-card-go { width: 44px; height: 44px; margin-top: 14px; border-radius: var(--radius-btn); }
  .h-card-go svg { width: 20px; height: 20px; }
  .h-card-text .h-card-name { grid-column: 1 / -1; }
  .h-card-text .h-card-desc { grid-column: 1; grid-row: 2; }
  .h-card-text .h-card-go { grid-column: 2; grid-row: 2; align-self: end; }
  .h-card { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; }
  .h-card-photo { aspect-ratio: 4 / 3; }
  .h-card-text { padding: 12px 18px 12px 26px; }
}

@container mappa (max-width: 360px) {
  .h-map { --tx: 6px; --off: 14px; }
  .h-card { grid-template-columns: minmax(0, 1fr); padding: 8px; }
  .h-card-photo { aspect-ratio: 16 / 7; }
  .h-card-text { padding: 14px 6px 6px; }
}

/* Schema orizzontale (dal tablet largo in su): lo studio in alto, tre rami verso le entità */
@container mappa (min-width: 860px) {
  .h-map-box .h-map { --hub: 112px; --g: clamp(20px, 2.6vw, 44px); --drop: 28px; }
  .h-hub { width: 100%; height: var(--hub-h); }
  .h-stem, .h-rail { display: block; }
  .h-stem { left: calc(50% - 1px); top: 0; width: 2px; height: var(--drop); }
  .h-rail { top: calc(var(--drop) - 1px); height: 2px; }
  .h-rail-l { left: calc((100% - 2 * var(--g)) / 6); right: 50%; }
  .h-rail-r { left: 50%; right: calc((100% - 2 * var(--g)) / 6); }
  .h-branches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--g); margin-top: calc(var(--drop) * 2); }
  .h-branch { padding: 0; display: grid; }
  .h-branch::before { left: calc(50% - 1px); top: calc(-1 * var(--drop)); width: 2px; height: var(--drop); }
  .h-branch::after, .h-card::before { display: none; }
  .h-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; }
  .h-card-photo { aspect-ratio: 5 / 4; }
  .h-card-text { padding: 26px 16px 16px; height: 100%; }
  /* in orizzontale il percorso passa dal fusto e da metà della barra */
  .h-map:has(.h-card:hover, .h-card:focus-visible) .h-stem { background: var(--line-on); }
  .h-map:has(.h-branch:first-child .h-card:hover, .h-branch:first-child .h-card:focus-visible) .h-rail-l,
  .h-map:has(.h-branch:last-child .h-card:hover, .h-branch:last-child .h-card:focus-visible) .h-rail-r { background: var(--line-on); }
  .h-branch:has(~ .h-branch .h-card:hover, ~ .h-branch .h-card:focus-visible)::before { background: var(--line); }
}

/* ------------------------------------------------------------------ GEN-D */
.h-gend-plate {
  container-type: inline-size;
  background: var(--bg-alt);
  border-radius: calc(var(--radius) * 1.4);
  box-shadow: var(--inset);
  padding: clamp(24px, 3.5vw, 60px);
}
.h-gend-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 32px; align-items: center; }
.h-book { --bp: clamp(10px, 1.2vw, 16px); grid-column: 1 / 4; display: block; padding: var(--bp); border-radius: var(--radius); background: var(--bg-alt); box-shadow: var(--raised); transition: box-shadow .3s; }
.h-book img { width: 100%; border-radius: calc(var(--radius) - var(--bp)); box-shadow: 0 0 0 1px rgba(21, 32, 59, .06); }
.h-book:hover { box-shadow: -13px -13px 26px var(--hi), 15px 15px 32px var(--lo), -1px -1px 2px var(--hi), 2px 2px 4px var(--lo); }
.h-book:active { box-shadow: var(--inset); }
.h-gend-intro { grid-column: 5 / 13; }
.h-gend-intro .lead { margin-top: 24px; max-width: 34em; }
.h-gend-links { grid-column: 5 / 13; grid-row: 2; align-self: start; margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 20px; }
.h-gend-top > .h-book { grid-row: 1 / 3; }

/* O × V × C = A: le fasi sulla stessa linea incisa dei rami; la linea si accende da O verso A */
.h-chain {
  --disc: clamp(64px, 6.4vw, 92px);
  position: relative;
  margin: clamp(32px, 4vw, 60px) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  --sw: max(var(--disc), 7.6em);
  grid-template-columns: var(--sw) 1fr var(--sw) 1fr var(--sw) 1fr var(--sw);
  align-items: start;
}
.h-chain::before, .h-chain::after {
  content: "";
  position: absolute;
  left: calc(var(--sw) / 2);
  right: calc(var(--sw) / 2);
  top: calc(var(--disc) / 2 - 1px);
  height: 2px;
  background: var(--line);
  box-shadow: 1px 1px 0 var(--line-hi);
}
.h-chain::after { background: var(--line-on); box-shadow: none; transform-origin: left center; }
.h-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.h-disc {
  display: grid; place-items: center;
  width: var(--disc); height: var(--disc);
  border-radius: 50%;
  background: var(--bg-alt);
  box-shadow: var(--raised-sm);
  font-size: calc(var(--disc) * .4);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}
.h-step-a .h-disc { background: var(--accent); color: var(--on-accent); box-shadow: var(--raised-accent-sm); }
.h-step-label { font-weight: 600; font-size: .98rem; color: var(--ink); white-space: nowrap; }
.h-op {
  position: relative; z-index: 1;
  justify-self: center;
  margin-top: calc(var(--disc) / 2 - 15px);
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg-alt);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
}
.h-op svg { display: block; width: 1em; height: 1em; }

/* entrata in vista: la linea corre da O ad A, poi A si riempie (solo con JS e movimento consentito) */
@media (prefers-reduced-motion: no-preference) {
  .js-anim .h-chain::after { transform: scaleX(0); transition: transform 1.6s cubic-bezier(.5, 0, .2, 1); }
  .js-anim .h-chain.is-in::after { transform: none; }
  .js-anim .h-step-a .h-disc { transition: background .5s 1.45s, color .5s 1.45s, box-shadow .5s 1.45s; }
  .js-anim .h-chain:not(.is-in) .h-step-a .h-disc { background: var(--bg-alt); color: var(--ink); box-shadow: var(--raised-sm); }
}

/* ------------------------------------------------------------------ Contatti */
.h-contact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 40px; align-items: center; }
.h-contact-text { grid-column: 1 / 6; }
/* sfondo fotografico dei contatti, solo su desktop: la foto copre tutta la larghezza della finestra e scorre al 60% della velocità
   della pagina; testo e mappa stanno su lastre di pietra. È più alta della sezione quanto serve (--px lo calcola home.js) */
.h-contact-photo { display: none; }
@media (min-width: 1101px) {
  .home { overflow-x: clip; }   /* 100vw comprende la barra di scorrimento classica: senza taglio sporgerebbe di qualche pixel */
  .home > .h-contact { position: relative; padding-top: var(--section); isolation: isolate; }
  .h-contact-photo { display: block; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw; margin: 0; overflow: hidden; }
  .h-contact-photo img { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% + var(--px, 0px)); object-fit: cover; object-position: 50% 52%; filter: saturate(.85) brightness(.82); will-change: transform; }
  .h-contact-photo::after { content: ""; position: absolute; inset: 0; background: rgba(21, 32, 59, .22); }
  .h-contact-text { background: var(--bg); border-radius: calc(var(--radius) * 1.2); padding: clamp(24px, 3.4vw, 52px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
  .h-contact .h-map-well { background: var(--bg); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
}
.h-contact-text .lead { margin-top: 20px; }
.h-contact-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.2vw, 16px); margin-top: 32px; }
/* la sede è la mappa; email e telefono sono due accessi diretti sotto il testo */
.h-contact-grid { grid-column: 7 / 13; }
.h-map-well { aspect-ratio: 10 / 7; }
.h-map-well > img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); filter: var(--map); }
.h-ctile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-items: center;
  padding: clamp(16px, 1.6vw, 22px);
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow .3s;
}
.h-ctile-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--radius-btn); box-shadow: var(--inset-sm); transition: background .3s, color .3s, box-shadow .3s; }
.h-ctile-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.h-ctile-label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.h-ctile-value { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-ctile:hover { box-shadow: -13px -13px 26px var(--hi), 15px 15px 32px var(--lo), -1px -1px 2px var(--hi), 2px 2px 4px var(--lo); }
.h-ctile:hover .h-ctile-icon, .h-ctile:focus-visible .h-ctile-icon { background: var(--accent); color: var(--on-accent); box-shadow: var(--inset-accent); }
.h-ctile:active { box-shadow: var(--inset); }
.h-ctile:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
@media (min-width: 1101px) {
  .h-contact-tiles .h-ctile { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 2px; padding: 18px 20px; }
  .h-contact-tiles .h-ctile-icon { grid-row: auto; width: 40px; height: 40px; margin-bottom: 12px; }
  .h-contact-tiles .h-ctile-value { font-size: .95rem; }
}

/* ------------------------------------------------------------------ Tablet */
@media (max-width: 1100px) {
  .h-contact { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .h-contact-text { display: contents; }
  .h-contact-grid { order: 1; margin-top: 40px; }
  .h-contact-tiles { order: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); margin-top: clamp(14px, 1.6vw, 24px); }
}

/* ------------------------------------------------------------------ Telefono */
@media (max-width: 820px) {
  .h-gend-plate { padding: 28px 20px 32px; border-radius: var(--radius); }
  .h-map-well > img { inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
}


/* ------------------------------------------------------------------ Telefono: composizioni dedicate */
@media (max-width: 820px) {
  /* Studio tablet: side-by-side centrato, aspect-ratio 4:5 intatto, pulsante compatto */
  .h-studio {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(280px, 440px);
    justify-content: center;
    column-gap: clamp(24px, 4vw, 44px);
    row-gap: 24px;
    align-items: center;
  }
  .h-studio-photo {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: 280px;
    aspect-ratio: 4 / 5;
    position: relative;
    padding: 14px;
    border-radius: var(--radius);
    box-shadow: var(--inset);
    margin: 0;
    min-height: 0;
    align-self: center;
  }
  .h-studio-photo > img {
    position: absolute;
    inset: 14px;
    width: calc(100% - 28px);
    height: calc(100% - 28px);
    object-fit: cover;
    border-radius: calc(var(--radius) - 12px);
    object-position: 50% 50%;
  }
  .h-studio-text {
    display: block;
    grid-column: 2;
    grid-row: 1;
    max-width: 440px;
  }
  .h-studio-text h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    line-height: 1.15;
    margin: 0;
  }
  .h-studio-text .lead {
    margin-top: 16px;
    font-size: 1rem;
    line-height: 1.6;
  }
  .h-studio .h-more {
    margin-top: 22px;
    display: flex;
    width: auto;
  }
  /* Contatti: titolo e frase, mappa e due accessi diretti. */
  .h-contact-text .lead { margin-top: 14px; }
  .h-contact-grid { margin-top: 28px; }
  .h-contact-tiles { gap: 14px; margin-top: 14px; }
}
@media (max-width: 560px) {
  /* Studio mobile: photo 4:5 e testo affiancati compatti, pulsante sotto centrato */
  .h-studio {
    grid-template-columns: minmax(120px, 150px) minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 16px;
  }
  .h-studio-text h2 {
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: clamp(1.6rem, 6vw, 2.1rem);
  }
  .h-studio-photo {
    grid-column: 1;
    grid-row: 2;
    padding: 8px;
  }
  .h-studio-photo > img {
    inset: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    border-radius: calc(var(--radius) - 8px);
  }
  .h-studio-text {
    display: contents;
  }
  .h-studio-text .lead {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    font-size: .92rem;
    line-height: 1.48;
  }
  .h-studio .h-more {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 4px;
    justify-content: center;
    width: 100%;
  }

  /* contatti: icona sopra il testo nei riquadri affiancati */
  .h-ctile { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 2px; padding: 16px; }
  .h-ctile-icon { grid-row: auto; width: 40px; height: 40px; margin-bottom: 14px; }
  .h-ctile-value { font-size: .95rem; }
}
@media (max-width: 380px) {
  /* telefoni stretti: l'icona dei contatti accanto al testo */
  .h-contact-tiles { grid-template-columns: minmax(0, 1fr); }
  .h-ctile { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; }
  .h-ctile-icon { grid-row: 1 / 3; margin-bottom: 0; }
}

/* ------------------------------------------------------------------ Tablet e telefono: apertura */
/* stessa composizione, foto più alta in proporzione e titolo su una riga libera */
@media (max-width: 1100px) {
  .h-hero-photo { min-height: clamp(460px, calc(100svh - var(--header) - 130px), 720px); }
  .h-hero-main { padding: clamp(24px, 5vw, 40px); }
  .h-hero h1 { font-size: clamp(2.1rem, 9cqi, 3.8rem); line-height: 1.04; }
  .h-hero h1 .h-l1 { display: inline; white-space: normal; }
  .h-hero .lead { font-size: clamp(1rem, 2.5vw, 1.15rem); margin-top: 20px; }
}
@media (min-width: 1101px) {
  /* panorama: foto ingrandita dall'angolo in basso a destra (via la tenda), velatura solo dove sta il testo, la Rocca resta luminosa */
  .h-hero-photo > img { inset: auto 0 0 auto; width: 124%; height: 124%; object-position: 50% 80%; }
  .h-hero-photo::after { background: linear-gradient(0deg, rgba(13, 20, 37, .8), rgba(13, 20, 37, .3) 45%, rgba(13, 20, 37, 0) 75%), linear-gradient(90deg, rgba(13, 20, 37, .55), rgba(13, 20, 37, 0) 65%); }
}
@media (min-width: 821px) and (max-width: 1100px) {
  /* tablet: la foto ingrandita dall'angolo in basso a destra toglie la tenda in alto a sinistra */
  .h-hero-photo > img { inset: auto 0 0 auto; width: 135%; height: 135%; object-position: 50% 100%; }
  .h-hero-main { padding: 48px; }
  .h-hero h1 { font-size: clamp(3.4rem, 7.4cqi, 4.4rem); }
  .h-hero .lead { font-size: 1.2rem; }
}
@media (max-width: 820px) {
  /* telefono: foto più alta, accessi a metà larghezza ciascuno */
  .h-hero-content { display: contents; }
  .h-hero-photo { min-height: clamp(500px, 78svh, 680px); }
  .h-hero-photo > img { object-position: 55% 50%; }
  .h-hero-cta, .h-hero-about { grid-row: 2; justify-self: stretch; min-height: 76px; padding: 14px 18px; gap: 14px; border-radius: var(--radius); }
  .h-hero .h-cta-arrow { width: 44px; height: 44px; }
  .h-hero-cta { grid-column: 1 / 8; }
  .h-hero-about { grid-column: 8 / 13; }
  .h-hero .h-cta-label { flex: 1; text-align: center; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .h-card, .h-card-go, .h-card-go svg, .h-ctile, .h-ctile-icon, .h-card-photo img, .h-book, .h-hero-cta, .h-hero-about, .h-cta-arrow, .h-groove, .h-branch::before, .h-branch::after, .h-card::before { transition: none; }
}

/* Frecce e riquadri frecce: sia i riquadri che le frecce ingranditi su desktop */
.h-card .h-card-go { width: 56px; height: 56px; border-radius: 18px; }
.h-card-go svg, .h-cta-arrow svg { width: 28px; height: 28px; }
.h-card-go svg path, .h-cta-arrow svg path { stroke-width: 2.3px; }

@media (max-width: 820px) {
  .h-cta-arrow { width: 44px; height: 44px; border-radius: 14px; }
  .h-hero-cta .h-cta-arrow {
    background: var(--accent);
    box-shadow: var(--inset-accent);
  }
  .h-hero-about .h-cta-arrow {
    background: var(--bg);
    box-shadow: var(--inset-sm);
  }
  .h-card .h-card-go { width: 44px; height: 44px; border-radius: 14px; }
  .h-card-go svg, .h-cta-arrow svg { width: 20px; height: 20px; }
  .h-card-go svg path, .h-cta-arrow svg path { stroke-width: 1.8px; }
}

/* Telefono: Contatti e Servizi restano affiancati, a metà larghezza ciascuno; la parola è centrata nello spazio che resta accanto al quadratino > */
@media (max-width: 639px) {
  .h-hero-cta, .h-hero-about { grid-row: 2; padding: 12px; gap: 6px; min-height: 76px; }
  .h-hero-cta { grid-column: 1 / 7; }
  .h-hero-about { grid-column: 7 / 13; }
  .h-hero .h-cta-label { font-size: .98rem; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
}
@media (max-width: 349px) {
  .h-hero-cta, .h-hero-about { padding: 12px 8px; gap: 4px; }
  .h-hero .h-cta-label { font-size: .9rem; }
}


/* Il GEN-D passa direttamente dal percorso orizzontale a copertina e percorso affiancati. */
.h-gend-professional::after { content: none; }
.h-gend-links .btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  inline-size: var(--btn-w, 15rem); min-inline-size: max-content; max-inline-size: 100%;
  min-height: 58px; white-space: nowrap; padding: 14px 26px;
  font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em; text-align: center;
  border-radius: var(--radius-btn);
  transition: box-shadow .3s, background .3s, translate .3s;
}
@media (max-width: 1000px) {
  .h-gend-plate { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 24px; padding: 30px 22px 26px; }
  .h-gend-plate .h-gend-top, .h-gend-plate .h-gend-intro { display: contents; }
  .h-gend-plate .h-gend-intro h2 { grid-column: 1 / -1; grid-row: 1; font-size: clamp(1.7rem, 5vw, 2.7rem); }
  .h-gend-plate .h-gend-intro .lead { grid-column: 1 / -1; grid-row: 2; margin-top: 14px; }
  .h-gend-plate .h-book { grid-column: 1; grid-row: 3; width: 100%; max-width: 220px; justify-self: center; margin-top: 22px; align-self: center; --bp: 8px; border-radius: 18px; }
  .h-gend-plate .h-book img { border-radius: 10px; }
  .h-gend-plate .h-chain { --disc: 44px; grid-column: 2; grid-row: 3; justify-self: center; align-self: center; width: max-content; margin: 22px 0 0; padding: 0; box-shadow: none; border-radius: 0; grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .h-gend-plate .h-chain::before, .h-gend-plate .h-chain::after { left: calc(var(--disc) / 2 - 1px); right: auto; top: calc(var(--disc) / 2); bottom: calc(var(--disc) / 2); width: 2px; height: auto; }
  .h-gend-plate .h-chain::after { transform-origin: center top; }
  .h-gend-plate .h-step { flex-direction: row; align-items: center; gap: 12px; }
  .h-gend-plate .h-disc { font-size: 1.1rem; box-shadow: var(--raised-sm); }
  .h-gend-plate .h-step-a .h-disc { box-shadow: var(--raised-accent-sm); }
  .js-anim .h-gend-plate .h-chain:not(.is-in) .h-step-a .h-disc { box-shadow: var(--raised-sm); }
  .h-gend-plate .h-step-label { font-size: 1rem; }
  .h-gend-plate .h-op { justify-self: start; margin: 8px 0 8px calc(var(--disc) / 2 - 11px); width: 22px; height: 22px; font-size: .9rem; }
  .h-gend-plate .h-gend-links { grid-column: 1 / -1; grid-row: 4; margin-top: 22px; flex-direction: row; justify-content: center; align-items: center; gap: 16px; text-align: center; }
}
@media (max-width: 560px) {
  .h-gend-plate .h-gend-links { flex-direction: column; align-items: stretch; width: 100%; gap: 12px; margin-top: 20px; }
  .h-gend-plate .h-gend-links .btn { inline-size: 100% !important; min-height: 52px; padding: 13px 20px; font-size: 1rem; }
  .h-gend-plate { grid-template-columns: minmax(0, 1fr) max-content; column-gap: 18px; padding: 26px 18px 22px; }
  .h-gend-plate .h-chain { --disc: 34px; justify-self: end; }
  .h-gend-plate .h-step { gap: 9px; }
  .h-gend-plate .h-step-label { font-size: .85rem; }
  .h-gend-plate .h-disc { font-size: 1rem; }
  .h-studio .h-more .btn { padding: .9em 1.1em; }
}
@media (max-width: 360px) {
  .h-gend-plate { column-gap: 12px; padding-left: 14px; padding-right: 14px; }
  .h-gend-plate .h-chain { --disc: 30px; }
  .h-gend-plate .h-step { gap: 7px; }
  .h-gend-plate .h-step-label { font-size: .78rem; }
}
@media (max-width: 1000px) and (prefers-reduced-motion: no-preference) {
  .js-anim .h-gend-plate .h-chain::after { transform: scaleY(0); }
  .js-anim .h-gend-plate .h-chain.is-in::after { transform: none; }
}

/* Sollevamento al passaggio e pressione al tocco (stesse regole delle pagine interne) */
@media (prefers-reduced-motion: no-preference) {
  .h-ctile, .h-book, .h-hero-cta, .h-hero-about { transition-property: box-shadow, background, background-color, transform, translate; transition-duration: .3s; }
  .h-ctile:active, .h-book:active, .h-hero-cta:active, .h-hero-about:active { translate: 0 1px; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .h-ctile:hover, .h-book:hover, .h-hero-cta:hover, .h-hero-about:hover { translate: 0 -2px; }
}

/* Il taglio orizzontale conserva testa e attributi della scultura sui telefoni. */
@container mappa (max-width: 360px) { .h-branch:first-child .h-card-photo { aspect-ratio: 3/2; } }

/* ------------------------------------------------------------------ Desktop: hero a tutta larghezza (10/10/2026, proposta A approvata da Leo) */
@media (min-width: 1101px) {
  /* Hero: la veduta a tutta larghezza, senza card; titolo, frase e accessi sulla foto */
  .home > .h-hero { max-width: none; padding: 0 0 var(--section); display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
  .h-hero-photo { grid-column: 1; grid-row: 1; border-radius: 0; box-shadow: none; min-height: clamp(560px, min(calc(100svh - var(--header)), 52vw), 1000px); }
  .h-hero-content { grid-column: 1; grid-row: 1; grid-template-rows: none; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; width: 100%; max-width: 1680px; margin: 0 auto; padding: 0 var(--pad) clamp(48px, 7vh, 88px); column-gap: 16px; }
  .h-hero-main { grid-column: 1; grid-row: 1; padding: 0; }
  .h-hero h1 { font-size: clamp(4.4rem, 6.2vw, 7.4rem); }
  .h-hero-cta, .h-hero-about { grid-row: 1; align-self: end; }
  .h-hero-cta { background: #fff; color: var(--ink); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .55); }
  .h-hero-cta .h-cta-arrow { background: var(--bg); color: var(--ink); box-shadow: var(--inset-sm); }
  .h-hero-cta:hover { background: #fff; box-shadow: 0 18px 34px -14px rgba(0, 0, 0, .6); }
  .h-hero-about { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55); backdrop-filter: blur(6px); }
  .h-hero-about .h-cta-arrow { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45); }
  .h-hero-about:hover { background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); }
  .h-hero-photo > img { inset: auto 0 0 auto; width: 124%; height: 110%; object-position: 50% 100%; }
  .h-hero-photo::after { background: linear-gradient(0deg, rgba(13, 20, 37, .82), rgba(13, 20, 37, .32) 42%, rgba(13, 20, 37, 0) 70%), linear-gradient(90deg, rgba(13, 20, 37, .45), rgba(13, 20, 37, 0) 60%); }

  /* Home, Competenza e metodo: il ritratto resta solo nel Profilo; sezione tipografica su due colonne */
  .h-studio { grid-template-columns: repeat(12, minmax(0, 1fr)); justify-content: stretch; column-gap: var(--gap); row-gap: 0; align-items: start; }
  .h-studio-photo { display: none; }
  .h-studio-text { display: contents; }
  .h-studio-text h2 { grid-row: 1 / 3; grid-column: 1 / 7; font-size: clamp(3.2rem, 5vw, 5.4rem); line-height: 1; max-width: none; }
  .h-studio-text .lead { grid-column: 7 / 12; grid-row: 1; margin-top: 0; padding-top: .9em; }
  .h-studio-text .h-more { grid-column: 7 / 12; grid-row: 2; margin-top: 32px; }
}

/* Hero desktop su schermi larghi e bassi (10/10/2026): niente tetto fisso all'altezza, che sui monitor larghi tagliava mare e Rocca;
   quando la finestra è più larga del doppio dell'altezza la foto si centra sull'orizzonte invece di partire dal basso */
@media (min-width: 1101px) {
  .h-hero-photo { min-height: clamp(440px, min(calc(100svh - var(--header)), 52vw), 2400px); }
}
@media (min-width: 1101px) and (min-aspect-ratio: 2/1) {
  .h-hero-photo > img { width: 136%; height: 100%; object-position: 50% 70%; }
}
