/* =========================================================================
   Dott.ssa Eleonora Quinti — Psicologa e Psicoterapeuta
   Direzione: "Il metodo gentile" — caldo, luminoso, professionale.
   Palette derivata dallo studio reale (noce, cotto, ocra, salvia).
   ========================================================================= */

:root {
  /* --- Colore (OKLCH, fallback hex per browser datati via @supports sotto) --- */
  --bg:          oklch(0.972 0.013 83);   /* cream luminoso        #F7F1E6 */
  --surface:     oklch(0.955 0.018 80);   /* card chiara           #F2E9D7 */
  --surface-2:   oklch(0.928 0.024 78);   /* card più calda        #EADBC2 */
  --ink:         oklch(0.272 0.018 64);   /* noce quasi-nero       #2E2820 */
  --ink-soft:    oklch(0.438 0.020 62);   /* testo secondario      #5C5142 */
  --accent:      oklch(0.700 0.118 70);   /* ocra caldo (solo decoro/fill) #D29A47 */
  --accent-deep: oklch(0.560 0.130 47);   /* cotto (fill/hover/icone)      #B05F37 */
  --accent-text: oklch(0.470 0.118 46);   /* cotto scuro per TESTO (AA)    #8F4A28 */
  --calm:        oklch(0.610 0.040 152);  /* salvia tenue          #84907E */
  --border:      oklch(0.882 0.020 78);   /* taupe caldo           #E1D4BD */
  --border-soft: oklch(0.918 0.016 80);   /* bordo leggero         #ECE1CE */

  /* --- Tipografia --- */
  --font-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  /* --- Misure --- */
  --maxw: 1120px;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 16px;
  --radius-sm: 11px;
  --header-h: 68px;

  --shadow: 0 1px 2px rgba(46, 40, 32, 0.04), 0 14px 36px -22px rgba(46, 40, 32, 0.22);
}

/* Fallback per browser senza OKLCH */
@supports not (color: oklch(0.5 0.1 80)) {
  :root {
    --bg: #F7F1E6; --surface: #F2E9D7; --surface-2: #EADBC2;
    --ink: #2E2820; --ink-soft: #5C5142;
    --accent: #D29A47; --accent-deep: #B05F37; --accent-text: #8F4A28; --calm: #84907E;
    --border: #E1D4BD; --border-soft: #ECE1CE;
  }
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;          /* 17px — niente zoom iOS */
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 0.7rem 1.1rem; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; border-radius: 4px; }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--border-soft);
  /* NB: nessun backdrop-filter qui — evita di intrappolare il drawer fixed */
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.wordmark-mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--ink); color: var(--bg);
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: 0.01em;
}
.wordmark-text { display: flex; flex-direction: column; line-height: 1.12; }
.wordmark-name { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--ink); }
.wordmark-role { font-size: 0.72rem; color: var(--ink-soft); letter-spacing: 0.01em; }

.nav-desktop { display: none; }

/* Hamburger */
.hamburger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px; padding: 11px;
  background: transparent; border: 1px solid var(--border); border-radius: 11px; cursor: pointer;
}
.hamburger-bar { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease; }
.hamburger[aria-expanded="true"] .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] .hamburger-bar:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================================
   Mobile menu — overlay full-screen, sfondo OPACO (niente translate math)
   ========================================================================= */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.28s ease; }
.mobile-menu-nav { display: flex; flex-direction: column; gap: 0.4rem; text-align: center; padding: 1.5rem; }
.mobile-menu-nav a {
  font-family: var(--font-display); font-weight: 600; font-size: 1.7rem;
  text-decoration: none; color: var(--ink); padding: 0.6rem 1rem; border-radius: 10px;
  transform: translateY(8px); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease, color 0.2s ease;
}
.mobile-menu.is-open .mobile-menu-nav a { transform: translateY(0); opacity: 1; }
.mobile-menu-nav a:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-nav a:nth-child(2) { transition-delay: 0.10s; }
.mobile-menu-nav a:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-nav a:nth-child(4) { transition-delay: 0.20s; }
.mobile-menu-nav a:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu-nav a:active { color: var(--accent-deep); }

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.85rem 1.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  text-decoration: none; border-radius: 999px; cursor: pointer;
  transition: transform 0.18s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* =========================================================================
   Hero
   ========================================================================= */
.hero { padding: clamp(2.5rem, 9vw, 5.5rem) 0 clamp(2rem, 6vw, 3.5rem); }
.hero-inner { max-width: 860px; }
.hero-eyebrow {
  font-weight: 600; font-size: 0.9rem; color: var(--accent-text);
  margin-bottom: 1rem; letter-spacing: 0.01em;
}
.hero-title { font-size: clamp(2.2rem, 7.2vw, 4rem); font-weight: 700; letter-spacing: -0.025em; }
.hero-title-accent { display: block; color: var(--ink-soft); font-weight: 600; }
.hero-sub {
  margin-top: 1.4rem; max-width: 60ch;
  font-size: clamp(1.05rem, 2.6vw, 1.2rem); color: var(--ink-soft);
}
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* Signature: schemi disfunzionali -> sani */
.schemi { margin-top: clamp(2.5rem, 7vw, 4rem); }
.schemi-svg { width: 100%; height: auto; color: var(--accent); display: block; }
.schemi-path {
  stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 3000; stroke-dashoffset: 3000;
  animation: draw-schemi 2.6s ease 0.25s forwards;
}
.schemi-caption {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 0.4rem; font-size: 0.8rem; color: var(--ink-soft);
}
.schemi-caption span:last-child { color: var(--accent-text); font-weight: 600; }
@keyframes draw-schemi { to { stroke-dashoffset: 0; } }

/* =========================================================================
   Sezioni — ritmo "workbook"
   ========================================================================= */
.section { padding: clamp(2.8rem, 8vw, 5rem) 0; }
.section-approccio { border-top: 1px solid var(--border-soft); }
.section-servizi { background: var(--surface); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section-persone { background: var(--bg); }
.section-studio { background: var(--surface); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }

.section-head { max-width: 62ch; margin-bottom: clamp(1.8rem, 5vw, 2.8rem); }
.section-kicker {
  font-weight: 600; font-size: 0.82rem; color: var(--accent-text);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.7rem;
}
.section-head h2 { font-size: clamp(1.55rem, 4.2vw, 2.45rem); }
.section-lead { margin-top: 1.1rem; color: var(--ink-soft); font-size: clamp(1.02rem, 2.4vw, 1.12rem); }

/* Tools (approccio) */
.tools { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.tool-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
}
.tool-icon { color: var(--accent-deep); width: 48px; height: 48px; margin-bottom: 1rem; }
.tool-icon svg { width: 100%; height: 100%; }
.tool-icon svg :is(circle, rect, line, path) { stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.tool-card h3 { font-size: 1.22rem; margin-bottom: 0.5rem; }
.tool-card p { color: var(--ink-soft); }

/* Aree (servizi) */
.aree-list {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem;
  margin-bottom: clamp(2rem, 5vw, 2.6rem);
}
.aree-list li {
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding: 0.85rem 1rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-weight: 500;
}
.aree-list li::before {
  content: ""; flex: 0 0 auto; margin-top: 0.62em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}

.modalita { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.modalita-item {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem;
}
.modalita-item h3 { font-size: 1.18rem; margin-bottom: 0.5rem; }
.modalita-item p { color: var(--ink-soft); }

/* Persone — card "outline" (fondo trasparente) per distinguerle dalle tool-card piene */
.persone-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.persona-card {
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
}
.persona-card h3 { font-size: 1.22rem; margin-bottom: 0.5rem; }
.persona-card p { color: var(--ink-soft); }

/* Studio / Chi sono */
.studio-inner { display: grid; gap: clamp(1.5rem, 5vw, 3rem); grid-template-columns: 1fr; align-items: center; }
.studio-photo {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow); max-width: 420px;
}
.studio-photo img { width: 100%; }
.studio-text h2 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); margin-bottom: 1rem; }
.studio-text p { color: var(--ink-soft); margin-top: 1rem; }
.studio-text p.studio-quote {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(1.15rem, 3vw, 1.4rem);
  line-height: 1.4; color: var(--ink);
  margin-top: 1.5rem; padding: 1.3rem 1.45rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
}

/* Contatti */
.contatti-inner { max-width: 760px; }
.section-contatti { text-align: center; }
.section-contatti .section-kicker { color: var(--accent-text); }
.section-contatti h2 { font-size: clamp(1.6rem, 4.4vw, 2.4rem); }
.contatti-lead { margin: 1.1rem auto 0; max-width: 48ch; color: var(--ink-soft); font-size: 1.1rem; }
.contatti-cards { margin: 2.2rem 0 1rem; display: grid; gap: 1rem; grid-template-columns: 1fr; }
.contatto-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem; display: flex; flex-direction: column; gap: 0.35rem;
}
.contatto-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-text); font-weight: 600; }
.contatto-value { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 3.5vw, 1.35rem); word-break: break-word; color: var(--ink); }
.contatti-note { font-size: 0.9rem; color: var(--ink-soft); }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--ink); color: var(--bg); padding: clamp(2.2rem, 6vw, 3rem) 0; }
.footer-inner { display: flex; flex-direction: column; gap: 1.4rem; }
.footer-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; display: block; }
.footer-role { font-size: 0.9rem; color: color-mix(in oklab, var(--bg) 72%, transparent); display: block; margin-top: 0.2rem; }
.footer-copy { font-size: 0.88rem; color: color-mix(in oklab, var(--bg) 78%, transparent); }
.footer-credit { font-size: 0.82rem; color: color-mix(in oklab, var(--bg) 66%, transparent); margin-top: 0.4rem; }
.footer-credit a { color: color-mix(in oklab, var(--bg) 88%, transparent); text-decoration: underline; text-underline-offset: 2px; }
.footer-credit a:hover { color: var(--bg); }

/* =========================================================================
   Reveal on scroll
   ========================================================================= */
/* Fail-safe: lo stato nascosto si applica SOLO se il JS è attivo (html.js).
   Senza JS — o se il JS fallisce — il contenuto resta sempre visibile. */
.reveal { transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================================
   Breakpoints
   ========================================================================= */
@media (min-width: 700px) {
  .tools { grid-template-columns: repeat(3, 1fr); }
  .modalita { grid-template-columns: 1fr 1fr; }
  .persone-grid { grid-template-columns: repeat(3, 1fr); }
  .contatti-cards { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  .hamburger { display: none; }
  .mobile-menu { display: none; }
  .nav-desktop { display: flex; align-items: center; gap: 1.7rem; }
  .nav-desktop a { text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 0.98rem; transition: color 0.18s ease; }
  .nav-desktop a:hover { color: var(--ink); }
  .nav-desktop .nav-cta {
    color: var(--ink); font-weight: 600;
    border: 1.5px solid var(--border); padding: 0.5rem 1.1rem; border-radius: 999px;
  }
  .nav-desktop .nav-cta:hover { border-color: var(--ink); }

  .aree-list { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 940px) {
  .studio-inner { grid-template-columns: 0.85fr 1.15fr; }
  .studio-photo { max-width: none; }
}

/* =========================================================================
   Reduced motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .schemi-path { stroke-dashoffset: 0; }
  .reveal { opacity: 1; transform: none; }
}
