/* ==========================================================================
   Chiara Montersino – Psicologa e Psicoterapeuta (Novara)
   Foglio di stile unico del sito. Struttura:
   1. Font          5. Header / navigazione    9.  Componenti di pagina
   2. Token         6. Bottoni                 10. Form e lightbox
   3. Reset/base    7. Hero                    11. Footer
   4. Tipografia    8. Sezioni e griglie       12. Motion / utilità
   ========================================================================== */

/* 1. FONT (self-hosted) ----------------------------------------------------- */
@font-face {
  font-family: "Bodoni Moda";
  src: url("/assets/fonts/bodoni-moda-variable.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("/assets/fonts/lato-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("/assets/fonts/lato-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Della Respira";
  src: url("/assets/fonts/dellarespira-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* 2. TOKEN ------------------------------------------------------------------ */
:root {
  /* colori */
  --color-bg: #fbfaf6;            /* crema caldo (sfondo pagina) */
  --color-white: #ffffff;
  --color-sage-50: #eef4ec;       /* salvia chiarissimo */
  --color-sage-100: #dce7d9;      /* salvia chiaro */
  --color-sage-200: #b6d2af;      /* salvia (accenti delle icone) */
  --color-green: #4a943c;         /* verde brand: icone, decorazioni, testo grande */
  --color-green-text: #3c7a31;    /* verde per link e testo piccolo (AA su chiaro) */
  --color-green-deep: #2e5c2a;    /* verde profondo: sezioni scure, titoli */
  --color-green-ink: #1e3d1b;     /* verde quasi nero (sfumature hero) */
  --color-orange: #faa749;        /* CTA */
  --color-orange-hover: #e8933a;
  --color-text: #302c2c;
  --color-muted: #5f5b58;
  --color-line: rgba(48, 44, 44, 0.12);
  --color-line-strong: rgba(48, 44, 44, 0.22);
  --color-focus: #4a943c;

  /* font */
  --font-display: "Bodoni Moda", "Bodoni 72", "Didot", Georgia, "Times New Roman", serif;
  --font-body: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-label: "Della Respira", Georgia, serif;

  /* spaziature */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 5.5rem;
  --space-10: 7.5rem;
  --section-y: clamp(3.5rem, 4vw + 2rem, 6.5rem);

  /* raggi, ombre, misure */
  --radius-sm: 0.625rem;
  --radius: 1.25rem;
  --radius-lg: 1.75rem;
  --shadow-soft: 0 18px 50px -24px rgba(46, 92, 42, 0.35);
  --container: 72rem;
  --container-narrow: 46rem;
  --gutter: 1rem;
  --header-h: 4.25rem;

  /* transizioni */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.25s;
}
@media (min-width: 640px) {
  :root { --gutter: 1.5rem; }
}
@media (min-width: 960px) {
  :root { --gutter: 2rem; --header-h: 4.75rem; }
}

/* 3. RESET / BASE ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (min-width: 960px) {
  body { font-size: 1.125rem; }
}
body.nav-open { overflow: hidden; }
img, picture, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--color-green-text); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--color-green-deep); }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 700; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--color-line); margin: 0; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 2px; }
/* su superfici scure l'anello di focus è bianco */
.hero :focus-visible, .cta-band :focus-visible, .lightbox :focus-visible, .lightbox:focus-visible { outline-color: #fff; }
::selection { background: var(--color-sage-200); color: var(--color-green-ink); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  padding: 0.75rem 1.25rem; background: var(--color-green-deep); color: #fff;
  border-radius: var(--radius-sm); font-family: var(--font-label); text-transform: uppercase;
  letter-spacing: 0.15em; font-size: 0.8rem; text-decoration: none; transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 1rem; color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }

/* 4. TIPOGRAFIA ------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.005em;
  color: var(--color-green-ink);
  margin: 0 0 0.5em;
  text-wrap: balance;
  font-variation-settings: "opsz" 48;
}
h1 { font-size: clamp(2.5rem, 1.6rem + 3.2vw, 4.5rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 1.35rem + 1.7vw, 2.9rem); }
h3 { font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.6rem); line-height: 1.2; }
h4 { font-size: 1.15rem; }

.eyebrow {
  display: block;
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-green-text);
  margin: 0 0 1rem;
}
.eyebrow--light { color: var(--color-sage-200); }
.lead { font-size: 1.2em; line-height: 1.55; }
.muted { color: var(--color-muted); }
.text-center { text-align: center; }
.prose p + p { margin-top: 0; }
.prose em { font-style: italic; }

/* 5. HEADER / NAVIGAZIONE --------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--color-line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}
.header-inner {
  display: flex; align-items: center; gap: 0.5rem;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--color-text);
  margin-right: auto; min-height: 44px;
}
.brand__mark { width: 40px; height: 40px; flex: 0 0 auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name {
  font-family: var(--font-display); font-weight: 500; font-size: 1.05rem;
  letter-spacing: 0.01em; color: var(--color-text); white-space: nowrap;
}
.brand__role {
  display: none; font-family: var(--font-label); font-size: 0.6rem;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--color-green-text); margin-top: 0.2rem;
}
@media (min-width: 400px) {
  .brand__mark { width: 44px; height: 44px; }
  .brand__name { font-size: 1.2rem; }
  .brand__role { display: block; }
}
@media (min-width: 960px) {
  .brand__mark { width: 48px; height: 48px; }
  .brand__name { font-size: 1.3rem; }
}

.site-nav ul { list-style: none; display: flex; }
.site-nav a { text-decoration: none; color: var(--color-text); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -0.5rem;
  background: transparent; border: 0; border-radius: 50%;
  color: var(--color-green-ink);
}
.nav-toggle:hover { background: var(--color-sage-50); }
.nav-toggle__icon { position: relative; width: 22px; height: 16px; display: block; }
.nav-toggle__icon span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px;
  background: currentColor; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease), top var(--dur) var(--ease);
}
.nav-toggle__icon span:nth-child(1) { top: 0; }
.nav-toggle__icon span:nth-child(2) { top: 7px; }
.nav-toggle__icon span:nth-child(3) { top: 14px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

.nav-backdrop {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 90;
  background: rgba(30, 61, 27, 0.45);
  opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease);
}
.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }

/* Mobile: il menu è un pannello che scorre da destra, sotto l'header */
@media (max-width: 959.98px) {
  .site-nav {
    position: fixed; top: var(--header-h); right: 0; bottom: 0; z-index: 95;
    width: min(22rem, 100%);
    background: var(--color-bg);
    border-left: 1px solid var(--color-line);
    padding: 1.5rem var(--gutter) 2rem;
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.32s var(--ease), visibility 0s linear 0.32s;
    display: flex; flex-direction: column;
  }
  .nav-open .site-nav { transform: none; visibility: visible; transition: transform 0.32s var(--ease); }
  .site-nav ul { flex-direction: column; }
  .site-nav li + li { border-top: 1px solid var(--color-line); }
  .site-nav a {
    display: block; padding: 1rem 0.25rem;
    font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; line-height: 1.2;
    color: var(--color-green-ink);
  }
  .site-nav a[aria-current="page"] { color: var(--color-green-text); }
  .site-nav__extra {
    margin-top: auto; padding-top: 1.5rem; border-top: 1px solid var(--color-line);
    display: grid; gap: 0.75rem;
  }
  .site-nav__extra a {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-family: var(--font-body); font-size: 0.95rem; color: var(--color-text); padding: 0.4rem 0; min-height: 44px;
    overflow-wrap: anywhere;
  }
  .site-nav__extra svg { width: 22px; height: 22px; flex: 0 0 auto; color: var(--color-green); }
  .site-header .header-cta { min-height: 44px; padding: 0.65rem 1rem; font-size: 0.75rem; letter-spacing: 0.14em; flex: 0 0 auto; }
  .header-inner { gap: 0.5rem; }
  .brand { gap: 0.5rem; min-width: 0; flex: 1 1 auto; }
  .brand__text { min-width: 0; }
  .brand__name { font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; }
  .nav-toggle { flex: 0 0 44px; }
}
/* Sotto i 480 px resta solo il marchio (albero): nome e CTA non entrano insieme */
@media (max-width: 479.98px) {
  .brand__text { display: none; }
  .brand__mark { width: 44px; height: 44px; }
}
@media (min-width: 960px) {
  .nav-toggle, .nav-backdrop, .site-nav__extra { display: none; }
  .site-nav { margin-right: 1.5rem; }
  .site-nav ul { gap: 2rem; }
  .site-nav a {
    position: relative; display: inline-block; padding: 0.5rem 0; font-size: 0.98rem;
    transition: color var(--dur) var(--ease);
  }
  .site-nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0.1rem; height: 1.5px;
    background: var(--color-green); transform: scaleX(0); transform-origin: left;
    transition: transform var(--dur) var(--ease);
  }
  .site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--color-green-text); }
  .site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
}

/* 6. BOTTONI ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 48px; padding: 0.85rem 1.75rem;
  border-radius: 999px; border: 1.5px solid transparent;
  font-family: var(--font-label); font-size: 0.82rem; letter-spacing: 0.2em; text-transform: uppercase;
  line-height: 1.1; text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn svg { width: 1.05em; height: 1.05em; flex: 0 0 auto; transition: transform var(--dur) var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; transform: none; }

.btn--primary {
  background: var(--color-orange); color: var(--color-text); border-color: var(--color-orange);
  box-shadow: 0 10px 24px -14px rgba(232, 147, 58, 0.9);
}
.btn--primary:hover { background: var(--color-orange-hover); border-color: var(--color-orange-hover); color: var(--color-text); transform: translateY(-2px); }
.btn--secondary { background: transparent; color: var(--color-green-deep); border-color: var(--color-green-deep); }
.btn--secondary:hover { background: var(--color-green-deep); color: #fff; transform: translateY(-2px); }
.btn--light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.btn--light:hover { background: #fff; color: var(--color-green-deep); border-color: #fff; }

/* 7. HERO (home) ------------------------------------------------------------ */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(27rem, 72vh, 50rem);
  display: flex; align-items: flex-end;
  color: #fff;
  background: var(--color-green-deep);
}
.hero__media, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__media img { object-fit: cover; object-position: 35% 50%; }
.hero__tint {
  position: absolute; inset: 0; z-index: 1; mix-blend-mode: multiply;
  background: linear-gradient(115deg, #2b5a27 0%, #3b7335 45%, #4a8a40 100%);
}
.hero__shade {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(180deg, rgba(30, 61, 27, 0.15) 0%, rgba(30, 61, 27, 0) 35%, rgba(30, 61, 27, 0.55) 100%),
    linear-gradient(90deg, rgba(30, 61, 27, 0.35) 0%, rgba(30, 61, 27, 0) 65%);
}
.hero__content {
  position: relative; z-index: 3;
  padding-top: calc(var(--space-9) + var(--header-h));
  padding-bottom: clamp(3rem, 8vh, 5.5rem);
}
.hero__title {
  color: #fff; margin: 0 0 1.5rem; max-width: 12ch;
  font-size: clamp(2.9rem, 1.4rem + 6.4vw, 7rem);
  line-height: 0.98; letter-spacing: -0.01em; font-weight: 500;
  font-variation-settings: "opsz" 96;
}
.hero__title-pre {
  display: block; font-size: 0.38em; font-weight: 400; letter-spacing: 0.04em;
  margin-bottom: 0.35em; color: rgba(255, 255, 255, 0.86);
  font-variation-settings: "opsz" 24;
}
.hero__pill {
  display: inline-flex; align-items: center; gap: 0.7rem;
  margin: 0; padding: 0.7rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 999px;
  background: rgba(30, 61, 27, 0.25);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  font-family: var(--font-label); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: #fff;
}
@media (min-width: 640px) {
  .hero__pill { font-size: 0.8rem; letter-spacing: 0.22em; }
}
.hero__pill::before {
  content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--color-sage-200); box-shadow: 0 0 0 4px rgba(182, 210, 175, 0.25);
}
.hero__scroll {
  position: absolute; right: var(--gutter); bottom: 2rem; z-index: 3;
  display: none; align-items: center; gap: 0.75rem;
  color: rgba(255, 255, 255, 0.85); text-decoration: none;
  font-family: var(--font-label); font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
}
.hero__scroll::after {
  content: ""; width: 1px; height: 3.5rem; background: rgba(255, 255, 255, 0.6);
  animation: scroll-line 2.2s var(--ease) infinite;
  transform-origin: top;
}
.hero__scroll:hover { color: #fff; }
@media (min-width: 960px) {
  .hero { min-height: clamp(32rem, 82vh, 50rem); }
  .hero__scroll { display: flex; flex-direction: column; }
}
@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* animazione d'ingresso dell'hero (CSS puro, funziona anche senza JS) */
.hero__title, .hero__pill { animation: rise 0.9s var(--ease) both; }
.hero__pill { animation-delay: 0.25s; }
.hero__media img { animation: hero-zoom 2.4s var(--ease) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(1.25rem); }
  to { opacity: 1; transform: none; }
}
@keyframes hero-zoom {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

/* 8. SEZIONI E GRIGLIE ------------------------------------------------------ */
.section { padding-block: var(--section-y); }
.section--white { background: var(--color-white); }
.section--cream { background: var(--color-bg); }
.section--sage { background: var(--color-sage-50); }
.section--sage-100 { background: var(--color-sage-100); }
.section--tight { padding-block: clamp(2.5rem, 3vw + 1rem, 4.5rem); }
.section__head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head h2 { margin-bottom: 0.35em; }
.section__foot { margin-top: clamp(2rem, 4vw, 3.5rem); text-align: center; }

.split {
  display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .split--even { grid-template-columns: 1fr 1fr; }
  .split--text-first { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .split--reverse > :first-child { order: 2; }
}

/* --- Intro (home) --- */
.intro__art {
  position: relative; max-width: 26rem; margin-inline: auto; padding: 2rem;
}
.intro__art::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--color-sage-100);
  border-radius: 58% 42% 55% 45% / 48% 55% 45% 52%;
  transform: rotate(-4deg);
}
.intro__art img { position: relative; z-index: 1; width: 100%; }
.intro__text .btn { margin-top: 1.25rem; }

/* --- Aree (home): 5 schede, 3 + 2 centrate --- */
.areas {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(1rem, 2vw, 1.5rem);
}
.area-card {
  flex: 1 1 17rem; max-width: 24rem;
  background: var(--color-sage-50);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex; flex-direction: column; gap: 0.5rem;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.area-card:nth-child(even) { background: var(--color-bg); border-color: var(--color-sage-100); }
.area-card:hover { transform: translateY(-4px); border-color: var(--color-sage-200); }
.area-card__icon { width: 5.5rem; height: 5.5rem; margin-bottom: 0.75rem; }
.area-card h3 { margin-bottom: 0.25rem; font-size: 1.35rem; }
.area-card p { color: var(--color-muted); font-size: 0.98rem; }
@media (min-width: 960px) {
  .area-card { flex-basis: calc(33.333% - 1rem); max-width: calc(33.333% - 1rem); }
}

/* --- Perché (home) --- */
.why__art { position: relative; max-width: 24rem; margin-inline: auto; padding: 1.5rem 1.75rem 0; }
.why__art::before {
  content: ""; position: absolute; inset: 0 0 6% 0; z-index: 0;
  background: var(--color-white);
  border-radius: 45% 55% 50% 50% / 55% 50% 50% 45%;
  transform: rotate(3deg);
}
.why__art img { position: relative; z-index: 1; width: 100%; filter: drop-shadow(0 20px 30px rgba(46, 92, 42, 0.12)); }
@media (min-width: 960px) { .why__art { max-width: 27rem; } }

/* --- Banda CTA --- */
.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--color-green-deep); color: #fff;
  padding-block: clamp(4rem, 7vw, 6.5rem);
  text-align: center;
}
.cta-band::before, .cta-band::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(10px);
}
.cta-band::before { width: 34rem; height: 34rem; left: -12rem; top: -18rem; background: rgba(74, 148, 60, 0.35); }
.cta-band::after { width: 26rem; height: 26rem; right: -10rem; bottom: -14rem; background: rgba(182, 210, 175, 0.18); }
.cta-band h2 { color: #fff; max-width: 18ch; margin-inline: auto; margin-bottom: 1.75rem; font-size: clamp(2rem, 1.3rem + 2.4vw, 3.4rem); }
.cta-band .eyebrow { color: var(--color-sage-200); }
.cta-band__leaf { width: 2.75rem; height: 2.75rem; margin: 0 auto 1.25rem; color: var(--color-sage-200); }

/* --- Banda titolo pagine interne --- */
.page-hero {
  background: var(--color-sage-100);
  padding-block: clamp(2.5rem, 4vw, 4rem) 0;
  overflow: hidden;
}
.page-hero__inner {
  display: grid; gap: 2rem; align-items: end;
}
.page-hero__text { padding-bottom: clamp(2rem, 4vw, 3.5rem); }
.page-hero h1 { margin: 0; color: var(--color-green-ink); }
.page-hero .eyebrow { color: var(--color-green-deep); } /* 6.2:1 su salvia chiaro */
.page-hero__media {
  margin: 0; position: relative; isolation: isolate;
  border-radius: 999px 999px 0 0; overflow: hidden;
  height: clamp(13rem, 32vw, 20rem);
  max-width: 34rem;
}
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__media::after {
  content: ""; position: absolute; inset: 0; mix-blend-mode: multiply;
  background: linear-gradient(180deg, rgba(220, 231, 217, 0.35), rgba(46, 92, 42, 0.35));
}
@media (min-width: 960px) {
  .page-hero__inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 4rem; }
  .page-hero__media { justify-self: end; width: 100%; }
}

/* 9. COMPONENTI DI PAGINA ---------------------------------------------------- */
/* --- Chi sono: biografia + ritratto --- */
.portrait {
  position: relative; width: min(100%, 20rem); margin: 0 auto;
}
.portrait::before {
  content: ""; position: absolute; inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  background: var(--color-sage-100); border-radius: var(--radius-lg); z-index: 0;
}
.portrait img { position: relative; z-index: 1; width: 100%; border-radius: var(--radius-lg); }
@media (min-width: 960px) {
  .portrait { margin: 0 0 0 auto; }
}

/* --- Valori (tipografico, numerato) --- */
.values { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--color-line); }
.value { padding: 1.75rem 0; border-bottom: 1px solid var(--color-line); display: grid; gap: 0.25rem 1.5rem; grid-template-columns: auto 1fr; }
.value__num {
  font-family: var(--font-display); font-size: 2.4rem; font-weight: 500; line-height: 1;
  color: var(--color-green); grid-row: span 2; align-self: start; padding-top: 0.1em;
  font-variation-settings: "opsz" 72;
}
.value h3 { margin: 0; }
.value p { color: var(--color-muted); font-size: 1rem; }
@media (min-width: 640px) {
  .values { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
}

/* --- Metodo: foto circolare --- */
.method__art { position: relative; width: min(100%, 20rem); aspect-ratio: 1; margin-inline: auto; }
.method__art::before {
  content: ""; position: absolute; inset: -1rem; border-radius: 50%;
  border: 1px solid var(--color-sage-200);
}
.method__art::after {
  content: ""; position: absolute; width: 5.5rem; height: 5.5rem; right: -1rem; bottom: 0.5rem;
  border-radius: 50%; background: var(--color-sage-100); z-index: 0;
}
.method__art img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* --- Studio: galleria --- */
.gallery { list-style: none; display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.gallery__item {
  display: block; position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--color-sage-100); aspect-ratio: 800 / 594;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(30, 61, 27, 0.35));
  opacity: 0; transition: opacity var(--dur) var(--ease);
}
.gallery__item:hover::after, .gallery__item:focus-visible::after { opacity: 1; }
.gallery__zoom {
  position: absolute; right: 0.9rem; bottom: 0.9rem; z-index: 1;
  width: 2.5rem; height: 2.5rem; border-radius: 50%; background: rgba(255, 255, 255, 0.92);
  color: var(--color-green-deep); display: grid; place-items: center;
  opacity: 0; transform: translateY(6px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.gallery__item:hover .gallery__zoom, .gallery__item:focus-visible .gallery__zoom { opacity: 1; transform: none; }
@media (min-width: 640px) { .gallery { gap: 1.5rem; } }

/* --- Aree di intervento: blocchi lunghi alternati --- */
.services { list-style: none; counter-reset: service; }
.service {
  display: grid; gap: 1.5rem 3rem; align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  border-top: 1px solid var(--color-line);
}
.service:first-child { border-top: 0; padding-top: 0; }
.service__icon {
  width: min(100%, 15rem); aspect-ratio: 1; margin-inline: auto;
  background: var(--color-sage-50); border-radius: 42% 58% 55% 45% / 50% 45% 55% 50%;
  display: grid; place-items: center; padding: 1.5rem;
}
.service:nth-child(even) .service__icon { background: var(--color-sage-100); border-radius: 55% 45% 42% 58% / 45% 52% 48% 55%; }
.service__icon img { width: 100%; height: 100%; }
.service__num {
  counter-increment: service;
  display: block; margin: 0 0 0.5rem; letter-spacing: 0; text-transform: none;
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; line-height: 1;
  color: var(--color-green); font-variation-settings: "opsz" 72;
}
.service__num::before { content: counter(service, decimal-leading-zero); }
.service h2 { font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.4rem); }
.service__text p { max-width: 60ch; }
@media (min-width: 960px) {
  .service { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  .service:nth-child(even) { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
  .service:nth-child(even) .service__icon { order: 2; }
  .service:nth-child(even) .service__text { order: 1; }
}

/* --- Perché uno psicologo --- */
.reasons-intro__icon { width: min(100%, 15rem); margin-inline: auto; }
.reasons { list-style: none; display: grid; gap: 1rem; margin-top: 1.5rem; }
.reason {
  display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start;
  background: var(--color-white); border-radius: var(--radius); padding: 1.35rem 1.5rem;
  border: 1px solid var(--color-sage-100);
}
.reason__bullet { width: 2.25rem; height: 2.25rem; color: var(--color-green); flex: 0 0 auto; margin-top: 0.05rem; }
.reason p { margin: 0; }
.reasons-outro { margin-top: 2.5rem; max-width: 60ch; }

/* --- Contatti --- */
.contact-cards { list-style: none; display: grid; gap: 1.25rem; }
.contact-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem;
  background: var(--color-sage-50); border: 1px solid transparent; border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2rem); text-decoration: none; color: var(--color-text);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
  min-height: 44px;
}
.contact-card:hover { transform: translateY(-4px); border-color: var(--color-sage-200); color: var(--color-text); }
.contact-card__icon { width: 5rem; height: 5rem; margin-bottom: 0.75rem; }
.contact-card .eyebrow { margin-bottom: 0.25rem; }
.contact-card__value {
  font-family: var(--font-display); font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.25rem); font-weight: 500; line-height: 1.3;
  color: var(--color-green-ink); overflow-wrap: anywhere;
}
.contact-card__hint { font-size: 0.9rem; color: var(--color-muted); display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.5rem; }
.contact-card__hint svg { width: 1em; height: 1em; }
@media (min-width: 640px) { .contact-cards { grid-template-columns: repeat(3, 1fr); } }

.map-frame { border-radius: var(--radius-lg); overflow: hidden; background: var(--color-sage-100); box-shadow: var(--shadow-soft); }
.map-frame iframe { width: 100%; height: 380px; border: 0; }

/* 10. FORM E LIGHTBOX -------------------------------------------------------- */
.form-card {
  background: var(--color-white); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-soft);
}
.form-grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid > .field--full { grid-column: 1 / -1; }
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-family: var(--font-label); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--color-green-deep);
}
.field label .req { color: var(--color-orange-hover); margin-left: 0.15rem; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 0.75rem 1rem;
  background: var(--color-bg); border: 1px solid var(--color-line-strong); border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--color-green); background: #fff;
  box-shadow: 0 0 0 3px rgba(74, 148, 60, 0.2);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: #c0392b; }
.field--check { flex-direction: row; align-items: flex-start; gap: 0.75rem; }
.field--check input {
  width: 1.25rem; height: 1.25rem; min-height: 0; margin: 0.15rem 0 0; padding: 0;
  accent-color: var(--color-green); flex: 0 0 auto;
}
.field--check label {
  font-family: var(--font-body); font-size: 0.95rem; letter-spacing: 0; text-transform: none; color: var(--color-text);
  line-height: 1.5;
}
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-status { margin: 0; min-height: 1.5rem; font-size: 0.98rem; }
.form-status[data-state="success"] { color: var(--color-green-deep); font-weight: 700; }
.form-status[data-state="error"] { color: #a93226; font-weight: 700; }
.form-status[data-state="sending"] { color: var(--color-muted); }
.cf-turnstile { min-height: 0; }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(96vw, 70rem); max-height: 96vh;
  width: auto; color: #fff;
}
.lightbox::backdrop { background: rgba(30, 61, 27, 0.9); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox__inner { position: relative; display: grid; gap: 0.75rem; justify-items: center; }
.lightbox__img { max-height: 82vh; width: auto; max-width: 100%; border-radius: var(--radius); background: var(--color-sage-100); }
.lightbox__caption { margin: 0; font-family: var(--font-label); letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.72rem; color: rgba(255, 255, 255, 0.85); }
.lightbox__btn {
  position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, 0.92); color: var(--color-green-deep); display: grid; place-items: center;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.lightbox__btn:hover { background: #fff; transform: scale(1.05); }
.lightbox__btn svg { width: 20px; height: 20px; }
.lightbox__close { top: 0.75rem; right: 0.75rem; }
.lightbox__prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox__prev:hover { transform: translateY(-50%) scale(1.05); }
.lightbox__next:hover { transform: translateY(-50%) scale(1.05); }

/* Pagina 404 */
.error-page { text-align: center; padding-block: clamp(4rem, 10vw, 8rem); }
.error-page h1 { margin-bottom: 0.5em; }
.error-page p { max-width: 36ch; margin-inline: auto; margin-bottom: 2rem; color: var(--color-muted); }
.error-page p.error-page__num {
  font-family: var(--font-display); font-size: clamp(5rem, 14vw, 9rem); line-height: 1; color: var(--color-sage-200);
  margin-bottom: 0.1em; font-variation-settings: "opsz" 96;
}

/* 11. FOOTER ---------------------------------------------------------------- */
.site-footer {
  background: var(--color-sage-50); border-top: 1px solid var(--color-line);
  padding-block: clamp(3rem, 5vw, 4.5rem) 1.5rem;
  font-size: 0.98rem;
}
.footer-grid { display: grid; gap: 2.5rem; }
.footer-logo { width: 13rem; margin-bottom: 1.5rem; }
.site-footer h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.footer-col p { color: var(--color-text); max-width: 34ch; }
.footer-links { list-style: none; display: grid; gap: 0.35rem; }
.footer-links a {
  display: inline-flex; align-items: center; gap: 0.75rem; min-height: 44px;
  text-decoration: none; color: var(--color-text);
}
.footer-links a:hover { color: var(--color-green-text); }
.footer-links a:hover svg { transform: translateY(-2px); }
.footer-links svg { width: 24px; height: 24px; color: var(--color-green); flex: 0 0 auto; transition: transform var(--dur) var(--ease); }
.footer-links a span { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; transition: text-decoration-color var(--dur) var(--ease); }
.footer-links a:hover span { text-decoration-color: currentColor; }
.footer-nav ul { list-style: none; display: grid; gap: 0.1rem; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-text); text-decoration: none; }
.footer-nav a:hover { color: var(--color-green-text); text-decoration: underline; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--color-line);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
  font-size: 0.85rem; color: var(--color-muted);
}
.footer-bottom p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.25rem; }
.footer-bottom a { color: var(--color-muted); display: inline-flex; align-items: center; min-height: 44px; }
.footer-bottom a:hover { color: var(--color-green-text); }
.footer-bottom .sep { margin-inline: 0.4rem; opacity: 0.6; }
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr; }
}
@media (min-width: 960px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 0.8fr; gap: 3rem; }
}

/* 12. MOTION / UTILITÀ ------------------------------------------------------ */
/* rivelazione allo scroll: attiva solo con JS, invisibile altrimenti → tutto sempre visibile senza JS */
.js .reveal {
  opacity: 0; transform: translateY(1.1rem);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { --reveal-delay: 0.1s; }
.reveal[data-delay="2"] { --reveal-delay: 0.2s; }
.reveal[data-delay="3"] { --reveal-delay: 0.3s; }
.reveal[data-delay="4"] { --reveal-delay: 0.4s; }

@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; scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .hero__scroll::after { animation: none; transform: none; }
}

@media print {
  .site-header, .site-footer, .cta-band, .hero__scroll, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}
