/* ============================================
   H&A MOTIVATION COMPANY — styles.css (optimized)
   ============================================ */

/* ── FONTS (self-hosted, no Google CDN) ─────── */
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/libre-baskerville-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/libre-baskerville-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/libre-baskerville-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/libre-baskerville-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/libre-baskerville-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/libre-baskerville-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── RESET ─────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
img, video, svg { max-width: 100%; display: block; }
button { border: none; background: none; font-family: inherit; cursor: pointer; padding: 0; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 4px; }

/* ── TOKENS ─────────────────────────────────── */
:root {
  --pink: #FF0052;
  --pink-hover: #e0004a;
  --dark: #0A0A0A;
  --dark-2: #111;
  --white: #FFFFFF;
  --txt-muted: rgba(255,255,255,0.5);
  --txt-low: rgba(255,255,255,0.6);   /* was 0.4 — raised to meet WCAG AA (4.5:1) for label text */
  --border-soft: rgba(255,255,255,0.1);
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Libre Baskerville', Georgia, serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.77, 0, 0.175, 1);
  --glass: rgba(0,0,0,0.25);
  --nav-gutter: clamp(24px, 5vw, 80px);
}

/* ── BASE ───────────────────────────────────── */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--white);
  background: var(--dark);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100svh;
  text-wrap: pretty;
}

@media (hover: none) { body { cursor: auto; } }

/* Custom cursor removed (2026-07) — the native OS cursor is used everywhere.
   The .cursor-dot/.cursor-ring elements are hidden (below) and initCursor() is
   no longer called. Interactive elements keep the native pointer. */
.hover-target { cursor: pointer; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--nav-gutter);
  position: relative;
  z-index: 2;
}

/* ── A11Y UTILS ─────────────────────────────── */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── SNAP ───────────────────────────────────── */
.snap-section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;        /* vh fallback for browsers without svh */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.snap-section-auto { scroll-snap-align: start; scroll-snap-stop: always; }
.snap-point {
  position: absolute;
  width: 100%;
  height: 1px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  pointer-events: none;
}

/* Off-screen sections skip paint/layout for performance (non-snap only) */
footer {
  content-visibility: auto;
  contain-intrinsic-size: 1px 800px;
}

/* ── UTILS ──────────────────────────────────── */
.overlay-inset { position: absolute; inset: 0; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* ── TYPOGRAPHY ─────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(30px);
}
.section-label-light { color: var(--txt-low); }

.accent-italic {
  color: var(--pink);
  font-style: italic;
  font-family: var(--font-serif);
  font-weight: 400;
}

.italic-word { font-style: italic; font-family: var(--font-serif); font-weight: 400; }
.red-word { color: #ff2d2d; font-style: italic; font-family: var(--font-serif); }
.rainbow-word {
  font-style: italic;
  font-family: var(--font-serif);
  background: linear-gradient(90deg, #ff004d, #ff8a00, #ffd500, #00c853, #2979ff, #8e24aa, #d500f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-phrase {
  display: block;
  font-size: clamp(40px, 6.4vw, 104px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.hero-label {
  margin-bottom: 20px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.body-text {
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.6;
  color: var(--txt-muted);
  margin-bottom: 16px;
}
.body-text strong { color: var(--white); font-weight: 600; }

/* ── ICON BUTTON ────────────────────────────── */
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.9);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  background: transparent;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--pink); border-color: var(--pink); transform: scale(1.05); }
.icon-btn-glass {
  background: rgba(0,0,0,0.35);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-color: rgba(255,255,255,0.1);
  width: 48px; height: 48px;
}

/* ── CUSTOM CURSOR ──────────────────────────── */
.cursor-dot, .cursor-ring {
  /* Custom cursor removed — kept in the DOM (initVideo references .cursor-ring)
     but never rendered. */
  display: none !important;
}
.cursor-dot { width: 8px; height: 8px; background: var(--pink); }
.cursor-ring {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.cursor-ring.hover {
  width: 80px; height: 80px;
  border-color: var(--pink);
  background: rgba(255,0,82,0.08);
}

/* Cursor video mode */
.cursor-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 18px; height: 18px;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.cursor-ring.on-video {
  width: 48px; height: 48px;
  border-width: 1px;
  border-color: rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.35);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}
.cursor-ring.on-video.is-paused .cursor-icon-play  { opacity: 1; }
.cursor-ring.on-video.is-playing .cursor-icon-pause { opacity: 1; }
/* Nasconde il pallino rosso quando il cursore è sul video (:has perché il dot precede il ring nel DOM) */
body:has(.cursor-ring.on-video) .cursor-dot { opacity: 0 !important; }

/* Mute button — expand hint */
#btnMuteUnmute {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: auto;         /* rimuove il 48px fisso di icon-btn-glass */
  min-width: 48px;     /* mai più piccolo del cerchio */
  max-width: 48px;     /* bloccato a cerchio in default */
  border-radius: 9999px; /* pill perfetto — cerchio quando 48×48, pill arrotondato quando esteso */
  transition: max-width 0.5s var(--ease), padding 0.5s var(--ease), gap 0.4s var(--ease), background 0.3s, border-color 0.3s, transform 0.3s;
}
#btnMuteUnmute:hover { transform: none; }
#btnMuteUnmute.expanded {
  max-width: 220px;    /* si allarga fino al contenuto reale */
  padding: 0 14px 0 14px;
  gap: 8px;
  justify-content: flex-start;
}
.mute-hint-label {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.02em;
  max-width: 0;        /* nascosto senza occupare spazio */
  overflow: hidden;
  opacity: 0;
  flex-shrink: 0;
  transition: max-width 0.5s var(--ease), opacity 0.15s;
}
#btnMuteUnmute.expanded .mute-hint-label {
  max-width: 120px;
  opacity: 1;
  transition: max-width 0.5s var(--ease), opacity 0.2s 0.2s;
}

@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none !important; } }

/* ── LOADER ─────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 99998;
  /* Fully opaque so nothing behind (the Vimeo player's own grey loading
     screen) bleeds through while the video buffers — stays solid black
     until it fades out onto the first rendered frame. */
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s var(--ease-snap), visibility 0.9s;
}
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
#loader.done .loader-inner { transform: scale(1.1); opacity: 0; }

.loader-inner {
  text-align: center;
  transition: transform 0.8s var(--ease-snap), opacity 0.8s;
}
.loader-logo-img { width: 200px; margin: 0 auto 28px; }
.loader-ring { width: 56px; height: 56px; margin: 0 auto; overflow: visible; }
.loader-ring-bg { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 3; }
.loader-ring-fill {
  fill: none;
  stroke: var(--pink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 289;
  stroke-dashoffset: 289;
  transform: rotate(-90deg);
  transform-origin: center;
  filter: drop-shadow(0 0 6px var(--pink));
}

/* ── LANG SWITCH ────────────────────────────── */
.lang-switch { display: flex; align-items: center; gap: 6px; }
.lang-switch a { font-size: 13px; font-weight: 700; opacity: 0.5; transition: opacity 0.3s, color 0.3s; }
.lang-switch a:hover { opacity: 1; color: var(--pink); }
.lang-switch a.active { opacity: 1; color: var(--white); }
.lang-sep { font-size: 12px; color: rgba(255,255,255,0.2); user-select: none; }

/* ── NAVBAR ─────────────────────────────────── */
#navbar {
  --nav-inset-x: 0px;
  --nav-inset-y: 0px;
  --nav-radius: 0px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px calc(var(--nav-gutter) + var(--nav-inset-x));
  transform: translate3d(0, var(--nav-inset-y), 0);
  transition:
    padding 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
#navbar::before {
  content: '';
  position: absolute;
  top: 0; right: var(--nav-inset-x); bottom: 0; left: var(--nav-inset-x);
  z-index: -1;
  background: rgba(0,0,0,0.25);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--nav-radius);
  opacity: 0;
  box-shadow: 0 12px 40px rgba(0,0,0,0);
  transition:
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    right 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
#navbar.scrolled {
  --nav-inset-x: clamp(24px, 6vw, 72px);
  --nav-inset-y: 16px;
  --nav-radius: 38px;
  padding: 10px calc(var(--nav-inset-x) + 22px);
}
#navbar.scrolled::before {
  opacity: 1;
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  height: 38px;
}
.nav-logo-img {
  height: 38px;
  width: auto;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: left center;
  backface-visibility: hidden;
}
#navbar.scrolled .nav-logo-img { transform: scale(0.78); }
.navbar-minimal .nav-logo-img { transform-origin: center center; }
.navbar-minimal { justify-content: center !important; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}
.nav-links a:not(.nav-cta):hover,
.nav-links a:not(.nav-cta).active { color: var(--pink); }
/* Menu footer block (contatti/sedi/social) — visibile solo nel menù mobile */
.nav-menu-foot { display: none; }

.nav-cta {
  background: rgba(0,0,0,0.35);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 10px 25px;
  border-radius: 9999px;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.nav-cta:hover { background: var(--pink); border-color: var(--pink); transform: scale(1.05); }

/* ── HAMBURGER ──────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 20px;
  z-index: 2000;
  position: relative;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ── HERO VIDEO ─────────────────────────────── */
#hero-video {
  position: relative;
  height: 100vh;            /* vh fallback for browsers without svh */
  height: 100svh;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dark) 0%, #1a0005 100%);
}
/* Vimeo iframe → cover the hero like object-fit:cover (16:9 source) */
.hero-video-embed {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--dark);
}
.hero-video-embed iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 56.25vw;          /* 16:9 → h = w × 9/16 */
  min-height: 100vh;        /* vh fallback for browsers without svh */
  min-height: 100svh;
  min-width: 177.78vh;      /* 16:9 → w = h × 16/9 */
  min-width: 177.78svh;
  border: 0;
  pointer-events: none;     /* clicks handled by the overlay above */
  /* Hidden until its first frame is ready (JS adds .is-ready), so the player's
     own loading background never shows — the solid-black embed shows meanwhile.
     Lets the loader dismiss fast without a grey flash. */
  opacity: 0;
  transition: opacity 0.6s ease;
}
.hero-video-embed.is-ready iframe { opacity: 1; }
.hero-video-overlay {
  z-index: 1;
  background: linear-gradient(0deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.05) 100%);
}

.video-timer-left {
  position: absolute;
  bottom: 20px;
  left: var(--nav-gutter);
  z-index: 10;
  display: flex;
  align-items: center;
  height: 48px;
  color: var(--txt-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.video-controls {
  position: absolute;
  bottom: 20px;
  right: 40px;
  z-index: 10;
  display: flex;
  gap: 16px;
}

[data-muted="true"] .icon-unmute,
[data-muted="false"] .icon-mute { display: none; }

/* Play/pause button: show the icon for the action available now */
#btnPlayPause[data-playing="true"] .icon-pp-play { display: none; }   /* playing → offer pause */
#btnPlayPause[data-playing="false"] .icon-pp-pause { display: none; } /* paused  → offer play  */
#btnPlayPause svg { width: 18px; height: 18px; }

/* ── HERO TEXT ──────────────────────────────── */
#hero-text { text-align: center; background: var(--dark); position: relative; z-index: 2; }

.hero-title {
  margin-bottom: 24px;
  opacity: 0;
  will-change: transform, opacity;
  transform: translate3d(0, 28px, 0);
  backface-visibility: hidden;
}
.hero-line {
  display: block;
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.hero-line .char { display: inline-block; }

.hero-sub {
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.6;
  opacity: 0;
  font-weight: 400;
  color: var(--txt-muted);
  margin: 24px auto 0;
  max-width: 540px;
  will-change: transform, opacity;
  transform: translate3d(0, 28px, 0);
  backface-visibility: hidden;
}
.hero-sub em { font-family: var(--font-serif); font-style: italic; color: var(--pink); }

/* ── CHI SIAMO ──────────────────────────────── */
.cs-big-number { display: none; }
.chi-siamo-creative { position: relative; }
.cs-content { position: relative; z-index: 1; max-width: 960px; margin: 0 auto; text-align: left; }
.reveal-heading {
  font-size: clamp(34px, 4.3vw, 62px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
#hero-text .reveal-heading,
#cta .reveal-heading {
  font-size: clamp(54px, 7vw, 100px);
  line-height: 1.05;
}
.reveal-heading--flush { margin-bottom: 0; }
.cs-text-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

/* ── APPROCCIO ──────────────────────────────── */
.approccio-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: left;
}
.approccio-inner > * { max-width: 100%; }
.word-highlight-text {
  font-size: clamp(34px, 4.3vw, 62px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 1000px;
}
.word-highlight-text .word { display: inline-block; opacity: 0.12; transition: opacity 0.4s; }
.word-highlight-text .word.lit { opacity: 1; }
.word-highlight-text .word-italic {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--pink);
  font-weight: 400;
}
.word-highlight-text .word-italic.lit { animation: textGlowFade 2s ease-out forwards; }

@keyframes textGlowFade {
  0%   { text-shadow: 0 0 15px var(--pink), 0 0 35px var(--pink); }
  100% { text-shadow: none; }
}
.glow-active { animation: textGlowFade 3s ease-out forwards; }

/* ── BU PAGINATION ──────────────────────────── */
#bu-pagination {
  position: fixed;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  background: rgba(0,0,0,0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 22px;
  padding: 14px 10px;
}
#bu-pagination.visible { opacity: 1; pointer-events: auto; }

.bu-dot-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bu-dot-wrap:hover .bu-dot-label { opacity: 1; transform: translateX(0); }
.bu-dot-wrap:hover .bu-dot,
.bu-dot-wrap.active .bu-dot {
  background: var(--pink);
  border-color: var(--pink);
  transform: scale(1.2);
}

.bu-dot-label {
  position: absolute;
  right: calc(100% + 20px);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--white);
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.bu-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  flex-shrink: 0;
  position: relative;
}
.bu-dot::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 20px; height: 20px;
  background: transparent;
}

/* ── BUSINESS UNITS ─────────────────────────── */
#business-units-wrapper {
  position: relative;
  width: 100%;
  height: 300vh;            /* vh fallback for browsers without svh */
  height: 300svh;
}
.sticky-panel {
  position: sticky;
  top: 0;
  height: 100vh;            /* vh fallback for browsers without svh */
  height: 100svh;
  width: 100%;
  overflow: hidden;
}
.bu-anim-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(110px, 16vh, 200px);
  background-size: cover;
  background-position: center;
  background-color: var(--dark);
  will-change: transform;
  transform: translateZ(0);
}
.bu-panel-overlay {
  background: linear-gradient(to right, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.6) 35%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0) 80%);
  z-index: 1;
}
.bu-blur-glass {
  position: absolute;
  inset: 0;
  z-index: 10;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: rgba(0,0,0,0.25);
  opacity: 0;
  will-change: opacity;
  pointer-events: none;
}

.bu-panel-content {
  position: relative;
  z-index: 3;
  padding: 0 var(--nav-gutter);
  max-width: 900px;
}
.bu-title-wrap { position: relative; display: block; margin-bottom: 24px; }
.bu-line-decor { display: none; }
.bu-panel-title {
  font-size: clamp(50px, 6.6vw, 92px);
  font-weight: 600;
  line-height: 1.05;
}
.bu-panel-label { margin-bottom: 12px; opacity: 1; transform: none; }
.bu-panel-desc {
  font-size: clamp(16px, 1.4vw, 21px);
  line-height: 1.55;
  opacity: 0.8;
  max-width: 600px;
}
.bu-glass-badge, .bu-progress-bar, .bu-progress-fill { display: none; }

/* ── CASE HISTORIES ─────────────────────────── */
#case-histories { padding-top: 140px; }
.mobile-br { display: none; }

.case-history-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}
.case-filters-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 20px;
}
.case-filters { display: flex; gap: 12px; flex-wrap: wrap; }
.case-filter {
  padding: 10px 24px;
  border-radius: 22px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--txt-muted);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.case-filter:hover { border-color: var(--pink); color: var(--pink); }
.case-filter.active { background: var(--white); color: var(--dark); border-color: var(--white); }

.case-controls { display: none; }

.cases-track-wrap { position: relative; }
.cases-arrow {
  position: absolute;
  top: 46%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  background: rgba(0,0,0,0.32);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: grid;
  place-items: center;
  z-index: 20;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.cases-arrow:hover { background: var(--pink); border-color: var(--pink); }
.cases-arrow.prev { left: clamp(12px, 2.5vw, 32px); }
.cases-arrow.next { right: clamp(12px, 2.5vw, 32px); }
.cases-arrow svg { width: 22px; height: 22px; }

.cases-track-native {
  --case-card-w: clamp(220px, 17vw, 280px);
  --case-card-w-active: clamp(520px, 55vw, 920px);
  --case-card-h: clamp(280px, 23vw, 360px);
  --case-gap: 24px;
  --case-active-offset: max(var(--nav-gutter), calc((100vw - 1280px) / 2 + var(--nav-gutter)));
  --case-client-fs-base: 22px;
  --case-client-fs-active: 28px;
  position: relative;
  width: 100%;
  height: calc(var(--case-card-h) + 80px);
  overflow: hidden;
  margin-block: 0;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}
.cases-track-native.dragging { cursor: grabbing; }
.case-card {
  position: absolute;
  left: 0;
  top: 46%;
  width: var(--case-card-w);
  height: var(--case-card-h);
  margin-top: calc(var(--case-card-h) / -2);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transform-origin: left center;
  isolation: isolate;
  will-change: transform;
}
.case-card img { border-radius: 20px; }
.case-card.is-active {
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
}
.case-card:not(.is-active) { pointer-events: none; }

/* Open button — visible on hover of the active card */
.case-card-open {
  position: absolute;
  bottom: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.95);
  background: rgba(0,0,0,0.35);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 9999px;
  cursor: pointer;
  z-index: 4;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s, border-color 0.3s;
}
.case-card-open svg { width: 16px; height: 16px; }
.case-card.is-active:hover .case-card-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.case-card-open:hover { background: var(--pink); border-color: var(--pink); }

/* Client name baseline; size driven continuously by JS for smooth growth */
.case-card-client { font-size: 22px; }
.case-card img {
  width: var(--case-card-w-active);
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}
.case-card.is-active:hover .case-card-meta {
  opacity: 0.75;
  max-height: 40px;
  margin-top: 8px;
}

.case-card-overlay {
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.35) 45%, transparent 80%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  text-align: left;
}
.case-card-category {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--white); opacity: 0.7; margin-bottom: 8px;
}
.case-card-client { font-size: 22px; font-weight: 600; line-height: 1.15; }
.case-card-meta {
  font-size: 12px;
  opacity: 0;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  color: rgba(255,255,255,0.85);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), max-height 0.65s cubic-bezier(0.22, 1, 0.36, 1), margin-top 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── CASE MODAL ─────────────────────────────── */
.case-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  background: rgba(0,0,0,0);
  transition: opacity 0.5s var(--ease), backdrop-filter 0.5s, background 0.5s, visibility 0.5s;
}
.case-modal.open {
  opacity: 1;
  visibility: visible;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  background: rgba(0,0,0,0.3);
}
.case-modal-backdrop { cursor: pointer; background: transparent; }

.case-modal-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  background: var(--dark-2);
  border-radius: 30px;
  max-width: 1200px;
  width: 94%;
  height: 85vh;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  transform: translateY(40px) scale(0.97);
  transition: transform 0.6s var(--ease);
}
.case-modal.open .case-modal-content { transform: translateY(0) scale(1); }

.carousel-wrapper {
  flex: 1.3;
  position: relative;
  height: 100%;
  background: #000;
}
.case-modal-carousel {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}
.case-modal-carousel img {
  flex: 0 0 100%;
  width: 100%; height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.3s, border-color 0.3s;
}
.carousel-btn:hover { background: var(--pink); border-color: var(--pink); }
.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }

.carousel-indicators {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
  padding: 10px 18px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 22px;
}
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.carousel-dot.active { background: var(--pink); border-color: var(--pink); transform: scale(1.2); }

.case-modal-body {
  flex: 1;
  padding: clamp(40px, 5vw, 60px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  text-align: left;
  overscroll-behavior: contain;
}
.case-modal-body::-webkit-scrollbar { width: 4px; }
.case-modal-body::-webkit-scrollbar-thumb { background: var(--border-soft); border-radius: 10px; }

.case-modal-close {
  position: absolute;
  top: 20px; right: 20px;
  z-index: 100;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  display: grid;
  place-items: center;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  font-size: 22px;
  padding-bottom: 8px;
  cursor: pointer;
}
.case-modal-close:hover { background: var(--pink); border-color: var(--pink); transform: scale(1.05); }

.case-modal-category { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.5; }
.case-modal-client { font-size: clamp(32px, 3vw, 48px); font-weight: 600; margin: 12px 0 32px; line-height: 1.1; }

.case-modal-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 32px;
}
.case-modal-meta strong { color: rgba(255,255,255,0.6); font-size: 11px; text-transform: uppercase; display: block; margin-bottom: 4px; }
.case-modal-meta span { font-size: 14px; color: rgba(255,255,255,0.8); display: block; }

.modal-text-grid { display: flex; flex-direction: column; gap: 40px; }
.case-modal-section h4 { font-size: 11px; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 12px; }
.long-text { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.75); }

/* ── NUMERI ─────────────────────────────────── */
#numeri {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  width: 100%;
}
.stat-row { display: flex; flex-direction: column; gap: 8px; }
.stat-number-wrap { display: flex; align-items: baseline; gap: 4px; opacity: 0.6; }
.stat-prefix, .stat-suffix { font-size: 26px; font-weight: 800; }
.stat-number { font-size: 54px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: rgba(255,255,255,0.7); }

/* ── PARTNER MARQUEE ────────────────────────── */
.marquee-wrap { overflow: hidden; padding: 24px 0 0; position: relative; z-index: 2; }
.marquee-row {
  display: flex;
  width: max-content;
  gap: 16px;
  padding: 8px 0;
  will-change: transform;
}
.marquee-row.left  { animation: marqueeLeft  40s linear infinite; }
.marquee-row.right { animation: marqueeRight 40s linear infinite; }
/* Pause rules MUST come after the `animation` shorthand above: the shorthand
   implicitly resets animation-play-state to `running`, so at equal specificity
   these only win by being declared later. Pauses on hover and while off-screen. */
.marquee-row:hover { animation-play-state: paused; }
.marquee-paused .marquee-row { animation-play-state: paused; }

@keyframes marqueeLeft  { to   { transform: translateX(-50%); } }
@keyframes marqueeRight { from { transform: translateX(-50%); } }

.marquee-item {
  padding: 17px 30px;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  border: none;
  color: var(--txt-muted);
  flex-shrink: 0;
}

/* ── CTA ────────────────────────────────────── */
.section-cta {
  padding: clamp(120px, 15vw, 200px) 0;
  text-align: center;
  background: var(--dark);
  position: relative;
  overflow: hidden;
}
.cta-inner { position: relative; z-index: 1; }
.cta-label { font-size: clamp(24px, 3vw, 36px); font-weight: 600; line-height: 1; margin-bottom: 5px; }
.cta-heading {
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-top: 5px;
  margin-bottom: 60px;
  position: relative;
}
.glow-word { position: relative; }
.glow-word::after {
  content: '';
  position: absolute;
  width: 300%;
  height: 300%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,0,82,0.22) 0%, rgba(255,0,82,0.08) 35%, transparent 65%);
  pointer-events: none;
  z-index: -1;
}

.magnetic-btn-wrap { display: inline-block; padding: 20px; }
.magnetic-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 20px 48px;
  background: var(--pink);
  color: var(--white);
  border-radius: 9999px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.3s;
  will-change: transform;
  white-space: nowrap;
}
.magnetic-btn:hover { background: var(--pink-hover); }

/* ── CERTIFICATES ───────────────────────────── */
.cred-grid { display: grid; grid-template-columns: 1fr; gap: 70px; position: relative; z-index: 2; }
.cred-block h3 { font-size: 20px; font-weight: 600; margin-bottom: 24px; }
.cert-logos { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.cert-logo-img {
  height: 100px; width: auto;
  object-fit: contain;
  opacity: 0.6;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
.award-img { height: 70px; }

/* ── FOOTER ─────────────────────────────────── */
footer {
  position: relative;
  z-index: 2;
  padding: 90px 0 24px;
  background: transparent;
  overflow: visible;
}
.footer-box {
  position: relative;
  padding: 56px 0 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
  z-index: 2;
}
.footer-outside {
  position: relative;
  z-index: 2;
  padding-top: 28px;
  padding-bottom: 16px;
}
.footer-glow {
  position: absolute;
  bottom: -10%; left: 50%;
  transform: translateX(-50%);
  width: min(1400px, 120vw);
  height: 500px;
  background: radial-gradient(ellipse at center bottom, rgba(255,0,82,0.18) 0%, rgba(255,0,82,0.06) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.footer-logo { width: 150px; margin-bottom: 24px; height: auto; }
.footer-claim { max-width: 260px; }
.footer-address { font-style: normal; }

.footer-grid-new {
  display: grid;
  grid-template-columns: 2.5fr 1.5fr 1.5fr 1.5fr;
  gap: 60px;
  margin-bottom: 80px;
  position: relative;
  z-index: 2;
}
.footer-col-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--pink);
  margin-bottom: 24px;
}
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a {
  font-size: 16px; font-weight: 500;
  color: var(--white); opacity: 0.6;
  transition: opacity 0.3s, color 0.3s;
  width: fit-content;
}
.footer-nav a:hover { opacity: 1; color: var(--pink); }

.footer-p { font-size: 15px; opacity: 0.6; line-height: 1.6; margin-bottom: 16px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative; z-index: 2;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p,
.footer-bottom a { font-size: 13px; color: var(--white); opacity: 0.5; font-weight: 400; transition: opacity 0.3s, color 0.3s; }
.footer-bottom a:hover { opacity: 1; color: var(--pink); }
.footer-legal { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer-cookie-prefs { font-size: 13px; color: var(--white); opacity: 0.5; font-weight: 400; transition: opacity 0.3s, color 0.3s; cursor: pointer; background: none; border: none; padding: 0; font-family: inherit; }
.footer-cookie-prefs:hover { opacity: 1; color: var(--pink); }

/* ── GATTINONI BADGE ─────────────────────── */
.gattinoni-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 45px;
}
.gattinoni-above {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
  font-weight: 500;
}
.gattinoni-logo { opacity: 0.9; width: 140px; height: auto; }

/* ── SCROLL-TRIGGERED ELEMENTS ──────────────── */
/* No persistent will-change here — these animate once (once:true) and GSAP
   promotes them for the duration of the tween via force3D. A standing
   will-change on every reveal element keeps dozens of idle layers alive. */
[data-animate] { opacity: 0; }
[data-animate="fade-up"] { transform: translateY(50px); }

/* ── TABLET ─────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid-new { grid-template-columns: 1fr 1fr; }
  #numeri { grid-template-columns: repeat(2, 1fr); }
  .case-modal-content { flex-direction: column; overflow-y: auto; }
  .carousel-wrapper { height: 40vh; flex: none; width: 100%; }
}

/* ============================================
   LANDING PAGE NEW BUSINESS 1 (VIDEO)
   ============================================ */
.page-landing { min-height: 100svh; display: flex; flex-direction: column; }

.landing-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 0 60px;
  position: relative;
  min-height: 100svh;
  overflow-x: hidden;
}

.landing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vertical-video-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 270px;
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255,255,255,0.1);
  contain: layout paint;
}
.vertical-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity 0.4s var(--ease);
  cursor: pointer;
}
.play-btn-huge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  display: grid;
  place-items: center;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
  cursor: pointer;
}
.play-overlay:hover .play-btn-huge {
  background: var(--pink);
  border-color: var(--pink);
  transform: scale(1.1);
}
.play-btn-huge svg { width: 32px; height: 32px; margin-left: 4px; }

.cta-container { margin-top: 20px; position: relative; z-index: 2; }

.footer-minimal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 60px;
  flex-wrap: wrap;
  gap: 40px;
  position: relative;
  z-index: 2;
}
.back-link {
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ── MOBILE ─────────────────────────────────── */
@media (max-width: 768px) {

  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    scroll-snap-type: none !important;
  }

  .snap-section,
  .snap-section-auto,
  .snap-point {
    scroll-snap-align: none !important;
    scroll-snap-stop: normal !important;
  }

  .snap-section:not(#hero-video) {
    min-height: auto !important;
    justify-content: flex-start !important;
    padding-top: 100px !important;
    padding-bottom: 100px !important;
  }

  section#hero-text.snap-section { padding-top: 200px !important; }
  section#approccio.snap-section { padding-bottom: 200px !important; }
  section#case-histories.snap-section { padding-top: 200px !important; }
  section#credibilita.snap-section {
    justify-content: flex-start !important;
    padding-top: 100px !important;
    padding-bottom: 120px !important;
  }

  /* HERO VIDEO */
  #hero-video { height: 100svh !important; }
  .video-controls, .video-timer-left { bottom: 30px !important; }
  .video-timer-left { left: 24px; }
  .video-controls { right: 24px; }

  /* BUSINESS UNITS */
  #business-units-wrapper {
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .sticky-panel {
    position: relative !important;
    height: auto !important;
    min-height: 70svh !important;
    overflow: hidden !important;
  }
  .sticky-panel + .sticky-panel::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: rgba(255,255,255,0.18);
    z-index: 5;
    pointer-events: none;
  }
  .bu-anim-layer {
    height: auto !important;
    min-height: 70svh !important;
    padding: 80px 0 !important;
    background-attachment: scroll !important;
    background-position: 65% center !important;
    transform: none !important;
  }
  .bu-panel-overlay {
    background: rgba(0,0,0,0.6) !important;
  }
  .bu-blur-glass { display: none !important; }
  .bu-line-decor { height: 32px; }
  .bu-glass-badge, #bu-pagination { display: none !important; }

  /* LANDING */
  .vertical-video-wrapper { border-radius: 16px; }
  .landing-content { padding: 90px 0 60px; }
  .footer-minimal { flex-direction: column; align-items: flex-start; gap: 32px; }

  /* MENU MOBILE — larghezza maggiore (margini stretti) */
  #navbar.scrolled { --nav-inset-x: 8px; }
  .nav-logo, .nav-logo-img { height: 36px !important; }
  /* FOOTER MOBILE — più ampio */
  .footer-box { padding: 40px 0 28px; }
  .footer-outside { padding-left: 14px; padding-right: 14px; }
  .nav-toggle { display: flex; }
  #navbar.scrolled .nav-logo-img { transform: scale(0.9) !important; }

  /* ── MENÙ MOBILE (editoriale) ─────────────────── */
  .nav-links {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100svh;
    background: rgba(10,10,10,0.98);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    z-index: 2000;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    padding: 116px var(--nav-gutter) 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-24px);
    transition: transform 0.55s var(--ease), opacity 0.4s, visibility 0.55s;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }

  /* Logo + hamburger restano sopra il menù aperto (fanno da intestazione) */
  .nav-toggle { z-index: 2010; position: relative; }
  .nav-logo { position: relative; z-index: 2010; }
  body:has(.nav-links.open) #navbar::before { opacity: 0 !important; }
  /* transform:none → il menù fixed torna relativo al viewport (niente spazio in alto dopo lo scroll) */
  body:has(.nav-links.open) #navbar { background: transparent !important; transform: none !important; }

  /* Voci: lista editoriale con righe divisorie */
  .nav-links > li { width: 100%; }
  .nav-links > li:not(.nav-menu-foot) { border-top: 1px solid rgba(255,255,255,0.10); }
  .nav-links > li:nth-child(4) { border-bottom: 1px solid rgba(255,255,255,0.10); }
  .nav-links a:not(.nav-foot-social) {
    display: block;
    padding: 20px 2px;
    font-size: clamp(28px, 8.5vw, 40px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--white);
    transition: color 0.3s;
  }
  .nav-links a:hover,
  .nav-links a:active { color: var(--pink); }
  /* La CTA nel menù mobile diventa un link accentato, non una pillola */
  .nav-links .nav-cta {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 20px 2px !important;
    color: var(--pink) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  /* Blocco in fondo: Headquarter + Follow Us (come nel footer) */
  .nav-menu-foot {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: auto;
    padding-top: 44px;
  }
  .nav-foot-col { display: flex; flex-direction: column; gap: 10px; }
  .nav-foot-title {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: 18px;
    color: var(--pink);
  }
  .nav-foot-addr {
    font-style: normal;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255,255,255,0.6);
  }
  /* .nav-links a specificità serve per battere lo stile base bianco/bold dei link */
  .nav-links a.nav-foot-social {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255,255,255,0.6);
    width: fit-content;
    transition: color 0.3s;
  }
  .nav-links a.nav-foot-social:hover { color: var(--pink); }

  /* Entrata a cascata dei blocchi */
  .nav-links > li {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  }
  .nav-links.open > li { opacity: 1; transform: none; }
  .nav-links.open > li:nth-child(1) { transition-delay: 0.10s; }
  .nav-links.open > li:nth-child(2) { transition-delay: 0.16s; }
  .nav-links.open > li:nth-child(3) { transition-delay: 0.22s; }
  .nav-links.open > li:nth-child(4) { transition-delay: 0.28s; }
  .nav-links.open > li:nth-child(5) { transition-delay: 0.38s; }
  .lang-switch { margin-top: 10px; gap: 16px; }
  .lang-switch a { font-size: 22px !important; }
  .lang-sep { font-size: 22px; opacity: 0.5; }

  /* LAYOUT GENERALE */
  .hero-line { white-space: normal; }

  /* HEADINGS — mobile-friendly sizes (avoid overflow / heavy wrapping) */
  .reveal-heading { font-size: clamp(30px, 7.2vw, 42px); letter-spacing: -0.02em; }
  #hero-text .reveal-heading,
  #cta .reveal-heading { font-size: clamp(42px, 11vw, 58px); line-height: 1.08; }
  .word-highlight-text { font-size: clamp(30px, 7.2vw, 42px); letter-spacing: -0.02em; }
  .bu-panel-title { font-size: clamp(38px, 9vw, 52px); line-height: 1.05; }
  .bu-panel-desc { font-size: 15px; }
  .case-modal-client { font-size: clamp(26px, 6.5vw, 36px); }
  .legal-title { font-size: clamp(30px, 7vw, 42px); }
  .cs-text-blocks { grid-template-columns: 1fr; gap: 20px; }
  #numeri { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid-new { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column !important; justify-content: flex-start !important; align-items: flex-start !important; text-align: left !important; gap: 16px; }
  .footer-bottom p, .footer-bottom a, .footer-bottom button { text-align: left !important; align-self: flex-start !important; }
  .footer-legal { justify-content: flex-start !important; align-items: flex-start !important; }
  .cert-logo-img { height: 60px; }
  .award-img { height: 45px; }
  .mobile-br { display: block; }

  /* CASE HISTORIES */
  .case-history-top { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
  .case-filters-wrapper { flex-direction: column; align-items: flex-start; margin-bottom: 8px; }
  .case-filters { gap: 8px; }
  .case-filter { padding: 8px 16px; font-size: 10px; letter-spacing: 0.06em; }
  .case-controls { align-self: flex-end; }
  .case-controls .icon-btn { display: none; }
  .cases-track-native { --case-card-w: 50vw; --case-card-w-active: 84vw; --case-card-h: 240px; --case-gap: 12px; --case-active-offset: 6vw; --case-client-fs-base: 16px; --case-client-fs-active: 22px; height: calc(var(--case-card-h) + 60px); }
  .cases-arrow { display: none; }
  /* Disable hover-only affordances on mobile (sticky-hover artifacts on touch) */
  .case-card-open { display: none; }
  .case-card.is-active:hover .case-card-meta { opacity: 0; max-height: 0; margin-top: 0; }

  /* BUTTON */
  .magnetic-btn { padding: 16px 28px !important; font-size: 14px !important; }
}

/* ============================================
   LEGAL PAGES (privacy, cookie, terms)
   ============================================ */
html:has(.page-legal) { scroll-snap-type: none; }
.page-legal { min-height: 100svh; display: flex; flex-direction: column; }

.legal-content {
  flex: 1;
  padding: 140px 0 80px;
  position: relative;
  z-index: 2;
}

.legal-container {
  max-width: 820px;
}

.legal-hero {
  margin-bottom: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.legal-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 16px 0 12px;
}

.legal-subtitle {
  font-size: clamp(15px, 1.3vw, 17px);
  color: var(--txt-muted);
  line-height: 1.5;
  font-family: var(--font-serif);
  font-style: italic;
}

.legal-article section {
  margin-bottom: 8px;
}

.legal-article h2 {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  line-height: 1.3;
  margin: 48px 0 16px;
  color: var(--white);
  letter-spacing: -0.01em;
}

.legal-article p {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255,255,255,0.72);
  margin-bottom: 16px;
  text-wrap: pretty;
}

.legal-article p strong { color: var(--white); font-weight: 600; }

.legal-article a {
  color: var(--pink);
  border-bottom: 1px solid rgba(255,0,82,0.3);
  transition: border-color 0.3s, color 0.3s;
}
.legal-article a:hover { border-color: var(--pink); color: var(--pink-hover); }

.legal-article ul {
  list-style: none;
  margin: 8px 0 24px;
  padding: 0;
}

.legal-article li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,0.72);
}

.legal-article li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 10px;
  height: 1px;
  background: var(--pink);
}

.legal-article li strong { color: var(--white); font-weight: 600; }

.legal-intro {
  font-size: clamp(16px, 1.3vw, 18px) !important;
  color: rgba(255,255,255,0.85) !important;
  line-height: 1.7 !important;
  margin-bottom: 32px !important;
}

.legal-h3 {
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 700;
  color: var(--white);
  margin: 32px 0 10px;
  letter-spacing: -0.01em;
}

.cookie-table-wrap {
  overflow-x: auto;
  margin: 16px 0 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
}
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 480px;
}
.cookie-table th {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cookie-table td {
  padding: 12px 16px;
  color: rgba(255,255,255,0.72);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: middle;
}
.cookie-table tbody tr:last-child td { border-bottom: none; }
.cookie-table tbody tr:hover td { background: rgba(255,255,255,0.03); }
.cookie-table code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--pink);
  background: rgba(255,0,82,0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.legal-footer-note {
  margin-top: 56px !important;
  padding-top: 24px !important;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px !important;
  color: var(--txt-low) !important;
  font-style: italic;
}

.legal-back {
  margin-top: 40px;
  color: var(--white);
  opacity: 0.7;
  transition: opacity 0.3s, color 0.3s;
  font-size: 15px;
}
.legal-back:hover { opacity: 1; color: var(--pink); border-bottom: none; }
.legal-back svg { transition: transform 0.3s var(--ease); }
.legal-back:hover svg { transform: translateX(-4px); }

@media (max-width: 768px) {
  .legal-content { padding: 100px 0 60px; }
  .legal-hero { margin-bottom: 40px; padding-bottom: 32px; }
  .legal-article h2 { margin-top: 36px; }
}

/* ── COOKIE BANNER ──────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 40px));
  z-index: 99990;
  background: rgba(0,0,0,0.35);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 20px 24px;
  max-width: 680px;
  width: calc(100% - 48px);
  display: flex;
  align-items: center;
  gap: 24px;
  opacity: 0;
  visibility: hidden;   /* keeps the buttons out of the tab order while hidden */
  pointer-events: none;
  transition: transform 0.7s var(--ease), opacity 0.5s, visibility 0.5s;
  box-shadow: 0 12px 36px rgba(0,0,0,0.35);
}
.cookie-banner.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.cookie-banner-text {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255,255,255,0.65);
  flex: 1;
  min-width: 0;
}
.cookie-banner-text strong { color: var(--white); font-weight: 600; }
.cookie-banner-text a {
  color: var(--white);
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  transition: border-color 0.3s;
  white-space: nowrap;
}
.cookie-banner-text a:hover { border-color: var(--white); }
.cookie-banner-actions { display: flex; gap: 10px; flex-shrink: 0; align-items: center; }
.cookie-btn {
  border-radius: 22px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.3s;
  white-space: nowrap;
  padding: 10px 22px;
  letter-spacing: 0.02em;
}
.cookie-btn-accept {
  background: var(--pink);
  color: var(--white);
  border: 1px solid var(--pink);
}
.cookie-btn-accept:hover { background: var(--pink-hover); border-color: var(--pink-hover); }
.cookie-btn-reject {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.15);
}
.cookie-btn-reject:hover { border-color: rgba(255,255,255,0.4); color: var(--white); }

@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    bottom: 16px;
    padding: 20px;
    border-radius: 16px;
  }
  .cookie-banner-actions { width: 100%; }
  .cookie-btn-accept { flex: 1; text-align: center; }

  /* Tighter heading sizes on very narrow viewports */
  .reveal-heading { font-size: 30px; }
  #hero-text .reveal-heading,
  #cta .reveal-heading { font-size: 42px; }
  .word-highlight-text { font-size: 30px; }
  .bu-panel-title { font-size: 36px; }
  .case-modal-client { font-size: 26px; }
  .case-card-client { font-size: 18px; }
  .case-card.is-active .case-card-client { font-size: 22px; }
}

/* ============================================
   LOW-PERFORMANCE MODE
   Older / low-end devices (few cores, little RAM, or reduced-motion).
   backdrop-filter blur is the single most expensive thing here — each
   instance re-rasterizes the content behind it, and several sit over a
   playing video or animate every scroll frame. We swap them for solid
   translucent surfaces (near-identical look, a fraction of the cost) and
   drop the per-frame custom cursor in favour of the native one.
   ============================================ */
.low-perf .icon-btn-glass,
.low-perf .nav-cta,
.low-perf #navbar::before,
.low-perf #bu-pagination,
.low-perf .bu-blur-glass,
.low-perf .cases-arrow,
.low-perf .case-card-open,
.low-perf .carousel-btn,
.low-perf .carousel-indicators,
.low-perf .case-modal-close,
.low-perf .case-modal.open,
.low-perf .cookie-banner,
.low-perf .nav-links,
.low-perf .play-btn-huge,
.low-perf .cursor-ring.on-video {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Opaque fallbacks so contrast survives without the blur */
.low-perf .icon-btn-glass { background: rgba(10,10,10,0.55); }
.low-perf .nav-cta { background: rgba(22,22,22,0.72); }
.low-perf #navbar.scrolled::before { background: rgba(10,10,10,0.85); }
.low-perf #bu-pagination { background: rgba(10,10,10,0.72); }
.low-perf .bu-blur-glass { background: rgba(0,0,0,0.55); }
.low-perf .cases-arrow { background: rgba(10,10,10,0.72); }
.low-perf .case-card-open { background: rgba(10,10,10,0.7); }
.low-perf .carousel-btn,
.low-perf .carousel-indicators,
.low-perf .case-modal-close { background: rgba(10,10,10,0.7); }
.low-perf .case-modal.open { background: rgba(0,0,0,0.72); }
.low-perf .cookie-banner { background: rgba(12,12,12,0.95); }
.low-perf .play-btn-huge { background: rgba(10,10,10,0.6); }

/* Preserve the pink hover fill: the opaque fallbacks above sit later in the
   file at equal specificity to the base :hover rules and would otherwise win
   even while hovering. These (0,3,0) selectors restore it. */
.low-perf .nav-cta:hover,
.low-perf .icon-btn-glass:hover,
.low-perf .cases-arrow:hover,
.low-perf .case-card-open:hover,
.low-perf .carousel-btn:hover,
.low-perf .case-modal-close:hover { background: var(--pink); }

/* Native cursor — the custom cursor's per-frame tween is a jank source */
.low-perf .cursor-dot,
.low-perf .cursor-ring { display: none !important; }
.low-perf body { cursor: auto; }
.low-perf button,
.low-perf a,
.low-perf [role="button"],
.low-perf .case-card { cursor: pointer; }
.low-perf .cases-track-native { cursor: grab; }
.low-perf .cases-track-native.dragging { cursor: grabbing; }

/* ── PRINT ──────────────────────────────────── */
@media print {
  #navbar, #loader, .cursor-dot, .cursor-ring, #bu-pagination,
  .video-controls, .video-timer-left, .hero-video-embed, .case-modal,
  .marquee-wrap, .footer-glow { display: none !important; }
  body { color: #000; background: #fff; cursor: auto; }
  a { color: #000; text-decoration: underline; }
}

/* ── REDUCED MOTION ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  html { scroll-snap-type: none; scroll-behavior: auto; }
  [data-animate], .section-label, .hero-line, .hero-title, .hero-sub, .word-highlight-text .word {
    opacity: 1 !important; transform: none !important;
  }
  #loader { display: none; }
  .marquee-row { animation: none !important; }
}

