/* ==========================================================================
   MASTERSOFT — main.css
   Design system condiviso da tutte le pagine
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* I cinque cubi del logo — sostituire con gli HEX esatti del marchio */
  --c-ai:  #9b6bff;   /* Agenti AI                    — viola  */
  --c-sw:  #2e8bff;   /* Software & App               — blu    */
  --c-web: #1fd27c;   /* E-Commerce & Siti Web        — verde  */
  --c-ads: #ff9f1c;   /* Google Ads & Social          — arancio*/
  --c-for: #ff3d5a;   /* Informatica Forense          — rosso  */

  --bg:        #050507;
  --bg-2:      #0b0b0f;
  --surface:   #111116;
  --surface-2: #17171d;
  --line:      rgba(255, 255, 255, .08);
  --line-2:    rgba(255, 255, 255, .14);
  --text:      #f5f5f7;
  --muted:     #a1a1a6;
  --dim:       #6e6e73;

  --accent: var(--c-sw);          /* ridefinito per pagina/sezione */

  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-hero: clamp(3rem, 9.2vw, 9.5rem);
  --fs-h1:   clamp(2.6rem, 6.4vw, 6rem);
  --fs-h2:   clamp(2rem, 4.6vw, 4.25rem);
  --fs-h3:   clamp(1.35rem, 2vw, 1.75rem);
  --fs-lead: clamp(1.15rem, 1.6vw, 1.5rem);

  --radius-s: 12px;
  --radius:   22px;
  --radius-l: 34px;

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 64px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io:  cubic-bezier(.65, 0, .35, 1);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.04; letter-spacing: -.035em; margin: 0; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: #fff; }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- 3. Layout ---------- */
.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.container--wide { width: min(100% - var(--gutter) * 2, 1480px); margin-inline: auto; }
.section { padding-block: clamp(60px, 9vw, 100px); position: relative; }
.section--tight { padding-block: clamp(50px, 7vw, 90px); }

.section-head { max-width: 860px; margin-bottom: clamp(48px, 7vw, 90px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p { margin-top: 22px; color: var(--muted); font-size: var(--fs-lead); line-height: 1.45; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; box-shadow: 0 0 16px currentColor; }

.lead { font-size: var(--fs-lead); color: var(--muted); line-height: 1.45; }
.muted { color: var(--muted); }

.text-gradient {
  background: linear-gradient(100deg, var(--c-ai), var(--c-sw) 28%, var(--c-web) 50%, var(--c-ads) 74%, var(--c-for));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%;
  animation: gradientShift 9s linear infinite;
}
.text-accent { color: var(--accent); }
@keyframes gradientShift { to { background-position: 200% 0; } }

/* ---------- 4. Buttons ---------- */
.btn {
  --btn-bg: var(--text); --btn-fg: var(--bg);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: 1rem; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .45s var(--ease-out), background .3s, color .3s, box-shadow .3s;
  will-change: transform; overflow: hidden; isolation: isolate;
}
.btn svg { width: 18px; height: 18px; transition: transform .4s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }
.btn--accent { --btn-bg: var(--accent); --btn-fg: #fff; box-shadow: 0 10px 40px -10px var(--accent); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--text); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: .9rem; }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120px circle at var(--bx, 50%) var(--by, 50%), rgba(255,255,255,.35), transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.btn:hover::after { opacity: 1; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .35s var(--ease-out); }
.link-arrow:hover svg { transform: translateX(5px); }

/* ---------- 5. Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  transition: background .4s, backdrop-filter .4s, transform .5s var(--ease-out), border-color .4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(8, 8, 11, .72);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; flex: none; }
.brand picture { display: block; }
.brand__logo { display: block; height: 40px; width: auto; transition: transform .6s var(--ease-out), opacity .3s; }
.brand:hover .brand__logo { transform: scale(1.03); }
.brand--footer .brand__logo { height: 52px; }

.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav a, .nav-trigger {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  font-size: .92rem; color: var(--muted); transition: color .25s, background .25s;
}
.main-nav a:hover, .nav-trigger:hover, .main-nav a[aria-current="page"], .nav-item.is-active > .nav-trigger { color: var(--text); background: rgba(255,255,255,.06); }
.nav-trigger svg { width: 12px; height: 12px; transition: transform .3s; }
.nav-item { position: relative; }
.nav-item.is-open .nav-trigger svg { transform: rotate(180deg); }

.mega {
  position: absolute; top: calc(100% + 14px); left: 50%;
  width: min(760px, 92vw); padding: 14px;
  background: rgba(16, 16, 21, .92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  opacity: 0; visibility: hidden; transform: translate(-50%, -8px) scale(.98);
  transition: opacity .3s var(--ease-out), transform .4s var(--ease-out), visibility .3s;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.7);
}
.nav-item.is-open .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); }
.mega a {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px; border-radius: 16px; color: var(--text);
}
.mega a:hover { background: rgba(255,255,255,.05); }
.mega a:last-child { grid-column: 1 / -1; }
.mega .dot { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--c); box-shadow: 0 6px 24px -6px var(--c); position: relative; }
.mega .dot::after { content: ""; position: absolute; inset: 7px; border-radius: 4px; background: rgba(255,255,255,.28); }
.mega strong { display: block; font-size: .95rem; font-weight: 600; letter-spacing: -.01em; }
.mega span { display: block; font-size: .82rem; color: var(--muted); line-height: 1.4; margin-top: 2px; }

.header-cta { display: flex; align-items: center; gap: 10px; }

.burger { display: none; width: 44px; height: 44px; border-radius: 50%; position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .45s var(--ease-out), top .45s var(--ease-out); }
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }
.nav-open .burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-open .burger span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* Menu mobile: tutte le voci e il pulsante "Chiama ora" visibili senza scroll.
   Le misure si adattano all'altezza realmente visibile (dvh, con fallback vh). */
.mobile-nav {
  --row-pad: clamp(4px, 1.1vh, 12px);
  --row-font: clamp(.98rem, 3vh, 1.6rem);
  position: fixed; inset: 0; z-index: 99; background: rgba(5,5,7,.97);
  height: 100vh; height: 100dvh;
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  padding: calc(var(--header-h) + clamp(4px, 1.5vh, 20px)) var(--gutter) max(14px, calc(env(safe-area-inset-bottom) + 10px));
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
}
@supports (height: 1dvh) {
  .mobile-nav { --row-pad: clamp(4px, 1.1dvh, 12px); --row-font: clamp(.98rem, 3dvh, 1.6rem); padding-top: calc(var(--header-h) + clamp(4px, 1.5dvh, 20px)); }
}
.nav-open .mobile-nav { opacity: 1; visibility: visible; }
.mobile-nav a {
  flex: none; display: flex; align-items: center; gap: 12px; padding: var(--row-pad) 0; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-size: var(--row-font); line-height: 1.2; font-weight: 600; letter-spacing: -.03em;
  opacity: 0; transform: translateY(20px); transition: opacity .5s var(--ease-out), transform .6s var(--ease-out);
}
.mobile-nav a i { width: .55em; height: .55em; border-radius: 3px; background: var(--c, var(--text)); flex: none; }
.nav-open .mobile-nav a { opacity: 1; transform: none; }
/* il pulsante resta ancorato in fondo, con uno stacco minimo dall'ultima voce */
.mobile-nav .btn {
  margin-top: auto; min-height: clamp(44px, 6.5vh, 56px); padding-block: 0;
  font-family: var(--font-body); font-size: 1rem; border: 0; justify-content: center;
}
.mobile-nav a:nth-last-child(2) { margin-bottom: clamp(10px, 2vh, 24px); }
.mobile-nav-label {
  flex: none; margin-top: clamp(6px, 1.8vh, 18px); padding-bottom: 2px;
  font-size: .7rem; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
}
/* telefono in orizzontale: due colonne (servizi a sinistra, studio e pulsante a destra) */
@media (orientation: landscape) and (max-height: 520px) {
  .mobile-nav {
    --row-pad: clamp(3px, 1.2vh, 8px); --row-font: clamp(.92rem, 4.4vh, 1.2rem);
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(7, auto) 1fr;
    grid-auto-flow: column; column-gap: clamp(24px, 5vw, 56px); align-content: start;
  }
  .mobile-nav > :nth-child(-n+7) { grid-column: 1; }            /* Home, Servizi e i 5 servizi */
  .mobile-nav > :nth-child(8)  { grid-column: 2; grid-row: 1; }  /* etichetta Studio */
  .mobile-nav > :nth-child(9)  { grid-column: 2; grid-row: 2; }  /* About */
  .mobile-nav > :nth-child(10) { grid-column: 2; grid-row: 3; }  /* Contatti */
  .mobile-nav .btn { grid-column: 2; grid-row: 4 / -1; align-self: end; margin-top: 10px; min-height: 44px; }
  .mobile-nav a:nth-last-child(2) { margin-bottom: 0; }
  .mobile-nav-label { margin-top: 4px; }
  .mobile-nav > :nth-child(8) { margin-top: 4px; }
}

/* ---------- 6. Scroll progress & cursor glow ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 101; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--c-ai), var(--c-sw), var(--c-web), var(--c-ads), var(--c-for));
}
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 520px; height: 520px; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%);
  transform: translate3d(-50%, -50%, 0); opacity: 0; transition: opacity .6s; filter: blur(10px);
  mix-blend-mode: screen;
}
.has-pointer .cursor-glow { opacity: .55; }

/* ---------- 7. Reveal animations ---------- */
[data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); transition-delay: var(--d, 0s); }
[data-reveal="fade"] { transform: none; }
[data-reveal="scale"] { transform: scale(.92); }
[data-reveal="left"] { transform: translateX(-50px); }
[data-reveal="right"] { transform: translateX(50px); }
[data-reveal].is-visible { opacity: 1; transform: none; }

.split-line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.split-line > span { display: inline-block; transform: translateY(110%); transition: transform 1.2s var(--ease-out); transition-delay: var(--d, 0s); }
.is-visible .split-line > span, .split-line.is-visible > span { transform: none; }

/* Testo che si "accende" parola per parola durante lo scroll (stile Apple) */
.scrub-text { font-family: var(--font-display); font-size: clamp(1.8rem, 4.2vw, 3.9rem); font-weight: 600; line-height: 1.12; letter-spacing: -.035em; }
.scrub-text .w { color: rgba(245,245,247,.16); transition: color .25s linear; }
.scrub-text .w.on { color: var(--text); }
.scrub-text .w.hl.on { color: var(--accent); }

/* ---------- 8. Cubo 3D (componente riutilizzabile) ---------- */
.cube {
  --s: 120px; --cube-color: var(--accent);
  width: var(--s); height: var(--s); position: relative; transform-style: preserve-3d;
}
.cube__face {
  position: absolute; inset: 0; border-radius: calc(var(--s) * .08);
  background: var(--cube-color);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), inset 0 0 calc(var(--s) * .3) rgba(255,255,255,.12);
  backface-visibility: hidden;
}
.cube__face::after { /* riflesso morbido */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.35), transparent 45%, rgba(0,0,0,.18));
}
.cube__face--front  { transform: translateZ(calc(var(--s) / 2)); }
.cube__face--back   { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); filter: brightness(.55); }
.cube__face--right  { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.72); }
.cube__face--left   { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.85); }
.cube__face--top    { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(1.18); }
.cube__face--bottom { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.4); }

/* ---------- 9. Service cards (con spotlight che segue il cursore) ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.svc-card {
  --c: var(--accent);
  grid-column: span 2; position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 380px; padding: 34px; border-radius: var(--radius-l); overflow: hidden; isolation: isolate;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .6s var(--ease-out), border-color .4s;
  transform-style: preserve-3d;
}
.svc-card:nth-child(4), .svc-card:nth-child(5) { grid-column: span 3; }
.svc-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c) 28%, transparent), transparent 55%);
}
.svc-card:hover { border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.svc-card:hover::before { opacity: 1; }
.svc-card__num { font-family: var(--font-mono); font-size: .8rem; color: var(--dim); }
.svc-card__cube { position: absolute; top: 30px; right: 30px; perspective: 600px; }
.svc-card__cube .cube { --s: 54px; --cube-color: var(--c); transform: rotateX(-24deg) rotateY(38deg); transition: transform 1s var(--ease-out); }
.svc-card:hover .svc-card__cube .cube { transform: rotateX(-24deg) rotateY(218deg); }
.svc-card h3 { font-size: var(--fs-h3); margin: auto 0 12px; max-width: 18ch; }
.svc-card p { color: var(--muted); font-size: .98rem; max-width: 46ch; }
.svc-card .link-arrow { margin-top: 22px; color: var(--c); }
.svc-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.svc-card__tags li { font-size: .75rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }

/* ---------- 10. Clients marquee ---------- */
.clients { overflow: hidden; }
.marquee {
  --gap: clamp(28px, 4vw, 64px); --speed: 40s;
  display: flex; gap: var(--gap); overflow: hidden; user-select: none;
  padding-block: 12px; /* spazio per il sollevamento in hover: il box non viene tagliato */
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee + .marquee { margin-top: 6px; }
.marquee__track { flex: none; display: flex; align-items: center; gap: var(--gap); min-width: 100%; animation: marquee var(--speed) linear infinite; }
.marquee--reverse .marquee__track { animation-direction: reverse; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-100% - var(--gap))); } }
.client-logo {
  flex: none; display: grid; place-items: center; width: clamp(180px, 18vw, 232px); height: 100px; padding: 18px 24px;
  border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
  transition: border-color .35s, background .35s, transform .5s var(--ease-out), box-shadow .35s;
}
/* due versioni sovrapposte: bianca a riposo, a colori al passaggio del mouse */
.client-logo img { grid-area: 1 / 1; max-width: 100%; max-height: 58px; object-fit: contain; transition: opacity .4s var(--ease-out); }
.client-logo__mono { opacity: .72; }
.client-logo__color { opacity: 0; }
.client-logo:hover { background: #f5f5f7; border-color: #f5f5f7; transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(0,0,0,.7); }
.client-logo:hover .client-logo__mono { opacity: 0; }
.client-logo:hover .client-logo__color { opacity: 1; }
/* loghi pensati per fondi scuri (scritte bianche): restano su fondo scuro */
.client-logo--dark:hover { background: var(--surface-2); border-color: var(--line-2); }

/* ---------- 11. CTA band ---------- */
.cta-band { position: relative; text-align: center; overflow: hidden; border-radius: var(--radius-l); clip-path: inset(0 round var(--radius-l)); -webkit-mask-image: -webkit-radial-gradient(#fff, #000); /* Safari: ritaglia gli angoli anche con il bagliore sfocato e animato */ padding: clamp(70px, 10vw, 140px) var(--gutter); background: var(--surface); border: 1px solid var(--line); isolation: isolate; }
.cta-band::before {
  content: ""; position: absolute; inset: -40%; z-index: -1; opacity: .55;
  background: conic-gradient(from var(--rot, 0deg), var(--c-ai), var(--c-sw), var(--c-web), var(--c-ads), var(--c-for), var(--c-ai));
  filter: blur(90px); animation: spin 18s linear infinite;
}
.cta-band::after { content: ""; position: absolute; inset: 1px; z-index: -1; border-radius: inherit; background: radial-gradient(ellipse at center, rgba(5,5,7,.55), rgba(5,5,7,.92) 70%); }
@property --rot { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --rot: 360deg; } }
.cta-band h2 { font-size: var(--fs-h1); max-width: 14ch; margin-inline: auto; }
.cta-band p { margin: 24px auto 0; max-width: 56ch; }
.cta-band .actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

/* ---------- 12. Inner page hero ---------- */
.page-hero { position: relative; padding: calc(var(--header-h) + clamp(70px, 12vw, 150px)) 0 clamp(60px, 9vw, 110px); overflow: hidden; }
.page-hero h1 { font-size: var(--fs-h1); max-width: 16ch; }
.page-hero .lead { margin-top: 28px; max-width: 62ch; }
.page-hero__glow { position: absolute; inset: auto -20% -40% -20%; height: 80%; z-index: -1; background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%); filter: blur(30px); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--dim); margin-bottom: 34px; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--dim); }
.breadcrumb [aria-current] { color: var(--muted); }

/* ---------- 13. Footer ---------- */
.site-footer { position: relative; border-top: 1px solid var(--line); padding: clamp(70px, 9vw, 110px) 0 34px; background: var(--bg-2); overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 48px; }
.footer-brand p { color: var(--muted); margin-top: 20px; max-width: 36ch; font-size: .95rem; }
.footer-col h3 { font-family: var(--font-body); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; }
.footer-col li + li { margin-top: 10px; }
.footer-col a, .footer-col address { color: var(--muted); font-size: .95rem; font-style: normal; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-col .swatch { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); margin-right: 10px; vertical-align: middle; }
.socials { display: flex; gap: 10px; margin-top: 24px; }
.socials a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--muted); transition: color .2s, border-color .2s, transform .4s var(--ease-out); }
.socials a:hover { color: var(--text); border-color: var(--text); transform: translateY(-3px); }
.socials svg { width: 18px; height: 18px; }
.footer-word {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.06em; line-height: .8;
  font-size: clamp(4rem, 17vw, 16rem); margin: clamp(30px, 4vw, 50px) 0 30px; white-space: nowrap;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none;
}
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 26px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--dim); }
.footer-bottom { align-items: center; }
.footer-bottom .socials { margin-top: 0; }
.socials--sm { gap: 8px; }
.socials--sm a { width: 34px; height: 34px; }
.socials--sm svg { width: 15px; height: 15px; }
.footer-bottom a:hover { color: var(--text); }

/* ---------- 14. Cookie notice ---------- */
.cookie-bar {
  position: fixed; left: 50%; bottom: 20px; z-index: 120; width: min(560px, calc(100% - 32px));
  display: flex; align-items: center; gap: 18px; padding: 16px 18px 16px 22px; border-radius: 20px;
  background: rgba(20,20,26,.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line-2);
  font-size: .88rem; color: var(--muted); box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  transform: translate(-50%, 140%); transition: transform .7s var(--ease-out);
}
.cookie-bar.is-visible { transform: translate(-50%, 0); }
.nav-open .cookie-bar { visibility: hidden; }
.cookie-bar a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 14b. Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: clamp(36px, 5vw, 60px) clamp(16px, 2.4vw, 34px); }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__num { font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 6vw, 5.6rem); letter-spacing: -.06em; line-height: 1; }
.stat__num sup { font-size: .45em; vertical-align: top; position: relative; top: .25em; margin-left: 2px; color: var(--c, var(--accent)); }
.stat p { margin-top: 12px; color: var(--muted); font-size: .95rem; max-width: 22ch; }

@media (max-width: 1080px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 680px) {
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- 15. Responsive ---------- */
@media (max-width: 1080px) {
  .main-nav, .header-cta .btn { display: none; }
  .burger { display: block; }
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .svc-card, .svc-card:nth-child(4), .svc-card:nth-child(5) { grid-column: span 1; }
  .svc-card:nth-child(5) { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 1rem; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc-card, .svc-card:nth-child(5) { grid-column: auto; min-height: 320px; padding: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .cookie-bar { flex-direction: column; align-items: stretch; text-align: left; }
  .brand__logo { height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal], .split-line > span { opacity: 1 !important; transform: none !important; }
  .scrub-text .w { color: var(--text); }
}
