/* ================================================================
   MEA CULPA LAB — Design System v5 (copula-inspired)
   Fonts: Bebas Neue (display) · Mulish (body)
   Palette: white · navy #0c1d32 · blue #2558a0
   ================================================================ */

/* ── TOKENS ──────────────────────────────────────────────────── */
:root {
  --white:    #ffffff;
  --black:    #0c1d32;
  --blue:     #2558a0;
  --blue-lt:  #3a72c0;
  --grey:     #464645;
  --grey-lt:  #9a9a9a;
  --grey-bg:  #f4f4f4;
  --bd-light: rgba(12,29,50,0.09);
  --bd-dark:  rgba(255,255,255,0.07);
  --ff-d: 'Bebas Neue', sans-serif;
  --ff-b: 'Mulish', sans-serif;
  --pad-x: 52px;
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--white);
  color: var(--black);
  font-family: var(--ff-b);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ── NAV ─────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--pad-x);
  transition: background .4s, border-color .4s, transform .45s ease;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: rgba(12,29,50,0.97);
  border-color: var(--bd-dark);
  backdrop-filter: blur(14px);
}
.nav-logo {
  font-family: var(--ff-d);
  font-size: 22px; letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.nav-logo em { font-style: normal; color: #fff; margin: 0 .1em; transition: color .3s; }
nav.scrolled .nav-logo em { color: var(--blue-lt); }
.nav-links {
  display: flex; gap: 8px; list-style: none;
}
.nav-links a {
  font-family: var(--ff-b);
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 18px;
  border-radius: 30px;
  transition: background .2s, color .2s, border-color .2s;
}
.nav-links a:hover { background: rgba(255,255,255,0.10); color: #fff; border-color: rgba(255,255,255,0.22); }
.nav-links a.active { background: rgba(255,255,255,0.14); color: #fff; border-color: rgba(255,255,255,0.18); }
.nav-cta {
  font-family: var(--ff-b); font-size: 13px; font-weight: 700;
  background: var(--blue); color: #fff;
  padding: 10px 26px; border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(37,88,160,.32);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.nav-cta:hover { background: var(--blue-lt); transform: translateY(-1px); box-shadow: 0 9px 24px rgba(37,88,160,.42); }

/* ── HAMBURGER ───────────────────────────────────────────────── */
.nav-burger {
  display: none;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.1);
  border: none; border-radius: 50%;
  cursor: pointer; z-index: 1001;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 0; flex-shrink: 0;
}
.nav-burger span {
  display: block; width: 16px; height: 1.5px;
  background: #fff; transition: transform .3s ease, opacity .25s ease;
  transform-origin: center;
}
.nav-burger.open .b1 { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open .b2 { opacity: 0; transform: scaleX(0); }
.nav-burger.open .b3 { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE NAV ──────────────────────────────────────────────── */
.nav-mobile {
  position: fixed; inset: 0;
  background: var(--black);
  z-index: 999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
  overflow: hidden;
}
.nav-mobile.open { opacity: 1; pointer-events: all; }
.nav-mobile ul {
  list-style: none; text-align: center;
  display: flex; flex-direction: column; gap: 0;
}
.nav-mobile ul li a {
  font-family: var(--ff-d);
  font-size: clamp(44px, 11vw, 72px);
  text-transform: uppercase; letter-spacing: .06em;
  color: rgba(255,255,255,0.55);
  text-decoration: none; display: block; padding: 6px 0;
  transition: color .2s;
}
.nav-mobile ul li a:hover,
.nav-mobile ul li a.active { color: #fff; }
.nav-mobile-cta {
  margin-top: 44px;
  font-family: var(--ff-b); font-size: 13px; font-weight: 700;
  background: var(--blue); color: #fff;
  padding: 14px 40px; border-radius: 30px;
  text-decoration: none; display: inline-block;
  transition: background .2s;
}
.nav-mobile-cta:hover { background: var(--blue-lt); }

/* ── SECTION LABEL (spinning asterisk) ──────────────────────── */
.sec-label {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px;
}
.sec-label svg { width: 25px; height: 25px; flex-shrink: 0; }

/* ── AMPOLLA / FLASK (concept laboratorio) ──────────────────── */
.flask { display: inline-block; overflow: visible; }
.flask-liquid {
  opacity: .5;
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: flask-bob 3.4s ease-in-out infinite;
}
@keyframes flask-bob { 0%,100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-.4px) scaleY(1.025); } }

/* bollicine che escono dal collo e salgono oltre l'ampolla (ebollizione) */
.flask-bubble { transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; }
.flask-bubble.b1 { animation: boil-a 2.1s ease-in infinite; }
.flask-bubble.b2 { animation: boil-b 2.7s ease-in infinite .55s; }
.flask-bubble.b3 { animation: boil-c 2.3s ease-in infinite 1.05s; }
.flask-bubble.b4 { animation: boil-a 2.9s ease-in infinite 1.6s; }
@keyframes boil-a {
  0%  { transform: translate(0,2px) scale(.3); opacity: 0; }
  20% { opacity: .95; }
  60% { transform: translate(-1.1px,-5px) scale(1); }
  80% { opacity: .55; }
  100%{ transform: translate(.5px,-12px) scale(1.1); opacity: 0; }
}
@keyframes boil-b {
  0%  { transform: translate(0,2px) scale(.3); opacity: 0; }
  20% { opacity: .95; }
  55% { transform: translate(1.1px,-5px) scale(1); }
  80% { opacity: .5; }
  100%{ transform: translate(-.8px,-13px) scale(1.12); opacity: 0; }
}
@keyframes boil-c {
  0%  { transform: translate(0,2px) scale(.3); opacity: 0; }
  22% { opacity: .9; }
  100%{ transform: translate(1.1px,-11px) scale(1.05); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .flask-bubble { animation: none; opacity: .5; }
  .flask-liquid { animation: none; }
}

.sec-label span {
  font-family: var(--ff-b); font-size: 12px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
}
.sec-label.dk { color: var(--grey); }
.sec-label.lt { color: rgba(255,255,255,0.85); }

@keyframes spin-slow { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

/* ── TYPOGRAPHY ──────────────────────────────────────────────── */
h1, .display {
  font-family: var(--ff-d);
  font-size: clamp(72px, 10vw, 160px);
  font-weight: 400; line-height: .88;
  letter-spacing: .02em;
  text-transform: uppercase;
}
h2 {
  font-family: var(--ff-d);
  font-size: clamp(44px, 6.5vw, 100px);
  font-weight: 400; line-height: .9;
  letter-spacing: .02em;
  text-transform: uppercase;
}
h3 {
  font-family: var(--ff-d);
  font-size: clamp(26px, 3.5vw, 52px);
  font-weight: 400; line-height: .95;
  text-transform: uppercase;
}
h2 .ghost { color: transparent; -webkit-text-stroke: 1.5px rgba(12,29,50,.5); }
h2[style*="#fff"] .ghost { -webkit-text-stroke-color: rgba(255,255,255,.72); }
h1 .ghost { color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.72); }

/* ── LETTER ANIMATION ────────────────────────────────────────── */
.letter {
  display: inline-block;
  opacity: 0; transform: translateY(50px);
  transition: opacity .6s ease, transform .6s ease;
}
.letter.in { opacity: 1; transform: translateY(0); }

/* ── SCROLL REVEAL ───────────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .75s ease, transform .75s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-scale {
  opacity: 0; transform: scale(.95);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal-scale.in { opacity: 1; transform: scale(1); }
.d1{transition-delay:.1s} .d2{transition-delay:.2s} .d3{transition-delay:.3s}
.d4{transition-delay:.4s} .d5{transition-delay:.5s} .d6{transition-delay:.6s}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--ff-b); font-size: 13px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 14px 30px; border-radius: 30px;
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-lt); transform: translateY(-2px); }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.28); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.05); }
.btn-dark { background: var(--black); color: #fff; }
.btn-dark:hover { background: #1a3050; transform: translateY(-2px); }
/* legacy compat */
.btn-solid  { background: #fff; color: var(--black); font-family: var(--ff-b); font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 14px 30px; border-radius: 30px; text-decoration: none; display: inline-block; transition: background .2s, transform .2s; }
.btn-solid:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }
.btn-ghost  { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.28); font-family: var(--ff-b); font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 14px 30px; border-radius: 30px; text-decoration: none; display: inline-block; transition: border-color .2s, background .2s; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.05); }

/* ── BLOB CTA BUTTON ─────────────────────────────────────────── */
.blob-cta {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 136px; height: 136px;
  text-decoration: none;
  flex-shrink: 0;
}
.blob-cta .blob-bg {
  position: absolute; inset: 0;
  background: var(--black);
  border-radius: 46% 54% 55% 45% / 48% 44% 56% 52%;
  transition: transform 1s ease;
}
.blob-cta.blob-blue .blob-bg { background: var(--blue); }
.blob-cta.blob-white .blob-bg { background: #fff; }
.blob-cta:hover .blob-bg { transform: rotate(50deg) scale(1.06); }
.blob-cta span {
  position: relative; z-index: 1;
  font-family: var(--ff-d); font-size: 22px; letter-spacing: .06em;
  text-transform: uppercase; color: #fff;
  text-align: center; padding: 16px; line-height: 1;
}
.blob-cta.blob-white span { color: var(--black); }

/* ── CTA BANNER ──────────────────────────────────────────────── */
.cta-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  background: var(--blue);
  padding: 40px 64px; border-radius: 150px;
  max-width: 1200px; margin: 0 auto;
}
.cta-banner p {
  font-family: var(--ff-d);
  font-size: clamp(28px, 4vw, 52px);
  text-transform: uppercase; line-height: 1;
  color: #fff; flex: 1;
}

/* ── MARQUEE ─────────────────────────────────────────────────── */
.marquee-stripe { overflow: hidden; background: var(--grey-bg); padding: 14px 0; }
.marquee-inner  { display: flex; width: max-content; animation: mq 24s linear infinite; }
.marquee-item {
  font-family: var(--ff-d); font-size: 15px; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(12,29,50,.6);
  padding: 0 28px; white-space: nowrap;
  display: flex; align-items: center; gap: 20px;
}
.marquee-item::after { content: '·'; opacity: .5; }
@keyframes mq { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ── WORK ACCORDION ──────────────────────────────────────────── */
.work-list { display: flex; flex-direction: column; }
.work-item { border-top: 1px solid var(--bd-light); }
.work-item:last-child { border-bottom: 1px solid var(--bd-light); }

.work-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 10px 0; gap: 12px;
  background: none; border: none; cursor: pointer;
}
.work-arrow {
  width: 48px; height: 48px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--black); opacity: 0;
  transition: opacity .3s, transform .4s;
}
.work-arrow svg { width: 34px; height: 34px; }
.work-item:hover .work-arrow,
.work-item.open  .work-arrow { opacity: 1; }
.work-item.open  .work-arrow { transform: rotate(180deg); }

.work-name {
  font-family: var(--ff-d);
  font-size: clamp(48px, 7.5vw, 116px);
  font-weight: 400; line-height: 1; text-transform: uppercase;
  color: var(--grey-lt); flex: 1; text-align: center;
  transition: color .3s; pointer-events: none;
}
.work-item:hover .work-name,
.work-item.open  .work-name { color: var(--black); }

.work-meta {
  font-family: var(--ff-b); font-size: 12px; font-weight: 800;
  color: var(--blue); text-transform: uppercase; letter-spacing: .15em;
}

.work-content {
  max-height: 0; overflow: hidden;
  transition: max-height .5s ease, padding .4s ease;
  padding-bottom: 0;
}
.work-item.open .work-content {
  max-height: 600px;
  padding-bottom: 32px;
}
.work-inner {
  display: flex; gap: 40px; padding-top: 8px;
}
.work-img-wrap {
  width: 320px; flex-shrink: 0; aspect-ratio: 16/9;
  overflow: hidden; background: var(--grey-bg);
}
.work-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
}
.work-img-bg {
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  transform: scale(1.16);
  transition: transform 1.1s cubic-bezier(.2,.6,.2,1);
}
.work-item.open .work-img-bg { transform: scale(1); }
.work-desc { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.work-cat {
  font-family: var(--ff-b); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .15em; color: var(--blue);
}
.work-text { font-size: 15px; font-weight: 300; color: var(--grey); line-height: 1.75; }
.work-link {
  display: inline-block; font-family: var(--ff-b); font-size: 13px; font-weight: 700;
  color: var(--blue); text-decoration: none;
  border-bottom: 1px solid var(--blue); padding-bottom: 2px;
  align-self: flex-start;
  transition: color .2s, border-color .2s;
}
.work-link:hover { color: var(--blue-lt); border-color: var(--blue-lt); }

/* ── SERVICE ACCORDION ───────────────────────────────────────── */
.svc-accordion { display: flex; flex-direction: column; }
.svc-item { border-top: 1px solid var(--bd-dark); }
.svc-item:last-child { border-bottom: 1px solid var(--bd-dark); }
.svc-toggle {
  display: flex; align-items: center; gap: 12px;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 20px 0; text-align: left;
}
.svc-name {
  font-family: var(--ff-d);
  font-size: clamp(36px, 5.5vw, 80px);
  font-weight: 400; line-height: 1; text-transform: uppercase;
  color: rgba(255,255,255,.45); flex: 1;
  transition: color .3s; pointer-events: none;
}
.svc-item:hover .svc-name,
.svc-item.open  .svc-name { color: #fff; }
.svc-content {
  max-height: 0; overflow: hidden;
  transition: max-height .45s ease, padding .35s ease;
  padding-bottom: 0;
}
.svc-item.open .svc-content { max-height: 400px; padding-bottom: 28px; }
.svc-content p {
  font-size: 15px; font-weight: 300;
  color: rgba(255,255,255,.78); line-height: 1.75; max-width: 560px; margin-bottom: 16px;
}
.svc-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-tag {
  font-family: var(--ff-b); font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.32);
  padding: 6px 14px; border-radius: 200px;
}

/* ── SECTORS CARDS ───────────────────────────────────────────── */
.sec-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; }
.sec-card {
  background: var(--grey-bg); padding: 44px 34px 38px;
  position: relative; overflow: hidden;
  text-decoration: none; color: var(--black); display: block;
  transition: background .3s;
}
.sec-card:hover { background: #ebebeb; }
.sec-num {
  font-family: var(--ff-d); font-size: 88px;
  color: rgba(12,29,50,.04); position: absolute;
  top: 12px; right: 16px; line-height: 1; pointer-events: none;
}
.sec-icon {
  width: 48px; height: 48px; background: var(--black); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-bottom: 26px;
}
.sec-icon svg { width: 22px; height: 22px; }
.sec-cat {
  font-family: var(--ff-b); font-size: 11px; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 8px;
}
.sec-title {
  font-family: var(--ff-d); font-size: 36px;
  text-transform: uppercase; color: var(--black); margin-bottom: 14px;
}
.sec-desc { font-size: 14px; font-weight: 300; color: var(--grey); line-height: 1.75; margin-bottom: 24px; }
.sec-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.stag {
  font-family: var(--ff-b); font-size: 11px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid rgba(12,29,50,.12);
  padding: 5px 12px; border-radius: 200px; color: var(--grey);
}

/* ── STATS ───────────────────────────────────────────────────── */
.stats { display: flex; gap: 48px; margin-top: 52px; padding-top: 40px; border-top: 1px solid var(--bd-light); }
.stat .num { font-family: var(--ff-d); font-size: 64px; line-height: 1; color: var(--blue); }
.stat .lbl { font-family: var(--ff-b); font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--grey); margin-top: 4px; }

/* ── PROCESS STEPS ───────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(4,1fr); position: relative; }
.steps::before {
  content: ''; position: absolute; top: 27px; left: 44px; right: 44px; height: 1px;
  background: linear-gradient(to right, rgba(255,255,255,.18), transparent);
}
.step { padding-right: 32px; }
.step-n {
  width: 54px; height: 54px; border: 1px solid rgba(255,255,255,.28);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-b); font-size: 12px; font-weight: 700;
  color: var(--blue-lt); margin-bottom: 34px;
  position: relative; z-index: 1; background: var(--black);
}
.step-t { font-family: var(--ff-d); font-size: 26px; text-transform: uppercase; color: #fff; margin-bottom: 10px; }
.step-d { font-size: 14px; font-weight: 300; color: rgba(255,255,255,.7); line-height: 1.75; }

/* ── EXTRA CARDS ─────────────────────────────────────────────── */
.extra-cards { display: flex; flex-direction: column; gap: 2px; }
.extra-card {
  display: flex; align-items: flex-start; gap: 22px;
  padding: 28px; background: var(--grey-bg);
  transition: background .3s;
}
.extra-card + .extra-card { border-top: 1px solid var(--bd-light); }
.extra-card:hover { background: #ebebeb; }
.ec-icon {
  width: 48px; height: 48px; flex-shrink: 0; background: var(--black);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 18px;
}
.ec-title { font-family: var(--ff-d); font-size: 22px; text-transform: uppercase; color: var(--black); margin-bottom: 4px; }
.ec-desc { font-size: 13px; font-weight: 300; color: var(--grey); line-height: 1.65; }

/* ── FORM ────────────────────────────────────────────────────── */
.ct-form { display: flex; flex-direction: column; gap: 14px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld label {
  font-family: var(--ff-b); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.68); display: block;
}
.fld input, .fld select, .fld textarea {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff; font-family: var(--ff-b); font-size: 14px;
  padding: 14px 16px; width: 100%; border-radius: 8px;
  transition: border-color .2s;
}
.fld input:focus, .fld select:focus, .fld textarea:focus {
  outline: none; border-color: var(--blue);
}
.fld textarea { min-height: 120px; resize: vertical; }
.fld select option { background: var(--black); color: #fff; }
.submit {
  background: var(--blue); color: #fff;
  font-family: var(--ff-b); font-size: 13px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  border: none; cursor: pointer;
  padding: 16px 36px; border-radius: 30px;
  transition: background .2s; align-self: flex-start;
}
.submit:hover { background: var(--blue-lt); }

/* ── FOOTER ──────────────────────────────────────────────────── */
footer {
  background: var(--black);
  border-top: 1px solid var(--bd-dark);
  padding: 32px var(--pad-x);
  display: flex; justify-content: space-between; align-items: center;
}
.foot-logo {
  font-family: var(--ff-d); font-size: 20px; letter-spacing: .1em;
  text-transform: uppercase; color: #fff;
}
.foot-logo em { font-style: normal; color: var(--blue); }
.foot-links { display: flex; gap: 24px; list-style: none; }
.foot-links a {
  font-family: var(--ff-b); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.62); text-decoration: none;
  transition: color .2s;
}
.foot-links a:hover { color: #fff; }
.foot-links a.active { color: rgba(255,255,255,.95); }
.foot-copy { font-family: var(--ff-b); font-size: 11px; color: rgba(255,255,255,.45); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --pad-x: 20px; }
  nav { padding: 16px var(--pad-x); }
  .nav-links { display: none; }
  .nav-cta   { display: none; }
  .nav-burger { display: flex; }

  .sec-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .steps::before { display: none; }
  .work-inner { flex-direction: column; }
  .work-img-wrap { width: 100%; }
  .cta-banner { padding: 32px; border-radius: 24px; flex-direction: column; }

  footer { flex-direction: column; gap: 20px; text-align: center; padding: 28px var(--pad-x); }
  .foot-links { flex-wrap: wrap; justify-content: center; gap: 16px; }
}
@media (max-width: 600px) {
  .steps { grid-template-columns: 1fr; }
  .work-name { font-size: 52px !important; }
  .svc-name  { font-size: 38px !important; }
  .frow { grid-template-columns: 1fr; }
}

/* ── LOADER ──────────────────────────────────────────────────── */
.loader {
  position: fixed; inset: 0;
  background: var(--black);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .55s ease, visibility .55s;
}
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader svg {
  width: 64px; height: 64px; color: #fff;
}

/* ── PAGE HERO (pagine interne) ──────────────────────────────── */
.page-hero {
  min-height: 72vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 160px var(--pad-x) 56px;
  color: #fff;
  position: relative; overflow: hidden;
}
.page-hero.is-navy { background: var(--black); }
.page-hero.is-blue { background: var(--blue); }
.page-hero h1 { color: #fff; }
.page-hero .hero-sub {
  font-family: var(--ff-b); font-size: 16px; font-weight: 300;
  color: rgba(255,255,255,.9); max-width: 520px;
  line-height: 1.7; margin-top: 28px;
}
.hero-star {
  width: clamp(60px, 8vw, 118px); height: clamp(60px, 8vw, 118px);
  color: var(--black);
  flex-shrink: 0;
}
.hero-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

/* ── MANIFESTO (sticky scroll) ───────────────────────────────── */
.manifesto { position: relative; height: 175vh; }
.manifesto-sticky {
  position: sticky; top: 0;
  height: 100vh; width: 100%;
  background: var(--black); color: #fff;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.manifesto-label {
  position: absolute; top: 0; left: 0;
  padding: 24px var(--pad-x);
}
.manifesto-svg {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 160%; height: auto;
  transition: opacity .5s ease;
}
.manifesto-svg textPath {
  font-family: var(--ff-d);
  font-size: 110px; letter-spacing: .04em;
  text-transform: uppercase; fill: #fff;
}
.manifesto-statement {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-46%);
  width: 100%; max-width: 1080px;
  padding: 0 var(--pad-x);
  text-align: center;
  font-family: var(--ff-d);
  font-size: clamp(34px, 4.6vw, 72px);
  line-height: 1; text-transform: uppercase; letter-spacing: .02em;
  opacity: 0;
  transition: opacity .7s ease, transform .7s ease;
}
.manifesto-statement.in { opacity: 1; transform: translate(-50%,-50%); }
.manifesto-statement em { font-style: normal; color: var(--blue-lt); }

@media (max-width: 900px) {
  .manifesto { height: 150vh; }
  .manifesto-svg { width: 300%; }
  .manifesto-svg textPath { font-size: 130px; }
}


/* ════════════════════════════════════════════════════════════════
   MOTION LAYER v5.1 — parallax, 3D, cursore, decorazioni
   ════════════════════════════════════════════════════════════════ */

/* Cross-fade tra pagine (View Transitions, progressive enhancement) */
@view-transition { navigation: auto; }

/* Nav auto-hide */
nav.nav-hidden { transform: translateY(-110%); }

/* nessun cursore personalizzato — si usa quello di sistema */

/* Sfere decorative fluttuanti negli hero */
#hero::after, .page-hero::after {
  content: ''; position: absolute;
  width: clamp(300px, 44vw, 680px); aspect-ratio: 1;
  border-radius: 50%; pointer-events: none; z-index: 0;
  right: -12%; top: -18%;
  animation: float-drift 12s ease-in-out infinite;
}
#hero::after { background: radial-gradient(circle at 35% 35%, rgba(12,29,50,.42), transparent 62%); }
.page-hero.is-blue::after { background: radial-gradient(circle at 35% 35%, rgba(12,29,50,.42), transparent 62%); }
.page-hero.is-navy::after { background: radial-gradient(circle at 35% 35%, rgba(37,88,160,.5), transparent 62%); }
#hero::before, .page-hero::before {
  content: ''; position: absolute;
  width: clamp(200px, 26vw, 420px); aspect-ratio: 1;
  border-radius: 50%; pointer-events: none; z-index: 0;
  left: -8%; bottom: -22%;
  background: radial-gradient(circle at 60% 40%, rgba(255,255,255,.12), transparent 60%);
  animation: float-drift 9s ease-in-out infinite reverse;
}
#hero > div, .page-hero > div { position: relative; z-index: 1; }
@keyframes float-drift {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(-4%,6%) scale(1.07); }
}

/* Contenuto accordion: entrata a cascata */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
.work-item.open .work-inner > *,
.work-item.open .proj-detail > * { animation: fadeUp .6s cubic-bezier(.2,.6,.2,1) both; }
.work-item.open .work-inner > *:nth-child(2),
.work-item.open .proj-detail > *:nth-child(2) { animation-delay: .1s; }
.svc-item.open .svc-content > * { animation: fadeUp .5s cubic-bezier(.2,.6,.2,1) both; }
.svc-item.open .svc-content > *:nth-child(2) { animation-delay: .07s; }
.svc-item.open .svc-content > *:nth-child(3) { animation-delay: .14s; }

/* Elementi con tilt 3D / parallax */
.sec-card, .extra-card, .promise-item, .mat-card, .team-card,
.vm-card, .app-card, .chi-img, .svc-side-img, .work-img-wrap { will-change: transform; }

/* Loader: uscita con zoom */
.loader svg { transition: transform .5s ease, opacity .5s ease; }
.loader.done svg { transform: scale(.55) rotate(90deg); opacity: 0; }

/* ════════════════════════════════════════════════════════════════
   REVISIONE COMMENTI CLIENTE — agosto 2026
   ════════════════════════════════════════════════════════════════ */

/* ── Hero home: passo verticale uniforme fra le righe del titolo ──
   Prima la terza riga stava dentro un flex insieme all'ampolla (fino a
   118px) e al blob-CTA (136px): erano loro a dettare l'altezza della riga,
   quindi l'ultima riga risultava più distante dalle precedenti.
   Ora l'ampolla è vincolata all'altezza della riga di testo
   (font-size × line-height .9) e il blob-CTA esce dal flusso. */
#hero h1 { margin: 0; }
#hero .hero-row { align-items: center; gap: clamp(12px, 1.6vw, 26px); }
#hero .hero-row .hero-star {
  width: clamp(41px, 6.84vw, 106px);
  height: clamp(41px, 6.84vw, 106px);
}
#hero .hero-cta { position: absolute; right: var(--pad-x); bottom: 48px; z-index: 2; }

/* ── Fascia loghi: card e marchi normalizzati ─────────────────── */
/* Padding verticale ridotto: altrimenti il box interno resta piu basso
   dei max-height sotto e i marchi quadrati non possono crescere. */
.logo-item { width: 190px; height: 104px; padding: 13px 22px; }
.logo-img  { max-height: 52px; }

/* ── Griglia foto produzione (sezione approccio / qualità) ─────── */
.prod-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; }
.prod-shot { margin: 0; }
.prod-shot img {
  /* height:auto e' necessario: gli attributi width/height sull'<img> (che
     servono a evitare il salto di layout) valgono come dichiarazioni, e
     senza questo l'altezza resterebbe fissa a 900px ignorando aspect-ratio. */
  width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 18px; display: block;
}
.prod-shot figcaption {
  font-family: var(--ff-b); font-size: 11px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.62);
  margin-top: 12px;
}
@media (max-width: 900px) { .prod-shots { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  #hero .hero-cta { position: static; right: auto; bottom: auto; margin-top: 34px; }
}

/* ── Manifesto: il testo sul percorso curvo ora scorre da solo ──
   Non è più agganciato allo scroll, quindi serve meno corsa verticale.
   Il solo effetto legato allo scroll resta la comparsa dello statement. */
.manifesto { height: 140vh; }
@media (max-width: 900px) { .manifesto { height: 125vh; } }
@media (prefers-reduced-motion: reduce) { .manifesto-svg textPath { animation: none; } }

/* Equilibrio ottico dei marchi: quelli quadrati o poco allungati
   possono crescere in altezza, quelli a lettering largo restano bassi.
   Serve a farli "pesare" uguale dentro la card. */
.logo-item.is-tall  .logo-img { max-height: 74px; }
.logo-item.is-boxy  .logo-img { max-height: 62px; }

/* ── Logo Lab (lettering ufficiale, bianco su fondi scuri) ─────
   Sostituisce il lockup testuale in Bebas. Il file e bianco con la
   forma nel canale alpha, quindi funziona sia sul blu dell'hero sia
   sul navy di nav-scrollata e footer. */
.nav-logo img  { height: 36px; width: auto; display: block; }
.foot-logo img { height: 40px; width: auto; display: block; }
@media (max-width: 700px) {
  .nav-logo img  { height: 29px; }
  .foot-logo img { height: 34px; }
}

/* ============================================================
   BRIEF PRE-LANCIO — settembre 2026
   Footer societario, CTA hero secondaria, slot filiera, privacy
   ============================================================ */

/* Footer su due righe: la prima come prima, sotto i dati societari */
footer { flex-direction: column; align-items: stretch; gap: 22px; }
.foot-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot-legal { border-top: 1px solid var(--bd-dark); padding-top: 18px; }
.foot-entity { font-family: var(--ff-b); font-size: 12px; font-weight: 400; color: rgba(255,255,255,.72); margin: 0 0 7px; }
.foot-entity strong { color: #fff; font-weight: 700; }
.foot-data { font-family: var(--ff-b); font-size: 11px; font-weight: 300; line-height: 1.75; color: rgba(255,255,255,.46); margin: 0; }
.foot-data a { color: rgba(255,255,255,.62); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.22); }
.foot-data a:hover { color: #fff; border-bottom-color: rgba(255,255,255,.5); }

@media (max-width: 700px) {
  footer { text-align: left; }
  .foot-top { flex-direction: column; align-items: center; text-align: center; }
  .foot-legal { text-align: center; }
}

/* CTA hero secondaria verso il portfolio (brief P1) */
.hero-cta2 {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 28px;
  font-family: var(--ff-b); font-size: 13px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.92); text-decoration: none;
  padding: 13px 27px; border-radius: 200px;
  border: 1px solid rgba(255,255,255,.42);
  transition: background .25s, border-color .25s, color .25s;
}
.hero-cta2:hover { background: #fff; border-color: #fff; color: var(--black); }
.hero-cta2 span { transition: transform .25s; }
.hero-cta2:hover span { transform: translateX(4px); }

/* Slot "Filiera selezionata": parola nel posto dove stava il 100% */
.nh-stat .num-word, .num-n-word, .h-num-word { white-space: nowrap; letter-spacing: .01em; }

/* Consenso privacy sotto i form (brief P0) */
.form-privacy {
  font-family: var(--ff-b); font-size: 12px; font-weight: 300;
  line-height: 1.6; margin: 16px 0 0;
}
.form-privacy a { text-decoration: none; border-bottom: 1px solid currentColor; }
.ct-form .form-privacy { color: rgba(255,255,255,.68); }
.ct-form .form-privacy a { color: rgba(255,255,255,.9); }

/* Esito dell'invio del form (compreso il ripiego su mailto) */
.form-note {
  font-family: var(--ff-b); font-size: 13px; font-weight: 300; line-height: 1.65;
  margin: 16px 0 0; padding: 13px 16px; border-radius: 12px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.82);
}
.form-note a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.45); }
.form-note a:hover { border-bottom-color: #fff; }

/* ── Hero mobile: le due CTA come una coppia ─────────────────────
   Sotto i 900px il blob esce dal posizionamento assoluto e si mette
   in coda al blocco di testo, quindi finisce sotto la CTA secondaria.
   L'ordine non si può invertire (stanno in contenitori diversi), ma
   avvicinandole e alleggerendo la secondaria la gerarchia resta
   leggibile: il blob pieno domina la pill vuota. */
@media (max-width: 900px) {
  .hero-cta2 { margin-top: 22px; padding: 11px 22px; font-size: 12px; border-color: rgba(255,255,255,.34); }
  #hero .hero-cta { margin-top: 18px; }
}

/* Honeypot antispam: fuori dallo schermo, non display:none — alcuni bot
   ignorano i campi nascosti con display, ma compilano quelli posizionati. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
