/* ==========================================================================
   Studio Dentistico Dr. Alessandro Mazzeo — Lainate
   Foglio di stile unico. Nessun framework.
   ========================================================================== */

/* ---------- Palette e variabili ---------- */
:root {
  --navy: #0B2340;
  --navy-2: #13345C;
  --blue: #1D5FA8;
  --blue-dark: #174E8C;
  --sky: #EAF3FB;
  --sky-2: #D3E6F6;
  --white: #FFFFFF;
  --paper: #F8FAFC;
  --accent: #E0705A;        /* corallo: solo per le azioni principali (Chiama) */
  --accent-dark: #C85C47;
  --text: #1B2A3A;
  --muted: #5A6B7E;
  --line: #E1E8F0;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11,35,64,.06), 0 8px 24px rgba(11,35,64,.06);
  --shadow-lg: 0 2px 4px rgba(11,35,64,.06), 0 18px 48px rgba(11,35,64,.12);
  --wrap: 1180px;
  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--paper { background: var(--paper); }
.section--sky { background: var(--sky); }
.section--navy { background: var(--navy); color: #D9E4F0; }
.section--navy h2, .section--navy h3 { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.section--navy .eyebrow { color: #8FC1F0; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .lead { margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 1000;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

/* Segnaposto da completare (visibili solo in bozza) */
.todo {
  background: #FFF4CC;
  color: #6B5200;
  border-radius: 4px;
  padding: 0 4px;
  font-style: normal;
}

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700; font-size: .98rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  cursor: pointer;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--call { background: var(--accent); color: #fff; }
.btn--call:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); color: #fff; }
.btn--ghost { border-color: var(--sky-2); color: var(--navy); background: var(--white); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--sky); color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Topbar + Header ---------- */
.topbar { background: var(--navy); color: #C5D5E6; font-size: .86rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar span + span::before { content: "·"; margin: 0 10px; color: #5F7894; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(11,35,64,.05); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand__logo { display: block; width: 46px; height: 56px; overflow: hidden; flex: none; }
.brand__logo img { height: 56px; width: auto; max-width: none; margin-left: -15px; }
.brand__mark {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: var(--navy); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 600;
}
.brand__text { line-height: 1.15; white-space: nowrap; }
.brand__name { display: block; font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; }
.brand__sub { display: block; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem;
  padding: 10px 14px; border-radius: 999px; white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--sky); color: var(--navy); }
.nav .btn { margin-left: 10px; padding: 11px 20px; }
.nav .btn:hover { background: var(--accent-dark); color: #fff; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--navy);
}
.nav-toggle svg { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 110px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto auto; width: 55%; height: 100%;
  background: radial-gradient(ellipse at 70% 30%, var(--sky) 0%, rgba(234,243,251,0) 70%);
  z-index: -1;
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 em { font-style: italic; color: var(--blue); }
.hero .lead { margin-bottom: 32px; }
.hero__note { margin-top: 18px; font-size: .92rem; color: var(--muted); }
.hero__media { position: relative; }
.hero__img {
  aspect-ratio: 4 / 5; width: 100%; object-fit: cover;
  border-radius: 28px 28px 28px 120px;
  background: var(--sky-2);
  box-shadow: var(--shadow-lg);
}
.hero__badge {
  position: absolute; left: -24px; bottom: 36px;
  background: #fff; border-radius: 16px; padding: 16px 20px;
  box-shadow: var(--shadow-lg); display: flex; gap: 14px; align-items: center;
}
.hero__badge strong { font-family: var(--font-display); font-size: 2rem; color: var(--navy); line-height: 1; }
.hero__badge span { font-size: .85rem; color: var(--muted); line-height: 1.3; }

/* ---------- Statistiche ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 28px 24px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { display: block; font-family: var(--font-display); font-size: 2.4rem; font-weight: 500; color: var(--navy); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .95rem; }

/* ---------- Banda novità (IA) ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center;
}
.feature__visual {
  position: relative; aspect-ratio: 5 / 4; border-radius: var(--radius);
  background:
    radial-gradient(circle at 30% 30%, rgba(143,193,240,.35), transparent 55%),
    radial-gradient(circle at 75% 70%, rgba(29,95,168,.55), transparent 60%),
    var(--navy-2);
  overflow: hidden; display: grid; place-items: center;
}
.feature__visual svg { width: 62%; height: auto; opacity: .95; }
.feature__visual .label {
  position: absolute; left: 20px; bottom: 18px; font-size: .8rem; color: #B8CDE3;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(143,193,240,.16); color: #CFE4F8;
  border: 1px solid rgba(143,193,240,.35);
  padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 18px;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #6FD3A8; }
.checklist { list-style: none; padding: 0; margin: 0 0 28px; }
.checklist li { position: relative; padding-left: 32px; margin-bottom: 12px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--sky) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%231D5FA8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.section--navy .checklist li::before { background-color: rgba(255,255,255,.1); }

/* ---------- Griglia trattamenti ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px 24px; text-decoration: none; color: var(--text);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover { border-color: var(--sky-2); box-shadow: var(--shadow); transform: translateY(-3px); color: var(--text); }
.card__num { font-family: var(--font-display); font-size: .95rem; color: var(--blue); margin-bottom: 18px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .96rem; flex: 1; }
.card__more { font-weight: 700; font-size: .9rem; color: var(--blue); display: inline-flex; gap: 6px; align-items: center; }
.card__more svg { width: 16px; height: 16px; transition: transform .2s; }
.card:hover .card__more svg { transform: translateX(4px); }

/* ---------- Split (testo + immagine) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split--reverse .split__media { order: -1; }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--sky-2); }

/* ---------- Tecnologie ---------- */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.tech { background: #fff; border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); }
.tech__icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--sky); color: var(--blue);
  display: grid; place-items: center; margin-bottom: 16px;
}
.tech__icon svg { width: 26px; height: 26px; }
.tech h3 { font-size: 1.15rem; }
.tech p { color: var(--muted); font-size: .95rem; margin: 0; }
.tech--featured { border-color: var(--blue); box-shadow: 0 0 0 4px var(--sky); }

/* ---------- Passi (come prenotare) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 30px 26px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: #fff; font-family: var(--font-display); font-size: 1.1rem;
  margin-bottom: 16px;
}
.step p { color: var(--muted); margin: 0; }
.step a { font-weight: 700; }

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.member { text-align: left; }
.member__photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; margin-bottom: 14px;
  background: linear-gradient(160deg, var(--sky) 0%, var(--sky-2) 100%);
  display: grid; place-items: center;
}
.member__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.member__initials { font-family: var(--font-display); font-size: 3rem; color: var(--blue); opacity: .6; }
.member h3 { font-size: 1.15rem; margin-bottom: 2px; }
.member p { color: var(--muted); font-size: .93rem; margin: 0; }

/* ---------- Instagram ---------- */
.insta {
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 36px;
}
.insta__icon {
  width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center;
  background: var(--sky); color: var(--blue);
}
.insta__icon svg { width: 36px; height: 36px; }
.insta h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: .25em; }
.insta p { color: var(--muted); margin-bottom: .4em; }
.insta__handle { font-weight: 700; text-decoration: none; }
.insta__handle:hover { text-decoration: underline; }
@media (max-width: 720px) {
  .insta { grid-template-columns: 1fr; padding: 28px 24px; gap: 18px; }
  .insta .btn { justify-content: center; }
}

/* ---------- Contatti ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: stretch; }
.contact__box { background: #fff; border-radius: var(--radius); padding: 34px; border: 1px solid var(--line); }
.contact__row { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact__row:last-child { border-bottom: 0; }
.contact__row svg { width: 22px; height: 22px; color: var(--blue); flex: none; margin-top: 3px; }
.contact__row strong { display: block; color: var(--navy); }
.contact__row a { font-weight: 600; }
.hours { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours td { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.hours td:last-child { text-align: right; color: var(--muted); }
.hours tr:last-child td { border-bottom: 0; }

.map {
  position: relative; min-height: 380px; border-radius: var(--radius); overflow: hidden;
  background:
    linear-gradient(rgba(11,35,64,.55), rgba(11,35,64,.55)),
    repeating-linear-gradient(45deg, #DCE8F4 0 2px, #EAF3FB 2px 22px);
  display: grid; place-items: center; text-align: center; color: #fff; padding: 24px;
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map p { max-width: 36ch; margin: 12px auto 18px; font-size: .92rem; color: #DCE6F1; }

/* ---------- Pagina interna: intestazione ---------- */
.page-hero { background: var(--sky); padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); max-width: 20ch; }
.page-hero .lead { margin-bottom: 0; }
.breadcrumb { font-size: .86rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { margin: 0 8px; }

/* ---------- Pagina trattamento ---------- */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 64px); align-items: start; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.aside {
  position: sticky; top: calc(var(--header-h) + 24px);
  background: var(--navy); color: #D9E4F0; border-radius: var(--radius); padding: 30px 28px;
}
.aside h3 { color: #fff; font-size: 1.3rem; }
.aside p { font-size: .95rem; }
.aside .btn { width: 100%; justify-content: center; margin-top: 8px; }
.aside small { display: block; margin-top: 16px; color: #9FB4CB; font-size: .84rem; }
.aside a:not(.btn) { color: #fff; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-weight: 700; color: var(--navy); font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

.related { display: flex; flex-wrap: wrap; gap: 10px; }
.related a {
  text-decoration: none; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--navy); font-weight: 600; font-size: .92rem; background: #fff;
}
.related a:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- CTA finale ---------- */
.cta {
  background: var(--navy); color: #D9E4F0; border-radius: 28px; padding: clamp(36px, 6vw, 64px);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center;
  position: relative; overflow: hidden;
}
.cta::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(29,95,168,.6), transparent 70%);
}
.cta h2 { color: #fff; margin-bottom: .3em; }
.cta p { margin: 0; }
.cta .btn-row { justify-content: flex-end; position: relative; z-index: 1; }

/* ---------- Footer ---------- */
.footer { background: #071A30; color: #9FB4CB; padding: 72px 0 0; font-size: .93rem; }
.footer a { color: #DCE6F1; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-family: var(--font-body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; font-weight: 700; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer .brand { color: #fff; margin-bottom: 16px; }
.footer .brand__mark { background: var(--blue); }
.footer .brand__sub { color: #9FB4CB; }
.footer__legal {
  margin-top: 56px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .84rem;
}

/* ---------- Barra "Chiama" fissa su mobile ---------- */
.callbar { display: none; }

/* ---------- Animazioni di comparsa ---------- */
/* Il contenuto è sempre visibile; l'animazione si attiva solo se il JavaScript è partito (classe .js su <html>). */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: calc(var(--header-h) + 0px) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; padding: 12px 20px 24px; border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(11,35,64,.1);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .2s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 12px; font-size: 1.05rem; }
  .nav .btn { margin: 10px 0 0; justify-content: center; }
  .hero .wrap, .feature, .split, .contact, .article, .cta { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .hero__media { max-width: 520px; }
  .hero__badge { left: 16px; }
  .aside { position: static; }
  .cta .btn-row { justify-content: flex-start; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; padding-bottom: 68px; }
  .topbar .hide-sm { display: none; }
  .topbar .wrap { justify-content: center; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer__grid { grid-template-columns: 1fr; }
  .brand__sub { display: none; }
  .callbar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
    backdrop-filter: blur(8px);
  }
  .callbar .btn { justify-content: center; padding: 13px 10px; font-size: .95rem; }
}
