/* ConValore — sito parallasse. Brand: verde scuro, oro, crema. Sotheby's:
   niente gradienti, niente ombre decorative, box rettangolari taglienti. */

:root {
  --verde: #0a1f18;
  --verde-2: #1f4a3d;
  --oro: #d4a637;
  --oro-2: #d9a84b;
  --crema: #faf6ec;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  background: var(--verde);
  color: var(--crema);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Accessibilità: skip-link + sr-only ---------- */
/* Skip-link: nascosto, compare in alto a sinistra solo al focus da tastiera.
   Squadrato + palette brand (verde/oro/crema), coerente con l'estetica Sotheby's. */
.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 200;
  padding: 0.85rem 1.2rem;
  background: var(--verde);
  color: var(--crema);
  border: 1px solid var(--oro);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 16px; outline: 2px solid var(--oro); outline-offset: 2px; }
/* Testo solo per screen reader (es. l'h1 di pagina): invisibile a schermo. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--verde);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.6s ease;
}
.preloader.is-hidden { opacity: 0; pointer-events: none; }
.preloader__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--crema);
  letter-spacing: -0.02em;
}
.preloader__brand span { color: var(--oro); }
.preloader__bar {
  width: min(280px, 60vw);
  height: 2px;
  background: rgba(250, 246, 236, 0.18);
  overflow: hidden;
}
.preloader__fill { width: 0%; height: 100%; background: var(--oro); transition: width 0.2s linear; }
.preloader__label {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(250, 246, 236, 0.55);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem clamp(1.5rem, 5vw, 4rem);
  background: rgba(10, 31, 24, 0.62); /* scrim piatto: leggibile su ogni frame, niente artefatto blu */
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--crema);
  letter-spacing: -0.01em;
}
.nav__brand span { color: var(--oro); }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); }
.nav__links a {
  color: var(--crema);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav__cta {
  border: 1px solid var(--crema);
  padding: 0.6rem 1.1rem;
}
/* Touch target >= 44px sui link di navigazione (puntatore grossolano = dito) */
@media (pointer: coarse) {
  .nav__links a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- Scrub hero ---------- */
.scrub {
  position: relative;
  height: 620vh; /* container alto: definisce quanto scroll = sequenza intera */
}
.scrub__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh; /* coerente col drawer: la barra URL mobile non taglia hint/canvas */
  overflow: hidden;
}
.scrub__canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--verde); /* fallback verde se un frame non carica (mai nero) */
}
/* Layer scritte pop-up */
.captions {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.caption {
  position: absolute;
  opacity: 0;
  max-width: min(540px, 82vw);
  padding: 1.5rem 1.8rem 1.6rem;
  background: rgba(10, 31, 24, 0.66); /* verde piatto semi-trasparente, no gradiente */
  border: 1px solid rgba(212, 166, 55, 0.3); /* cornice oro tenue (luxury) */
  border-top: 2px solid var(--oro); /* accento oro più marcato in alto */
  border-radius: 16px; /* arrotondate (richiesta Mario): più armoniche/eleganti */
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4); /* galleggiano sopra la scena */
  transform: translateY(var(--y, 22px));
  filter: blur(var(--blur, 0px)); /* "focus-in": sfuocate fuori scena, nitide a fuoco */
  will-change: opacity, transform; /* niente 'filter': non promuovere layer permanenti per le caption off-screen */
}
.caption--bl { left: clamp(1.5rem, 5vw, 4rem); bottom: clamp(3rem, 10vh, 7rem); }
.caption--tr { right: clamp(1.5rem, 5vw, 4rem); top: clamp(16vh, 20vh, 22vh); text-align: right; }
.caption--center {
  left: 50%;
  bottom: clamp(4rem, 14vh, 9rem);
  transform: translateX(-50%) translateY(var(--y, 22px));
  text-align: center;
  max-width: min(680px, 86vw);
}
.caption__tag {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--crema); /* crema (non oro): leggibile su frame chiari (AA); l'accento oro resta sul bordo */
  margin-bottom: 0.7rem;
}
.caption__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 2.8rem);
  line-height: 1.12;
  color: var(--crema);
  letter-spacing: -0.01em;
}

.scrub__hint {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: min(90vw, 30rem);
  text-align: center;
  line-height: 1.5;
  padding: 0.7rem 1.3rem 0.9rem;
  background: rgba(10, 31, 24, 0.66); /* scrim verde: la scritta si legge su OGNI frame */
  border-top: 2px solid var(--oro);
  color: var(--crema);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: opacity 0.4s ease;
}
/* "Scorri" evidenziato in oro per essere subito intuitivo */
.scrub__hint b { color: var(--oro); font-weight: 700; }
/* Doppia freccia (chevron) oro che rimbalza verso il basso = "scorri giù" */
.scrub__hint i {
  position: relative;
  width: 18px;
  height: 22px;
  animation: hintBounce 1.5s ease-in-out infinite;
}
.scrub__hint i::before,
.scrub__hint i::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 11px;
  height: 11px;
  border-right: 2.5px solid var(--oro);
  border-bottom: 2.5px solid var(--oro);
  transform: translateX(-50%) rotate(45deg);
}
.scrub__hint i::before { top: 0; }
.scrub__hint i::after { top: 8px; opacity: 0.55; }
@keyframes hintBounce {
  0%, 100% { transform: translateY(0); opacity: 0.85; }
  50% { transform: translateY(7px); opacity: 1; }
}

/* ---------- Blocchi editoriali ---------- */
/* overflow-x: clip → contiene le animazioni reveal "left/right" (translateX ±70px)
   che altrimenti sforerebbero a lato su schermi stretti creando scroll orizzontale.
   `clip` (non `hidden`) NON crea un contenitore di scroll → lo sticky dello scrub
   (che vive in .scrub, non qui) resta intatto e l'asse verticale resta `visible`. */
.page { position: relative; z-index: 2; background: var(--verde); overflow-x: clip; }
.block {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 10vw, 9rem) clamp(1.5rem, 8vw, 8rem);
  border-top: 1px solid rgba(212, 166, 55, 0.2);
}
.block--alt { background: var(--verde-2); }
.block__tag {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--oro);
  margin-bottom: 1.4rem;
}
.block__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 4.5rem);
  line-height: 1.05;
  max-width: 18ch;
  letter-spacing: -0.01em;
}
.block__body {
  margin-top: 1.6rem;
  max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.7;
  color: rgba(250, 246, 236, 0.78);
}
.block__cta {
  margin-top: 2rem;
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--oro);
  text-decoration: none;
}
/* Link inline dentro il testo editoriale: oro (mai blu). Su verde-2 usa oro-2 (AA). */
.block__body a { color: var(--oro); text-decoration: underline; text-underline-offset: 0.18em; }
.block--alt .block__body a { color: var(--oro-2); }

/* ---------- Form sezioni (Vendi / Lavora con noi) ---------- */
.form-section {
  position: relative;
  z-index: 2;
  background: var(--verde);
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: clamp(3.5rem, 9vw, 7rem) clamp(1.5rem, 8vw, 8rem);
  border-top: 1px solid rgba(212, 166, 55, 0.2);
}
.form-section--alt { background: var(--verde-2); }
.form-wrap { width: 100%; max-width: 920px; }
.form-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin-top: 1rem;
  max-width: 16ch;
}
.form-intro {
  margin-top: 1.2rem;
  max-width: 52ch;
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  line-height: 1.65;
  color: rgba(250, 246, 236, 0.78);
}

.cv-form {
  margin-top: 2.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.cv-row { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.cv-field { flex: 1 1 220px; display: flex; }
.cv-field label {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250, 246, 236, 0.7);
}
.cv-field input,
.cv-field select,
.cv-field textarea {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(250, 246, 236, 0.28);
  border-radius: 0;
  color: var(--crema);
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
  padding: 0.9rem 0.95rem;
  transition: border-color 0.2s ease;
}
.cv-field textarea { resize: vertical; }
.cv-field input::placeholder,
.cv-field textarea::placeholder { color: rgba(250, 246, 236, 0.65); }
.cv-field input:focus,
.cv-field select:focus,
.cv-field textarea:focus { outline: none; border-color: var(--oro); }
/* select: freccia custom oro, niente stile nativo arrotondato */
.cv-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23d4a637' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}
.cv-field select option { color: #0a1f18; } /* lista nativa: testo scuro su bianco */
.cv-field.is-invalid input,
.cv-field.is-invalid select {
  border-color: var(--oro);
  border-width: 2px;
  /* marcatore non solo cromatico: bordo più spesso distinto dal focus */
}

.cv-hint { color: var(--oro); font-size: 0.8rem; letter-spacing: 0.04em; }
.cv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cv-submit {
  align-self: flex-start;
  margin-top: 0.4rem;
  background: var(--oro);
  color: var(--verde);
  border: 1px solid var(--oro);
  border-radius: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1.05rem 2.2rem;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.cv-submit:hover { background: transparent; color: var(--oro); }

.cv-success {
  margin-top: 2.6rem;
  border-top: 2px solid var(--oro);
  background: rgba(10, 31, 24, 0.4);
  padding: 2rem 2.2rem;
}
.cv-success__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--crema);
}
.cv-success__sub { margin-top: 0.6rem; color: rgba(250, 246, 236, 0.78); font-size: 1.05rem; }

/* ---------- Pagina Metodo: numeri ---------- */
.numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: rgba(212, 166, 55, 0.2);
  border-top: 1px solid rgba(212, 166, 55, 0.2);
  border-bottom: 1px solid rgba(212, 166, 55, 0.2);
}
.numbers__cell { background: var(--verde); padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem); }
.numbers__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  color: var(--oro);
}
.numbers__label {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(250, 246, 236, 0.72);
}

/* ---------- Immobili: scaffale (griglia) ---------- */
.shelf-intro { min-height: auto; padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.shelf {
  position: relative;
  z-index: 2;
  background: var(--verde);
  padding: clamp(1rem, 4vw, 3rem) clamp(1.5rem, 8vw, 8rem) clamp(4rem, 9vw, 8rem);
}
.imm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem);
}

/* Card immobile (mostra il prezzo; segnaposto "ConValore." se manca la foto) */
.imm-card {
  display: flex;
  flex-direction: column;
  background: var(--verde-2);
  border: 1px solid rgba(212, 166, 55, 0.25);
}
.imm-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--verde);
  border-bottom: 1px solid rgba(212, 166, 55, 0.25);
}
.imm-card__ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: rgba(212, 166, 55, 0.8);
}
.imm-card__ph i { color: var(--oro); font-style: normal; }
.imm-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.imm-card__body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.imm-card__zona {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--oro-2); /* oro più chiaro: contrasto AA su verde-2 */
}
/* Tag piccolo oro sulle sezioni verde-2: usa oro-2 per contrasto AA */
.block--alt .block__tag { color: var(--oro-2); }
.imm-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.12;
  color: var(--crema);
}
.imm-card__addr { font-size: 0.9rem; color: rgba(250, 246, 236, 0.72); }
.imm-card__price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--oro);
  margin-top: 0.2rem;
}
.imm-card__meta { font-size: 0.92rem; line-height: 1.5; color: rgba(250, 246, 236, 0.7); }
.imm-card__add {
  margin-top: 0.8rem;
  align-self: flex-start;
  background: var(--oro);
  color: var(--verde);
  border: 1px solid var(--oro);
  border-radius: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.8rem 1.4rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.imm-card__add:hover { background: transparent; color: var(--oro); }
.imm-card__add.is-added { background: transparent; color: var(--oro); }

/* Card del CATALOGO: angoli morbidi, profondità 3D, leggero fluttuare allo scroll */
.imm-grid .imm-card {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(212, 166, 55, 0.18);
  transform: translateY(var(--float, 0px));
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  will-change: transform;
}
.imm-grid .imm-card:hover {
  transform: translateY(calc(var(--float, 0px) - 7px)) scale(1.012);
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(212, 166, 55, 0.32);
}
@media (prefers-reduced-motion: reduce) {
  .imm-grid .imm-card { transform: none; transition: none; }
}

/* ---------- Prodotti lungo il cammino (pop-up eleganti 3D) ---------- */
.scrub--market { height: 560vh; }
.aisle-products {
  position: absolute;
  inset: 0;
  pointer-events: none;
  perspective: 1500px;
  perspective-origin: 50% 45%;
}
.aisle-product {
  position: absolute;
  width: min(248px, 62vw); /* compatti: veri "pop-up" che NON coprono lo sfondo */
  opacity: 0;
  transform-style: preserve-3d;
  will-change: opacity, transform;
}
.aisle-product--left {
  left: clamp(1.5rem, 6vw, 5rem);
  bottom: clamp(4rem, 12vh, 8rem);
  transform-origin: left center;
}
.aisle-product--right {
  right: clamp(1.5rem, 6vw, 5rem);
  bottom: clamp(4rem, 12vh, 8rem);
  transform-origin: right center;
}
/* Card del pop-up: più ricercata — fondo verde profondo + doppia cornice oro */
.aisle-product .imm-card {
  background: rgba(10, 31, 24, 0.92);
  border: 1px solid var(--oro);
  outline: 1px solid rgba(212, 166, 55, 0.28);
  outline-offset: 3px;
  border-radius: 16px; /* arrotondati come le card del catalogo (richiesta Mario) */
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55); /* galleggiano sopra il corridoio */
  overflow: hidden;
}
.aisle-product .imm-card__media { aspect-ratio: 16 / 9; }
.aisle-product .imm-card__body { padding: 0.85rem 1rem 1rem; gap: 0.3rem; }
.aisle-product .imm-card__zona { font-size: 0.6rem; }
.aisle-product .imm-card__name { font-size: 1.05rem; }
.aisle-product .imm-card__addr { font-size: 0.78rem; }
.aisle-product .imm-card__price { font-size: 1.08rem; }
.aisle-product .imm-card__meta { font-size: 0.78rem; }
.aisle-product .imm-card__add { padding: 0.55rem 0.95rem; font-size: 0.62rem; margin-top: 0.55rem; }

/* ---------- Carrello: pulsante + badge ---------- */
.cart-btn {
  position: fixed;
  bottom: 1.6rem;
  right: clamp(1.5rem, 5vw, 4rem);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--oro);
  color: var(--verde);
  border: 1px solid var(--oro);
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.72rem 1.2rem;
  cursor: pointer;
}
.cart-btn__icon { width: 1.15rem; height: 1.15rem; flex: none; }
.cart-btn__badge {
  min-width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--verde);
  color: var(--crema);
  font-size: 0.75rem;
  letter-spacing: 0;
}
.cart-btn__badge.is-empty { opacity: 0.5; }

/* ---------- Drawer carrello ---------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(10, 31, 24, 0.6);
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 80;
  width: min(440px, 92vw);
  height: 100vh;
  height: 100dvh; /* tiene conto della chrome dinamica / tastiera su mobile */
  background: var(--verde);
  border-left: 2px solid var(--oro);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1.6rem 2rem;
  overflow-y: auto;
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid rgba(212, 166, 55, 0.25);
}
.cart-drawer__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--crema);
}
.cart-drawer__close {
  background: none;
  border: none;
  color: var(--crema);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.cart-drawer__items { padding: 0.9rem 0; display: flex; flex-direction: column; gap: 0.7rem; }
.cart-empty { color: rgba(250, 246, 236, 0.6); font-size: 0.95rem; line-height: 1.6; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(212, 166, 55, 0.16);
}
/* Anteprima foto dell'immobile nel carrello (segnaposto "C." se manca) */
.cart-item__thumb {
  position: relative;
  flex: 0 0 auto;
  width: 66px;
  height: 50px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--verde-2);
  border: 1px solid rgba(212, 166, 55, 0.25);
}
.cart-item__ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: rgba(212, 166, 55, 0.85);
}
.cart-item__ph i { color: var(--oro); font-style: normal; }
.cart-item__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cart-item__info { flex: 1 1 auto; min-width: 0; }
.cart-item__name { font-family: var(--font-display); font-size: 1.1rem; color: var(--crema); }
.cart-item__zona { margin-top: 0.2rem; font-size: 0.8rem; color: rgba(250, 246, 236, 0.62); }
.cart-item__remove {
  background: none;
  border: 1px solid rgba(250, 246, 236, 0.3);
  color: var(--crema);
  width: 2rem;
  height: 2rem;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.cart-item__remove:hover { border-color: var(--oro); color: var(--oro); }
/* Carrello compatto: il form segue subito gli immobili (niente vuoto in mezzo) e
   sta in una schermata; scrolla solo se ci sono molti immobili nel carrello. */
.cart-form { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.5rem; padding-top: 0.85rem; padding-bottom: env(safe-area-inset-bottom); }
/* I campi qui sono in COLONNA: niente flex-basis 220px (diventerebbe altezza e li
   distanzierebbe). Altezza naturale, così stanno compatti in una schermata. */
.cart-form .cv-field { flex: 0 0 auto; }
.cart-form .cv-field label { gap: 0.35rem; }
.cart-form .cv-submit { align-self: stretch; text-align: center; margin-top: 0.55rem; }
.cv-submit.is-disabled,
.cv-submit:disabled { opacity: 0.45; cursor: not-allowed; }
.cart-form .cv-submit:disabled:hover { background: var(--oro); color: var(--verde); }

body.no-scroll { overflow: hidden; }

/* ---------- Cursore chiave di casa (cursor.js, solo puntatore fine) ---------- */
.has-cursor,
.has-cursor * { cursor: none !important; }
/* Sui campi di testo resta il cursore I-beam nativo (digitazione comoda) */
.has-cursor input:not([type=button]):not([type=submit]):not([type=checkbox]):not([type=radio]),
.has-cursor textarea { cursor: text !important; }
#cv-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  pointer-events: none;
  will-change: transform;
}
.cv-cursor__key {
  display: block;
  height: auto;
  transform-origin: center;
  transition: transform 0.18s ease, opacity 0.2s ease;
}
#cv-cursor.cv-cursor--off,
#cv-cursor.cv-cursor--text { opacity: 0; }
#cv-cursor.cv-cursor--hover .cv-cursor__key { transform: scale(1.35) rotate(-12deg); }
#cv-cursor.cv-cursor--down .cv-cursor__key { transform: scale(0.85); }
@media (prefers-reduced-motion: reduce) {
  .cv-cursor__key { transition: opacity 0.2s ease; }
}

/* Scritte animate (reveal.js): l'engine imposta opacity/transform inline */
.is-reveal { will-change: opacity, transform; }

/* Rispetta chi preferisce meno movimento: stop animazione decorativa dell'hint
   (le scritte/reveal vengono neutralizzate via JS, vedi reveal.js) */
@media (prefers-reduced-motion: reduce) {
  .scrub__hint i { animation: none; }
}

/* Focus da tastiera ad alto contrasto (oro), senza mostrarlo al click del mouse */
a:focus-visible,
button:focus-visible,
.cart-btn:focus-visible,
.imm-card__add:focus-visible,
.cart-drawer__close:focus-visible,
.cart-item__remove:focus-visible,
.cv-submit:focus-visible,
.nav__links a:focus-visible,
.cv-success__title:focus-visible {
  outline: 2px solid var(--oro);
  outline-offset: 2px;
}
.cv-field input:focus-visible,
.cv-field select:focus-visible,
.cv-field textarea:focus-visible {
  outline: 2px solid var(--oro);
  outline-offset: 1px;
  border-color: var(--oro);
}

@media (max-width: 768px) {
  /* Nav compatta: brand sopra, link che VANNO A CAPO (non più striscia scrollabile che
     troncava "Lavora con noi" → "Lavo"). flex-wrap + font/gap ridotti → su QUALSIASI
     telefono i link si leggono interi, al massimo su 2 righe. */
  .nav { flex-direction: column; align-items: flex-start; gap: 0.5rem; padding-block: 0.9rem; }
  .nav__links {
    flex-wrap: wrap;
    gap: 0.4rem 0.85rem;
    width: 100%;
    font-size: 0.86rem;
  }
  .nav__links a { white-space: nowrap; }   /* il singolo link resta intero, non si spezza a metà parola */
  /* Tap target >= 44px sui controlli del carrello */
  .cart-btn { padding: 0.95rem 1.2rem; }
  .imm-card__add { padding: 0.95rem 1.5rem; }
  .cart-item__remove { min-width: 44px; min-height: 44px; }
  .cart-drawer__close {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  .cart-drawer { width: min(440px, 100vw); }
  /* Pop-up immobili: compatti e su un lato anche sul telefono (NON coprono lo sfondo) */
  .aisle-product { width: min(70vw, 220px); }
  .aisle-product--left { left: 4vw; right: auto; transform-origin: left center; }
  .aisle-product--right { right: 4vw; left: auto; transform-origin: right center; }
  /* alzati sopra il pill del carrello (in basso a dx): niente conflitto di tocco */
  .aisle-product--left,
  .aisle-product--right { bottom: clamp(6rem, 16vh, 9rem); }
  /* Meno spazio verticale su mobile: le sezioni si adattano al contenuto invece di
     90/92vh fissi (così il Metodo non ha "zone verdi" mezze vuote tra un blocco e l'altro). */
  .block { min-height: auto; padding-top: clamp(2.4rem, 11vw, 3.6rem); padding-bottom: clamp(2.4rem, 11vw, 3.6rem); }
  .form-section { min-height: auto; padding-top: clamp(2.8rem, 11vw, 4rem); padding-bottom: clamp(2.8rem, 11vw, 4rem); }
}

/* ---------- Rifiniture mobile/a11y (11 giu) ---------- */
/* Rete anti testo-tagliato: token lunghi non spezzabili (email/URL/indirizzi) vanno a capo invece di traboccare/essere tagliati. */
.block__title, .block__body, .form-title, .form-intro, .caption__title, .numbers__value,
.imm-card__name, .imm-card__addr, .imm-card__price, .imm-card__body, .cart-item__info { overflow-wrap: break-word; }
/* Contrasto AA: oro su verde-2 -> oro-2 (coerente con tag/body, look quasi identico). */
.block--alt .block__cta { color: var(--oro-2); }

/* ---------- Pagine SEO landing (senza scrub) + compattezza (11 giu) ---------- */
/* Nav IN FLUSSO sulle landing (niente video sotto) → elimina la sovrapposizione nav↔titolo su mobile. */
.nav--solid { position: sticky; background: var(--verde); }
/* Sezioni delle landing più COMPATTE: niente full-screen, meno scroll (richiesta Mario). */
.page--compact .block { min-height: auto; padding-top: clamp(1.4rem, 5vw, 2.6rem); padding-bottom: clamp(1.4rem, 5vw, 2.6rem); }
.page--compact .block:first-child { padding-top: clamp(0.8rem, 3.5vw, 1.6rem); }
.page--compact .numbers { padding-top: clamp(1rem, 4vw, 2rem); padding-bottom: clamp(1rem, 4vw, 2rem); }
/* Meno spazio tra le sezioni su MOBILE su tutte le pagine (più compatto). */
@media (max-width: 768px) {
  .block { padding-top: clamp(1.5rem, 6.5vw, 2.6rem); padding-bottom: clamp(1.5rem, 6.5vw, 2.6rem); }
}
