/* ═══════════════════════════════════════════════════════════
   CSC AUTO · fondamenta: font, colori, vetro, componenti comuni
   ═══════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Geist';
  src: url('../assets/fonts/geist-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('../assets/fonts/geist-mono-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Palette: nero, bianco e grigi. L'unico blu del sito è la luce attorno al pianeta. */
  --bg: #000;
  --ink: #f5f5f7;
  --ink-2: rgba(238, 239, 243, .72);
  --ink-3: rgba(238, 239, 243, .5);
  --mute: #7c8089;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .17);
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .08);

  --accent: #e9ebf0;
  --accent-strong: #cfd2da;
  --ok: #74e8b4;
  --info: #9cc4ff;
  --warn: #ffcb7d;
  --sold: #aab1c2;
  --danger: #ff8f8f;
  --wa: #25d366;

  --r-xs: 10px;
  --r-s: 14px;
  --r-m: 20px;
  --r-l: 28px;
  --r-pill: 999px;

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --pad: clamp(16px, 4vw, 44px);
  --maxw: 1360px;
  --nav-h: 46px;
  --nav-top: 16px;
  --corner: clamp(20px, 2.4vw, 44px);   /* margine degli elementi d'angolo (logo, voci di menu) */
  --logo-h: 86px;
  --section-gap: clamp(96px, 9vw, 170px);   /* distanza tra una sezione e la successiva */
  /* alone scuro attorno ai testi che poggiano sul cielo: copre le stelle vicine alle lettere */
  --halo: 0 0 3px #000, 0 0 9px #000, 0 0 18px #000, 0 0 32px rgba(0, 0, 0, .95), 0 0 56px rgba(0, 0, 0, .85);
  --header-offset: calc(var(--nav-h) + var(--nav-top) + 22px);
  --edge: max(var(--pad), calc((100vw - var(--maxw)) / 2 + var(--pad)));
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
  background: var(--bg);
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -.006em;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
  overflow-x: clip;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.15; text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
/* in attesa della traduzione (lingua inglese): evita il lampo di testo italiano */
.i18n-pending body { visibility: hidden; }
::selection { background: rgba(255, 255, 255, .24); color: #fff; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.ic { flex: none; }

/* ── Sfondo: cielo stellato ──────────────────────────────── */
.space {
  position: fixed;
  inset: 0;
  height: 100lvh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
/* le tele hanno dimensioni fisse (in px, da JS) e vengono solo spostate: nessun ridisegno mentre si scorre */
.space canvas { position: absolute; left: 0; top: 0; will-change: transform; }

main, .footer { position: relative; z-index: 1; }

/* ── Impaginazione ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}
/* Ogni sezione ha mezzo "stacco" sopra e mezzo sotto: tra due sezioni la distanza è sempre --section-gap. */
.section { padding-block: calc(var(--section-gap) / 2); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
}

.title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 2.8vw + 1rem, 3.5rem);
  line-height: 1.02;
  letter-spacing: -.04em;
  color: #fff;
}
/* la parte "in sordina" del titolo, come nel riferimento */
.title em { font-style: normal; font-weight: 700; color: var(--mute); }
.lead { color: var(--ink-2); font-size: clamp(1rem, .4vw + .95rem, 1.14rem); max-width: 58ch; }

.section__head { display: grid; gap: 18px; margin-bottom: clamp(32px, 5vw, 60px); max-width: 860px; }

/* ── Leggibilità sul cielo stellato ──────────────────────── */
/* I testi che non stanno dentro un pannello hanno un alone scuro, così non si confondono con le stelle. */
.hero__inner, .section__head, .bespoke__copy, .nav__links, .crumbs, .results__bar,
.detail__content, .prose, .state, .footer, .ahead {
  text-shadow: var(--halo);
}
/* niente alone su ciò che ha già un suo fondo */
.btn, .chip, .pill-x, .badge, .tag { text-shadow: none; }

/* ── Vetro liquido ───────────────────────────────────────── */
.glass {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .035) 42%, rgba(255, 255, 255, .07));
  -webkit-backdrop-filter: blur(26px) saturate(190%) brightness(1.08);
  backdrop-filter: blur(26px) saturate(190%) brightness(1.08);
  border-radius: var(--r-l);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .3),
    inset 0 -1px 0 rgba(255, 255, 255, .06),
    inset 0 -14px 24px -18px rgba(255, 255, 255, .22),
    inset 0 18px 30px -24px rgba(255, 255, 255, .22),
    0 24px 60px -24px rgba(0, 0, 0, .85);
}
/* bordo luminoso: più acceso negli angoli colpiti dalla luce */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg,
    rgba(255, 255, 255, .62),
    rgba(255, 255, 255, .08) 26%,
    rgba(255, 255, 255, .03) 60%,
    rgba(255, 255, 255, .34));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.glass--soft {
  background: linear-gradient(135deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .02) 45%, rgba(255, 255, 255, .045));
}
/* dove il backdrop-filter non c'è, il pannello resta leggibile */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(18, 18, 20, .92); }
}

/* riflesso che segue il puntatore */
.spot { --mx: 50%; --my: 0%; }
.spot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, .07), transparent 60%);
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.spot:hover::after { opacity: 1; }

/* ── Pulsanti ────────────────────────────────────────────── */
.btn {
  --h: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--h);
  padding: 0 26px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s, border-color .25s, color .25s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active { transform: scale(.975); }
.btn--sm { --h: 40px; padding: 0 18px; font-size: 14px; }
.btn--block { width: 100%; }

.btn--light {
  background: linear-gradient(180deg, #fff, #dcdde2);
  color: #05070c;
  box-shadow: inset 0 1px 0 #fff, 0 10px 30px -12px rgba(255, 255, 255, .28);
}
.btn--light:hover { box-shadow: inset 0 1px 0 #fff, 0 14px 44px -8px rgba(255, 255, 255, .34); transform: translateY(-1px); }

.btn--glass {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.btn--glass:hover { background: linear-gradient(135deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .08)); transform: translateY(-1px); }

.btn--wa { background: var(--wa); color: #04130a; box-shadow: 0 12px 36px -12px rgba(37, 211, 102, .7); }
.btn--wa:hover { transform: translateY(-1px); box-shadow: 0 16px 44px -10px rgba(37, 211, 102, .85); }

.btn--ghost { color: var(--ink-2); padding-inline: 14px; }
.btn--ghost:hover { color: var(--ink); background: var(--surface); }
.btn--danger { color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255, 143, 143, .35); }
.btn--danger:hover { background: rgba(255, 143, 143, .12); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition: background .2s, transform .2s var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, .16); }
.icon-btn:active { transform: scale(.94); }

.link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent);
  font-weight: 600;
  transition: gap .25s var(--ease), color .2s;
}
.link:hover { gap: 12px; color: #fff; }

/* ── Campi ───────────────────────────────────────────────── */
.field { display: grid; gap: 7px; min-width: 0; align-content: start; }
.field > span, .field__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field small { color: var(--ink-3); font-size: 12.5px; }

.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 15px;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: rgba(22, 22, 25, .8);
  color: var(--ink);
  font-size: 16px;
  transition: border-color .2s, background .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-2); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, .5);
  background: rgba(30, 30, 34, .88);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .1);
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.textarea--short { min-height: 84px; }
.select {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b9bcc4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  text-overflow: ellipsis;
}
.select option { background: #131316; color: var(--ink); }

/* ── Menu a tendina su misura (js/ui/select.js) ── */
/* La select vera resta nella pagina ma invisibile; si vede e si usa il pulsante accanto. */
.cselect, .field > .cselect {
  position: relative; display: block; min-width: 0;
  /* dentro un campo non deve ereditare lo stile dell'etichetta (maiuscoletto piccolo) */
  font-size: 16px; font-weight: 400; letter-spacing: -.006em; text-transform: none; color: var(--ink);
}
.cselect > select {
  position: absolute; inset: 0;
  width: 100%; height: 100%; min-height: 0;
  opacity: 0; pointer-events: none;
}
.cselect__btn { display: block; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cselect__btn[aria-expanded="true"] {
  border-color: rgba(255, 255, 255, .5);
  background-color: rgba(30, 30, 34, .88);
}
.cselect__btn[disabled] { opacity: .5; cursor: not-allowed; }

.cselect__list {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 6px;
  border: 0;
  border-radius: 18px;
  max-width: calc(100vw - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .22) transparent;
  background: linear-gradient(160deg, rgba(40, 40, 45, .94), rgba(16, 16, 18, .95));
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  color: var(--ink);
  font-size: 15px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 0 0 1px rgba(255, 255, 255, .1),
    0 26px 60px -18px #000;
}
.cselect__list:popover-open { animation: cselect-in .2s var(--ease); }
.cselect__list[data-side="up"]:popover-open { animation-name: cselect-in-up; }
@keyframes cselect-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes cselect-in-up { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.cselect__opt {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
  outline: none;
  transition: background .15s, color .15s;
}
.cselect__opt .ic { opacity: 0; }
.cselect__opt:hover, .cselect__opt:focus { background: rgba(255, 255, 255, .09); color: #fff; }
.cselect__opt[aria-selected="true"] { color: #fff; font-weight: 600; }
.cselect__opt[aria-selected="true"] .ic { opacity: 1; }
.cselect__opt[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* interruttore */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; min-height: 44px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i {
  flex: none;
  width: 46px; height: 28px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px var(--line);
  position: relative;
  transition: background .25s;
}
.switch i::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
  transition: transform .28s var(--ease);
}
.switch input:checked + i { background: #fff; }
.switch input:checked + i::after { transform: translateX(18px); background: #0a0a0c; }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 3px; }

/* pillole selezionabili */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px;
  padding: 0 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(20, 20, 23, .74);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
  cursor: pointer;
  user-select: none;
}
.chip:hover { color: var(--ink); border-color: var(--line-2); }
.chip[aria-pressed="true"], .chip.is-on {
  background: #fff;
  border-color: #fff;
  color: #05070c;
}
.chip sup { font-size: 11px; opacity: .6; margin-left: -2px; font-variant-numeric: tabular-nums; }

/* ── Etichette di stato ──────────────────────────────────── */
.badge {
  --c: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px 0 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--c);
  background: rgba(8, 8, 10, .58);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 0 0 1px rgba(255, 255, 255, .1);
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
}
.badge--disponibile { --c: var(--ok); }
.badge--in_arrivo { --c: var(--info); }
.badge--in_trattativa { --c: var(--warn); }
.badge--venduta { --c: var(--sold); }
.badge--new { --c: #fff; padding-left: 12px; }
.badge--new::before { display: none; }

/* ── Logo d'angolo ───────────────────────────────────────── */
/* Nell'angolo in alto a sinistra, con lo stesso margine sopra e di lato.
   Non è fisso: scorre via con la pagina. */
.brand {
  position: absolute;
  top: var(--corner);
  left: var(--corner);
  z-index: 5;
  display: block;
  transition: opacity .25s;
}
.brand img { height: var(--logo-h); width: auto; }
.brand:hover { opacity: .8; }

/* ── Navigazione ─────────────────────────────────────────── */
/* Desktop: solo le voci, scritte in alto a destra, senza alcuno sfondo.
   Mobile: un tondo di vetro con il menu. */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  /* sempre alla stessa distanza dal bordo superiore, in cima alla pagina come durante lo scorrimento */
  padding: 12px var(--corner) 0;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
/* scorrendo, una sfumatura nera tiene le voci leggibili sopra i contenuti */
.nav::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 116px;
  z-index: -1;
  background: linear-gradient(rgba(0, 0, 0, .88), rgba(0, 0, 0, .5) 45%, transparent);
  opacity: 0;
  transition: opacity .45s;
  pointer-events: none;
}
.nav.is-scrolled::before { opacity: 1; }

.nav__bar { height: var(--nav-h); display: flex; align-items: center; }
.nav__links { display: flex; gap: clamp(20px, 2.4vw, 40px); }
.nav__links :is(a, button) {
  position: relative;
  padding: 8px 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color .2s;
}
.nav__links :is(a, button)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav__links :is(a, button):hover, .nav__links [aria-current="page"] { color: #fff; }
.nav__links :is(a, button):hover::after, .nav__links [aria-current="page"]::after { transform: scaleX(1); }
.nav__toggle { display: none; width: 100%; height: 100%; place-items: center; border-radius: 50%; }
.nav__sheet {
  position: absolute;
  top: calc(var(--pad) + var(--nav-h) + 12px);
  left: var(--pad); right: var(--pad);
  padding: 10px;
  display: grid;
  gap: 2px;
  border-radius: var(--r-l);
  background: linear-gradient(135deg, rgba(24, 24, 27, .9), rgba(10, 10, 12, .86));
  animation: sheet-in .35s var(--ease);
}
.nav__sheet :is(a, button) {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 16px 16px;
  border-radius: var(--r-s);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.nav__sheet :is(a, button) span { color: var(--ink-3); }
.nav__sheet :is(a, button):active, .nav__sheet [aria-current="page"] { background: rgba(255, 255, 255, .08); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }

/* Scelta della lingua: stesso menu a tendina del resto del sito, sul pulsante solo la sigla (IT / EN). */
.nav__lang { display: flex; align-items: center; height: var(--nav-h); }
.lang.cselect__btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: .14em;
  color: var(--ink-2);
  transition: color .2s;
}
.lang.cselect__btn::after {
  content: "";
  width: 6px; height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .25s var(--ease), margin .25s var(--ease);
}
.lang.cselect__btn[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 3px; }
.lang.cselect__btn:hover, .lang.cselect__btn[aria-expanded="true"] { color: #fff; border-color: transparent; background-color: transparent; }
/* Casetta: torna alla home, di fianco alla lingua. Nella home non c'è (la aggiunge ui/shell.js solo nelle altre pagine). */
.nav__home { display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--ink-2); transition: color .2s, background .2s; }
.nav__home:hover { color: #fff; }

@media (min-width: 900px) {
  .nav__home { padding: 8px 0; margin-right: clamp(14px, 1.5vw, 22px); }
  /* su desktop niente vetro né pillola: restano solo le scritte */
  .nav__bar.glass { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .nav__bar.glass::before { content: none; }
  /* la lingua segue le voci, staccata da una lineetta */
  .nav__lang { margin-left: clamp(18px, 2vw, 32px); padding-left: clamp(18px, 2vw, 32px); position: relative; }
  .nav__lang::before { content: ""; position: absolute; left: 0; top: 50%; translate: 0 -50%; width: 1px; height: 14px; background: var(--line-2); }
  .lang.cselect__btn { padding: 8px 0; }
}
/* desktop stretto: logo più piccolo */
@media (min-width: 900px) and (max-width: 1180px) { :root { --logo-h: 62px; } }

@media (max-width: 899px) {
  :root { --nav-h: 50px; --nav-top: var(--pad); --corner: var(--pad); --logo-h: 50px; }
  .nav, .nav.is-scrolled { padding: var(--pad) var(--pad) 0; }
  .nav::before { display: none; }
  .nav__bar { width: var(--nav-h); justify-content: center; border-radius: 50%; transition: background .4s; }
  .nav.is-scrolled .nav__bar, .nav.is-open .nav__bar {
    background: linear-gradient(135deg, rgba(24, 24, 27, .74), rgba(10, 10, 12, .64));
  }
  .nav__links { display: none; }
  .nav__toggle { display: grid; }
  /* la lingua è un secondo tondo di vetro, a sinistra del menu */
  .nav { gap: 10px; }
  .nav__lang { order: -1; gap: 10px; }
  /* anche la casetta è un tondo di vetro, a sinistra della lingua */
  .lang.cselect__btn, .nav__home {
    width: var(--nav-h); height: var(--nav-h);
    justify-content: center; gap: 0;
    border-radius: 50%;
    color: var(--ink);
    font-size: 12.5px; font-weight: 600; letter-spacing: .08em;
    background: linear-gradient(135deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .035) 42%, rgba(255, 255, 255, .07));
    -webkit-backdrop-filter: blur(26px) saturate(190%);
    backdrop-filter: blur(26px) saturate(190%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 0 0 1px rgba(255, 255, 255, .1), 0 24px 60px -24px rgba(0, 0, 0, .85);
  }
  /* il tondo resta uguale agli altri, la casetta dentro è più grande */
  .nav__home .ic { width: 26px; height: 26px; }
  .lang.cselect__btn::after { display: none; }
  .lang.cselect__btn:hover, .lang.cselect__btn[aria-expanded="true"], .nav__home:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .07));
  }
}
/* telefoni molto stretti: logo più piccolo, per non finire sotto i tre tondi */
@media (max-width: 359px) { :root { --logo-h: 38px; } }

/* ── Piè di pagina ───────────────────────────────────────── */
.footer {
  margin-top: calc(var(--section-gap) / 2);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 40%);
  padding-block: clamp(48px, 7vw, 84px) 28px;
  font-size: 15px;
}
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr; gap: clamp(28px, 5vw, 72px); }
.footer__brand img { width: 170px; margin-left: -4px; }
.footer__brand p { margin-top: 18px; color: var(--ink-2); max-width: 38ch; }
.footer__col { display: grid; gap: 12px; align-content: start; justify-items: start; }
.footer__col h2 {
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.footer__col a, .footer__col p { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); transition: color .2s; }
.footer__col a:hover { color: #fff; }
.footer__legal {
  margin-top: clamp(36px, 6vw, 64px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px;
  color: var(--ink-3);
  font-size: 13px;
}
.footer__legal a:hover { color: var(--ink); }
@media (max-width: 820px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer { padding-bottom: 96px; }
}

/* ── Pulsante WhatsApp flottante ─────────────────────────── */
.fab {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 40;
  display: flex; align-items: center;
  height: 58px; min-width: 58px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  /* vetro scuro: di verde resta solo il simbolo */
  background: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05)), rgba(14, 14, 16, .5);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  color: var(--ink);
  font-weight: 600; font-size: 14.5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .34),
    inset 0 0 0 1px rgba(255, 255, 255, .13),
    0 14px 36px -12px rgba(0, 0, 0, .9);
  transition: transform .3s var(--ease), background .3s;
}
.fab .ic { color: var(--wa); }
.fab span {
  max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0;
  transition: max-width .45s var(--ease), opacity .3s, margin .45s var(--ease);
}
.fab:hover { transform: translateY(-2px); }
@media (hover: hover) {
  .fab:hover span { max-width: 200px; opacity: 1; margin-left: 10px; }
}

.demo-flag {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 39;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  color: var(--warn);
  background: rgba(20, 16, 6, .72);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 203, 125, .3);
}

/* ── Avvisi temporanei ───────────────────────────────────── */
.toasts {
  position: fixed;
  left: 50%; bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 200;
  display: grid; gap: 8px; justify-items: center;
  width: max-content; max-width: calc(100vw - 32px);
  pointer-events: none;
}
.toast {
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: rgba(18, 18, 20, .88);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 40px -14px #000;
  font-size: 14.5px; font-weight: 500;
  opacity: 0; transform: translateY(12px);
  transition: opacity .35s, transform .35s var(--ease);
}
.toast.is-in { opacity: 1; transform: none; }
.toast--ok { color: var(--ok); }
.toast--error { color: var(--danger); }

/* ── Comparsa allo scorrimento ───────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* scheletro di caricamento */
.skeleton {
  border-radius: var(--r-m);
  background: linear-gradient(100deg, rgba(255, 255, 255, .04) 30%, rgba(255, 255, 255, .09) 50%, rgba(255, 255, 255, .04) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { to { background-position: -300% 0; } }

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