/* Font self-hosted (Google Fonts, licenza OFL): Newsreader, Geist, Geist Mono */
/* latin-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url(/assets/fonts/Geist-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url(/assets/fonts/Geist-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/GeistMono-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/GeistMono-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/GeistMono-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/GeistMono-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url(/assets/fonts/Newsreader-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url(/assets/fonts/Newsreader-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/assets/fonts/Newsreader-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/assets/fonts/Newsreader-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Font di riserva con metriche calibrate sui font del sito: lo scambio (font-display: swap) non sposta il testo (CLS).
   Valori calcolati sulla larghezza media di un testo italiano: Times/Arial = iOS, macOS, Windows; Noto Serif/Roboto = Android. */
@font-face { font-family: "Newsreader FB Times"; src: local("Times New Roman"), local("TimesNewRomanPSMT"), local("Times"); size-adjust: 100.1%; ascent-override: 73.4%; descent-override: 26.5%; line-gap-override: 0%; }
@font-face { font-family: "Newsreader FB Times"; font-style: italic; src: local("Times New Roman Italic"), local("TimesNewRomanPS-ItalicMT"), local("Times-Italic"); size-adjust: 100.1%; ascent-override: 73.4%; descent-override: 26.5%; line-gap-override: 0%; }
@font-face { font-family: "Newsreader FB Noto"; src: local("Noto Serif"), local("NotoSerif"), local("Droid Serif"); size-adjust: 84.7%; ascent-override: 86.8%; descent-override: 31.3%; line-gap-override: 0%; }
@font-face { font-family: "Newsreader FB Noto"; font-style: italic; src: local("Noto Serif Italic"), local("NotoSerif-Italic"); size-adjust: 84.7%; ascent-override: 86.8%; descent-override: 31.3%; line-gap-override: 0%; }
@font-face { font-family: "Geist FB Arial"; src: local("Arial"), local("ArialMT"), local("Helvetica"); size-adjust: 104.0%; ascent-override: 96.6%; descent-override: 28.4%; line-gap-override: 0%; }
@font-face { font-family: "Geist FB Roboto"; src: local("Roboto"), local("Roboto-Regular"); size-adjust: 104.1%; ascent-override: 96.5%; descent-override: 28.3%; line-gap-override: 0%; }

@font-face {
  font-family: "Phosphor";
  src: url("/assets/icons/Phosphor.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: block; /* ponytail: solo woff2, supportato da tutti i browser moderni */
}

.ph {
  /* use !important to prevent issues with browser extensions that change fonts */
  font-family: "Phosphor" !important;
  speak: never;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;

  /* Enable Ligatures ================ */
  letter-spacing: 0;
  -webkit-font-feature-settings: "liga";
  -moz-font-feature-settings: "liga=1";
  -moz-font-feature-settings: "liga";
  -ms-font-feature-settings: "liga" 1;
  font-feature-settings: "liga";
  -webkit-font-variant-ligatures: discretionary-ligatures;
  font-variant-ligatures: discretionary-ligatures;

  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ph.ph-arrow-right:before { content: "\e06c"; }
.ph.ph-atom:before { content: "\e5e4"; }
.ph.ph-bone:before { content: "\e7f2"; }
.ph.ph-buildings:before { content: "\e102"; }
.ph.ph-caret-down:before { content: "\e136"; }
.ph.ph-dna:before { content: "\e924"; }
.ph.ph-drop:before { content: "\e210"; }
.ph.ph-ear:before { content: "\e70c"; }
.ph.ph-envelope-simple:before { content: "\e218"; }
.ph.ph-facebook-logo:before { content: "\e226"; }
.ph.ph-first-aid-kit:before { content: "\e570"; }
.ph.ph-footprints:before { content: "\ea88"; }
.ph.ph-gender-female:before { content: "\e6e0"; }
.ph.ph-graduation-cap:before { content: "\e62c"; }
.ph.ph-hand-palm:before { content: "\e57e"; }
.ph.ph-handshake:before { content: "\e582"; }
.ph.ph-heartbeat:before { content: "\e2ac"; }
.ph.ph-info:before { content: "\e2ce"; }
.ph.ph-instagram-logo:before { content: "\e2d0"; }
.ph.ph-leaf:before { content: "\e2da"; }
.ph.ph-list:before { content: "\e2f0"; }
.ph.ph-lock-key:before { content: "\e2fe"; }
.ph.ph-map-pin:before { content: "\e316"; }
.ph.ph-moon-stars:before { content: "\e58e"; }
.ph.ph-person-simple-walk:before { content: "\e73a"; }
.ph.ph-phone:before { content: "\e3b8"; }
.ph.ph-plus:before { content: "\e3d4"; }
.ph.ph-scales:before { content: "\e750"; }
.ph.ph-scissors:before { content: "\eae0"; }
.ph.ph-shield-check:before { content: "\e40c"; }
.ph.ph-sparkle:before { content: "\e6a2"; }
.ph.ph-stethoscope:before { content: "\e7ea"; }
.ph.ph-tooth:before { content: "\e9cc"; }
.ph.ph-whatsapp-logo:before { content: "\e5d0"; }
.ph.ph-x:before { content: "\e4f6"; }

/* Centro Medico Giancotti — bozza sito unico Roma + Milano
   Design system: editoriale minimal, avorio caldo + blu inchiostro (dal logo CMG) */

:root {
  --bg: #F7F5F0;          /* avorio caldo */
  --surface: #FFFFFF;
  --surface-2: #FBFAF7;
  --ink: #1B1E26;         /* testo principale, mai nero puro */
  --ink-2: #4A4D55;
  --muted: #77736D;
  --line: #E6E2DA;
  --brand: #1D3557;       /* blu inchiostro CMG */
  --brand-2: #2C4A73;
  --on-brand: #FFFFFF;
  --tag-blue: #E4EDF6;   --tag-blue-t: #1F4E7A;
  --tag-sand: #F3EBDD;   --tag-sand-t: #7A5A22;
  --tag-sage: #E8EFE6;   --tag-sage-t: #3A5E3C;
  --focus: #2C6BB0;

  --serif: "Newsreader", "Newsreader FB Times", "Newsreader FB Noto", Georgia, serif;
  --sans: "Geist", "Geist FB Arial", "Geist FB Roboto", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", "SF Mono", ui-monospace, monospace;

  --r-s: 4px; --r-m: 8px; --r-l: 12px;
  --wrap: 1200px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--tag-blue); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 10px 16px; z-index: 1000; }
.skip:focus { left: 16px; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.narrow { max-width: 760px; }

/* ---------- Tipografia ---------- */
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1.04; margin: 0 0 24px; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.1; margin: 0 0 20px; }
h3 { font-size: 1.55rem; line-height: 1.2; margin: 0 0 10px; }
h1 em, h2 em { font-style: italic; color: var(--brand); }
p { margin: 0 0 16px; color: var(--ink-2); }
.lead { font-size: 1.2rem; line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
.eyebrow {
  font: 500 0.74rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.small { font-size: 0.9rem; color: var(--muted); }

/* ---------- Bottoni ---------- */
.btn {
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-s);
  font: 500 0.95rem/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .12s;
}
.btn:active { transform: scale(0.98); }
.btn .gmaps { width: 13px; height: auto; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--bg); }
.link-arrow { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 4px; transition: border-color .2s, gap .2s; }
.link-arrow:hover { border-color: var(--ink); gap: 12px; }

.tag { display: inline-block; align-self: flex-start; white-space: nowrap; font: 500 0.7rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; }
.tag-blue { background: var(--tag-blue); color: var(--tag-blue-t); }
.tag-sand { background: var(--tag-sand); color: var(--tag-sand-t); }
.tag-sage { background: var(--tag-sage); color: var(--tag-sage-t); }

/* ---------- Topbar + Header ---------- */
.topbar { background: var(--ink); color: #D9D6CF; font-size: 0.82rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; flex-wrap: wrap; }
.topbar a { text-decoration: none; color: #fff; }
.topbar span { display: inline-flex; align-items: center; gap: 6px; }

.header { position: sticky; top: 0; z-index: 50; background: rgba(247,245,240,0.88); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.header .wrap { width: min(1360px, 100% - 40px); display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
.nav { min-width: 0; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark { font: 500 1.65rem/1 var(--serif); color: var(--brand); letter-spacing: 0.02em; border-right: 1px solid var(--line); padding-right: 12px; }
.logo-text { white-space: nowrap; font: 500 0.78rem/1.25 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.logo-text small { display: block; color: var(--muted); letter-spacing: 0.1em; font-size: 0.68rem; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav > ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; }
.nav li { position: relative; }
.nav a.top, .nav button.top { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; font: 450 0.92rem/1 var(--sans); text-decoration: none; background: none; border: 0; color: var(--ink); cursor: pointer; border-radius: var(--r-s); }
.nav a.top:hover, .nav button.top:hover, .nav a.top[aria-current="page"] { background: rgba(29,53,87,0.06); }
.mega {
  position: absolute; left: 0; top: calc(100% + 10px); min-width: 520px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  box-shadow: 0 12px 32px rgba(27,30,38,0.06);
}
.nav li:hover > .mega, .nav li:focus-within > .mega { opacity: 1; visibility: visible; transform: none; }
.mega h4 { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.mega a { display: block; padding: 6px 0; text-decoration: none; font-size: 0.93rem; }
.mega a:hover { color: var(--brand); }
.header-cta { display: flex; gap: 10px; align-items: center; }
.menu-btn { display: none; width: 48px; height: 48px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-s); cursor: pointer; font-size: 1.3rem; color: var(--ink); }

/* Drawer mobile */
.drawer { position: fixed; inset: 0; z-index: 100; display: none; }
.drawer.open { display: block; }
.drawer-bg { position: absolute; inset: 0; background: rgba(27,30,38,0.45); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(420px, 100%); background: var(--bg); padding: 24px; overflow-y: auto; animation: slideIn .3s var(--ease); }
@keyframes slideIn { from { transform: translateX(24px); opacity: 0; } }
.drawer-panel .close { float: right; width: 48px; height: 48px; border: 1px solid var(--line); background: #fff; border-radius: var(--r-s); font-size: 1.2rem; cursor: pointer; }
.drawer-panel nav { clear: both; padding-top: 16px; }
.drawer-panel details { border-bottom: 1px solid var(--line); }
.drawer-panel summary, .drawer-panel .d-link { display: flex; justify-content: space-between; padding: 16px 0; font: 400 1.35rem/1.2 var(--serif); list-style: none; cursor: pointer; text-decoration: none; border-bottom: 1px solid var(--line); }
.drawer-panel details summary { border-bottom: 0; }
.drawer-panel summary::-webkit-details-marker { display: none; }
.drawer-panel details a { display: block; padding: 8px 0 8px 12px; text-decoration: none; color: var(--ink-2); }
.drawer-panel details[open] { padding-bottom: 12px; }

/* ---------- Sezioni ---------- */
section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head p { max-width: 52ch; margin: 0; }
.bg-white { background: var(--surface); }
.bg-ink { background: var(--ink); color: #E9E6E0; }
.bg-ink h2, .bg-ink h3 { color: #fff; }
.bg-ink p { color: #BDB9B1; }
.bg-ink .eyebrow { color: #A8A49C; }
.hairline { border-top: 1px solid var(--line); }

/* Hero home */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 110px); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; background: radial-gradient(closest-side, rgba(29,53,87,0.06), transparent 70%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-media { position: relative; }
.hero-media .ph-main { aspect-ratio: 4/5; border-radius: var(--r-l); overflow: hidden; }
.hero-media .ph-float { position: absolute; left: -36px; bottom: 36px; width: 46%; aspect-ratio: 1; border-radius: var(--r-l); overflow: hidden; border: 6px solid var(--bg); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.88); }
.hero-facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 40px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero-facts div { font: 400 2rem/1 var(--serif); color: var(--ink); }
.hero-facts small { display: block; margin-top: 8px; font: 500 0.72rem/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* Sede switch */
.sede-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-m); padding: 4px; background: var(--surface); }
.sede-switch button { border: 0; background: none; padding: 10px 18px; border-radius: 6px; font: 500 0.9rem/1 var(--sans); cursor: pointer; color: var(--muted); min-height: 40px; }
.sede-switch button[aria-pressed="true"] { background: var(--brand); color: #fff; }

/* Aree (3 colonne) */
.areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.area {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden;
  text-decoration: none; display: flex; flex-direction: column; transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.area:hover { box-shadow: 0 8px 28px rgba(27,30,38,0.06); transform: translateY(-2px); }
.area .ph { aspect-ratio: 4/3; overflow: hidden; }
.area .ph img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85); transition: transform .6s var(--ease); }
.area:hover .ph img { transform: scale(1.03); }
.area .body { padding: 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.area .body p { font-size: 0.97rem; }
.area .meta { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }

/* Bento Preservé */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(180px, auto); gap: 16px; }
.cell { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 32px; position: relative; overflow: hidden; }
.cell.span-3 { grid-column: span 3; } .cell.span-2 { grid-column: span 2; } .cell.span-4 { grid-column: span 4; } .cell.row-2 { grid-row: span 2; }
.cell.media { padding: 0; } .cell.media img { width: 100%; height: 100%; object-fit: cover; }
.cell .big { font: 400 3rem/1 var(--serif); color: var(--brand); margin-bottom: 10px; }
.cell.dark { background: var(--brand); border-color: var(--brand); color: #fff; }
.cell.dark h3, .cell.dark p { color: #fff; } .cell.dark p { opacity: .82; }

/* Griglia trattamenti */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 10px 16px; font: 500 0.88rem/1 var(--sans); cursor: pointer; color: var(--ink-2); min-height: 40px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.treat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.treat { background: var(--surface); padding: 28px 26px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; min-height: 210px; transition: background .2s; }
.treat:hover { background: var(--surface-2); }
.treat h3 { font-size: 1.35rem; margin: 6px 0 2px; }
.treat p { font-size: 0.92rem; margin: 0; }
.treat .where { margin-top: auto; padding-top: 14px; font: 500 0.7rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.treat .where i { color: var(--ink); font-size: 1rem; transition: transform .2s; }
.treat:hover .where i { transform: translateX(4px); }
.treat[hidden] { display: none !important; }

/* Split storia */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split .ph { border-radius: var(--r-l); overflow: hidden; aspect-ratio: 5/6; }
.split .ph img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85); }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.values i { font-size: 1.4rem; color: var(--brand); }
.values strong { display: block; font: 400 1.15rem/1.3 var(--serif); margin: 8px 0 4px; }
.values span { font-size: 0.9rem; color: var(--muted); }

/* Percorso */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.step { padding: 28px 28px 0 0; border-top: 1px solid rgba(255,255,255,0.18); position: relative; }
.step::before { counter-increment: s; content: "0" counter(s); font: 500 0.75rem/1 var(--mono); letter-spacing: .1em; color: #A8A49C; display: block; margin-bottom: 18px; }
.step h3 { font-size: 1.4rem; }
.bg-white .step, .light-steps .step { border-top-color: var(--line); }
.bg-white .step::before, .light-steps .step::before { color: var(--muted); }

/* Équipe */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.doc { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); overflow: hidden; }
.doc .ph { aspect-ratio: 1/1; background: linear-gradient(160deg, #EFEBE3, #E3DED4); display: grid; place-items: center; color: var(--muted); font: 400 3rem/1 var(--serif); }
.doc .ph img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.doc .body { padding: 20px 22px 24px; }
.doc h3 { font-size: 1.25rem; margin-bottom: 4px; }
.doc p { font-size: 0.88rem; margin: 0; color: var(--muted); }

/* Recensioni */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote { margin: 0; border: 1px solid var(--line); border-radius: var(--r-l); padding: 32px; background: var(--surface); display: flex; flex-direction: column; gap: 20px; }
.quote blockquote { margin: 0; font: 400 1.22rem/1.5 var(--serif); color: var(--ink); }
.quote cite { font: 500 0.75rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-style: normal; margin-top: auto; }
.rating { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rating .score { font: 400 3.4rem/1 var(--serif); }
.stars { color: #B98A2E; letter-spacing: 2px; }

/* Sedi */
.sedi { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sede { border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; background: var(--surface); display: grid; grid-template-rows: auto 1fr; }
.sede .ph { aspect-ratio: 16/9; overflow: hidden; }
.sede .ph img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85); }
.sede .body { padding: 32px; }
.sede dl { display: grid; grid-template-columns: 110px 1fr; gap: 10px 16px; margin: 20px 0 24px; font-size: 0.95rem; }
.sede dt { font: 500 0.72rem/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sede dd { margin: 0; }
.sede .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 24px 0; font: 400 1.3rem/1.35 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 300 1.6rem/1 var(--sans); color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 24px; max-width: 70ch; }

/* Form */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(24px, 4vw, 48px); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font: 500 0.85rem/1.2 var(--sans); color: var(--ink); }
.field label .req { color: #9F2F2D; }
.field input, .field select, .field textarea {
  font: 400 1rem/1.4 var(--sans); color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-s); padding: 13px 14px; min-height: 48px; width: 100%;
  transition: border-color .2s, background .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(29,53,87,0.12); }
.field textarea { min-height: 120px; resize: vertical; }
.field .hint { font-size: 0.82rem; color: var(--muted); }
.field .err { font-size: 0.82rem; color: #9F2F2D; display: none; }
.field.invalid input, .field.invalid select { border-color: #9F2F2D; }
.field.invalid .err { display: block; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.88rem; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.form-ok { display: none; padding: 20px; border-radius: var(--r-m); background: var(--tag-sage); color: var(--tag-sage-t); margin-top: 16px; }
.form-ok.show { display: block; }
.contact-split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list i { font-size: 1.3rem; color: var(--brand); margin-top: 3px; }
.contact-list a { text-decoration: none; font-weight: 500; }

/* Pagina interna: hero, breadcrumb, sommario */
.crumbs { font-size: 0.85rem; color: var(--muted); padding: 24px 0 0; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--ink); }
.crumbs span { margin: 0 8px; }
.page-hero { padding: 32px 0 clamp(48px, 7vw, 88px); }
.page-hero .hero-grid { grid-template-columns: 1.2fr 0.8fr; }
.page-hero .ph { aspect-ratio: 4/5; border-radius: var(--r-l); overflow: hidden; }
.page-hero .ph img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.88); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); margin-top: 36px; }
.facts div { padding: 20px 22px; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts dt { font: 500 0.7rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.facts dd { margin: 0; font: 400 1.15rem/1.3 var(--serif); }
.article { display: grid; grid-template-columns: 240px 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.toc { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); }
.toc a { text-decoration: none; padding: 8px 16px; font-size: 0.92rem; color: var(--muted); border-left: 2px solid transparent; margin-left: -1px; }
.toc a:hover, .toc a.active { color: var(--ink); border-left-color: var(--brand); }
.prose h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-top: 64px; scroll-margin-top: 100px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 1.05rem; line-height: 1.75; }
.prose ul { padding-left: 20px; color: var(--ink-2); }
.prose li { margin-bottom: 8px; }
.callout { border: 1px solid var(--line); border-left: 3px solid var(--brand); background: var(--surface); padding: 24px 28px; border-radius: var(--r-m); margin: 28px 0; }
.callout p:last-child { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.timeline li strong { font: 500 0.75rem/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.list-cols { columns: 2; column-gap: 40px; }

/* Prima e dopo */
.ba-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ba-grid.gallery { grid-template-columns: repeat(2, 1fr); }
.ba { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.ba-img { position: relative; background: #EEEBE5; aspect-ratio: 3/2; display: grid; place-items: center; }
.ba-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ba-img::after { content: ""; position: absolute; top: 12%; bottom: 12%; left: 50%; width: 1px; background: rgba(255,255,255,0.7); }
.lbl { position: absolute; top: 12px; font: 500 0.66rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; background: rgba(255,255,255,0.92); color: var(--ink); padding: 6px 9px; border-radius: 4px; }
.lbl.l { left: 12px; } .lbl.r { right: 12px; }
.ba figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 18px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ba figcaption strong { font: 400 1.15rem/1.3 var(--serif); }
.ba figcaption span { font: 500 0.68rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ba[hidden] { display: none !important; }
.disclaimer { border: 1px solid var(--line); border-radius: var(--r-m); padding: 20px 24px; background: var(--surface); display: flex; gap: 14px; align-items: flex-start; font-size: 0.9rem; color: var(--ink-2); }
.disclaimer i { font-size: 1.3rem; color: var(--brand); margin-top: 2px; }

/* Blocchi trattamento nelle pagine categoria */
.proc { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 72px); padding: 56px 0; border-top: 1px solid var(--line); scroll-margin-top: 96px; align-items: start; }
.proc:first-of-type { border-top: 0; }
.proc .ph { border-radius: var(--r-l); overflow: hidden; aspect-ratio: 4/3; background: #EEEBE5; }
.proc .ph img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.88); }
.proc h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.proc .kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; margin: 20px 0 24px; }
.proc .kv div { background: var(--surface); padding: 14px 16px; }
.proc .kv dt { font: 500 0.66rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.proc .kv dd { margin: 4px 0 0; font: 400 1.02rem/1.3 var(--serif); }
.subnav { position: sticky; top: 76px; z-index: 40; background: rgba(247,245,240,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.subnav a { white-space: nowrap; text-decoration: none; font-size: 0.88rem; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.subnav a:hover { border-color: var(--ink); }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.spec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 28px; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 96px; }
.spec i.ico { font-size: 1.6rem; color: var(--brand); }
.spec h3 { font-size: 1.35rem; margin: 6px 0 0; }
.spec p { font-size: 0.94rem; margin: 0; }
.spec .who { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.gallery-strip { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.gallery-strip figure { margin: 0; border-radius: var(--r-l); overflow: hidden; aspect-ratio: 4/3; }
.gallery-strip figure:first-child { grid-row: span 2; aspect-ratio: auto; }
.gallery-strip img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85); }
.bio { display: grid; grid-template-columns: 280px 1fr; gap: 40px; padding: 48px 0; border-top: 1px solid var(--line); align-items: start; }
.bio .ph { aspect-ratio: 4/5; border-radius: var(--r-l); overflow: hidden; background: linear-gradient(160deg, #EFEBE3, #E3DED4); display: grid; place-items: center; font: 400 3.2rem/1 var(--serif); color: var(--muted); }
.bio .ph img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.bio h3 { font-size: 1.9rem; }

@media (max-width: 860px) {
  .ba-grid, .ba-grid.gallery, .spec-grid { grid-template-columns: 1fr; }
  .proc { grid-template-columns: 1fr; }
  .proc .kv { grid-template-columns: 1fr 1fr; }
  .gallery-strip { grid-template-columns: 1fr 1fr; }
  .gallery-strip figure:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 4/3; }
  .bio { grid-template-columns: 1fr; }
  .bio .ph { max-width: 280px; }
}

/* Sticky CTA mobile */
.mobile-cta { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: rgba(247,245,240,0.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 10px; }
.mobile-cta .btn { flex: 1; }

/* Footer */
.footer { background: var(--ink); color: #BDB9B1; padding: 80px 0 32px; font-size: 0.92rem; }
.footer a { text-decoration: none; color: #E9E6E0; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer h4 { font: 500 0.7rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #8E8A82; margin: 0 0 18px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer .logo-mark { color: #fff; border-color: rgba(255,255,255,0.2); }
.footer .logo-text { color: #fff; } .footer .logo-text small { color: #8E8A82; }
.footer-legal { padding-top: 28px; display: grid; gap: 10px; font-size: 0.8rem; color: #8E8A82; line-height: 1.6; }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,0.18); border-radius: var(--r-s); font-size: 1.15rem; }

.ph-note { position: absolute; left: 12px; bottom: 12px; font: 500 0.65rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,0.9); color: var(--ink); padding: 6px 8px; border-radius: 4px; }
.todo { background: #FBF3DB; color: #7A5A22; padding: 0 4px; border-radius: 3px; font-size: 0.9em; }

/* ---------- Motion ----------
   Tutto scoped a .js: senza JavaScript il contenuto resta visibile.
   Si anima solo transform / opacity / clip-path. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* Sopra la piega: entra al caricamento, senza aspettare l'IntersectionObserver (LCP) */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes settle { from { transform: scale(1.08); } }
.js :is(.hero, .page-hero) .reveal { opacity: 1; transform: none; transition: none; animation: rise .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
.js :is(.hero-media, .page-hero .ph).reveal { animation: none; }
.js :is(.hero .ph-main, .page-hero .ph) img { animation: settle 1.6s var(--ease) both; }

/* Titoli: parole che salgono da una maschera */
.words { perspective: 900px; }
.words .w { display: inline-block; vertical-align: top; }
.js .words .w > span { display: inline-block; opacity: 0; transform: rotateX(-88deg) translateY(.3em); transform-origin: 50% 100% -.4em; transition: transform 1.2s var(--ease), opacity .7s var(--ease); transition-delay: calc(var(--w) * 60ms + 60ms); }
.js .words.in .w > span { opacity: 1; transform: none; }
@keyframes wordFlip { from { opacity: 0; transform: rotateX(-88deg) translateY(.3em); } to { opacity: 1; transform: none; } }
.js .words-now .w > span { transition: none; animation: wordFlip 1.3s var(--ease) both; animation-delay: calc(var(--w) * 70ms + 120ms); }

/* Immagini sotto la piega: leggero "assestamento" quando entrano */
.js :is(.proc, .split, .bio, .gallery-strip figure, .area).reveal img,
.js :is(.split, .proc) .ph.reveal img { transform: scale(1.1); transition: transform 1.6s var(--ease); }
.js :is(.proc, .split, .bio, .gallery-strip figure, .area).reveal.in img,
.js :is(.split, .proc) .ph.reveal.in img { transform: none; }
.js .area.reveal.in:hover .ph img { transform: scale(1.03); }

/* Hero home: la cornice si stringe e l'immagine scorre più lenta mentre si scrolla (--hp 0→1) */
.hero .ph-main { clip-path: inset(calc(var(--hp, 0) * 4%) calc(var(--hp, 0) * 6%) calc(var(--hp, 0) * 4%) round calc(12px + var(--hp, 0) * 20px)); }
.hero .ph-main img { translate: 0 calc(var(--hp, 0) * 6%); }
.page-hero .ph img { translate: 0 calc(var(--hp, 0) * 7%); scale: 1.08; }

/* Momento firma: sala operatoria che si apre a tutto schermo (sezione con pin) */
.pin { padding: 0; height: 230svh; background: var(--ink); }
.pin-sticky { position: sticky; top: 0; height: 100svh; overflow: clip; display: grid; align-items: end; }
.pin-media { position: absolute; inset: 0; clip-path: inset(calc((1 - var(--pp, 1)) * 24%) calc((1 - var(--pp, 1)) * 22%) round calc((1 - var(--pp, 1)) * 28px)); }
@media (max-width: 860px) { .pin-media { clip-path: inset(calc((1 - var(--pp, 1)) * 16%) calc((1 - var(--pp, 1)) * 9%) round calc((1 - var(--pp, 1)) * 24px)); } }
.pin-media img { width: 100%; height: 100%; object-fit: cover; scale: calc(1.18 - var(--pp, 1) * .18); }
.pin-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,24,32,0) 35%, rgba(20,24,32,.72)); opacity: var(--pp, 1); }
.pin-copy { position: relative; color: #fff; padding-bottom: clamp(40px, 8vh, 96px); opacity: clamp(0, calc((var(--pp, 1) - .62) * 3), 1); translate: 0 calc((1 - clamp(0, calc((var(--pp, 1) - .62) * 3), 1)) * 24px); }
.pin-copy h2 { color: #fff; max-width: 16ch; }
.pin-copy p { max-width: 46ch; color: rgba(255,255,255,.86); }
.pin-copy .eyebrow { color: rgba(255,255,255,.7); }
.pin-copy .eyebrow::before { background: rgba(255,255,255,.5); }
.pin-copy h2 em { color: #C9D6E8; }

/* Carte che si inclinano col puntatore (solo mouse) */
@media (pointer: fine) {
  .tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)); transition: transform .5s var(--ease), box-shadow .25s var(--ease); }
  .tilt.tilting { transition: transform .12s linear, box-shadow .25s var(--ease); }
  .area.tilt:hover { --ty: -2px; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-2px); }
}

/* Header che si nasconde scendendo e torna risalendo; barra mobile dopo l'hero */
.header { transition: transform .35s var(--ease), box-shadow .3s; }
.header.is-hidden { transform: translateY(-100%); }
.header.is-scrolled { box-shadow: 0 6px 24px rgba(27,30,38,.06); }
.mobile-cta { transition: transform .4s var(--ease); }
.js body:not(.past-hero) .mobile-cta { transform: translateY(110%); }

/* Barra di lettura sulle pagine con indice */
.read-bar { position: fixed; left: 0; top: 0; height: 2px; width: 100%; background: var(--brand); transform-origin: 0 50%; transform: scaleX(var(--rp, 0)); z-index: 70; pointer-events: none; }

/* Blocco locale "Anche a Milano" */
.local-band { padding: 0 0 clamp(56px, 8vw, 96px); }
.local-band-in { display: flex; justify-content: space-between; align-items: center; gap: 24px 40px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); padding: clamp(24px, 4vw, 40px); }
.local-band .eyebrow { margin-bottom: 10px; }
.local-band-t { margin: 0; font: 400 clamp(1.15rem, 2vw, 1.45rem)/1.35 var(--serif); max-width: 36ch; }
.local-band-a { display: flex; gap: 10px; flex-wrap: wrap; }

/* Cambio pagina morbido (View Transitions tra documenti, zero JS) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .22s ease-in both; }
::view-transition-new(root) { animation: vt-in .38s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
.header { view-transition-name: header; }
.topbar { view-transition-name: topbar; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .words .w > span { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero .ph-main { clip-path: none; } .hero .ph-main img, .page-hero .ph img { translate: none; scale: none; }
  .pin { height: auto; } .pin-sticky { position: relative; height: 80svh; } .pin-media { clip-path: none; } .pin-media img { scale: none; } .pin-copy { opacity: 1; translate: none; }
  @view-transition { navigation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1440px) { .header-cta .btn-ghost { display: none; } }
@media (max-width: 1280px) {
  .nav > ul, .header-cta .btn-ghost { display: none; }
  .menu-btn { display: inline-grid; place-items: center; }
}
@media (max-width: 1100px) {
  .treat-grid { grid-template-columns: repeat(3, 1fr); }
  .team { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .hero-grid, .page-hero .hero-grid, .split, .contact-split, .sedi, .article { grid-template-columns: 1fr; }
  .hero-media .ph-float { left: auto; right: 12px; bottom: -24px; width: 40%; }
  .areas, .quotes { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .cell.span-3, .cell.span-4, .cell.span-2 { grid-column: span 2; }
  .treat-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: 24px; }
  .values { grid-template-columns: 1fr; }
  .hero-facts { grid-template-columns: 1fr 1fr; gap: 24px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(2) { border-right: 0; }
  .facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .toc { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .mobile-cta { display: flex; }
  .footer { padding-bottom: 96px; }
  .header-cta .btn-primary { display: none; }
  .topbar .hide-m { display: none; }
  .list-cols { columns: 1; }
}
@media (max-width: 520px) {
  .logo-text small { display: none; }
  .logo-text { font-size: 0.68rem; letter-spacing: 0.08em; }
  .logo-mark { font-size: 1.35rem; padding-right: 10px; }
  .header .wrap { height: 64px; }
  .treat-grid, .team, .steps { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; }
  .sede dl { grid-template-columns: 1fr; gap: 2px 0; }
  .sede dd { margin-bottom: 10px; }
}

/* Form: errore invio + honeypot anti-spam */
.form-err { display: none; padding: 16px 20px; border-radius: var(--r-m); background: #FBEAEA; color: #8A2C2C; margin-top: 16px; }
.form-err.show { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Banner consenso cookie */
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.consent { position: fixed; left: 20px; bottom: 20px; z-index: 90; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px; box-shadow: 0 12px 40px rgba(27,30,38,.10); font-size: 0.92rem; }
.consent p { margin: 0 0 14px; }
.consent-opts { display: grid; gap: 8px; margin: 0 0 14px; }
.consent-opts[hidden] { display: none; }
.consent-opts label { display: flex; gap: 10px; align-items: center; }
.consent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.consent-actions .btn { min-height: 44px; padding: 0 16px; flex: 1 1 auto; }
@media (max-width: 860px) { .consent { left: 12px; right: 12px; bottom: 84px; max-width: none; } }
.spec h3 a { color: inherit; text-decoration: none; }
.spec h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.spec .link-arrow { align-self: flex-start; }
/* parole mediche lunghe (otorinolaringoiatria, fibrolaringoscopia) su schermi stretti */
@media (max-width: 520px) { h1, h2, h3, .facts dd, .kv dd { hyphens: auto; overflow-wrap: break-word; } }

/* Mappe statiche delle sedi */
.map { position: relative; display: block; border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; aspect-ratio: 4/3; background: #EEEBE5; }
.map img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.map:hover img { transform: scale(1.02); }
.map .map-open { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-s); font: 500 0.85rem/1 var(--sans); color: var(--ink); }
.map .map-open img { width: 12px; height: auto; }
.map .map-attr { position: absolute; right: 0; bottom: 0; padding: 3px 8px; background: rgba(255,255,255,.8); font: 0.68rem/1.4 var(--mono); color: var(--muted, #6b6b6b); }

/* ---------- Profondità e mobile "immersivo" ---------- */
/* grana finissima sullo sfondo: toglie l'effetto superficie piatta */
:root { --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.11 0 0 0 0 0.12 0 0 0 0 0.15 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
body { background-image: var(--grain); }
.page-hero { position: relative; overflow-x: clip; }

/* fascia scorrevole dei trattamenti (home) */
.marquee { padding: 22px 0; border-block: 1px solid var(--line); overflow: clip; background: var(--surface); }
.marquee-track { display: flex; width: max-content; gap: 48px; animation: marquee 48s linear infinite; }
.marquee-track span { font: 400 clamp(1.5rem, 3.2vw, 2.4rem)/1 var(--serif); color: var(--ink); white-space: nowrap; display: inline-flex; align-items: center; gap: 48px; }
.marquee-track span:nth-child(even) { font-style: italic; color: var(--brand); }
.marquee-track span::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; flex-wrap: wrap; width: auto; } }

@media (max-width: 860px) {
  /* hero pagine: immagine a tutta larghezza in apertura, testo su un foglio che la sovrappone */
  .page-hero { padding-top: 0; }
  .page-hero .hero-grid { display: flex; flex-direction: column; gap: 0; }
  .page-hero .hero-grid > .ph { order: -1; width: calc(100% + 40px); margin: 0 -20px; aspect-ratio: 5/4; border-radius: 0; }
  .page-hero .hero-grid > div:not(.ph) { position: relative; z-index: 1; margin: -40px -20px 0; padding: 28px 20px 0; background: var(--bg) var(--grain); border-radius: 24px 24px 0 0; }
  .crumbs + .page-hero { margin-top: 0; }
}

/* ---------- Prima / dopo con cursore ---------- */
.ba-slide { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.ba-stage { position: relative; aspect-ratio: 4/5; overflow: hidden; touch-action: pan-y; background: #EEEBE5; }
.ba-stage > img, .ba-before img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; translate: -1px 0; background: #fff; pointer-events: none; }
.ba-handle::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font: 500 1rem/1 var(--sans); letter-spacing: 2px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.ba-stage input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba-stage .lbl { position: absolute; top: 14px; z-index: 1; font: 500 .66rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; background: rgba(255,255,255,.92); color: var(--ink); padding: 7px 9px; border-radius: 4px; pointer-events: none; }
.ba-stage .lbl.l { left: 14px; } .ba-stage .lbl.r { right: 14px; }
.ba-slide figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; font-size: .92rem; }
.ba-slide figcaption span { color: var(--muted); }
.ba-grid:has(.ba-slide) { grid-template-columns: repeat(2, minmax(0, 420px)); }
@media (max-width: 860px) { .ba-grid:has(.ba-slide) { grid-template-columns: 1fr; } }

/* ---------- Mobile: aree come carte che si impilano ---------- */
@media (max-width: 860px) {
  .areas { display: block; }
  .areas .area { position: sticky; top: calc(16px + var(--i, 0) * 18px); margin-bottom: 22px; box-shadow: 0 -10px 34px rgba(27,30,38,.08); }
}

/* ---------- Immagini che si aprono a sipario ---------- */
.js section:not(.page-hero) .reveal div.ph, .js section:not(.page-hero) div.ph.reveal { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease); transition-delay: calc(var(--i, 0) * 90ms + 80ms); }
.js section:not(.page-hero) .reveal.in div.ph, .js section:not(.page-hero) div.ph.reveal.in { clip-path: inset(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  .areas .area { position: relative; top: 0; }
  .js section:not(.page-hero) .reveal div.ph, .js section:not(.page-hero) div.ph.reveal { clip-path: none; }
}

/* ---------- Scultura: apertura della home ---------- */
.gallery-hero { position: relative; min-height: calc(100svh - 104px); display: grid; grid-template-rows: 1fr auto; padding: 0; color: #F7F5F0; overflow: clip;
  background: radial-gradient(120% 90% at 70% 45%, #2a3346 0%, #161a23 58%, #101319 100%); }
.gallery-media { position: absolute; inset: 0; }
.gallery-media picture, .gallery-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery-media canvas, .vitrine canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .8s ease; }
.is-live canvas { opacity: 1; }
.is-live > picture, .is-live .gallery-media picture { opacity: 0; transition: opacity .8s ease .2s; }
.gallery-copy { position: relative; align-self: end; padding-top: 72px; padding-bottom: clamp(24px, 4vw, 48px); pointer-events: none; }
.gallery-copy a { pointer-events: auto; }
.gallery-copy .eyebrow { color: rgba(247,245,240,.7); }
.gallery-copy h1 { color: #F7F5F0; font-size: clamp(2.7rem, min(7.2vw, 11vh), 6.6rem); line-height: .97; letter-spacing: -0.035em; max-width: 11ch; }
.gallery-copy h1 em { color: #C9D6E8; }
.gallery-copy .lead { color: rgba(247,245,240,.82); max-width: 44ch; }
.btn-glass { color: #fff; border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.06); }
.btn-glass:hover { background: #fff; color: var(--ink); }
.cine-foot { position: relative; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(255,255,255,.18); }
.cine-facts { display: flex; gap: clamp(20px, 4vw, 56px); margin: 0; }
.cine-facts dt { font: 400 clamp(1.6rem, 3vw, 2.2rem)/1 var(--serif); }
.cine-facts dd { margin: 6px 0 0; font: 500 .66rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: rgba(247,245,240,.62); }
@media (max-width: 860px) {
  .gallery-hero { min-height: calc(100svh - 96px); }
  .gallery-media { bottom: auto; height: calc(100svh - 96px); }
  .gallery-copy { padding-top: 33svh; padding-bottom: 20px; }
  .gallery-copy h1 { font-size: clamp(2.5rem, 11.5vw, 3.4rem); }
  .gallery-copy .lead { font-size: .98rem; line-height: 1.55; }
  .gallery-copy .hero-actions { margin-top: 22px; }
  .cine-facts dd { font-size: .58rem; }
}

/* ---------- Vetrina con scultura nelle pagine ---------- */
.vitrine { position: relative; background: radial-gradient(120% 90% at 50% 40%, #2a3346 0%, #161a23 58%, #101319 100%); }
.vitrine-navy { background: radial-gradient(120% 90% at 50% 40%, #2b4466 0%, #182a44 58%, #0f1b2c 100%); }
.vitrine picture, .vitrine > picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.vitrine img { object-fit: cover; }
.page-hero .vitrine img { translate: none !important; scale: 1 !important; }
.vitrine { box-shadow: 0 40px 80px -40px rgba(16,19,25,.55); }

/* ---------- Percorso: anello 3D che ruota con lo scroll ---------- */
.ring-sec { padding: 0; }
.ring-pin { height: 340svh; }
.ring-stick { position: sticky; top: 0; height: 100svh; display: grid; grid-template-rows: auto 1fr; padding-top: clamp(40px, 8svh, 88px); overflow: clip; }
.ring-sec .section-head { margin-bottom: 0; }
.ring-stage { perspective: 1300px; display: grid; place-items: center; }
.ring { --R: min(66vw, 470px); position: relative; width: min(74vw, 340px); height: min(92vw, 400px); transform-style: preserve-3d; transform: translateZ(calc(var(--R) * -1)) rotateY(calc(var(--a, 0) * -1deg)); }
.ring article { position: absolute; inset: 0; border-radius: var(--r-l); padding: 28px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.16);
  transform: rotateY(calc(var(--n) * 72deg)) translateZ(var(--R)); backface-visibility: hidden; display: flex; flex-direction: column; gap: 10px; }
.ring .ring-n { font: 400 clamp(3.6rem, 9vw, 5rem)/1 var(--serif); color: #C9D6E8; margin-bottom: auto; }
.ring h3 { font: 400 1.7rem/1.1 var(--serif); margin: 0; color: #fff; }
.ring p { margin: 0; color: rgba(255,255,255,.76); font-size: .95rem; }
.ring .ring-cta { background: #F7F5F0; justify-content: flex-end; gap: 22px; }
.ring .ring-cta h3 { color: var(--ink); font-size: 2rem; } .ring .ring-cta h3 em { color: var(--brand); }
.ring .ring-cta .btn { align-self: flex-start; }

/* ---------- Carte che si sollevano in 3D e foto in finestra (variabili scritte da motion.js) ---------- */
.js .rise3d { opacity: calc(.12 + var(--r, 1) * .88); translate: 0 calc((1 - var(--r, 1)) * 80px) calc((1 - var(--r, 1)) * -150px); rotate: x calc((1 - var(--r, 1)) * 26deg); transform-origin: 50% 100%; }
.js .rise3d.reveal { transition: none; }
.js .frame3d { rotate: x calc(var(--ft, 0) * 9deg); scale: calc(.94 + (1 - var(--ft, 0) * var(--ft, 0)) * .06); transform-origin: 50% 50%; }

@media (prefers-reduced-motion: reduce) {
  .ring-pin { height: auto; } .ring-stick { position: relative; height: auto; padding-bottom: 64px; } .ring-stage { perspective: none; overflow-x: auto; place-items: start; padding: 32px 20px 0; }
  .ring { transform: none; display: flex; gap: 16px; width: auto; height: auto; } .ring article { position: relative; transform: none; width: 280px; min-height: 300px; flex: none; }
  .js .rise3d, .js .frame3d { opacity: 1; translate: none; rotate: none; scale: none; }
  .js .words .w > span { opacity: 1; transform: none; }
}

/* Badge "Powered by Netlify" (piano gratuito): fisso in basso a destra sopra tutto.
   Alziamo barra mobile e banner cookie sopra di esso, così Chiama/WhatsApp restano cliccabili. */
.has-host-badge .mobile-cta { bottom: 64px; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .has-host-badge .consent { bottom: 150px; } }
