/* ==========================================================================
   FMF Implant Dentistry — Prestige Theme
   Palette: Charcoal Neutrale #161616 + Connolly Cream Accent #E6D5A8
   Typography: Cormorant Garamond (display) + Helvetica Neue (body)
   ========================================================================== */

:root {
  /* Foreground — warm ivory/cream family (was cold blue-white) */
  --ink:        #F5ECD6;   /* primary text — warm ivory */
  --ink-mid:    #E0CFA2;   /* body text — crema medio chiaro */
  --ink-light:  #C9B788;   /* labels / muted — crema leggibile */
  /* Background surfaces — charcoal neutrale (era blu notte, ora grigio elegante) */
  --cream:      #161616;   /* main BG — charcoal scuro */
  --cream-d:    #1d1d1d;   /* elevated surface — sezioni alternate */
  --white:      #232323;   /* card BG — massima elevazione */
  /* Rules + accents */
  --rule:       rgba(245,236,214,0.14);
  --rule-soft:  rgba(245,236,214,0.07);
  --accent:     #E6D5A8;   /* Connolly cream signature */
  --accent-h:   #CDB888;   /* accent hover — aged cream */
  --accent-ink: #161616;   /* text on cream primary button */
  --err:        #b94a48;   /* form error — INVARIATO */
  /* Layout */
  --nav-h:      96px;         /* alzato per ospitare logo 60px con aria */
  --max:        100%;         /* full-bleed: il respiro è dato dal padding laterale */
  --gutter:     clamp(24px, 6vw, 96px);
  /* Fonts */
  --f-display:  'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --f-body:     'Helvetica Neue', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.ss-link { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(230,213,168,0.35); transition: border-color .2s ease, color .2s ease; }
.ss-link:hover, .ss-link:focus-visible { border-bottom-color: var(--accent); color: var(--accent-h); outline: none; }
button { background: none; border: none; cursor: pointer; color: inherit; font-family: inherit; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h1 { font-size: clamp(40px, 7vw, 84px); }
h2 { font-size: clamp(32px, 5vw, 56px); }
h3 { font-size: clamp(20px, 2.2vw, 28px); }
h4 { font-size: clamp(18px, 1.8vw, 22px); }
em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
p { color: var(--ink-mid); font-size: 16px; line-height: 1.75; }
.body-text { font-size: 17px; line-height: 1.8; color: var(--ink-mid); max-width: 56ch; }

/* Eyebrow labels */
.label {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--f-body);
  padding-left: 28px;
  position: relative;
}
.label::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 20px; height: 1px;
  background: var(--accent);
}

/* ---------- Fade-up animation ---------- */
.fu { opacity: 0; transform: translateY(24px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.fu.on { opacity: 1; transform: translateY(0); }
.fu.d1 { transition-delay: .1s; }
.fu.d2 { transition-delay: .2s; }
.fu.d3 { transition-delay: .3s; }
.fu.d4 { transition-delay: .4s; }

/* ---------- NAV ---------- */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(3, 5, 11, 0.82);   /* nero-blu scurissimo: neutro su hero nero e su resto blu notte */
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
}
.nav-identity { display: flex; align-items: center; gap: 20px; }
.nav-logo { height: 48px; width: auto; opacity: 1; }
.nav-name { display: flex; flex-direction: column; line-height: 1.25; gap: 4px; }
.nav-name strong { font-family: var(--f-display); font-size: 22px; font-weight: 500; color: var(--ink); letter-spacing: 0; }
.nav-name span { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-light); }
.nav-links { list-style: none; display: flex; gap: 32px; }
.nav-links a {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mid);
  font-weight: 400;
  padding: 8px 0;
  position: relative;
  transition: color .25s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .3s ease, left .3s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; left: 0; }
.nav-right { display: flex; align-items: center; gap: 18px; }

/* Language switcher */
.lang-switcher { display: flex; gap: 2px; border: 1px solid var(--rule); border-radius: 2px; padding: 2px; }
.lang-btn {
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 5px 9px;
  color: var(--ink-light);
  border-radius: 1px;
  transition: color .2s, background .2s;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.active { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: transparent; }

/* Pages dropdown */
.nav-pages { position: relative; }
.nav-pages-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mid);
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: color .2s, border-color .2s;
}
.nav-pages-btn:hover { color: var(--ink); border-color: var(--accent); }
.nav-pages-btn svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .2s; }
.nav-pages.open .nav-pages-btn svg { transform: rotate(180deg); }
#navPagesDropdown {
  position: fixed;
  display: none;
  background: var(--cream-d);
  border: 1px solid rgba(230,213,168,0.22);
  border-top: 2px solid var(--accent);
  border-radius: 2px;
  min-width: 220px;
  padding: 8px 0;
  box-shadow: 0 18px 48px rgba(0,0,0,.75), 0 2px 6px rgba(0,0,0,.4);
  z-index: 101;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
#navPagesDropdown a {
  display: block;
  padding: 11px 20px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mid);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .2s, background .2s, border-color .2s, padding-left .2s;
}
#navPagesDropdown a:hover {
  color: var(--accent);
  background: rgba(230,213,168,0.06);
  border-left-color: var(--accent);
  padding-left: 24px;
}
#navPagesDropdown a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}
#navPagesDropdown a + a { border-top: 1px solid rgba(230,213,168,0.08); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform .3s, opacity .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--cream);
  z-index: 99;
  transform: translateX(100%);
  transition: transform .35s ease;
  padding: 40px 32px;
  overflow-y: auto;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer ul { list-style: none; margin-bottom: 32px; }
.mobile-drawer li { border-bottom: 1px solid var(--rule-soft); }
.drawer-link {
  display: block;
  padding: 18px 0;
  font-family: var(--f-display);
  font-size: 26px;
  color: var(--ink);
}
.drawer-lang { display: flex; gap: 8px; margin-bottom: 28px; }
.drawer-pages { display: flex; flex-direction: column; gap: 14px; }
.drawer-page-link {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-light);
  padding: 12px 0;
  border-top: 1px solid var(--rule-soft);
}

/* ---------- HERO ---------- */
.hero {
  --hero-bg: #000000;            /* nero puro solo nell'hero — resto del sito usa --cream */
  background: var(--hero-bg);
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(230,213,168,0.06), transparent 60%);
  pointer-events: none;
}
.hero-left { display: flex; align-items: center; padding: 60px var(--gutter); }
.hero-left-inner { max-width: 640px; }
/* Badge riga: linea decorativa + due label testo-only separate da dot */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  padding-left: 48px;
  position: relative;
}
.hero-badges::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 32px; height: 1px;
  background: var(--accent);
}
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  font-weight: 500;
}
.badge + .badge::before {
  content: '·';
  margin: 0 12px;
  color: var(--accent);
  opacity: 0.7;
}
.hero h1 { margin-bottom: 28px; font-weight: 300; }
.hero h1 em { font-weight: 400; }
.hero-body { font-size: 18px; line-height: 1.75; margin-bottom: 36px; color: var(--ink-mid); max-width: 54ch; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 28px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background .25s ease, transform .25s ease;
}
.btn-primary:hover { background: var(--accent-h); color: var(--accent-ink); transform: translateY(-1px); }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 28px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: border-color .25s ease, color .25s ease;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* Hero stats row */
.hero-stats {
  display: flex;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.hero-stat { display: flex; flex-direction: column; }
.hero-stat-val { font-family: var(--f-display); font-size: 40px; font-weight: 400; color: var(--accent); line-height: 1; margin-bottom: 6px; }
.hero-stat-lbl { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-light); }

/* Hero right — photo (fusione con sfondo nero puro, zero stacco visibile) */
.hero-right { position: relative; overflow: hidden; min-height: 500px; background: var(--hero-bg); }
.hero-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.78) contrast(1.08);
  transition: filter 0.5s;
}
.hero-right::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    #000 0%,
    rgba(0,0,0,0.88) 12%,
    rgba(0,0,0,0.48) 28%,
    rgba(0,0,0,0.20) 45%,
    transparent 62%);
  pointer-events: none;
  z-index: 1;
}
/* top/bottom vignette per fondere anche i margini verticali della foto */
.hero-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.40) 0%,
    transparent 20%,
    transparent 80%,
    rgba(0,0,0,0.40) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero-badge-overlay {
  position: absolute;
  right: 32px; bottom: 32px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  padding: 16px 20px;
  max-width: 260px;
}
.hero-badge-overlay .label { padding-left: 0; margin-bottom: 8px; }
.hero-badge-overlay .label::before { display: none; }
.hero-badge-overlay p { font-family: var(--f-display); font-size: 20px; font-style: italic; color: var(--ink); line-height: 1.3; }

/* ---------- Section base ---------- */
section { padding: clamp(80px, 10vw, 140px) 0; position: relative; }
.section-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section-header { max-width: 720px; margin-bottom: clamp(48px, 6vw, 80px); }
.section-header .label { margin-bottom: 20px; }
.section-header h2 { font-weight: 300; }

/* ---------- EXPERTISE ---------- */
#expertise { background: var(--cream); }
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  background: transparent;
  border: none;
  counter-reset: exp-count;
}
.exp-card {
  background: transparent;
  padding: 56px 36px 44px;
  position: relative;
  counter-increment: exp-count;
  overflow: hidden;
  border-top: 1px solid transparent;
  transition: background .35s ease, border-top-color .35s ease;
}
/* Numero decorativo grande 01-04, si illumina sul hover */
.exp-card::after {
  content: "0" counter(exp-count);
  position: absolute;
  top: 40px;
  right: 28px;
  font-family: var(--f-display);
  font-size: clamp(56px, 6.5vw, 88px);
  font-weight: 300;
  color: var(--accent);
  opacity: 0.14;
  line-height: 1;
  pointer-events: none;
  letter-spacing: -0.02em;
  transition: opacity .4s ease;
}
.exp-card:hover {
  background: rgba(230, 213, 168, 0.08);
  border-top-color: var(--accent);
}
.exp-card:hover::after { opacity: 0.28; }
/* Icone SVG originali nascoste — il numero counter le sostituisce come marker visivo */
.exp-icon { display: none; }
.exp-card h3 { margin-bottom: 14px; font-weight: 400; font-size: clamp(20px, 2vw, 26px); position: relative; z-index: 1; }
.exp-card p { font-size: 14.5px; line-height: 1.75; position: relative; z-index: 1; }

/* ---------- CONSULTANCY ---------- */
/* padding:0 override per la regola generica section{} che aggiunge ~80-140px sopra/sotto.
   Il padding interno è già su .consultancy-left (96px) — la foto deve fillare edge-to-edge. */
#consultancy { background: var(--cream-d); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 0; }
.consultancy-grid {
  display: grid;
  grid-template-columns: 6fr 4fr;
  gap: 0;
  max-width: var(--max);
  margin: 0 auto;
  min-height: 85vh;
  align-items: stretch;
}
.consultancy-left { display: flex; align-items: center; padding: 96px var(--gutter); }
.consultancy-left-inner { max-width: 700px; }
.consultancy-left .label { margin-bottom: 22px; }
.consultancy-left h2 { margin-bottom: 28px; font-weight: 300; font-size: clamp(34px, 3.2vw, 52px); line-height: 1.15; }
.consultancy-left .body-text { margin-bottom: 34px; font-size: 19px; line-height: 1.75; max-width: 60ch; }
.consultancy-items { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.ci {
  font-size: 14px;
  color: var(--ink-mid);
  padding: 13px 0 13px 24px;
  border-top: 1px solid var(--rule-soft);
  position: relative;
}
.ci::before {
  content: '';
  position: absolute;
  left: 0; top: 18px;
  width: 12px; height: 1px;
  background: var(--accent);
}
.consultancy-right { position: relative; overflow: hidden; background: var(--cream-d); }
.consultancy-right picture { position: absolute; inset: 0; display: block; }
.consultancy-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(0.88) contrast(1.05); }
.cons-badge {
  position: absolute;
  left: 32px; bottom: 32px;
  z-index: 2;
  background: rgba(22,22,22,0.9);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  padding: 14px 20px;
}
.cons-badge .label { padding-left: 0; margin-bottom: 4px; }
.cons-badge .label::before { display: none; }
.cons-badge p { font-family: var(--f-display); font-size: 22px; color: var(--ink); }

/* ---------- PATIENT CARE ---------- */
/* padding-top conserva il respiro sopra la section, sides+bottom 0 (gestiti da grid margin e .affiliations-section). */
#patient-care { background: var(--cream); padding: clamp(20px, 3vw, 35px) 0 0; }
.patient-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: var(--max);
  margin: 0 auto clamp(20px, 3vw, 40px);
  align-items: center;  /* centra foto e testo verticalmente */
}
/* Foto edge-to-edge a sinistra, ma con aspect-ratio naturale 3:2 (sorgente 960×639).
   No fill forzato → no zoom-crop → tutti i denti visibili come nell'originale. */
.patient-photo-wrap { position: relative; }
.patient-photo-wrap picture { display: block; }
.patient-photo { display: block; width: 100%; aspect-ratio: 3/2; object-fit: cover; border: none; }
/* Caption come overlay glass (coerente con hero-badge-overlay e cons-badge) */
.patient-caption {
  position: absolute;
  left: 32px; bottom: 32px;
  z-index: 2;
  background: rgba(22,22,22,0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  padding: 16px 22px;
  max-width: 380px;
  margin: 0;
}
.patient-caption .label { padding-left: 0; margin-bottom: 8px; }
.patient-caption .label::before { display: none; }
.patient-caption p { font-family: var(--f-display); font-size: 17px; font-style: italic; color: var(--ink); line-height: 1.45; }
/* Contenuto a destra — padding interno proprio (sostituisce il gutter rimosso dal grid) */
.patient-content { display: flex; flex-direction: column; justify-content: center; padding: clamp(60px, 8vw, 110px) var(--gutter); }
.patient-content .label { margin-bottom: 20px; }
.patient-content h2 { margin-bottom: 24px; font-weight: 300; }
.patient-content .body-text { margin-bottom: 32px; }
.patient-points { list-style: none; margin-bottom: 36px; }
.pp {
  display: flex; gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--rule-soft);
}
.pp:last-child { border-bottom: 1px solid var(--rule-soft); }
.pp-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  color: var(--accent);
  margin-top: 2px;
}
.pp-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.5; }
.pp h3 { font-size: 18px; font-weight: 400; margin-bottom: 4px; }
.pp p { font-size: 14px; line-height: 1.65; }

/* Affiliations */
.affiliations-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 30px) var(--gutter) clamp(20px, 3vw, 35px);
  border-top: 1px solid var(--rule);
}
.affiliations-section > .label { margin-bottom: 28px; }
.aff-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.aff-card {
  background: var(--cream-d);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background .3s ease;
  min-width: 0;
}
.aff-card:hover { background: rgba(230, 213, 168, 0.08); }
.aff-featured { background: linear-gradient(135deg, rgba(230,213,168,0.10), var(--cream-d)); border-left: 2px solid var(--accent); }
.aff-acronym {
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  word-break: break-word;
}
a.aff-acronym { cursor: pointer; transition: color .2s ease, text-decoration-color .2s ease; text-decoration: underline transparent; text-underline-offset: 4px; }
a.aff-acronym:hover, a.aff-acronym:focus-visible { color: var(--accent-h); text-decoration-color: var(--accent-h); outline: none; }
.aff-name {
  font-size: 11.5px;
  color: var(--ink);
  line-height: 1.4;
}
.aff-since {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-top: 2px;
}

/* ---------- SCIENTIFIC ---------- */
#scientific { background: var(--white); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.pub-card {
  background: var(--cream);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background .3s ease;
}
.pub-card:hover { background: rgba(230, 213, 168, 0.08); }
.pub-card .label { margin-bottom: 4px; }
.pub-card h3 { font-size: 18px; font-weight: 400; line-height: 1.3; }
.pub-journal { font-size: 12px; font-style: italic; color: var(--ink-light); margin-top: auto; }
.pub-doi-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 8px;
  border-top: 1px solid var(--rule-soft);
  transition: color .2s;
}
.pub-doi-link:hover { color: var(--ink); }
.pub-card-alt { background: linear-gradient(135deg, rgba(230,213,168,0.10), var(--cream-d)); border-left: 2px solid var(--accent); }
.pub-card-alt h4 { font-size: 20px; font-weight: 400; margin-bottom: 16px; color: var(--accent); font-style: italic; }
.role-item { font-size: 14px; line-height: 1.7; padding: 8px 0; border-top: 1px solid var(--rule-soft); color: var(--ink-mid); }
.role-item:first-of-type { border-top: none; }

/* ---------- AUDIENCE SPLIT ---------- */
/* Banda elevata: section #1d1d1d, cards #232323 → trittico distinguibile col patient (#161616) sopra e contact (#000) sotto. */
.audience-split {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) var(--gutter);
  background: var(--cream-d);
}
.audience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.audience-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(40px, 5vw, 60px);
  transition: background .3s ease;
  position: relative;
}
/* Differenziazione cromatica: pro = neutro freddo/clinico, pat = caldo/accogliente con sottotono gold. */
.audience-card.pro { background: var(--cream); }            /* #161616 — denso, freddo */
.audience-card.pat { background: #25221c; }                  /* warm dark, sottotono crema */
.audience-card.pro:hover { background: #1f1f1f; }
.audience-card.pat:hover { background: #2d2920; }
.audience-card .label { margin-bottom: 8px; }
.audience-card h3 { font-size: clamp(28px, 3vw, 38px); font-weight: 300; font-style: italic; color: var(--ink); }
.audience-card p { font-size: 15px; line-height: 1.7; max-width: 48ch; }
.audience-enter {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  transition: gap .3s;
}
.audience-enter svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.audience-card:hover .audience-enter { gap: 16px; }

/* ---------- CONTACT ---------- */
#contact { background: #000; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
}
.contact-left .label { margin-bottom: 20px; }
.contact-left h2 { margin-bottom: 36px; font-weight: 300; }
.contact-details { list-style: none; }
.cd {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--rule-soft);
}
.cd:last-child { border-bottom: 1px solid var(--rule-soft); }
.cd-ico {
  flex-shrink: 0;
  width: 22px; height: 22px;
  color: var(--accent);
  margin-top: 2px;
}
.cd-ico svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.5; }
.cd-lbl {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 4px;
}
.cd-val { display: block; font-size: 15px; color: var(--ink); }
.cd-val a { transition: color .2s; }
.cd-val a:hover { color: var(--accent); }
.cv-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent);
  font-size: 15px;
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.cv-link svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.cv-link:hover { border-bottom-color: var(--accent); }

/* Form */
.contact-right { background: var(--cream-d); border: 1px solid var(--rule); padding: clamp(28px, 4vw, 48px); }
.contact-right .label { margin-bottom: 12px; }
.contact-right h3 { font-size: 26px; font-weight: 400; font-style: italic; color: var(--accent); margin-bottom: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fg { margin-bottom: 18px; }
.fg label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 8px;
}
.fg label.required::after { content: ' *'; color: var(--err); }
.fg input, .fg textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  font-family: var(--f-body);
  font-size: 15px;
  color: var(--ink);
  transition: border-color .25s;
}
.fg input:focus, .fg textarea:focus { outline: none; border-bottom-color: var(--accent); }
/* :user-invalid scatta solo DOPO che l'utente interagisce — non al page load.
   Risolve il falso positivo "tutto rosso al caricamento" causato dagli input required senza placeholder. */
.fg input:user-invalid, .fg textarea:user-invalid { border-bottom-color: var(--err); }
.fg textarea { resize: vertical; min-height: 100px; }
.form-submit {
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background .25s;
  margin-top: 12px;
}
.form-submit:hover { background: var(--accent-h); color: var(--accent-ink); }
.form-submit:disabled { opacity: 0.6; cursor: wait; }

/* ---------- FOOTER ---------- */
footer {
  background: #000000;
  border-top: 1px solid var(--rule);
  padding: 48px var(--gutter) 32px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.footer-id { display: flex; align-items: center; gap: 20px; }
.footer-logo { height: 48px; width: auto; opacity: 0.95; }
.footer-name { display: flex; flex-direction: column; line-height: 1.25; gap: 4px; }
.footer-name strong { font-family: var(--f-display); font-size: 20px; font-weight: 500; color: var(--ink); }
.footer-name span { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-light); }
.footer-copy { font-size: 12px; color: var(--ink-light); text-align: center; }
.footer-right { display: flex; align-items: center; gap: 16px; }
.footer-links { display: flex; gap: 12px; }
.footer-link-btn {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
  padding: 6px 0;
  transition: color .2s;
}
.footer-link-btn:hover { color: var(--accent); }

/* ---------- LEGAL MODAL ---------- */
.legal-modal {
  position: fixed;
  inset: 0;
  background: rgba(22, 22, 22, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.legal-modal.open { opacity: 1; pointer-events: auto; }
.legal-modal-inner {
  background: var(--cream-d);
  border: 1px solid var(--rule);
  max-width: 780px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border-radius: 2px;
  overflow: hidden;
}
.legal-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--f-display);
  font-size: 22px;
  color: var(--ink);
}
.cv-close-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-mid);
  transition: color .2s;
}
.cv-close-btn:hover { color: var(--accent); }
.cv-close-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.legal-modal-body { padding: 28px; overflow-y: auto; }
.legal-lc { display: none; }
.legal-lc.active { display: block; }
.legal-lc h2 { font-size: 28px; font-weight: 400; margin-bottom: 20px; color: var(--ink); }
.legal-lc h3 { font-size: 18px; font-weight: 500; margin: 24px 0 10px; color: var(--accent); font-family: var(--f-body); letter-spacing: 0.02em; }
.legal-lc p { font-size: 14px; line-height: 1.75; margin-bottom: 12px; color: var(--ink-mid); }
.legal-lc a { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color .2s; }
.legal-lc a:hover { border-bottom-color: var(--accent); }

/* ---------- CV MODAL (if present) ---------- */
#cvModal {
  position: fixed; inset: 0;
  background: rgba(22,22,22,0.92);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#cvModal.open { display: flex; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-name { display: none; }
  .hamburger { display: flex; }
  .hero { grid-template-columns: 1fr; }
  .hero-right { min-height: 400px; order: -1; }
  .consultancy-grid, .patient-grid, .contact-grid, .audience-grid {
    grid-template-columns: 1fr;
  }
  .consultancy-right { min-height: 400px; }
  .patient-photo-wrap { order: -1; }
  .patient-content { padding: 60px var(--gutter); }
  .footer-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .footer-id { justify-content: center; }
  .footer-right { justify-content: center; }
  .aff-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  :root { --nav-h: 68px; }
  /* Nav compression — match professionisti mobile look */
  #nav { padding: 0 16px; }
  .nav-identity { gap: 12px; }
  .nav-right { gap: 10px; }
  .lang-btn { padding: 5px 7px; font-size: 10.5px; }
  .nav-pages-btn { padding: 7px 10px; font-size: 10.5px; letter-spacing: 0.1em; }
  .hero-badges {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-left: 36px;
    margin-bottom: 24px;
  }
  .hero-badges::before { width: 24px; top: 10px; }
  .badge { font-size: 10.5px; letter-spacing: 0.14em; line-height: 1.4; }
  .badge + .badge::before { display: none; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .hero-stat-val { font-size: 32px; }
  .form-row { grid-template-columns: 1fr; }
  .aff-grid, .expertise-grid, .pub-grid {
    grid-template-columns: 1fr 1fr;
  }
  .consultancy-items { grid-template-columns: 1fr; }
  .hero-badge-overlay { right: 16px; bottom: 16px; max-width: 200px; padding: 12px 16px; }
  .hero-badge-overlay p { font-size: 16px; }
  .patient-caption { left: 16px; bottom: 16px; max-width: calc(100% - 32px); padding: 12px 16px; }
  .patient-caption p { font-size: 15px; }
}
@media (max-width: 400px) {
  .aff-grid, .expertise-grid, .pub-grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .fu { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  #nav, .mobile-drawer, .audience-split, .hero-ctas, form, footer .footer-links { display: none; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   Pazienti / Professionisti — Page-specific components
   ========================================================================== */

/* Eyebrow on subpage hero (replaces badges row) */
.hero-eyebrow {
  display: block;
  font-family: var(--f-body);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--ink-light);
  margin-bottom: 28px;
  font-weight: 400;
}
.hero-eyebrow::before { content: '— '; color: var(--accent); margin-right: 4px; }

/* Centered-text section (problem framing / editorial) */
.section-centered {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding: 0 var(--gutter);
}
.section-centered .label { display: inline-block; margin-bottom: 22px; }
.section-centered h2 { margin-bottom: 28px; font-weight: 300; }
.section-centered .body-text {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.8;
  color: var(--ink-mid);
}
.section-centered .body-text strong { color: var(--ink); font-weight: 400; }

/* Percorso — 6 step grid */
.percorso-wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.percorso-wrap .section-header { text-align: center; margin: 0 auto 56px; }
.percorso-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step-card {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 36px 32px;
  position: relative;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.step-card:hover {
  background: rgba(230, 213, 168, 0.06);
  border-color: rgba(230, 213, 168, 0.30);
  transform: translateY(-2px);
}
.step-num {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 300;
  font-size: 52px;
  line-height: 1;
  color: var(--accent);
  display: block;
  margin-bottom: 18px;
}
.step-card h3 { margin-bottom: 10px; font-weight: 400; font-size: 22px; }
.step-card p { font-size: 15px; color: var(--ink-mid); line-height: 1.7; }

.pull-quote {
  max-width: 880px;
  margin: 80px auto 0;
  text-align: center;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.35;
  color: var(--accent);
  padding: 0 var(--gutter);
}

/* About + credentials split (pazienti) */
.about-pat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.about-pat-left, .about-pat-right {
  padding: clamp(56px, 8vw, 112px) clamp(28px, 5vw, 80px);
}
.about-pat-left { background: var(--cream-d); }
.about-pat-right { background: var(--white); border-left: 1px solid var(--rule); }
.about-pat-left .label, .about-pat-right .label { display: inline-block; margin-bottom: 20px; }
.about-pat-left h2 { margin-bottom: 24px; font-weight: 300; }
.about-pat-left p {
  color: var(--ink-mid);
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 28px;
  max-width: 520px;
}
.about-pat-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(230, 213, 168, 0.35);
  transition: border-color .2s ease, color .2s ease;
}
.about-pat-link:hover { color: var(--accent-h); border-bottom-color: var(--accent); }
.about-pat-link svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.cred-list { list-style: none; }
.cred-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 16px;
  color: var(--ink-mid);
  display: flex;
  align-items: center;
  gap: 18px;
  line-height: 1.55;
}
.cred-list li:last-child { border-bottom: none; }
.cred-list li::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* FAQ accordion */
.faq-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.faq-wrap .section-header { text-align: center; margin: 0 auto 48px; }
.faq-list { margin: 0; }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item:first-child { border-top: 1px solid var(--rule); }
.faq-q {
  width: 100%;
  text-align: left;
  padding: 28px 0;
  font-family: var(--f-display);
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 400;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  transition: color .2s ease;
  letter-spacing: -0.005em;
}
.faq-q:hover { color: var(--accent); }
.faq-q-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  position: relative;
}
.faq-q-icon::before, .faq-q-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transition: transform .3s ease;
}
.faq-q-icon::after { transform: rotate(90deg); }
.faq-q[aria-expanded="true"] .faq-q-icon::after { transform: rotate(0deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s ease;
}
.faq-a-inner {
  padding: 0 0 28px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-mid);
  max-width: 780px;
}
.faq-q[aria-expanded="true"] + .faq-a { max-height: 800px; }

/* Form extras: select + checkbox */
.fg select {
  width: 100%;
  background: transparent;
  color: var(--ink);
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
  font-family: var(--f-body);
  font-size: 16px;
  font-weight: 300;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C9B788' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  background-size: 18px;
  padding-right: 28px;
  cursor: pointer;
  border-radius: 0;
}
.fg select:focus { outline: none; border-bottom-color: var(--accent); }
.fg select option { background: var(--white); color: var(--ink); }
.fg select:user-invalid { border-bottom-color: var(--err); }

.fg-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 20px 0 28px;
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.6;
}
.fg-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--accent);
  cursor: pointer;
}
.fg-check input[type="checkbox"]:user-invalid + label { color: var(--err); }
.fg-check label { cursor: pointer; }
.fg-check a { color: var(--accent); border-bottom: 1px solid rgba(230, 213, 168, 0.35); }
.fg-check a:hover { color: var(--accent-h); }

.form-success {
  padding: 28px 0;
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 1.85;
}

/* Contact-left extras for subpages */
.contact-left .lead-text {
  color: var(--ink-mid);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 28px;
}
.contact-left .contact-meta {
  color: var(--ink-light);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

/* Responsive overrides */
@media (max-width: 980px) {
  .percorso-grid { grid-template-columns: repeat(2, 1fr); }
  .about-pat-grid { grid-template-columns: 1fr; }
  .about-pat-right { border-left: none; border-top: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  .percorso-grid { grid-template-columns: 1fr; gap: 16px; }
  .step-card { padding: 28px 24px; }
  .faq-q { padding: 22px 0; }
  .hero-eyebrow { margin-bottom: 20px; }
}
