/* Studio Dentistico Riccardi - foglio di stile unico
   Nessuna dipendenza esterna: font self-hosted, nessun framework. */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
}

:root {
  --ink: #0f2e2c;
  --ink-soft: #3f5754;
  --paper: #f6f9f7;
  --surface: #ffffff;
  --mint: #d9eee5;
  --mint-deep: #b9dccd;
  --sage: #4e8a76;
  --lemon: #f3d35b;
  --lemon-deep: #e2bd2f;
  --line: #d3e0da;
  --closed: #c95b4a;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-4: clamp(2.4rem, 1.5rem + 4vw, 4.1rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius-s: 6px;
  --radius-l: 18px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--ink); text-decoration-color: var(--sage); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.12; margin: 0 0 0.6em; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: var(--step-3); font-weight: 750; }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
p, ul, ol { margin: 0 0 1em; }
p { max-width: 68ch; text-wrap: pretty; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.prose { max-width: 68ch; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--sage); }
.lead { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.5; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
.treatments-page { padding-bottom: clamp(3rem, 6vw, 5rem); }

.mt-3 { margin-top: 3rem; }
.mb-25 { margin-bottom: 2.5rem; }
.pb-4 { padding-bottom: 4rem; }
.pb-5 { padding-bottom: 5rem; }
.pb-section { padding-bottom: clamp(3rem, 6vw, 5rem); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; border-radius: var(--radius-s);
}
.skip:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }

.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-right: auto; }
.brand svg { width: 2.1rem; flex: none; }
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; line-height: 1.05; }
.brand-name small { display: block; font-weight: 500; font-size: 0.8rem; color: var(--ink-soft); letter-spacing: 0; }

.nav ul { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-weight: 600; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--sage); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 700; line-height: 1.2;
  padding: 0.85rem 1.3rem; border-radius: 999px; border: 2px solid var(--ink);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn-primary { background: var(--lemon); border-color: var(--lemon); color: var(--ink); }
.btn-primary:hover { background: var(--lemon-deep); border-color: var(--lemon-deep); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-small { padding: 0.55rem 1rem; font-size: var(--step--1); }

.menu-toggle { display: none; }

@media (max-width: 52rem) {
  .header-call { display: none; }
}
@media (max-width: 70rem) {
  .menu-toggle {
    display: inline-flex; background: none; border: 2px solid var(--ink); border-radius: 999px;
    font: inherit; font-weight: 700; padding: 0.45rem 0.9rem; color: var(--ink); cursor: pointer;
  }
  .nav { display: none; position: absolute; inset: 100% 0 auto 0; background: var(--paper); border-bottom: 1px solid var(--line); }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .nav a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--line); font-size: var(--step-1); }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.hero h1 { max-width: 14ch; }
.hero .lead { max-width: 40ch; }
.hero-address { font-weight: 600; margin-bottom: 1.6rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (max-width: 56rem) {
  .hero .wrap { grid-template-columns: 1fr; }
}

/* ---------- Orari: l'elemento caratterizzante ---------- */
.hours {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(15, 46, 44, 0.45);
}
.hours h2 { font-size: var(--step-1); margin-bottom: 0.3rem; }
.status { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; margin: 0 0 1.1rem; min-height: 1.6em; }
.status::before { content: ""; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--line); flex: none; }
.status[data-state="open"]::before { background: var(--sage); box-shadow: 0 0 0 4px var(--mint); }
.status[data-state="closed"]::before { background: var(--closed); }

.hours table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.hours th { text-align: left; font-weight: 600; padding: 0.45rem 0.75rem 0.45rem 0; width: 5.5rem; white-space: nowrap; }
.hours td { padding: 0.45rem 0; }
.hours tr + tr th, .hours tr + tr td { border-top: 1px solid var(--line); }
.hours .times { text-align: right; white-space: nowrap; color: var(--ink-soft); padding-left: 0.75rem; }
.hours tr.is-today th, .hours tr.is-today .times { color: var(--ink); font-weight: 800; }

.bar { position: relative; height: 0.7rem; background: var(--paper); border-radius: 999px; min-width: 6rem; }
.bar span { position: absolute; top: 0; bottom: 0; background: var(--mint-deep); border-radius: 999px; }
.hours tr.is-today .bar span { background: var(--sage); }
.hours tfoot td, .hours tfoot th { border-top: 0 !important; padding-top: 0.2rem; }
.bar-scale { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--ink-soft); }
.hours-note { font-size: var(--step--1); color: var(--ink-soft); margin: 1rem 0 0; }

@media (max-width: 30rem) {
  .bar-col, .bar-scale { display: none; }
}

/* ---------- Sezioni ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-mint { background: var(--mint); }
.section-ink { background: var(--ink); color: var(--paper); }
.section-ink a { color: var(--paper); text-decoration-color: var(--lemon); }
.section-ink .btn-primary, .section-ink .map-card a, .map-card .btn-primary { color: var(--ink); }
.section-head { max-width: 46rem; margin-bottom: 2.2rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 52rem) { .split { grid-template-columns: 1fr; } }

/* Elenco trattamenti: lista a due colonne, non card identiche */
.treatments { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: clamp(2rem, 5vw, 4rem); }
.treatments li { border-top: 2px solid var(--ink); padding: 1.1rem 0 1.6rem; }
.treatments a { text-decoration: none; display: block; }
.treatments h3 { margin-bottom: 0.35rem; display: flex; justify-content: space-between; gap: 1rem; }
.treatments h3 svg { width: 1.2rem; flex: none; margin-top: 0.15rem; transition: transform 0.2s ease; }
.treatments a:hover h3 svg { transform: translateX(4px); }
.treatments a:hover h3 span { text-decoration: underline; text-decoration-color: var(--sage); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.treatments p { margin: 0; color: var(--ink-soft); }
@media (max-width: 44rem) { .treatments { grid-template-columns: 1fr; } }

/* Fatti sullo studio */
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.facts li { display: grid; grid-template-columns: 2.6rem 1fr; gap: 1rem; align-items: start; }
.facts svg { width: 2.6rem; height: 2.6rem; padding: 0.55rem; background: var(--paper); border-radius: 50%; color: var(--sage); }
.facts strong { display: block; font-size: var(--step-1); line-height: 1.25; margin-bottom: 0.2rem; }
.facts span { color: var(--ink-soft); }

/* Domande frequenti */
.faq { max-width: 48rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; font-weight: 700; font-size: var(--step-1);
  padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0.4rem; top: 50%; width: 0.7rem; height: 0.7rem;
  border-right: 2.5px solid var(--sage); border-bottom: 2.5px solid var(--sage);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0 0 1.2rem; color: var(--ink-soft); }

/* Contatti */
.contact-list { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: 1.1rem; }
.contact-list li { display: grid; grid-template-columns: 1.5rem 1fr; gap: 0.8rem; }
.contact-list svg { width: 1.4rem; color: var(--sage); margin-top: 0.15rem; }
.contact-list strong { display: block; }
.section-ink .contact-list svg { color: var(--lemon); }
.section-ink .lead { color: color-mix(in srgb, var(--paper) 80%, transparent); }
.section-ink .btn-ghost { border-color: var(--paper); color: var(--paper); }
.section-ink .btn-ghost:hover { background: var(--paper); color: var(--ink); }

.map-card {
  border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
}
.map-card iframe { display: block; width: 100%; height: 22rem; border: 0; }
.map-consent { padding: 1.5rem; }
.map-consent .h3 { margin-bottom: 0.6em; }
.map-consent p { font-size: var(--step--1); color: var(--ink-soft); }

/* Pagine interne */
.page-head { padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 { font-size: var(--step-4); max-width: 18ch; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0 0 1.4rem; font-size: var(--step--1); color: var(--ink-soft); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; color: var(--line); }
.breadcrumb a { color: var(--ink-soft); }

.article { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; padding-bottom: clamp(3rem, 6vw, 5rem); }
.article .prose h2 { font-size: var(--step-2); margin-top: 1.8em; }
.article .prose h2:first-child { margin-top: 0; }
.aside { position: sticky; top: 6rem; display: grid; gap: 1rem; }
.aside-box { background: var(--mint); border-radius: var(--radius-l); padding: 1.4rem; }
.aside-box h2 { font-size: var(--step-1); }
.aside-box p { font-size: var(--step--1); }
.aside-box .btn { width: 100%; }
.aside-box .btn + .btn { margin-top: 0.6rem; }
.aside nav h2 { font-size: var(--step-0); margin: 0.4rem 0 0.6rem; }
.aside nav ul { list-style: none; padding: 0; margin: 0; font-size: var(--step--1); }
.aside nav li { padding: 0.35rem 0; border-top: 1px solid var(--line); }
.aside nav a { text-decoration: none; display: block; padding: 0.25rem 0; }
.aside nav a[aria-current="page"] { font-weight: 800; }
@media (max-width: 56rem) {
  .article { grid-template-columns: 1fr; }
  .aside { position: static; }
}

.note { font-size: var(--step--1); color: var(--ink-soft); border-left: 3px solid var(--mint-deep); padding-left: 1rem; }

/* Foto */
.photo { margin: 1.5rem 0 0; }
.photo img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-l); background: var(--mint); }
.photo figcaption { font-size: var(--step--1); color: var(--ink-soft); margin-top: 0.5rem; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 3vw, 1.75rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.photos .photo { margin: 0; }
@media (max-width: 44rem) { .photos { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: color-mix(in srgb, var(--paper) 82%, transparent); padding: 3rem 0 6rem; font-size: var(--step--1); }
.site-footer a { color: var(--paper); text-decoration-color: color-mix(in srgb, var(--paper) 40%, transparent); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { color: var(--paper); font-size: var(--step-0); margin-bottom: 0.7rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer nav a { display: inline-block; padding: 0.3rem 0; }
.site-footer li { margin-bottom: 0.35rem; }
.social { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.social a { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0; }
.social svg { width: 1.2rem; height: 1.2rem; flex: none; }
.legal { border-top: 1px solid color-mix(in srgb, var(--paper) 18%, transparent); margin-top: 2.2rem; padding-top: 1.4rem; }
.legal p { max-width: none; margin-bottom: 0.4rem; }
@media (max-width: 52rem) { .footer-grid { grid-template-columns: 1fr; } }
@media (min-width: 52.01rem) { .site-footer { padding-bottom: 3rem; } }

/* Barra azioni fissa su mobile */
.callbar { display: none; }
@media (max-width: 52rem) {
  .callbar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom));
    background: var(--paper); border-top: 1px solid var(--line);
  }
  .callbar .btn { padding: 0.75rem 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .site-header, .callbar, .map-card, .aside { display: none !important; }
  body { background: #fff; }
}

/* Indirizzi email lunghi: vanno a capo invece di allargare la pagina su mobile */
.contact-list a, .site-footer a { overflow-wrap: anywhere; }
.contact-list div { min-width: 0; }
/* La card mappa resta chiara anche dentro la sezione scura */
.map-card .btn-ghost, .section-ink .map-card .btn-ghost { border-color: var(--ink); color: var(--ink); }
.map-card .btn-ghost:hover, .section-ink .map-card .btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- Attività principali: implantologia e ortodonzia trasparente ---------- */
.section-focus { padding-top: clamp(1rem, 3vw, 2rem); }
.focus { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 3vw, 1.75rem); }
.focus-card {
  display: flex; flex-direction: column; align-items: flex-start;
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius-l); padding: clamp(1.5rem, 4vw, 2.75rem);
}
.focus-card > svg {
  width: 3.25rem; height: 3.25rem; padding: 0.7rem; border-radius: 50%;
  background: var(--lemon); color: var(--ink); margin-bottom: 1.4rem;
}
.focus-card h2, .focus-card h3 { font-size: var(--step-3); font-weight: 800; margin-bottom: 0.5em; }
.focus-card p { color: color-mix(in srgb, var(--paper) 82%, transparent); font-size: var(--step-1); line-height: 1.5; }
.focus-card ul { list-style: none; padding: 0; margin: 0.4rem 0 2rem; display: grid; gap: 0.6rem; }
.focus-card li { padding-left: 1.6rem; position: relative; }
.focus-card li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 0.85rem; height: 0.45rem;
  border-left: 2.5px solid var(--lemon); border-bottom: 2.5px solid var(--lemon); transform: rotate(-45deg);
}
.focus-card .btn { margin-top: auto; white-space: normal; text-align: center; }
@media (max-width: 52rem) { .focus { grid-template-columns: 1fr; } }

.others-title { margin-top: clamp(3rem, 6vw, 4.5rem); margin-bottom: 1.4rem; }
.reviewed { font-size: var(--step--1); color: var(--ink-soft); margin: 1rem 0 0; }

/* Fasce orarie (generate da build.py) */
.seg-0900-1200{left:8.3%;width:25.0%}
.seg-1430-1900{left:54.2%;width:37.5%}
