/* ============================================================
   CIVIS HOTELS — shared.css  v2.0
   Design system: token monocromi, font lilium, nav, footer,
   bottoni, reveal. Nessuno stile pagina-specifico qui.
   ============================================================ */

/* ============================================================
   @font-face — self-hosted variable fonts
   ============================================================ */

/* Fraunces — variable serif, high-contrast, display + editorial italic */
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Inter — variable grotesque, UI / body / nav / captions */
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   DESIGN TOKENS — monocromo puro, croma = 0 su tutto il chrome
   ============================================================ */
:root {
  /* ---- Canvas -------------------------------------------- */
  --paper:   oklch(98% 0 0);   /* sfondo principale light      */
  --ink:     oklch(15% 0 0);   /* testo / UI light             */
  --ash-1:   oklch(45% 0 0);   /* testo secondario             */
  --ash-2:   oklch(50% 0 0);   /* testo terziario / caption (AA) */
  --line:    oklch(88% 0 0);   /* hairline / bordi             */

  /* ---- Radii — tutto stondato e moderno ------------------ */
  --radius-sm:   12px;
  --radius-md:   20px;
  --radius-lg:   28px;   /* immagini grandi / card          */
  --radius-pill: 999px;  /* bottoni, tag                    */

  /* ---- Famiglie tipografiche ----------------------------- */
  --display: 'Fraunces', Georgia, serif;
  --serif:   'Fraunces', Georgia, serif;
  --sans:    'Inter', system-ui, sans-serif;

  /* ---- Type scale fluida --------------------------------- */
  --text-2xs:  clamp(0.6875rem,0.64rem + 0.15vw,  0.75rem);   /* 11–12px  */
  --text-xs:   clamp(0.75rem,  0.71rem + 0.2vw,   0.8125rem); /* 12–13px  */
  --text-sm:   clamp(0.75rem,  0.70rem + 0.27vw,  0.875rem);  /* 12–14px  */
  --text-base: clamp(0.9375rem,0.88rem + 0.29vw,  1rem);      /* 15–16px  */
  --text-md:   clamp(1rem,     0.93rem + 0.35vw,  1.125rem);  /* 16–18px  */
  --text-lg:   clamp(1.125rem, 1rem    + 0.63vw,  1.375rem);  /* 18–22px  */
  --text-xl:   clamp(1.5rem,   1.25rem + 1.25vw,  2rem);      /* 24–32px  */
  --text-2xl:  clamp(1.875rem, 1.5rem  + 1.88vw,  2.75rem);   /* 30–44px  */
  --text-3xl:  clamp(2.25rem,  1.75rem + 2.5vw,   3.5rem);    /* 36–56px  */
  --text-hero: clamp(3rem,     2rem    + 5vw,      6rem);      /* 48–96px  */

  /* ---- Motion -------------------------------------------- */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);   /* signature easing */

  /* ---- Spaziatura --------------------------------------- */
  --section-py: clamp(44px, 5.5vw, 80px);
  --gap:        clamp(16px, 2vw, 32px);
}

/* Dark mode — inverte la tela, mantiene le foto a colori.
   Scoped to :not([data-theme="light"]) so an explicit light choice on a
   dark-mode OS isn't overridden (nav-invisibility / muddy-text bug). */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --paper: oklch(11% 0 0);
    --ink:   oklch(96% 0 0);
    --ash-1: oklch(62% 0 0);
    --ash-2: oklch(64% 0 0);
    --line:  oklch(28% 0 0);
  }
}
html[data-theme="dark"] {
  --paper: oklch(11% 0 0);
  --ink:   oklch(96% 0 0);
  --ash-1: oklch(62% 0 0);
  --ash-2: oklch(64% 0 0);
  --line:  oklch(28% 0 0);
}
html[data-theme="light"] {
  --paper: oklch(98% 0 0);
  --ink:   oklch(15% 0 0);
  --line:  oklch(88% 0 0);
}

/* ============================================================
   RESET MODERNO
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-optical-sizing: auto;
}

body {
  font-family: var(--sans);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

fieldset {
  border: none;
}

/* ============================================================
   SKIP-TO-CONTENT — a11y, visually hidden until focus
   ============================================================ */
.cv-skip {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.cv-skip:focus {
  top: 16px;
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.cv-container {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(24px, 5vw, 64px);
}

/* ============================================================
   TYPE SCALE HELPERS
   ============================================================ */
/* Fraunces note: weight 300 at large optical size reads editorial-luxe;
   avoid 700+ at display sizes — it reads chunky, not premium.
   Tight negative tracking enhances the high-contrast serif's presence. */
.cv-h1 {
  font-family: var(--display);
  font-size: var(--text-hero);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-optical-sizing: auto;
}

.cv-h2 {
  font-family: var(--display);
  font-size: var(--text-3xl);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-optical-sizing: auto;
}

.cv-h3 {
  font-family: var(--display);
  font-size: var(--text-2xl);
  font-weight: 350;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-optical-sizing: auto;
}

/* Display headline — clean modern grotesque (Inter, heavy + tight).
   Travel-site / Expedia energy: functional, fresh, big. Used for section
   titles across the homepage instead of the Fraunces serif heads. */
.cv-display {
  font-family: var(--sans);
  font-size: var(--text-3xl);
  font-weight: 650;
  line-height: 1.0;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.cv-display--lg { font-size: clamp(2.5rem, 1.4rem + 5.2vw, 5rem); }
.cv-display--md { font-size: var(--text-2xl); }

/* Fraunces italic at 300 is the editorial accent — replaces Cormorant.
   High contrast italic at this weight is characterful, not decorative. */
.cv-editorial {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--text-xl);
  font-weight: 300;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-optical-sizing: auto;
}

.cv-body {
  font-family: var(--sans);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.7;
  color: var(--ash-1);
}

.cv-eyebrow {
  font-family: var(--sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash-2);
}

.cv-caption {
  font-family: var(--sans);
  font-size: var(--text-xs);
  font-weight: 300;
  color: var(--ash-2);
  letter-spacing: 0.04em;
}

/* ============================================================
   BUTTONS — pill, B/N, varianti
   ============================================================ */
.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  padding: 12px 28px;
  font-family: var(--sans);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background-color 0.4s var(--ease),
    color 0.4s var(--ease),
    border-color 0.4s var(--ease),
    opacity 0.4s var(--ease),
    transform 0.2s var(--ease);
}

.cv-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.cv-btn:active {
  transform: scale(0.97);
}

.cv-btn:disabled,
.cv-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

/* Primary: ink fill on paper background */
.cv-btn--primary {
  background-color: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.cv-btn--primary:hover {
  background-color: transparent;
  color: var(--ink);
}

/* Ghost: outline only */
.cv-btn--ghost {
  background-color: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.cv-btn--ghost:hover {
  border-color: var(--ink);
}

/* Ink: inverted (for dark sections) — paper fill */
.cv-btn--ink {
  background-color: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.cv-btn--ink:hover {
  opacity: 0.82;
}

/* Dark-band utility — scoped-token inversion. Shared so EVERY page that uses
   .cv-section--ink gets the dark background (not just index/work-with-us). */
.cv-section--ink {
  --paper: oklch(11% 0 0);
  --ink:   oklch(96% 0 0);
  --ash-1: oklch(72% 0 0);
  --ash-2: oklch(64% 0 0);
  --line:  oklch(26% 0 0);
  background-color: var(--paper);
  color: var(--ink);
}

/* On ink canvas: force the primary CTA to be a true light pill
   regardless of theme, so it always pops against the dark band.
   --paper inside .cv-section--ink resolves to oklch(11% 0 0),
   so we hard-code the light values here (chroma 0 throughout). */
.cv-section--ink .cv-btn--ink {
  background-color: oklch(96% 0 0);
  color: oklch(15% 0 0);
  border-color: oklch(96% 0 0);
}
.cv-section--ink .cv-btn--ink:hover {
  background-color: oklch(100% 0 0);
  border-color: oklch(100% 0 0);
  opacity: 1;
}

/* Arrow decoration inside buttons */
.cv-btn__arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}
.cv-btn:hover .cv-btn__arrow {
  transform: translate(3px, -1px);
}

/* ============================================================
   SCROLL REVEAL — gated su html.js (fallback no-JS: visibile)
   ============================================================ */
html.js .cv-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

/* Stagger delay driven entirely by JS setTimeout in reveal.js — no CSS transition-delay needed */

html.js .cv-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Reduced motion: niente animazioni */
@media (prefers-reduced-motion: reduce) {
  .cv-reveal {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   NAV — top bar + hover mega menus + mobile drawer
   ============================================================ */
.cv-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
}
/* frosted glass on a ::before layer — NOT on .cv-nav itself, so the nav does
   not become the containing block for the position:fixed mobile drawer */
.cv-nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in oklch, var(--paper) 70%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in oklch, var(--ink) 8%, transparent);
  transition: background .25s, border-color .25s;
}
.cv-nav__inner {
  max-width: 1500px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 68px; padding: 0 clamp(20px, 3vw, 48px);
}
.cv-nav__brand { display: inline-flex; align-items: center; color: var(--ink); grid-column: 1; justify-self: start; }
.cv-nav__logo { display: block; width: 52px; height: auto; }

/* primary nav (desktop) */
.cv-nav__nav { display: flex; align-items: center; gap: clamp(2px, 0.6vw, 12px); list-style: none; margin: 0; padding: 0; grid-column: 2; justify-self: center; }
.cv-nav__item { position: relative; display: flex; }
.cv-nav__link {
  display: inline-flex; align-items: center; gap: 7px;
  font: 600 var(--text-sm)/1 var(--sans); color: var(--ink); letter-spacing: -0.01em;
  background: none; border: 0; cursor: pointer; text-decoration: none;
  padding: 10px 13px; border-radius: 10px;
}
.cv-nav__link:hover { background: color-mix(in oklch, var(--ink) 8%, transparent); }
.cv-nav__link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.cv-nav__chev { width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-1px); transition: transform .2s; opacity: 0.6; }
.cv-has-mega:hover .cv-nav__chev,
.cv-has-mega:focus-within .cv-nav__chev,
.cv-has-mega.is-open .cv-nav__chev { transform: rotate(-135deg) translateY(1px); }

/* right actions */
.cv-nav__actions { display: flex; align-items: center; gap: 10px; grid-column: 3; justify-self: end; }
.cv-nav__toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
}
.cv-nav__toggle:hover { background: color-mix(in oklch, var(--ink) 8%, transparent); }
.cv-nav__toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.cv-icon--sun { display: none; }
html[data-theme="dark"] .cv-icon--moon { display: none; }
html[data-theme="dark"] .cv-icon--sun { display: inline; }
.cv-nav__cta { padding: 10px 15px; gap: 6px; white-space: nowrap; min-height: 44px; }
.cv-nav__chev--light { opacity: 0.85; }

/* burger (mobile only) */
.cv-nav__burger { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; color: var(--ink); }
.cv-nav__burger span { display: block; width: 22px; height: 1.6px; background: currentColor; border-radius: 2px; transition: transform .25s, opacity .2s; }
.cv-nav.is-open .cv-nav__burger span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.cv-nav.is-open .cv-nav__burger span:nth-child(2) { opacity: 0; }
.cv-nav.is-open .cv-nav__burger span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

/* ── MEGA MENU ──────────────────────────────────────────── */
.cv-mega {
  position: absolute; top: calc(100% + 26px); left: 0;
  background: color-mix(in oklch, var(--paper) 72%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid color-mix(in oklch, var(--ink) 10%, transparent); border-radius: 16px;
  box-shadow: 0 26px 64px -22px oklch(0% 0 0 / 0.32);
  padding: 16px;
  opacity: 0; visibility: hidden; transform: translateY(8px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 20;
}
.cv-mega--right { left: auto; right: 0; }
.cv-mega::before { content: ''; position: absolute; top: -28px; left: 0; right: 0; height: 28px; } /* hover bridge over the gap */
.cv-has-mega:hover > .cv-mega,
.cv-has-mega:focus-within > .cv-mega,
.cv-has-mega.is-open > .cv-mega { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }

/* responsive tile grid — wraps as the collection grows; no nested card borders */
.cv-mega__grid { display: grid; grid-template-columns: repeat(3, minmax(168px, 1fr)); gap: 4px; max-width: 620px; }
.cv-mega__grid--4 { grid-template-columns: repeat(4, minmax(148px, 1fr)); max-width: 720px; }
/* ≤1180 — il pannello 4 colonne (min 638px) esce dal viewport: 2×2 compatto */
@media (max-width: 1180px) {
  .cv-mega__grid--4 { grid-template-columns: repeat(2, minmax(148px, 1fr)); max-width: 400px; }
}
.cv-mega__card { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ink); padding: 6px; transition: background .15s; }
.cv-mega__card:hover { background: color-mix(in oklch, var(--ink) 6%, transparent); }
.cv-mega__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 8px; background: var(--line); }
.cv-mega__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.cv-mega__card:hover .cv-mega__media img { transform: scale(1.04); }
.cv-mega__txt { display: flex; flex-direction: column; gap: 2px; padding: 9px 7px 5px; }
.cv-mega__kind { font: 600 var(--text-2xs, 0.62rem)/1 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ash-2); }
.cv-mega__name { font: 650 var(--text-md)/1.12 var(--sans); letter-spacing: -0.02em; }
.cv-mega__meta { font-size: var(--text-xs); color: var(--ash-1); }
.cv-mega__card--region .cv-mega__txt { padding: 8px 7px 4px; }
.cv-mega__card--region .cv-mega__name { font-size: var(--text-sm); }

/* links mega (Esplora) */
.cv-mega--links { min-width: 280px; padding: 10px; }
.cv-mega__links { display: grid; gap: 1px; }
.cv-mega__link { display: flex; flex-direction: column; gap: 2px; padding: 10px 13px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.cv-mega__link:hover { background: color-mix(in oklch, var(--ink) 8%, transparent); }
.cv-mega__link-h { font: 650 var(--text-sm)/1.1 var(--sans); letter-spacing: -0.01em; }
.cv-mega__link-p { font-size: var(--text-xs); color: var(--ash-1); }

/* book mega */
.cv-mega--book { min-width: 320px; padding: 12px; }
.cv-mega__book-head { font: 600 var(--text-2xs, 0.62rem)/1 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ash-2); padding: 6px 13px 10px; }
.cv-mega__book { display: flex; flex-direction: column; gap: 2px; padding: 11px 13px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.cv-mega__book:hover { background: color-mix(in oklch, var(--ink) 8%, transparent); }
.cv-mega__book-n { font: 650 var(--text-sm)/1.1 var(--sans); letter-spacing: -0.01em; }
.cv-mega__book-m { font-size: var(--text-xs); color: var(--ash-1); }

/* ── OVER-HERO (transparent until scrolled / mega open) ──── */
.cv-nav--over-hero::before { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-color: transparent; }
.cv-nav--over-hero:not(.is-scrolled):not(.is-open) .cv-nav__link,
.cv-nav--over-hero:not(.is-scrolled):not(.is-open) .cv-nav__brand,
.cv-nav--over-hero:not(.is-scrolled):not(.is-open) .cv-nav__toggle,
.cv-nav--over-hero:not(.is-scrolled):not(.is-open) .cv-nav__burger { color: oklch(98% 0 0); }
.cv-nav--over-hero:not(.is-scrolled):not(.is-open) .cv-nav__link,
.cv-nav--over-hero:not(.is-scrolled):not(.is-open) .cv-nav__burger span { text-shadow: 0 1px 10px oklch(0% 0 0 / 0.45); }
.cv-nav--over-hero:not(.is-scrolled):not(.is-open) .cv-nav__logo { filter: drop-shadow(0 1px 6px oklch(0% 0 0 / 0.5)); }
.cv-nav--over-hero:not(.is-scrolled):not(.is-open) .cv-nav__toggle { border-color: oklch(98% 0 0 / 0.4); }
/* solid only when scrolled or drawer open — NOT on mega hover (header stays
   transparent over the hero; the mega panel carries its own surface) */
.cv-nav--over-hero.is-scrolled::before,
.cv-nav--over-hero.is-open::before {
  background: color-mix(in oklch, var(--paper) 70%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: color-mix(in oklch, var(--ink) 8%, transparent);
}

/* ── MOBILE DRAWER ──────────────────────────────────────── */
.cv-nav__drawer {
  position: fixed; top: 68px; left: 0; right: 0; bottom: 0;
  background: var(--paper); padding: 8px clamp(16px, 5vw, 32px) 40px;
  overflow-y: auto; transform: translateX(100%); transition: transform .3s ease;
  visibility: hidden;
}
.cv-nav.is-open .cv-nav__drawer { transform: translateX(0); visibility: visible; }
.cv-nav__drawer-inner { display: flex; flex-direction: column; }
.cv-nav__drawer-label { font: 600 var(--text-2xs, 0.62rem)/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ash-2); margin: 22px 0 6px; }
.cv-nav__drawer-inner a { font: 600 var(--text-lg)/1 var(--sans); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; padding: 13px 0; border-bottom: 1px solid var(--line); }
.cv-nav__drawer-inner a:active { opacity: 0.6; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1000px) {
  .cv-nav__nav, .cv-nav__book { display: none; }
  .cv-nav__burger { display: inline-flex; }
}
@media (min-width: 1001px) {
  .cv-nav__drawer { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cv-mega, .cv-nav--over-hero, .cv-nav__drawer, .cv-mega__media img, .cv-nav__burger span { transition: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.cv-footer {
  position: relative;
  isolation: isolate;
  /* piano più profondo della pagina: è il fondo su cui poggia il vetro */
  background-color: color-mix(in oklch, var(--paper) 93%, var(--ink));
  border-top: 1px solid var(--line);
  padding-block: clamp(56px, 6vw, 88px) clamp(20px, 2.5vw, 32px);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
/* Strato luce: il footer legge come un piano staccato dalla pagina */
.cv-footer::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 70% at 10% -20%, oklch(55% 0 0 / 0.13), transparent 62%),
    linear-gradient(to bottom, oklch(50% 0 0 / 0.08), transparent 32%);
}
html[data-theme="dark"] .cv-footer::before {
  background:
    radial-gradient(120% 70% at 10% -20%, oklch(78% 0 0 / 0.10), transparent 62%),
    linear-gradient(to bottom, oklch(90% 0 0 / 0.06), transparent 32%);
}

.cv-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--gap);
  margin-bottom: clamp(48px, 6vw, 72px);
  align-items: start;
}

/* Footer logo (theme-adaptive via CSS mask — no inline SVG duplication) */
.cv-footer__brand-link { display: inline-block; margin-bottom: 20px; }
.cv-footer__logo {
  display: block;
  width: 62px;
  height: 34px;
  background-color: var(--ink);
  -webkit-mask: url('/images/civis-logo.svg') no-repeat left center / contain;
          mask: url('/images/civis-logo.svg') no-repeat left center / contain;
}

.cv-footer__wordmark {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 20px;
}

.cv-footer__tagline {
  margin-bottom: 28px;
  color: var(--ash-1);
  max-width: 36ch;
  font-size: var(--text-sm);
  font-weight: 300;
}

.cv-footer__socials {
  display: flex;
  gap: 10px;
}

.cv-footer__social {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ash-2);
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.cv-footer__social:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.cv-footer__social:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.cv-footer__col-label {
  margin-bottom: 20px;
  display: block;
}

.cv-footer__links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cv-footer__links a {
  font-family: var(--sans);
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--ash-1);
  transition: color 0.25s var(--ease);
}

.cv-footer__links a:hover {
  color: var(--ink);
}

.cv-footer__links a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 2px;
}

.cv-footer__divider {
  width: 100%;
  height: 0;
  border-top: 1px dashed var(--line);
  margin-bottom: 28px;
  transition: border-color 0.4s var(--ease);
}

.cv-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cv-footer__copy,
.cv-footer__legal a {
  font-family: var(--sans);
  font-size: var(--text-xs);
  font-weight: 300;
  color: var(--ash-2);
  letter-spacing: 0.04em;
}

.cv-footer__legal {
  display: flex;
  gap: 20px;
}

.cv-footer__legal a:hover {
  color: var(--ink);
}

.cv-footer__legal a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ≤1024 — tablet: 2-col footer grid */
@media (max-width: 1024px) {
  .cv-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .cv-footer__brand {
    grid-column: 1 / -1;
  }
}

/* ≤768 — mobile: single-col footer */
@media (max-width: 768px) {
  .cv-footer__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .cv-footer__brand {
    grid-column: auto;
  }
  .cv-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ≤390 — small mobile: tighten footer spacing */
@media (max-width: 390px) {
  .cv-footer {
    padding-block: clamp(40px, 8vw, 60px) clamp(20px, 4vw, 28px);
  }
  .cv-footer__bottom {
    gap: 8px;
  }
}

/* ── FOOTER NEWSLETTER ───────────────────────────────────── */
.cv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cv-footer__news {
  display: grid; grid-template-columns: 1fr minmax(0, 460px);
  align-items: center; gap: clamp(20px, 4vw, 64px);
  padding: clamp(24px, 3.2vw, 44px);
  margin-bottom: clamp(36px, 4.5vw, 64px);
  border: 1px solid color-mix(in oklch, var(--ink) 14%, transparent);
  border-radius: var(--radius-lg);
  background: color-mix(in oklch, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow:
    inset 0 1px 0 0 color-mix(in oklch, var(--ink) 8%, transparent),
    0 30px 60px -48px oklch(0% 0 0 / 0.55);
}
.cv-footer__news-h {
  font: 400 var(--text-xl)/1.12 var(--sans);
  letter-spacing: -0.025em; color: var(--ink);
  margin-top: clamp(8px, 1vw, 12px); max-width: 22ch; text-wrap: balance;
}
.cv-footer__news-form { display: flex; flex-direction: column; gap: 12px; }
.cv-footer__news-row { display: flex; gap: 10px; }
.cv-footer__news-input {
  flex: 1 1 auto; min-width: 0;
  font: 400 var(--text-base)/1 var(--sans); color: var(--ink);
  font-size: max(1rem, var(--text-base)); /* ≥16px: evita l'auto-zoom iOS al focus */
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 13px 20px;
  transition: border-color .2s var(--ease);
}
.cv-footer__news-input::placeholder { color: var(--ash-2); }
.cv-footer__news-input:focus-visible { outline: none; border-color: var(--ink); }
.cv-footer__news-row .cv-btn { flex: 0 0 auto; }
.cv-footer__news-consent {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: var(--text-xs); line-height: 1.5; color: var(--ash-1); cursor: pointer;
}
.cv-footer__news-consent input { margin-top: 0.18em; accent-color: var(--ink); flex: 0 0 auto; }
.cv-footer__news-consent a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.cv-footer__news-msg { font-size: var(--text-xs); line-height: 1.5; min-height: 1.2em; margin: 0; }
.cv-footer__news-msg[data-state="ok"]  { color: var(--ink); }
.cv-footer__news-msg[data-state="err"] { color: var(--ash-1); }
@media (max-width: 820px) {
  .cv-footer__news { grid-template-columns: 1fr; gap: 18px; }
  .cv-footer__news-row { flex-wrap: wrap; }
  .cv-footer__news-row .cv-btn { width: 100%; justify-content: center; }
}


/* ============================================================
   LA ROTTA — motivo ricorrente
   Linea piena dove la collezione è arrivata, tratteggiata dove
   deve ancora arrivare. Si disegna una volta all'ingresso in
   viewport; reveal.js non aggiunge .is-in con reduced-motion,
   quindi il tratto resta fermo e completo.
   ============================================================ */
.cv-route { display: block; width: 100%; height: 100%; overflow: visible; color: var(--ink); }
.cv-route__line {
  fill: none; stroke: url(#cv-route-fade); stroke-width: 1.5; stroke-linecap: round;
  stroke-dasharray: 5 9; vector-effect: non-scaling-stroke;
}
/* La linea si scopre da Roma in poi: una tendina, non dei trattini che scivolano */
.cv-route__wipe {
  transform: scaleX(0); transform-origin: left center;
  transition: transform 1500ms var(--ease);
}
.cv-route.is-in .cv-route__wipe { transform: scaleX(1); }
html:not(.js) .cv-route__wipe { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  .cv-route__wipe { transition: none; transform: scaleX(1); }
}

/* Glifo compatto: precede gli eyebrow dei blocchi Grand Tour */
.cv-routemark { display: inline-block; width: 46px; height: 8px; margin-right: 10px; vertical-align: middle; }
.cv-routemark path { fill: none; stroke: currentColor; stroke-width: 1.25; stroke-dasharray: 4 6; opacity: 0.6; }
.cv-routemark circle { fill: currentColor; }




@media (prefers-reduced-transparency: reduce) {
  .cv-footer__news { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@supports not (backdrop-filter: blur(1px)) {
  .cv-footer__news { background: var(--paper); }
}
@media (prefers-reduced-transparency: reduce) {
  .cv-footer__news { background: var(--paper); }
}

/* ── Tappe future: presenti nei menu, non cliccabili ─────────────────────── */
.cv-mega__card--soon { cursor: default; opacity: 0.55; }
.cv-mega__card--soon .cv-mega__media img { filter: grayscale(1); }
.cv-nav__drawer-soon,
.cv-footer__soon {
  display: block; font-size: var(--text-sm); color: var(--ash-2);
  letter-spacing: -0.01em; padding: 6px 0;
}


/* ── Skeleton loader: shimmer finché il media non è davvero caricato ─────── */
@keyframes cv-skel-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.cv-skel {
  position: relative;
  overflow: hidden;
  background-color: color-mix(in oklch, var(--paper) 92%, var(--ink));
}
.cv-skel::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background-image: linear-gradient(100deg,
    color-mix(in oklch, var(--paper) 92%, var(--ink)) 28%,
    color-mix(in oklch, var(--paper) 97%, var(--ink)) 46%,
    color-mix(in oklch, var(--paper) 92%, var(--ink)) 64%);
  background-size: 200% 100%;
  background-repeat: no-repeat;
  animation: cv-skel-shimmer 1.5s linear infinite;
}
.cv-skel > img,
.cv-skel > video,
.cv-skel picture > img { opacity: 0; }

.cv-skel--done > img,
.cv-skel--done > video,
.cv-skel--done picture > img { animation: cv-skel-in 0.45s var(--ease) both; }
@keyframes cv-skel-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .cv-skel::after { animation: none; }
  .cv-skel--done > img, .cv-skel--done > video, .cv-skel--done picture > img { animation: none; }
}

/* ── Meandro: la rotta punteggiata di fondo, alla maniera delle mappe ──────
   Punti tondi (non trattini: quelli sono la rotta funzionale), curve larghe,
   opacità bassa. Statico: sfuma insieme alla sezione, nessun loop. */
.cv-meander {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  overflow: visible;
}
.cv-meander path {
  fill: none; stroke: currentColor; stroke-width: 3;
  stroke-linecap: round; stroke-dasharray: 0.1 16;
  vector-effect: non-scaling-stroke;
}
.cv-meander circle { fill: currentColor; }
.cv-footer .cv-meander { color: var(--ash-2); opacity: 0.28; z-index: -1; }
.cv-section--ink .cv-meander,
.cv-tour .cv-meander { color: var(--paper); opacity: 0.10; }
.cv-pp .cv-meander { color: var(--ash-2); opacity: 0.20; }

/* ============================================================
   SUB-NAV — scorciatoie sotto l'header, solo mobile/tablet:
   sul telefono il menu vive dietro il burger, questa barra
   porta le pagine principali a un tap. Pill glass sopra le foto.
   ============================================================ */
.cv-subnav { display: none; }
@media (max-width: 900px) {
  .cv-subnav {
    display: block;
    position: fixed; top: 68px; left: 0; right: 0; z-index: 190;
    pointer-events: none;
  }
  .cv-subnav__track {
    display: flex; gap: 6px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 16px 10px;
    pointer-events: auto;
    -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent);
    mask-image: linear-gradient(90deg, #000 90%, transparent);
  }
  .cv-subnav__track::-webkit-scrollbar { display: none; }
  .cv-subnav__track a {
    flex: 0 0 auto;
    display: inline-flex; align-items: center;
    min-height: 40px; padding: 0 15px;
    font: 600 var(--text-xs)/1 var(--sans);
    letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--ink); text-decoration: none;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: color-mix(in oklch, var(--paper) 78%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .cv-subnav__track a[aria-current="page"] {
    color: var(--paper);
    background: var(--ink);
    border-color: var(--ink);
  }
}
