/* ==========================================================================
   Studio Legale Tedeschi — Art direction "Bordeaux Atelier"
   Design system: inchiostro bordeaux, avorio, oro brunito.
   Tipografia editoriale + motion cinematico sobrio (GSAP / Lenis / WebGL).
   ========================================================================== */

:root {
  /* Inchiostro */
  --ink: #1b1715;
  --ink-soft: #4f4741;
  --muted: #7a706a;

  /* Bordeaux */
  --bordeaux: #5a0b1e;
  --bordeaux-deep: #3b0612;
  --bordeaux-deeper: #26040c;
  --bordeaux-soft: #7d1c33;

  /* Neutri caldi */
  --ivory: #fbfaf6;
  --cream: #f5f1ea;
  --pearl: #ece7de;
  --white: #ffffff;

  /* Oro brunito */
  --gold: #b08d57;
  --gold-soft: #cbb185;
  --gold-line: rgba(176, 141, 87, .45);

  --line: rgba(27, 23, 21, .12);
  --line-strong: rgba(27, 23, 21, .22);

  --serif: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1240px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius: 4px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);

  --shadow-soft: 0 30px 80px -40px rgba(38, 4, 12, .45);
  --shadow-card: 0 20px 60px -34px rgba(38, 4, 12, .4);
}

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

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.75;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

[x-cloak] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  color: var(--bordeaux-deep);
}
h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); font-weight: 500; }
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); }

p { margin: 0 0 1.15rem; }

a {
  color: var(--bordeaux);
  text-decoration: none;
  transition: color .3s var(--ease-soft);
}
a:hover { color: var(--bordeaux-soft); }

img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--gold-soft); color: var(--bordeaux-deeper); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container.narrow { max-width: 860px; }
.center { text-align: center; }
.section { padding-block: clamp(5rem, 12vh, 9rem); position: relative; }

/* --- Accessibilità --- */
.skip-link {
  position: fixed; left: -9999px; top: 0; z-index: 400;
  background: var(--bordeaux); color: #fff; padding: .7rem 1.1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

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

/* --- Occhielli e numeri di sezione --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .34em;
  font-size: .68rem;
  font-weight: 500;
  color: var(--gold);
  margin: 0 0 1.2rem;
}
.eyebrow::before {
  content: "";
  width: 2.2rem; height: 1px;
  background: var(--gold-line);
}
.eyebrow.on-light { color: var(--bordeaux); }
.eyebrow.on-light::before { background: var(--line-strong); }

.section-number {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold);
  margin-bottom: 1.4rem;
}

/* --- Bottoni --- */
.btn {
  --btn-fg: var(--ivory);
  --btn-bg: var(--bordeaux);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 1.1rem 2.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--btn-fg);
  background: var(--btn-bg);
  cursor: pointer;
  overflow: hidden;
  transition: color .4s var(--ease-soft), background .4s var(--ease-soft),
              border-color .4s var(--ease-soft), transform .4s var(--ease-soft);
  will-change: transform;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateY(101%);
  transition: transform .5s var(--ease);
  z-index: 0;
}
.btn > * { position: relative; z-index: 1; }
.btn:hover { color: var(--bordeaux-deeper); border-color: var(--gold); }
.btn:hover::after { transform: translateY(0); }

.btn-outline { --btn-fg: var(--bordeaux); --btn-bg: transparent; border-color: var(--line-strong); }
.btn-outline:hover { color: var(--bordeaux-deeper); }

.btn-ghost { --btn-fg: var(--ivory); --btn-bg: transparent; border-color: rgba(251,250,246,.4); }
.btn-ghost:hover { color: var(--bordeaux-deeper); }

.btn-full { width: 100%; }
.btn:disabled, .btn.is-disabled { opacity: .45; cursor: not-allowed; }

/* --- Header ---
   Solido per default (leggibile anche senza JavaScript).
   Trasparente solo in cima alla pagina, quando c'è l'hero dietro (classe .is-top). */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  padding: .85rem 0;
  color: var(--bordeaux-deep);
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 40px -38px rgba(38, 4, 12, .55);
  transition: padding .45s var(--ease), background .45s var(--ease),
              box-shadow .45s var(--ease), border-color .45s var(--ease),
              color .45s var(--ease);
}
.site-header.is-top {
  padding: 1.5rem 0;
  background: transparent;
  color: var(--ivory);
  border-bottom-color: transparent;
  box-shadow: none;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: .9rem; color: inherit; }
.brand:hover { color: inherit; }
.brand-mark {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: .04em;
  transition: transform .6s var(--ease), background .5s var(--ease), color .5s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-8deg); background: var(--gold); color: var(--bordeaux-deeper); border-color: var(--gold); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 1.12rem; font-weight: 500; letter-spacing: .01em; }
.brand-text small {
  font-size: .6rem; letter-spacing: .3em; text-transform: uppercase; opacity: .7;
}

.main-nav { display: flex; align-items: center; gap: 2.2rem; }
.main-nav a {
  color: var(--ink-soft);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
}
.main-nav a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.main-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.main-nav a:hover { color: var(--bordeaux); }
.site-header.is-top .main-nav a { color: rgba(251, 250, 246, .82); }
.site-header.is-top .main-nav a:hover { color: #fff; }

.nav-cta {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: .65rem 1.4rem !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--gold); border-color: var(--gold); color: var(--bordeaux-deeper) !important; }
.site-header.is-top .nav-cta { border-color: rgba(251, 250, 246, .45); }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 6px;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer;
  color: inherit;
}
.nav-toggle span {
  display: block; width: 26px; height: 1.5px; background: currentColor;
  transition: transform .4s var(--ease), opacity .3s var(--ease);
}

/* Menu mobile a tutto schermo */
.mobile-nav {
  position: fixed; inset: 0; z-index: 110;
  background: var(--bordeaux-deeper);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .4rem;
  padding: 2rem;
}
.mobile-nav a {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  color: var(--ivory);
  letter-spacing: .01em;
}
.mobile-nav a:hover { color: var(--gold); }
.mobile-nav .nav-cta {
  margin-top: 2rem; font-family: var(--sans);
  font-size: .78rem !important; letter-spacing: .2em;
}

/* --- Progress line --- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 130;
  background: var(--gold);
  transform: scaleX(0); transform-origin: left;
}

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: var(--ivory);
  background: var(--bordeaux-deeper);
  overflow: hidden;
  isolation: isolate;
}
#hero-canvas {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  display: block;
}

/* Tema 1 — la foto della Giustizia entra nell'hero come sfondo.
   Il canvas WebGL non viene più caricato; l'immagine è un <img> reale,
   quindi resta indicizzabile e ha un alt descrittivo. */
html[data-theme="1"] .hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  /* Tinta già impressa nel JPEG: niente filter a runtime (scroll più fluido). */
  will-change: transform;
}
html[data-theme="1"] .hero::after {
  background:
    linear-gradient(90deg, rgba(38,4,12,.74) 0%, rgba(38,4,12,.48) 38%, rgba(38,4,12,.16) 68%, rgba(38,4,12,.1) 100%),
    radial-gradient(90% 80% at 82% 18%, rgba(176,141,87,.14), transparent 60%),
    linear-gradient(180deg, rgba(38,4,12,.12) 0%, rgba(38,4,12,.32) 60%, rgba(38,4,12,.84) 100%);
}
@media (max-width: 760px) {
  html[data-theme="1"] .hero-photo {
    object-position: 64% center;
  }
  html[data-theme="1"] .hero::after {
    background:
      linear-gradient(180deg, rgba(38,4,12,.46) 0%, rgba(38,4,12,.56) 38%, rgba(38,4,12,.92) 100%);
  }
}

.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 90% at 78% 20%, rgba(176,141,87,.18), transparent 55%),
    linear-gradient(180deg, rgba(38,4,12,.15) 0%, rgba(38,4,12,.55) 62%, rgba(38,4,12,.95) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  padding-block: 11rem 7rem;
  max-width: 960px;
}
.hero .eyebrow { color: var(--gold-soft); }
.hero .eyebrow::before { background: var(--gold-line); }
.hero h1 {
  color: var(--ivory);
  line-height: .98;
  margin-bottom: 1.6rem;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: block; }
.hero h1 em {
  font-style: italic;
  color: var(--gold-soft);
  font-weight: 400;
}
.hero-sub {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.1vw, 1.6rem);
  font-style: italic;
  color: rgba(251,250,246,.86);
  max-width: 640px;
  margin-bottom: 2.6rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-meta {
  position: absolute; z-index: 2;
  left: var(--gutter); right: var(--gutter);
  bottom: 2.2rem;
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1rem;
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(251,250,246,.6);
}
.hero-scroll { display: inline-flex; align-items: center; gap: .7rem; }
.hero-scroll .line-anim {
  width: 54px; height: 1px; background: rgba(251,250,246,.35);
  position: relative; overflow: hidden;
}
.hero-scroll .line-anim::after {
  content: ""; position: absolute; inset: 0;
  background: var(--gold);
  transform: translateX(-100%);
  animation: sweep 2.6s var(--ease) infinite;
}
@keyframes sweep { 0% { transform: translateX(-100%); } 60%,100% { transform: translateX(100%); } }

/* --- Sezioni editoriali --- */
.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head .eyebrow { color: var(--gold); }
.section-lead { color: var(--ink-soft); font-size: 1.12rem; }
.areas-note {
  font-size: .88rem;
  font-style: italic;
  color: var(--bordeaux);
  margin: -.2rem 0 0;
}

/* Profilo */
.profile { background: var(--ivory); }
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 6.5rem);
  align-items: center;
}
.profile-text { max-width: 880px; }
.profile-photo { position: relative; }
.profile-photo img {
  position: relative;
  z-index: 1;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  width: 100%;
}
.profile-photo .frame {
  position: absolute; inset: 22px -22px -22px 22px;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  z-index: 0;
}
.profile-text p { color: var(--ink-soft); }
.profile-text .lead::first-letter {
  font-family: var(--serif);
  font-size: 3.4rem;
  float: left;
  line-height: .82;
  padding: .1em .12em 0 0;
  color: var(--bordeaux);
}
.pull-quote {
  margin: 2.4rem 0 0;
  padding: 0 0 0 1.8rem;
  border-left: 1px solid var(--gold);
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.4;
  color: var(--bordeaux-deep);
}
.pull-quote cite {
  display: block; margin-top: .9rem;
  font-family: var(--sans); font-size: .72rem;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); font-style: normal;
}
.signature {
  font-family: var(--serif); font-style: italic;
  font-size: 1.6rem; color: var(--bordeaux);
  margin-top: 1.6rem;
}

/* Aree di intervento — lista editoriale */
.areas { background: var(--cream); }
.areas-grid {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
.area-card {
  position: relative;
  padding: clamp(2rem, 3.4vw, 3.2rem) clamp(1.4rem, 2.6vw, 2.6rem);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  transition: color .5s var(--ease-soft);
}
.area-card:nth-child(odd) { border-right: 1px solid var(--line); }
.area-card::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--bordeaux);
  transform: translateY(100%);
  transition: transform .6s var(--ease);
  z-index: 0;
}
.area-card:hover::before { transform: translateY(0); }
.area-card > * { position: relative; z-index: 1; }
.area-card:hover { color: var(--ivory); }
.area-card:hover h3, .area-card:hover .area-index { color: var(--ivory); }
.area-card:hover p { color: rgba(251,250,246,.8); }
.area-card:hover .area-link { color: var(--gold-soft); }

.area-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.area-index {
  font-family: var(--serif); font-style: italic;
  font-size: 1rem; color: var(--gold);
  transition: color .5s var(--ease-soft);
}
.area-card h3 { margin-bottom: .7rem; transition: color .5s var(--ease-soft); }
.area-card p { color: var(--ink-soft); margin-bottom: 1.3rem; transition: color .5s var(--ease-soft); }
.area-link {
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--bordeaux); display: inline-flex; align-items: center; gap: .6rem;
  transition: color .5s var(--ease-soft), gap .5s var(--ease);
}
.area-card:hover .area-link { gap: 1rem; }

/* FAQ */
.faq { background: var(--ivory); }
.faq h2 { margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); padding: 1.05rem 0; }
.faq-item summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.35;
  color: var(--bordeaux-deep);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 1.35rem;
  line-height: 1;
  color: var(--gold);
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: .55rem 0 0; color: var(--ink-soft); }

/* Contatti */
.contact { background: var(--bordeaux-deep); color: var(--ivory); }
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.contact .eyebrow { color: var(--gold-soft); }
.contact .eyebrow::before { background: var(--gold-line); }
.contact h2 { color: var(--ivory); }
.contact-intro { color: rgba(251,250,246,.72); max-width: 42ch; }
.contact-list { list-style: none; padding: 0; margin: 2.6rem 0 0; }
.contact-list li {
  padding: 1.15rem 0;
  border-top: 1px solid rgba(251,250,246,.14);
  display: grid; gap: .2rem;
}
.contact-label {
  font-size: .64rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold);
}
.contact-list a, .contact-list span:not(.contact-label) { color: var(--ivory); }
.contact-list a { transition: color .3s var(--ease-soft); }
.contact-list a:hover { color: var(--gold-soft); }

.contact-form-card {
  background: var(--ivory);
  color: var(--ink);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 3rem);
  box-shadow: var(--shadow-soft);
  position: relative;
}
.contact-form-card::before {
  content: "";
  position: absolute; inset: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  pointer-events: none;
}

/* Form */
.contact-form { position: relative; z-index: 1; }
.contact-form .field { margin-bottom: 1.5rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.contact-form label {
  display: block;
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: .55rem;
}
.req { color: var(--bordeaux); }
.opt { color: var(--muted); letter-spacing: .06em; text-transform: none; font-size: .68rem; }

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  padding: .85rem 0;
  border: 0; border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  transition: border-color .4s var(--ease-soft), background .4s var(--ease-soft);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-bottom-color: var(--bordeaux);
}
.contact-form input.is-prefilled {
  border-color: var(--gold);
  background: rgba(176, 141, 87, .12);
  animation: fieldPulse 1.8s var(--ease-soft);
}
@keyframes fieldPulse {
  0% { box-shadow: 0 0 0 0 rgba(176, 141, 87, .35); }
  60% { box-shadow: 0 0 0 8px rgba(176, 141, 87, 0); }
  100% { box-shadow: none; }
}
.contact-form .has-error { border-bottom-color: #b03a2e; background: rgba(176,58,46,.04); }
.field-error { color: #b03a2e; font-size: .78rem; margin: .45rem 0 0; }
.form-alert {
  background: rgba(176,58,46,.08);
  border-left: 2px solid #b03a2e;
  padding: .8rem 1rem; margin-bottom: 1.5rem;
  font-size: .88rem; color: #8f2c22;
}
.field-check { margin: 1.4rem 0 1.9rem; }
.checkbox { display: flex; gap: .8rem; align-items: flex-start; font-weight: 400; font-size: .82rem; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.checkbox input { margin-top: .3rem; width: 1.05rem; height: 1.05rem; accent-color: var(--bordeaux); }
.form-note { font-size: .74rem; color: var(--muted); margin-top: 1.1rem; text-align: center; }

.spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(251,250,246,.4);
  border-top-color: var(--ivory);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-success { text-align: center; padding: 2rem 0; color: var(--bordeaux); }
.form-success svg { margin: 0 auto 1.2rem; color: var(--gold); }
.form-success h3 { color: var(--bordeaux-deep); }
.form-success p { color: var(--ink-soft); margin-bottom: 2rem; }

/* Mappa */
.map-wrap {
  margin-top: clamp(3rem, 7vw, 5.5rem);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(251,250,246,.14);
}
.map-wrap iframe { display: block; width: 100%; min-height: clamp(280px, 38vh, 440px); filter: grayscale(.35) contrast(1.05); }
.map-placeholder {
  min-height: clamp(280px, 38vh, 440px);
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
  background:
    radial-gradient(circle at 50% 28%, rgba(176, 141, 87, .16), transparent 58%),
    linear-gradient(135deg, rgba(176, 141, 87, .1), rgba(176, 141, 87, .02));
}
.map-consent {
  max-width: 440px;
  display: grid;
  justify-items: center;
  gap: .75rem;
}
.map-consent > svg { color: var(--bordeaux); }
.map-consent p { margin: 0; color: var(--ink-soft); }
.map-consent strong {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--bordeaux-deep);
}
.map-consent .btn { margin-top: .35rem; }
.map-consent-note { font-size: .72rem; color: var(--muted); }

/* Pagine legali */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-bottom: 1.4rem;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.breadcrumb a { color: var(--bordeaux); }
.breadcrumb span[aria-current] { color: var(--muted); }
.legal-updated { font-size: .82rem; color: var(--muted); margin-bottom: 1.8rem; }
.legal { background: var(--ivory); padding-top: clamp(9rem, 18vh, 12rem); }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.legal h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-top: 2.4rem; }
.legal p { color: var(--ink-soft); }
.legal-note {
  font-size: .82rem; font-style: italic; color: var(--bordeaux);
  border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 2.6rem;
}
.area-page .lead { font-size: 1.12rem; color: var(--ink-soft); }
.area-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2.2rem 0 2.8rem; }
.area-related { background: var(--cream); }
.area-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem 2rem;
}
.area-related-list a {
  font-family: var(--serif);
  font-size: 1.12rem;
  color: var(--bordeaux);
}
.area-card h3 a,
.area-card-4 h3 a { color: inherit; }
.area-card h3 a:hover,
.area-card-4 h3 a:hover { color: var(--bordeaux); }
@media (max-width: 560px) {
  .area-related-list { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer {
  background: var(--bordeaux-deeper); color: rgba(251,250,246,.66);
  padding: clamp(3.5rem, 8vw, 5.5rem) 0 2.2rem;
  border-top: 1px solid rgba(176,141,87,.2);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr .9fr .9fr 1fr; gap: 2.5rem; }
.footer-brand { font-family: var(--serif); font-size: 1.9rem; color: var(--ivory); margin: 0 0 .6rem; }
.footer-title { font-size: .64rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-bottom: .9rem; }
.footer-note { font-size: .9rem; }
.site-footer a { color: rgba(251,250,246,.78); }
.site-footer a:hover { color: var(--gold-soft); }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.6rem;
  border-top: 1px solid rgba(251,250,246,.1);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  font-size: .74rem; letter-spacing: .04em;
}

/* ==========================================================================
   GDPR Cookie Banner & Gestione Consenso
   ========================================================================== */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 180;
  max-width: 800px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  margin-inline: auto;
  background: rgba(38, 4, 12, 0.98);
  color: rgba(251, 250, 246, 0.9);
  border: 1px solid rgba(176, 141, 87, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(176, 141, 87, 0.15);
  padding: 1.15rem 1.35rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  outline: none;
}
.cookie-banner-inner {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.cookie-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cookie-title-row {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.cookie-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}
.cookie-title {
  font-family: var(--sans);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .02em;
  margin: 0;
  color: var(--cream);
}
.cookie-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(251, 250, 246, 0.7);
  cursor: pointer;
  transition: all .2s ease;
}
.cookie-close:hover,
.cookie-close:focus-visible {
  color: var(--gold);
  border-color: rgba(176, 141, 87, 0.3);
  background: rgba(176, 141, 87, 0.1);
  outline: none;
}
.cookie-content {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.cookie-text {
  margin: 0;
  font-size: .83rem;
  line-height: 1.55;
  color: rgba(251, 250, 246, 0.85);
}
.cookie-banner a {
  color: var(--gold-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-banner a:hover {
  color: var(--cream);
}

/* Pannello preferenze dettagliate */
.cookie-details {
  border-top: 1px solid rgba(176, 141, 87, 0.2);
  padding-top: .85rem;
  margin-top: .2rem;
}
.cookie-pref-group {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.cookie-pref-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(176, 141, 87, 0.18);
  border-radius: calc(var(--radius) - 2px);
  padding: .75rem .95rem;
}
.cookie-pref-info {
  flex: 1 1 auto;
}
.cookie-pref-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.cookie-pref-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--cream);
  cursor: pointer;
}
.cookie-pref-badge {
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .15rem .45rem;
  border-radius: 3px;
  background: rgba(176, 141, 87, 0.25);
  color: var(--gold-soft);
}
.cookie-pref-badge-opt {
  background: rgba(251, 250, 246, 0.12);
  color: rgba(251, 250, 246, 0.7);
}
.cookie-pref-desc {
  margin: .35rem 0 0 0;
  font-size: .75rem;
  line-height: 1.45;
  color: rgba(251, 250, 246, 0.72);
}
.cookie-pref-toggle {
  display: flex;
  align-items: center;
  padding-top: .15rem;
}
.cookie-pref-toggle input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: var(--gold);
}
.cookie-pref-toggle input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: .75;
}

/* Pulsanti azioni banner */
.cookie-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .55rem;
  padding-top: .35rem;
}
.cookie-banner .btn {
  padding: .6rem 1.25rem;
  font-size: .72rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  border-radius: 999px;
  line-height: 1.2;
}
.cookie-banner .btn-primary {
  --btn-bg: var(--gold);
  --btn-fg: #1a0208;
  border-color: var(--gold);
}
.cookie-banner .btn-primary:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  color: #1a0208;
}
.cookie-banner .btn-outline {
  --btn-bg: transparent;
  --btn-fg: var(--cream);
  border-color: rgba(251, 250, 246, 0.35);
}
.cookie-banner .btn-outline:hover {
  border-color: var(--gold);
  color: #1a0208;
}

/* Pulsante preferenze nel footer */
.footer-cookie-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color .2s ease;
}
.footer-cookie-btn:hover,
.footer-cookie-btn:focus-visible {
  color: var(--gold-soft);
  outline: none;
}

/* Card di gestione cookie nella pagina Cookie Policy */
.cookie-manage-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin: 1.8rem 0 2.2rem;
  padding: 1.3rem 1.6rem;
  background: rgba(38, 4, 12, 0.04);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
}
.cookie-manage-text h3 {
  margin: 0 0 .3rem 0;
  font-size: 1.05rem;
  color: var(--bordeaux);
}
.cookie-manage-text p {
  margin: 0;
  font-size: .84rem;
  color: var(--ink-soft);
}
.cookie-manage-card .btn {
  padding: .75rem 1.5rem;
  font-size: .74rem;
}

/* Tabelle informative legali */
.legal-table-wrap {
  overflow-x: auto;
  margin: 1.4rem 0 1.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
  text-align: left;
}
.legal-table th,
.legal-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.legal-table th {
  background: rgba(0, 0, 0, 0.03);
  font-weight: 600;
  color: var(--bordeaux);
  letter-spacing: .02em;
}
.legal-table td {
  color: var(--ink-soft);
  line-height: 1.45;
}
.legal-table tr:last-child td {
  border-bottom: none;
}
.legal-table code {
  font-size: .82rem;
  padding: .15rem .35rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
  color: var(--bordeaux);
}

/* --- Reveal inline (fallback senza JS: sempre visibile) --- */
.motion-off [data-reveal],
.motion-off [data-reveal-child] > * { opacity: 1 !important; }

/* --- Responsive --- */
@media (max-width: 980px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .profile-grid, .contact-grid { grid-template-columns: 1fr; }
  .profile-photo { max-width: 460px; }
  .areas-grid { grid-template-columns: 1fr; }
  .area-card:nth-child(odd) { border-right: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .hero-meta { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-delay: 0s !important;
  }
  html { scroll-behavior: auto !important; }
}

/* ==========================================================================
   Motion — reveal allo scroll + entrata hero (leggero, nativo)
   ========================================================================== */

html { scroll-behavior: smooth; }

/* Offset per l'header fisso quando si naviga con gli anchor */
[id] { scroll-margin-top: 104px; }

/* Hero: entrata in scena immediata */
.hero-anim { animation: heroRise 1s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes heroRise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

/* Reveal on-scroll (attivo solo con html.motion) */
html.motion .reveal { opacity: 0; transform: translateY(22px); }
html.motion .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease) var(--d, 0s),
              transform .7s var(--ease) var(--d, 0s);
}

html.motion [data-stagger] > * { opacity: 0; transform: translateY(20px); }
html.motion [data-stagger].is-in > * {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
html.motion [data-stagger].is-in > *:nth-child(1) { transition-delay: .03s; }
html.motion [data-stagger].is-in > *:nth-child(2) { transition-delay: .08s; }
html.motion [data-stagger].is-in > *:nth-child(3) { transition-delay: .13s; }
html.motion [data-stagger].is-in > *:nth-child(4) { transition-delay: .18s; }
html.motion [data-stagger].is-in > *:nth-child(5) { transition-delay: .23s; }
html.motion [data-stagger].is-in > *:nth-child(6) { transition-delay: .28s; }
html.motion [data-stagger].is-in > *:nth-child(7) { transition-delay: .33s; }
html.motion [data-stagger].is-in > *:nth-child(8) { transition-delay: .38s; }

/* --- Menu mobile aperto: header trasparente sopra l'overlay scuro --- */
body.nav-open { overflow: hidden; }
body.nav-open .site-header {
  background: transparent;
  color: var(--ivory);
  border-bottom-color: transparent;
  box-shadow: none;
}
body.nav-open .main-nav a,
body.nav-open .brand { color: var(--ivory); }

/* --- Icone aree --- */
.area-icon { color: var(--gold); display: inline-flex; transition: color .5s var(--ease-soft); }
.area-icon svg { width: 30px; height: 30px; }
.area-card:hover .area-icon { color: var(--gold-soft); }

/* ==========================================================================
   Preventivo (dopo la mappa)
   ========================================================================== */

.quote { background: var(--white); }
.quote-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 2.2rem;
}
.quote-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.quote-tab {
  flex: 1 1 200px;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: 1.15rem 1.4rem;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: background .35s var(--ease-soft), color .35s var(--ease-soft);
}
.quote-tab:last-child { border-right: 0; }
.quote-tab:hover { color: var(--bordeaux); background: var(--cream); }
.quote-tab.is-active {
  background: var(--bordeaux);
  color: var(--ivory);
}
.quote-tab-index {
  font-family: var(--serif);
  font-style: italic;
  font-size: .82rem;
  letter-spacing: 0;
  color: var(--gold);
}
.quote-tab.is-active .quote-tab-index { color: var(--gold-soft); }

.quote-panel { padding: clamp(1.6rem, 3.4vw, 2.6rem); }
.quote-panel h3 { margin-bottom: 1.4rem; }
.quote-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .1rem 2.2rem;
}
.quote-list li {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
  color: var(--ink-soft);
}
.quote-list li strong { color: var(--ink); font-weight: 600; }
.quote-check {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  margin-top: .18rem;
  display: grid; place-items: center;
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  color: var(--bordeaux);
  background: var(--white);
}
.quote-footnote {
  margin: 1.4rem 0 0;
  font-size: .8rem;
  font-style: italic;
  color: var(--muted);
}

.quote-price {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.4rem, 3vw, 2.4rem);
  align-items: start;
  padding: clamp(1.8rem, 3.4vw, 2.8rem);
  border-radius: var(--radius);
  background: var(--bordeaux-deep);
  color: var(--ivory);
}
.quote-price-label {
  font-size: .64rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold);
}
.quote-price-value {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.05;
  margin: .4rem 0 .3rem;
  color: var(--ivory);
}
.quote-price-value small {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .1em;
  margin-left: .2rem;
  color: rgba(251, 250, 246, .7);
}
.quote-price-value.is-market {
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  color: rgba(251, 250, 246, .55);
}
.quote-price-value.is-market s {
  text-decoration-thickness: 1px;
  text-decoration-color: var(--gold-line);
}
.quote-price-note {
  font-size: .8rem;
  margin: 0;
  color: rgba(251, 250, 246, .68);
  max-width: 44ch;
}
.quote-price-main { padding: .4rem 0; }
.quote-price-yours {
  padding-left: clamp(1rem, 3vw, 2.2rem);
  border-left: 1px solid rgba(251, 250, 246, .18);
}
.quote-price-server .quote-price-value { color: var(--gold-soft); }

.quote-perks {
  grid-column: 1 / -1;
  list-style: none;
  margin: .4rem 0 0;
  padding: clamp(1.2rem, 2.4vw, 1.6rem) 0 0;
  border-top: 1px solid rgba(251, 250, 246, .18);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem 2rem;
}
.quote-perks li { display: grid; gap: .35rem; }
.quote-perk-title {
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.quote-perk-text { font-size: .86rem; color: rgba(251, 250, 246, .74); line-height: 1.55; }

.quote-price-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-top: .6rem;
}
.quote-cta { display: grid; gap: .9rem; justify-items: start; }
.quote-cta .btn { --btn-bg: var(--gold); --btn-fg: var(--bordeaux-deeper); }
.quote-cta .btn:hover { color: var(--bordeaux-deeper); }
.quote-price-disclaimer { max-width: 52ch; }

/* ==========================================================================
   Selettore tema (footer)
   ========================================================================== */

.footer-themes {
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(251, 250, 246, .1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem 1.2rem;
}
.footer-themes .footer-title { margin: 0; }
.theme-switch { display: inline-flex; gap: .5rem; flex-wrap: wrap; }
.theme-link {
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .45rem .95rem;
  border: 1px solid rgba(251, 250, 246, .22);
  border-radius: 999px;
  color: rgba(251, 250, 246, .7);
  transition: all .35s var(--ease-soft);
}
.theme-link:hover {
  border-color: var(--gold);
  color: var(--gold-soft);
}
.theme-link.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bordeaux-deeper);
}

@media (max-width: 980px) {
  .quote-list { grid-template-columns: 1fr; }
  .quote-price { grid-template-columns: 1fr; }
  .quote-price-yours { padding-left: 0; border-left: 0; border-top: 1px solid rgba(251, 250, 246, .18); padding-top: 1.2rem; }
  .quote-perks { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .quote-tab { flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .quote-tab:last-child { border-bottom: 0; }
}



/* ==========================================================================
   Miglioramenti UI/UX — nav attiva, torna su, link mappa, toggle animato
   ========================================================================== */

/* Nav: sezione corrente (scroll-spy) */
.main-nav a.is-current { color: var(--bordeaux); }
.main-nav a.is-current::after { transform: scaleX(1); transform-origin: left; }
.site-header.is-top .main-nav a.is-current { color: #fff; }
.main-nav .nav-cta.is-current::after { display: none; }

/* Hamburger animato → diventa una X quando il menu è aperto */
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Hero: indicatore "Scorri" ora è un link */
a.hero-scroll { color: inherit; }
a.hero-scroll:hover { color: var(--gold-soft); }

/* Link "Apri in Google Maps" sotto la mappa */
.map-link { margin: 1.2rem 0 0; }
.map-open {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold-soft);
}
.map-open svg { transition: transform .4s var(--ease); }
.map-open:hover { color: var(--gold); }
.map-open:hover svg { transform: translate(2px, -2px); }

/* Pulsante "Torna su" */
.to-top {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  z-index: 140;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  background: var(--bordeaux);
  color: var(--ivory);
  cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .4s var(--ease), transform .4s var(--ease),
              visibility .4s var(--ease), background .35s var(--ease), color .35s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--gold); color: var(--bordeaux-deeper); border-color: var(--gold); }
/* Non sovrapporsi al cookie banner quando è visibile */
.cookie-banner ~ * .to-top { bottom: 6rem; }

/* ==========================================================================
   Profilo: sottotitolo "Profilo professionale"
   ========================================================================== */
.profile-sub {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  margin: 2.2rem 0 .9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  color: var(--bordeaux);
}

/* Elenchi puntati nelle pagine legali */
.legal-list { margin: 0 0 1.15rem; padding-left: 1.2rem; color: var(--ink-soft); }
.legal-list li { margin-bottom: .5rem; }

/* ==========================================================================
   Rifiniture mobile (UI/UX)
   ========================================================================== */
@media (max-width: 760px) {
  .section { padding-block: clamp(3.4rem, 10vh, 5rem); }
  [id] { scroll-margin-top: 82px; }

  /* Header più compatto su mobile */
  .site-header { padding: .7rem 0; }
  .site-header.is-top { padding: 1rem 0; }
  .brand-mark { width: 40px; height: 40px; font-size: .95rem; }
  .brand-text strong { font-size: 1rem; }
  .brand-text small { font-size: .54rem; letter-spacing: .22em; }

  /* Hero: più respiro e titolo proporzionato */
  .hero-inner { padding-block: 8.5rem 6rem; }
  .hero-sub { margin-bottom: 2rem; }
  .hero-meta { bottom: 1.4rem; font-size: .62rem; }

  /* Profilo: foto sopra, testo sotto, centrata */
  .profile-photo { margin-inline: auto; }
  .profile-text .lead::first-letter { font-size: 2.8rem; }

  /* Card contatti e form: padding gestibile */
  .contact-list li { padding: .95rem 0; }
  .to-top { width: 42px; height: 42px; }
}

@media (max-width: 560px) {
  .cookie-banner { left: .5rem; right: .5rem; bottom: .5rem; padding: .9rem 1rem; }
  .cookie-actions { flex-direction: column; width: 100%; gap: .45rem; }
  .cookie-actions .btn { width: 100%; }
  .cookie-pref-item { flex-direction: column; gap: .5rem; }
  .cookie-pref-toggle { align-self: flex-end; }
  .cookie-manage-card { flex-direction: column; align-items: flex-start; }
  .cookie-manage-card .btn { width: 100%; }
}

@media (max-width: 480px) {
  .brand-text small { display: none; }
  .footer-bottom { font-size: .68rem; }
}

/* Laptop con poca altezza (es. 1366×768, browser con zoom): più compatto */
@media (min-width: 981px) and (max-height: 820px) {
  .section { padding-block: clamp(3.5rem, 8vh, 6rem); }
  .hero-inner { padding-block: 8rem 5rem; }
  .map-wrap { margin-top: clamp(2rem, 5vw, 4rem); }
  .map-wrap iframe { min-height: clamp(240px, 34vh, 380px); }
  .contact-form-card { padding: clamp(1.5rem, 2.6vw, 2.4rem); }
  .contact-form .field { margin-bottom: 1.15rem; }
}

/* Touch: niente hover "appiccicoso" sul magnetismo dei bottoni */
@media (hover: none) {
  .area-card:hover::before { transform: translateY(100%); }
  .area-card:active::before { transform: translateY(0); }
}
