/* Dott.ssa Patrizia Bordonaro — foglio di stile (mobile-first) */

/* ---------- Font self-hosted ---------- */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/newsreader-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/newsreader-italic-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Albert Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/albert-sans-var.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-500.woff2') format('woff2');
}

/* ---------- Token ---------- */
:root {
  --bg: #fbf7f6;
  --surface: #ffffff;
  --surface-2: #f4ecec;
  --ink: #2a1f2b;
  --muted: #6e5f6c;
  --line: #e6dadb;
  --accent: #a8425f;
  --accent-ink: #ffffff;
  --f-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --f-body: 'Albert Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1419; --surface: #231b22; --surface-2: #2c222a; --ink: #f3e9ee; --muted: #b6a3b0;
    --line: #3b2f39; --accent: #e07d98; --accent-ink: #1a1419;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
address { font-style: normal; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: max(16px, env(safe-area-inset-left, 0px));
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; color: var(--accent-ink); }

.eyebrow {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.small { font-size: 0.9rem; color: var(--muted); }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); border-radius: 999px;
  padding: 0.6rem 1.2rem;
  font: 600 0.95rem/1.2 var(--f-body);
  text-decoration: none; cursor: pointer;
  white-space: nowrap;
}
.btn:hover { color: var(--accent-ink); filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); filter: none; }
.ghost {
  appearance: none; background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  min-height: 44px; padding: 0.55rem 1rem; font: 500 0.9rem var(--f-body); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}

/* ---------- Header / navigazione ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(10px)) {
  .nav { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
}
.nav-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: var(--nav-h); padding-block: 10px; }
.brand { display: flex; flex: 1 1 0; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; flex: none; color: var(--accent); }
.brand-name { font-family: var(--f-display); font-size: 1.05rem; line-height: 1.15; }
.brand-name small { display: block; font-family: var(--f-body); font-size: 0.75rem; color: var(--muted); letter-spacing: 0.02em; }
.btn-call { padding-inline: 0.95rem; }

.menu-toggle {
  width: 44px; height: 44px; flex: none;
  display: none; place-items: center;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
}
.js .menu-toggle { display: inline-grid; }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; content: "";
  transition: transform 0.2s ease;
}
.menu-icon { position: relative; }
.menu-icon::before { position: absolute; top: -6px; }
.menu-icon::after { position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

.menu { flex-basis: 100%; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
.menu a { display: inline-block; padding: 10px 0; text-decoration: none; color: var(--muted); font-size: 0.95rem; }
.menu a:hover { color: var(--ink); }

/* Con JS attivo il menu mobile si apre e chiude dal pulsante */
.js .menu { display: none; }
.js .menu.open { display: block; }
.js .menu.open ul { flex-direction: column; padding-bottom: 8px; }
.js .menu.open a { display: block; padding: 12px 0; border-top: 1px solid var(--line); font-size: 1rem; color: var(--ink); }

@media (max-width: 380px) {
  .brand-name { font-size: 0.95rem; }
  .brand-name small { display: none; }
}

/* ---------- Hero ---------- */
.hero { display: grid; gap: 32px; padding-block: 36px 56px; }
.hero h1 { font-size: clamp(2.2rem, 7.5vw, 4rem); letter-spacing: -0.01em; }
.hero h1 em { color: var(--accent); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 54ch; margin-top: 1.1rem; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.6rem; }
.hero-side { display: grid; gap: 22px; }
.portrait {
  width: 200px; height: 200px; object-fit: cover;
  border-radius: 50%;
  border: 8px solid var(--surface-2);
}
.hero-facts { display: grid; gap: 12px; margin: 0; font-size: 0.95rem; }
.hero-facts div { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.hero-facts dt { font-family: var(--f-mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hero-facts dd { margin: 0; }

/* ---------- Sezioni ---------- */
.block { padding-bottom: 72px; }
.block-head { display: grid; gap: 14px; margin-bottom: 28px; }
.block-head h2 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
.block-head > p { color: var(--muted); max-width: 60ch; }

/* Prestazioni */
.services { display: grid; border-top: 1px solid var(--line); }
.service { padding: 22px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.service h3 { font-size: 1.35rem; margin-bottom: 8px; }
.service p { color: var(--muted); font-size: 0.97rem; }

/* Sede */
.place { display: grid; gap: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px; }
.place-info { display: grid; gap: 16px; justify-items: start; }
.place-info h3 { font-size: 1.45rem; }
.place-info address { font-size: 1.05rem; }
.map-card { position: relative; border-radius: 18px; overflow: hidden; }
.map-card svg { width: 100%; }
.map-label {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.25rem 0.8rem; font-size: 0.85rem; white-space: nowrap;
}

/* Contatti */
.contact { display: grid; gap: 14px; }
.contact > div { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; min-width: 0; display: grid; gap: 8px; align-content: start; }
.contact h3 { font-size: 1.25rem; }
.phone { font-family: var(--f-mono); font-weight: 500; font-size: 1.3rem; text-decoration: none; color: var(--accent); }
.mail { font-weight: 600; color: var(--accent); overflow-wrap: anywhere; }
.visit-note { margin-top: 18px; padding: 18px 22px; background: var(--surface-2); border-radius: 20px; }
.visit-note strong { font-weight: 600; }
.visit-note + .visit-note { margin-top: 10px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 28px 40px; font-size: 0.88rem; color: var(--muted); }
.footer .wrap { display: grid; gap: 8px; }
.footer strong { color: var(--ink); font-weight: 600; }
.footer a { overflow-wrap: anywhere; }

/* ---------- Pagine interne (legali, 404) ---------- */
.page { padding-block: 40px 72px; max-width: 760px; }
.page h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 0.6rem; }
.page h2 { font-size: 1.5rem; margin: 2.2rem 0 0.6rem; }
.page p, .page ul { margin: 0 0 1rem; }
.page ul { padding-left: 1.2rem; }
.page .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.8rem; }
.page-404 { text-align: center; padding-block: 80px; max-width: 600px; margin-inline: auto; }
.page-404 p { color: var(--muted); margin: 1rem 0 1.8rem; }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .wrap { padding-inline: max(24px, env(safe-area-inset-left, 0px)); }
  .hero { padding-block: 48px 72px; }
  .hero-side { grid-template-columns: auto 1fr; align-items: center; gap: 28px; }
  .portrait { width: 220px; height: 220px; }
  .services { grid-template-columns: 1fr 1fr; }
  .service { padding: 22px 20px 22px 0; }
  .service:nth-child(2n) { padding-left: 20px; padding-right: 0; border-left: 1px solid var(--line); }
  .contact { grid-template-columns: 1fr 1fr; }
  .contact > div:last-child { grid-column: 1 / -1; }
}

/* Menu orizzontale da 860px */
@media (min-width: 860px) {
  .nav-bar { flex-wrap: nowrap; gap: 24px; }
  .menu-toggle, .js .menu-toggle { display: none; }
  .menu, .js .menu { display: block; flex-basis: auto; order: -1; margin-left: auto; }
  .brand { flex: none; }
  .menu ul { gap: 22px; }
  .js .menu.open ul { flex-direction: row; padding: 0; }
  .js .menu.open a { display: inline-block; padding: 10px 0; border: 0; font-size: 0.95rem; color: var(--muted); }
  .brand { order: -2; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1025px) {
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center; padding-block: 72px 96px; }
  .hero-side { grid-template-columns: 1fr; justify-items: start; }
  .portrait { width: 240px; height: 240px; }
  .block { padding-bottom: 96px; }
  .block-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 36px; }
  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .service, .service:nth-child(2n) { padding: 24px 24px 26px; border-left: 1px solid var(--line); }
  .service:nth-child(3n+1) { padding-left: 0; border-left: 0; }
  .place { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 32px; gap: 40px; align-items: center; }
  .contact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact > div:last-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
