/* =========================================================
   giuliafigliuolopsicologa.it — foglio di stile principale
   ========================================================= */

/* ---------- 1. Design token ---------- */
:root {
  /* Colori: il petrolio è ripreso dalla parete dello studio */
  --teal-900: #082e34;
  --teal-800: #0b3a40;
  --teal-700: #10646f;
  --teal-600: #157c8a;
  --teal-500: #1f97a6;
  --teal-100: #d6ebee;
  --teal-50:  #eaf5f6;

  --ochre-600: #a97a26;
  --ochre-500: #c79237;

  --sand-50:  #fdfbf8;
  --sand-100: #f7f1e9;
  --sand-200: #ece3d7;

  --ink:      #14262a;
  --ink-soft: #3d5359;
  --muted:    #6b8085;

  --white: #fff;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-head: 'Lora', Georgia, 'Times New Roman', serif;

  --radius-sm: 10px;
  --radius:    18px;
  --radius-lg: 28px;
  --radius-xl: 40px;

  --shadow-sm: 0 1px 2px rgba(8, 46, 52, .05), 0 2px 8px rgba(8, 46, 52, .04);
  --shadow:    0 4px 12px rgba(8, 46, 52, .06), 0 16px 40px rgba(8, 46, 52, .07);
  --shadow-lg: 0 10px 30px rgba(8, 46, 52, .10), 0 30px 70px rgba(8, 46, 52, .12);

  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 76px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--sand-50);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, .97rem + .15vw, 1.0625rem);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.015em;
  color: var(--teal-900);
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.2rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.85rem, 1.35rem + 2vw, 2.85rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .4vw, 1.35rem); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--teal-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-600); }

ul { margin: 0; padding: 0; list-style: none; }

sup { font-size: .62em; vertical-align: super; line-height: 0; }

::selection { background: var(--teal-100); color: var(--teal-900); }

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

/* ---------- 3. Utility ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 999;
  background: var(--teal-800);
  color: var(--white);
  padding: .7rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; color: var(--white); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal-600);
}
.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
  opacity: .6;
}
.center .eyebrow::after {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

/* ---------- 4. Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .72rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 100px;
  font: 600 .95rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s var(--ease),
              box-shadow .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 1.1em; height: 1.1em; }

.btn-primary {
  background: var(--teal-700);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(16, 100, 111, .28);
}
.btn-primary:hover { background: var(--teal-600); color: var(--white); box-shadow: 0 10px 24px rgba(16, 100, 111, .34); }

.btn-ghost {
  background: transparent;
  color: var(--teal-800);
  border-color: rgba(16, 100, 111, .3);
}
.btn-ghost:hover { background: var(--white); border-color: var(--teal-600); color: var(--teal-800); box-shadow: var(--shadow-sm); }

.btn-lg { padding: .95rem 1.7rem; font-size: 1rem; }

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 251, 248, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--sand-200);
  box-shadow: 0 4px 24px rgba(8, 46, 52, .05);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--teal-700), var(--teal-900));
  color: var(--white);
  font: 600 .95rem/1 var(--font-head);
  letter-spacing: .04em;
}
.brand-text { display: grid; line-height: 1.3; }
.brand-text strong {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--teal-900);
  letter-spacing: -.01em;
}
.brand-text span { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Navigazione */
.nav { display: flex; align-items: center; gap: 2rem; }
.nav-list { display: flex; align-items: center; gap: .3rem; }

.nav-list > li > a {
  display: inline-block;
  padding: .55rem .85rem;
  border-radius: 100px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-list > li > a:hover,
.nav-list > li > a.is-active { color: var(--teal-800); background: var(--teal-50); }

/* Sottomenu servizi */
.has-sub { position: relative; }
.subnav {
  position: absolute;
  top: calc(100% + .5rem);
  left: 50%;
  translate: -50% 0;
  min-width: 250px;
  padding: .5rem;
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.has-sub:hover .subnav,
.has-sub:focus-within .subnav { opacity: 1; visibility: visible; transform: translateY(0); }
.subnav a {
  display: block;
  padding: .5rem .8rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.subnav a:hover { background: var(--teal-50); color: var(--teal-800); }

.nav-cta { padding: .6rem 1.1rem; font-size: .9rem; }

/* Hamburger */
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--sand-200);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--teal-800);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 6. Hero ---------- */
.hero { position: relative; padding: clamp(2.5rem, 1.5rem + 4vw, 5rem) 0 clamp(3rem, 2rem + 4vw, 5.5rem); overflow: hidden; }

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 78% -10%, var(--teal-50) 0%, transparent 62%),
    radial-gradient(45rem 35rem at 5% 15%, #fdf6ec 0%, transparent 60%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  right: -14%;
  top: -22%;
  width: 46rem;
  height: 46rem;
  border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  background: linear-gradient(160deg, rgba(31,151,166,.10), rgba(16,100,111,.05));
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.hero h1 { margin-bottom: 1.1rem; }

.lead {
  max-width: 34em;
  font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem);
  color: var(--ink-soft);
  line-height: 1.75;
}
.lead strong { color: var(--teal-800); font-weight: 600; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin: 2rem 0 2.2rem;
}

.hero-badges { display: grid; gap: .6rem; }
.hero-badges li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .93rem;
  color: var(--ink-soft);
}
.hero-badges .icon {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: .32rem;
  color: var(--teal-600);
  stroke-width: 2.2;
}

/* Ritratto */
.hero-figure { position: relative; margin: 0; }
.hero-figure-frame {
  position: relative;
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 6rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 4;
  background: var(--teal-100);
}
.hero-figure-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-figure::before {
  content: "";
  position: absolute;
  inset: auto -1.5rem -1.5rem auto;
  width: 62%;
  height: 62%;
  border: 1px solid rgba(16, 100, 111, .22);
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 6rem;
  z-index: -1;
}

/* ---------- 7. Sezioni ---------- */
.section { padding: clamp(3.5rem, 2rem + 5.5vw, 6.5rem) 0; }
.section-alt { background: var(--sand-100); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.2rem, 4vw, 3.5rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-bottom: .5rem; }
.section-sub {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 42em;
}
.center .section-sub { margin-inline: auto; }

/* ---------- 8. Chi sono ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.about-text { color: var(--ink-soft); }
.text-intro {
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 1.05rem + .5vw, 1.42rem);
  line-height: 1.55;
  color: var(--teal-900);
}

.about-side { position: sticky; top: calc(var(--header-h) + 1.5rem); display: grid; gap: 1.25rem; }

.card {
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .35rem; }
.card-note { font-size: .9rem; color: var(--muted); margin-bottom: 1.1rem; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li {
  padding: .4rem .85rem;
  border-radius: 100px;
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  font-size: .84rem;
  font-weight: 500;
  color: var(--teal-800);
}

.facts { margin: 0; display: grid; gap: 0; }
.facts > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: .85rem 0;
  border-top: 1px solid var(--sand-200);
}
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: .2rem;
}
.facts dd { margin: 0; font-size: .95rem; color: var(--ink); }

/* ---------- 9. Griglia servizi ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.15rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.75rem;
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--teal-100);
  box-shadow: var(--shadow);
  color: inherit;
}

.service-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 1.15rem;
  border-radius: 16px;
  background: var(--teal-50);
  color: var(--teal-700);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.service-icon .icon { width: 26px; height: 26px; }
.service-card:hover .service-icon { background: var(--teal-700); color: var(--white); }

.service-card h3 { margin-bottom: .45rem; }
.service-card p { font-size: .93rem; color: var(--ink-soft); margin-bottom: 1.4rem; }

.service-more {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: auto;
  font-size: .85rem;
  font-weight: 600;
  color: var(--teal-700);
}
.service-more .icon { width: 1rem; height: 1rem; transition: transform .3s var(--ease); }
.service-card:hover .service-more .icon { transform: translateX(4px); }

/* ---------- 10. Dettaglio servizi ---------- */
.detail-section { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }

.detail {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.detail-aside { display: flex; align-items: center; gap: 1.25rem; }
.detail-num {
  font: 600 clamp(2.6rem, 2rem + 2vw, 3.6rem)/1 var(--font-head);
  color: var(--teal-100);
  letter-spacing: -.03em;
}
.section-alt .detail-num { color: #dfe9e6; }
.detail-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  flex: none;
  border-radius: 18px;
  background: linear-gradient(150deg, var(--teal-700), var(--teal-900));
  color: var(--white);
  box-shadow: 0 8px 20px rgba(11, 58, 64, .22);
}
.detail-icon .icon { width: 28px; height: 28px; }

.detail-body { max-width: 46em; color: var(--ink-soft); }
.detail-body h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.15rem); margin-bottom: .8rem; }

.pull-quote {
  padding-left: 1.25rem;
  border-left: 3px solid var(--teal-500);
  font-family: var(--font-head);
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--teal-800);
}

.list-check { display: grid; gap: .85rem; margin-top: .5rem; }
.list-check li { display: flex; align-items: flex-start; gap: .75rem; }
.list-check .icon {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .35rem;
  color: var(--teal-600);
  stroke-width: 2.2;
}

/* ---------- 11. Citazione ---------- */
.quote-band {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(20rem, 38vw, 30rem);
  padding: clamp(3rem, 6vw, 5rem) 0;
  overflow: hidden;
  isolation: isolate;
}
.quote-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}
.quote-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, rgba(8, 46, 52, .88) 0%, rgba(11, 58, 64, .74) 55%, rgba(16, 100, 111, .55) 100%);
}
.quote-inner { max-width: 58rem; text-align: center; }
.quote-band blockquote { margin: 0; }
.quote-band blockquote p {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 1rem + 1.7vw, 2.15rem);
  line-height: 1.45;
  color: var(--white);
  text-wrap: balance;
}
.quote-band em { color: var(--teal-100); font-style: italic; }

/* ---------- 12. Galleria studio ---------- */
.gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--sand-200);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-tall { grid-column: 2; grid-row: 1 / span 2; }
.gallery-tall img { object-position: 50% 60%; }
.gallery-item:not(.gallery-tall) { aspect-ratio: 16 / 10; }

/* ---------- 13. Contatti ---------- */
.section-contact { background: var(--sand-100); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.15rem;
}
.contact-card {
  display: block;
  padding: 1.9rem 1.6rem;
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg);
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.contact-card:hover {
  transform: translateY(-5px);
  border-color: var(--teal-100);
  box-shadow: var(--shadow);
  color: inherit;
}
.contact-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-700);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.contact-icon .icon { width: 24px; height: 24px; }
.contact-card:hover .contact-icon { background: var(--teal-700); color: var(--white); }

.contact-card h3 {
  font-family: var(--font-body);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .5rem;
}
.contact-value {
  font-family: var(--font-head);
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--teal-900);
  margin-bottom: .4rem;
  overflow-wrap: break-word;
}
/* L'indirizzo email è lungo: va rimpicciolito per non spezzarsi a metà parola */
.contact-value-email { font-size: .95rem; letter-spacing: -.01em; }
.contact-note { font-size: .84rem; color: var(--muted); margin: 0; }

.contact-hours {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  margin: 2rem 0 0;
  font-size: .95rem;
  color: var(--ink-soft);
}
.contact-hours .icon { width: 1.15rem; height: 1.15rem; color: var(--teal-600); }

/* ---------- 14. Footer ---------- */
.site-footer {
  background: var(--teal-900);
  color: rgba(255, 255, 255, .74);
  font-size: .93rem;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-block: clamp(3rem, 5vw, 4.5rem) 2.5rem;
}
.site-footer h2 {
  font-family: var(--font-body);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal-500);
  margin-bottom: 1.1rem;
}
.site-footer a { color: rgba(255, 255, 255, .8); text-decoration: none; transition: color .2s var(--ease); }
.site-footer a:hover { color: var(--white); text-decoration: underline; }

.footer-brand .brand-mark { margin-bottom: 1.1rem; background: rgba(255, 255, 255, .1); }
.footer-name {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: .35rem;
}
.footer-role { font-size: .88rem; line-height: 1.6; margin: 0; }

.footer-nav ul, .footer-contact ul { display: grid; gap: .6rem; }
.footer-contact li { display: flex; align-items: flex-start; gap: .65rem; }
.footer-contact .icon { width: 1.1rem; height: 1.1rem; margin-top: .3rem; color: var(--teal-500); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .84rem;
}
.footer-bottom p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.footer-links .sep { opacity: .4; }

/* ---------- 15. Torna su ---------- */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--teal-800);
  color: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s, background-color .2s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--teal-700); color: var(--white); }
.to-top .icon { width: 20px; height: 20px; transform: rotate(-90deg); }

/* Banner informativo cookie */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: clamp(.75rem, 2.5vw, 1.5rem);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  width: min(46rem, calc(100% - 2rem));
  padding: 1rem 1.25rem 1rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translate(-50%, 1rem);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.cookie-banner.is-visible { opacity: 1; transform: translate(-50%, 0); }
.cookie-text { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--ink-soft); }
.cookie-text a { color: var(--teal-700); text-decoration: underline; text-underline-offset: 2px; }
.cookie-ok { flex-shrink: 0; }

@media (max-width: 640px) {
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: left; }
}

/* ---------- 16. Animazioni allo scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 17. Pagine legali ---------- */
.legal { padding: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) 0 clamp(3.5rem, 2rem + 5.5vw, 6.5rem); }
.legal-inner { max-width: 46rem; overflow-wrap: break-word; }
.legal-back { flex-shrink: 0; padding: .7rem 1.1rem; }
.legal h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 3rem); margin-bottom: .6rem; }
.legal-updated { color: var(--muted); font-size: .9rem; margin-bottom: 2.5rem; }
.legal h2 {
  font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem);
  margin: 2.6rem 0 .9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--sand-200);
}
.legal h3 { font-size: 1.08rem; margin: 1.6rem 0 .6rem; }
.legal ul { list-style: disc; padding-left: 1.3rem; margin: 0 0 1.15em; }
.legal li { margin-bottom: .45rem; }
.legal-box {
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius);
  margin-bottom: 1.15em;
}
.legal-box p:last-child { margin-bottom: 0; }

/* ---------- 18. Responsive ---------- */
@media (max-width: 1040px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-side { position: static; }
  .detail { grid-template-columns: 1fr; }
  .detail-aside { margin-bottom: .5rem; }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 26rem; margin-inline: auto; }
  .hero-figure-frame { aspect-ratio: 1 / 1; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .gallery-tall { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 10; }
  .gallery-tall img { object-position: 50% 70%; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    display: block;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 1.25rem var(--gutter) 2rem;
    background: var(--sand-50);
    border-bottom: 1px solid var(--sand-200);
    box-shadow: 0 20px 40px rgba(8, 46, 52, .1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }

  .nav-list { display: block; }
  .nav-list > li > a {
    display: block;
    padding: .8rem .25rem;
    font-size: 1.05rem;
    border-radius: 0;
    border-bottom: 1px solid var(--sand-200);
  }
  .nav-list > li > a:hover, .nav-list > li > a.is-active { background: transparent; }

  .subnav {
    position: static;
    translate: none;
    min-width: 0;
    padding: .35rem 0 .5rem .5rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: 0;
    border-left: 2px solid var(--teal-100);
    border-radius: 0;
    box-shadow: none;
    margin-left: .25rem;
  }
  .subnav a { padding: .45rem .7rem; }

  .nav-cta { display: inline-flex; margin-top: 1.25rem; width: 100%; }
}

@media (max-width: 640px) {
  :root { --header-h: 68px; }
  .brand-text strong { font-size: .95rem; }
  .brand-text span { font-size: .68rem; }
  .hero-actions .btn { width: 100%; }
  .gallery { grid-template-columns: 1fr; grid-template-rows: none; }
  .gallery-tall { grid-row: auto; grid-column: auto; }
  .gallery-item { aspect-ratio: 4 / 3 !important; }
  .facts > div { grid-template-columns: 1fr; gap: .2rem; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: flex-start; }
}

@media (max-width: 380px) {
  .brand-text span { display: none; }
  .legal-back { padding: .6rem .85rem; font-size: .85rem; }
}

/* ---------- 19. Preferenze utente ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .nav, .to-top, .quote-bg, .gallery, .cookie-banner { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
}
