/* =========================================================
   Sito Dott.ssa Michelle — foglio di stile principale
   Palette: salvia / carta da zucchero / ocra spenta
   Caratteri: Newsreader (titoli) + Instrument Sans (testi)
   ========================================================= */

:root {
  /* Colore */
  --ground: #edefe8;
  --ground-deep: #e3e7dd;
  --paper: #fafbf6;
  --ink: #1e2b27;
  --muted: #5e6e68;
  --line: #d2d8cd;
  --blue: #3f6376;
  --blue-dark: #32505f;
  --blue-soft: #dce7ec;
  --ochre: #a9743f;
  --ochre-soft: #f0e4d6;

  /* Tipografia */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Misure */
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(64px, 9vw, 116px);
  --radius: 4px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.012em;
}

h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.5rem);
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.45rem);
  line-height: 1.16;
}

h3 {
  font-size: 1.16rem;
  line-height: 1.35;
}

p {
  margin: 0;
}

a {
  color: var(--blue);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--blue-dark);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* ---------- Impalcatura ---------- */

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section--paper {
  background: var(--paper);
}

.section--tint {
  background: var(--ground-deep);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 62ch;
  margin-bottom: clamp(32px, 4.5vw, 56px);
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 60ch;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: var(--paper);
  padding: 12px 20px;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Bottoni ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: var(--paper);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn--sm {
  padding: 10px 20px;
  font-size: 0.88rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  align-self: flex-start;
}

.link-arrow span[aria-hidden] {
  transition: transform 0.18s ease;
}

.link-arrow:hover span[aria-hidden] {
  transform: translateX(3px);
}

/* ---------- Testata ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ground);
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--ground) 96%, transparent);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 16px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.2;
}

.brand__name {
  font-family: var(--serif);
  font-size: 1.16rem;
}

.brand__role {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a:not(.btn) {
  font-size: 0.93rem;
  color: var(--ink);
  text-decoration: none;
}

.nav a:not(.btn):hover {
  color: var(--blue);
}

/* Le voci non vanno mai spezzate a meta' frase */
.nav a:not(.btn) {
  white-space: nowrap;
}

/* Il bottone dentro il menu serve solo a menu aperto, da telefono.
   Su schermo largo la chiamata all'azione e' quella fuori dal menu. */
.nav > .btn {
  display: none;
}

.header-cta {
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  margin-inline: auto;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav,
  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav.is-open {
    display: flex;
    position: absolute;
    inset: 100% 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-block: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
  }

  .nav.is-open a {
    padding-block: 14px;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }

  .nav.is-open .btn {
    display: inline-flex;
    margin-top: 18px;
    border-bottom: 0;
  }

  /* Pagine senza menu (privacy, cookie): il bottone di ritorno resta visibile */
  .site-header .header-cta--solo {
    display: inline-flex;
  }
}

/* ---------- Apertura ---------- */

.hero {
  padding-block: clamp(48px, 7vw, 88px) clamp(56px, 8vw, 104px);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 22px;
  /* Misura pensata sul titolo e sui due bottoni, non sul testo corrente:
     sotto le 32rem il titolo si sfilaccia e le due azioni si impilano. */
  max-width: 32rem;
}

.hero h1 em {
  font-style: italic;
}

.hero__sub {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 40ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2px;
}

.reassure {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.87rem;
  color: var(--muted);
  margin-top: 2px;
}

.reassure li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 7px;
}

.reassure li + li::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ochre);
  margin-right: 9px;
}

ul.reassure {
  margin: 0;
  padding: 0;
}

@media (max-width: 880px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__text {
    max-width: 100%;
  }

  .hero__media {
    order: -1;
  }
}

/* ---------- Segnaposto fotografici ---------- */

.photo {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(155deg, var(--blue-soft) 0%, var(--ochre-soft) 100%);
}

.photo--portrait {
  aspect-ratio: 4 / 5;
}

.photo--wide {
  aspect-ratio: 4 / 3;
}

.photo__hint {
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.55;
}

/* Quando la foto c'e' davvero riempie il riquadro. La sfumatura sotto
   resta come stato di caricamento. */
.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Fascia di sintonia ---------- */

.empathy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.empathy {
  background: var(--paper);
  padding: 30px 28px 34px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empathy .icon {
  color: var(--ochre);
}

.empathy p {
  font-size: 0.95rem;
  color: var(--muted);
}

.section--paper .empathy {
  background: var(--ground);
}

.empathy-note {
  margin-top: 28px;
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 58ch;
}

/* ---------- Chi sono ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 58ch;
}

.about-text p {
  color: var(--muted);
}

.about-text p.first {
  color: var(--ink);
  font-size: 1.08rem;
}

.credentials {
  margin: 4px 0 0;
  padding: 20px 24px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--ground);
  border-left: 2px solid var(--ochre);
  font-size: 0.92rem;
}

.section--paper .credentials {
  background: var(--ground);
}

.credentials strong {
  font-weight: 600;
}

@media (max-width: 880px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Servizi ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
  gap: 22px;
}

.service {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px 30px 34px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.section--paper .service {
  background: var(--ground);
}

.service p {
  font-size: 0.95rem;
  color: var(--muted);
}

.service__meta {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- Come funziona ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: clamp(26px, 3.5vw, 44px);
  counter-reset: step;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.step__n {
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.step p {
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- Domande frequenti ---------- */

.faq {
  max-width: 760px;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-block: 20px;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: 1.13rem;
  line-height: 1.4;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--sans);
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--blue);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq .answer {
  padding-bottom: 24px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.97rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- Contatti ---------- */

.contact-lead {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 52ch;
  margin-bottom: clamp(34px, 4.5vw, 52px);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.field label .opt {
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field textarea,
.field select {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  padding: 13px 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  outline: 1px solid var(--blue);
  outline-offset: -2px;
}

.field textarea {
  resize: vertical;
  min-height: 118px;
}

.choices {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.choice {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
  cursor: pointer;
}

.choice input {
  accent-color: var(--blue);
  margin: 0;
}

.choice:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
}

.consent input {
  margin-top: 4px;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.form-note {
  font-size: 0.82rem;
  color: var(--muted);
}

.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 32px 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.contact-block h3 {
  font-size: 1.04rem;
}

.contact-block p,
.contact-block address {
  font-size: 0.94rem;
  color: var(--muted);
  font-style: normal;
}

.contact-block a:not(.btn) {
  color: var(--blue);
}

.whatsapp {
  align-self: flex-start;
}

@media (max-width: 880px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Chiusura in fondo alla pagina ---------- */

.closing {
  background: var(--blue-soft);
  text-align: left;
}

.closing .wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 58ch;
  margin-inline: auto;
}

.closing p {
  color: var(--muted);
}

/* ---------- Piede ---------- */

.site-footer {
  background: var(--ground-deep);
  border-top: 1px solid var(--line);
  padding-block: 52px 44px;
  font-size: 0.87rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 4px;
}

.footer-col a {
  color: var(--muted);
  text-decoration: none;
  width: fit-content;
}

.footer-col a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.footer-legal {
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.8rem;
  line-height: 1.6;
}

.footer-legal .disclaimer {
  max-width: 74ch;
}

.emergency {
  padding: 14px 18px;
  background: var(--paper);
  border-left: 2px solid var(--ochre);
  max-width: 74ch;
}

/* ---------- Barra fissa da telefono ---------- */

.mobile-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: none;
  gap: 10px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.28s ease;
}

.mobile-bar.is-visible {
  transform: translateY(0);
}

.mobile-bar .btn {
  flex: 1;
  padding: 13px 14px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .mobile-bar {
    display: flex;
  }

  body:has(.mobile-bar) {
    padding-bottom: 76px;
  }
}

/* ---------- Pagine di testo (privacy, cookie) ---------- */

.prose {
  max-width: 68ch;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 22px;
}

.prose h3 {
  margin-top: 10px;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 0.98rem;
}

.prose ul {
  margin: 0;
  padding-left: 1.15em;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.todo {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--ochre-soft);
  color: var(--ochre);
  font-size: 0.85em;
  font-weight: 600;
  font-family: var(--sans);
}

/* ---------- Blocco a password dell'anteprima ---------- */

/* Il resto della pagina resta nascosto mentre il cancello e' in piedi.
   La classe viene messa prima che il corpo sia stato letto, quindi il
   contenuto non lampeggia. */
html.bloccato body > *:not(.cancello) {
  display: none !important;
}

html.bloccato body {
  padding: 0;
}

.cancello {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--ground);
}

.cancello__box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 26rem;
  padding: clamp(28px, 5vw, 40px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cancello__nome {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.2;
}

.cancello h1 {
  font-size: 1.7rem;
  line-height: 1.2;
}

.cancello__testo {
  font-size: 0.95rem;
  color: var(--muted);
}

.cancello label {
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.cancello input {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  padding: 13px 15px;
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cancello input:focus {
  border-color: var(--blue);
  outline: 1px solid var(--blue);
  outline-offset: -2px;
}

.cancello button {
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: var(--paper);
  cursor: pointer;
}

.cancello button:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

.cancello__errore {
  font-size: 0.88rem;
  color: var(--ochre);
}

/* ---------- Movimento ridotto ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
