/* ============================================================
   UNION PROJEKT BAU — clean brand system (blue / ink / cool white)
   ============================================================ */

:root {
  --bg:        #F6F8FA;   /* cool near-white */
  --surface:   #EDF1F4;   /* alt sections */
  --panel:     #E2EAEF;   /* image panels */
  --ink:       #14181C;   /* near-black */
  --ink-soft:  #434B52;   /* secondary text */
  --muted:     #767E85;   /* tertiary */
  --line:      rgba(20,24,28,.10);
  --line-2:    rgba(20,24,28,.20);

  --blue:      #2F88C4;   /* brand blue, readable */
  --blue-br:   #3D9FD4;   /* brand blue, bright */
  --blue-dp:   #11354C;   /* deep brand blue (dark section) */

  --dark:      #0F1418;   /* near-black section */
  --on-dark:   #EAF0F4;

  --maxw: 1240px;
  --gut:  clamp(1.25rem, 5vw, 4rem);
  --sec:  clamp(6rem, 13vh, 11rem);

  --font:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --display: "Hanken Grotesk", system-ui, -apple-system, sans-serif; /* sans only — no serif */
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility; overflow-x: hidden;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}
p { text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--blue); color: #fff; }

/* keyboard focus — visible, on-brand, never on mouse click */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }
:focus:not(:focus-visible) { outline: none; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: var(--sec); }
.section--alt { background: var(--surface); }

/* ---------- type ---------- */
.h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 600;
  letter-spacing: -.022em; line-height: 1.06; max-width: 20ch;
  text-wrap: balance;
}
.h2--light { color: var(--on-dark); }
/* numbered index eyebrow — counts up per page, in the site's 01/02 number language */
main { counter-reset: kick; }
main .kicker { counter-increment: kick; }
.kicker {
  font-size: .95rem; font-weight: 600; letter-spacing: -.01em;
  color: var(--ink-soft); margin-bottom: 1.6rem;
  display: inline-flex; align-items: baseline; gap: .6rem;
}
.kicker::before {
  content: counter(kick, decimal-leading-zero);
  font-size: .78rem; font-weight: 700; color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.kicker--light { color: rgba(255, 255, 255, .85); }
.kicker--light::before { color: var(--blue-br); }
/* page heroes carry their own numbering — no counter there */
.pagehero .kicker { counter-increment: none; }
.pagehero .kicker::before { content: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .95em 1.6em; background: var(--ink); color: #fff;
  font-size: .9rem; font-weight: 600; border-radius: 6px;
  transition: background .3s var(--ease), transform .2s var(--ease), color .3s var(--ease);
}
/* arrow always visible; swaps through on hover */
.btn::after {
  content: "→"; display: inline-block; margin-left: .5em;
}
.btn:hover::after { animation: arrswap .5s var(--ease); }
@keyframes arrswap {
  0%   { transform: translateX(0);     opacity: 1; }
  45%  { transform: translateX(14px);  opacity: 0; }
  50%  { transform: translateX(-14px); opacity: 0; }
  100% { transform: translateX(0);     opacity: 1; }
}
.btn:hover { background: var(--blue); }
.btn:active { transform: translateY(1px); }
.btn--sm { padding: .65em 1.15em; font-size: .85rem; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover { background: var(--ink); color: #fff; box-shadow: none; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--blue-br); color: #fff; }
.btn--ghost-light { background: transparent; color: var(--on-dark); box-shadow: inset 0 0 0 1px rgba(234,240,244,.32); }
.btn--ghost-light:hover { background: rgba(234,240,244,.1); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 2rem;
  /* align inner edges with the .wrap content column */
  padding: clamp(.9rem, 2vh, 1.35rem) max(var(--gut), calc((100% - var(--maxw)) / 2 + var(--gut)));
  color: var(--ink);
  transition: transform .5s var(--ease), background .35s ease, box-shadow .35s ease;
}
.nav--solid { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.nav--over { color: #fff; }
.nav--over .nav__word { color: #fff; }
.nav--over .nav__links a, .nav--over .nav__top { color: rgba(255,255,255,.86); }
.nav--over .nav__links a:hover, .nav--over .nav__top:hover { color: #fff; }
.nav--over .nav__caret { color: rgba(255,255,255,.86); }
.nav--over .nav__mark--dark { display: none; }
.nav--over .nav__mark--light { display: block; }
.nav--over .nav__burger span { background: #fff; }
.nav--hidden { transform: translateY(-105%); }
.nav__logo { display: flex; align-items: center; gap: .6rem; margin-right: auto; }
.nav__logo svg { width: 24px; height: 24px; }
.nav__word { font-weight: 700; font-size: .98rem; letter-spacing: -.01em; }
.nav__links { display: flex; gap: 2rem; }
.nav__links a { font-size: .92rem; font-weight: 500; color: var(--ink-soft); transition: color .25s ease; position: relative; }
.nav__links a:hover { color: var(--ink); }
/* sliding underline (enters left, exits right) */
.nav__links > a::after, .nav__links .nav__top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav__links > a:hover::after, .nav__links > a[aria-current="page"]::after,
.nav__item:hover .nav__top::after { transform: scaleX(1); transform-origin: left; }
/* language switcher */
.nav__lang { display: flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 700; letter-spacing: .05em; }
.nav__lang a { color: var(--muted); transition: color .25s ease; }
.nav__lang a:hover { color: var(--ink); }
.nav__lang a[aria-current] { color: var(--ink); pointer-events: none; }
.nav__lang i { color: var(--line-2); font-style: normal; }
.menu__lang { position: absolute; right: var(--gut); bottom: var(--gut); display: flex; gap: 1.1rem; font-size: 1rem; font-weight: 700; letter-spacing: .05em; }
.menu__lang a { color: rgba(255, 255, 255, .5); }
.menu__lang a[aria-current] { color: #fff; }

.nav__burger { display: none; width: 28px; height: 16px; position: relative; }
.nav__burger span { position: absolute; left: 0; width: 100%; height: 1.6px; background: var(--ink); transition: transform .4s var(--ease), opacity .3s; }
.nav__burger span:nth-child(1) { top: 1px; } .nav__burger span:nth-child(2) { bottom: 1px; }
body.menu-open .nav__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.menu-open .nav__burger span:nth-child(2) { transform: translateY(-6px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 99; background: var(--dark); color: var(--on-dark);
  display: flex; flex-direction: column; justify-content: center;
  padding: 6rem var(--gut) var(--gut);
  clip-path: inset(0 0 100% 0); pointer-events: none; transition: clip-path .6s var(--ease);
}
body.menu-open .menu { clip-path: inset(0 0 0 0); pointer-events: auto; }
body.menu-open .nav__burger span { background: var(--on-dark); }
body.menu-open .nav__word { color: var(--on-dark); }
body.menu-open .nav__logo svg rect:not(.b) { fill: var(--on-dark); }
body.menu-open .nav .btn--sm { opacity: 0; pointer-events: none; }
.menu__links { display: flex; flex-direction: column; gap: .35rem; }
.menu__links a { font-size: clamp(2rem, 8vw, 3.2rem); font-weight: 600; letter-spacing: -.02em; opacity: .55; transition: opacity .3s, transform .3s var(--ease); }
.menu__links a:hover { opacity: 1; transform: translateX(.4rem); }
.menu__mail { position: absolute; left: var(--gut); bottom: var(--gut); color: var(--blue-br); font-weight: 500; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-top: clamp(8rem, 18vh, 12rem); padding-bottom: var(--sec); }
.hero__kicker { margin-bottom: 1.8rem; }
.hero__title {
  font-family: var(--display);
  font-size: clamp(2.8rem, 8vw, 7rem); font-weight: 600;
  letter-spacing: -.035em; line-height: .98; max-width: 16ch;
  text-wrap: balance;
}
.hero__title .accent { color: var(--blue); }
.hero__foot {
  display: grid; grid-template-columns: 1.3fr 1fr; align-items: end; gap: 2.5rem;
  margin-top: clamp(2.5rem, 6vh, 4rem);
}
.hero__lede { font-size: clamp(1.05rem, 1.4vw, 1.22rem); color: var(--ink-soft); max-width: 46ch; line-height: 1.55; }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; justify-self: end; }
/* hero image under the headline (white hero) */
.hero__media { margin: clamp(2rem, 5vh, 3.4rem) 0 0; border-radius: 12px; overflow: hidden; aspect-ratio: 21 / 9; background: var(--panel); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; will-change: transform; }

/* ============================================================
   PAGE LOADER — image sequence that lands in the hero
   ============================================================ */
html.loader-active, html.loader-active body { overflow: hidden; }
.loader { position: fixed; inset: 0; z-index: 1500; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.loader__frame { position: relative; width: min(64vw, 760px); aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--panel); box-shadow: 0 30px 80px rgba(15,20,24,.18); }
.loader__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============================================================
   STUDIO
   ============================================================ */
.studio__grid { display: grid; grid-template-columns: 1fr; gap: 1rem clamp(2rem, 6vw, 5rem); margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.studio__cols { display: grid; gap: 1.6rem; grid-template-columns: 1fr; margin-top: 2rem; }
.studio__cols p { color: var(--ink-soft); max-width: 52ch; }
@media (min-width: 860px) {
  .studio__grid { grid-template-columns: 7rem 1fr; }
  .studio__cols { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

/* ---------- media panels (clean, no broken-cross placeholder) ---------- */
.media { position: relative; overflow: hidden; background: var(--panel); border-radius: 10px; }
.media[data-ratio="21-9"] { aspect-ratio: 21 / 9; }
.media[data-ratio="4-5"]  { aspect-ratio: 4 / 5; }
.media[data-ratio="3-2"]  { aspect-ratio: 3 / 2; }
.media__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s var(--ease); will-change: transform; }
.media.is-loaded .media__img { opacity: 1; }
.media.is-loaded .media__mark { opacity: 0; }
.media__mark { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: opacity .5s ease; }
.media__mark svg { width: 54px; opacity: .14; }
.media__mark svg rect { fill: var(--ink); }
.media__mark svg rect.b { fill: var(--blue); }

/* ============================================================
   SERVIZI
   ============================================================ */
.head { margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.svc-list { border-top: 1px solid var(--line); }
.svc {
  display: grid; grid-template-columns: 3.5rem 1fr auto; align-items: center; gap: 1.5rem;
  padding: clamp(1.3rem, 3vh, 2rem) 0; border-bottom: 1px solid var(--line);
}
/* no padding shift on hover — rows must not reflow */
.svc__n { font-size: .85rem; font-weight: 600; color: var(--muted); }
.svc__name { font-family: var(--display); font-size: clamp(1.3rem, 2.6vw, 2rem); font-weight: 500; letter-spacing: -.015em; }
.svc__arr { font-size: 1.3rem; color: var(--blue); opacity: 0; transform: translateX(-8px); transition: opacity .35s, transform .35s var(--ease); }
.svc:hover .svc__arr { opacity: 1; transform: translateX(0); }
.svc:hover .svc__name { color: var(--blue); }

/* ============================================================
   METODO
   ============================================================ */
.steps { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.5rem); }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding-top: 1.6rem; border-top: 2px solid var(--ink); }
.step__n { font-size: .85rem; font-weight: 700; color: var(--blue); }
.step__t { font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 600; letter-spacing: -.015em; margin: .9rem 0 .8rem; }
.step__p { color: var(--ink-soft); max-width: 38ch; }

/* ============================================================
   NUMERI
   ============================================================ */
.numeri { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 820px) { .numeri { grid-template-columns: repeat(4, 1fr); } }
.num { display: flex; flex-direction: column; gap: .8rem; }
.num__n { font-family: var(--display); font-variant-numeric: tabular-nums; font-size: clamp(3rem, 7vw, 5rem); font-weight: 700; letter-spacing: -.04em; line-height: .9; color: var(--ink); }
.num__n i { font-style: normal; font-size: .32em; font-weight: 600; color: var(--blue); margin-left: .15em; letter-spacing: 0; }
.num__l { font-size: .95rem; color: var(--muted); max-width: 22ch; }

/* ============================================================
   VALORI
   ============================================================ */
.valori { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 860px) { .valori { grid-template-columns: .8fr 1.2fr; } }
.valori__list { display: grid; grid-template-columns: 1fr; gap: 2.2rem; }
@media (min-width: 560px) { .valori__list { grid-template-columns: 1fr 1fr; } }
.val__t { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: .5rem; }
.val__t::before { content: ""; display: block; width: 26px; height: 2px; background: var(--blue); margin-bottom: 1rem; }
.val__p { color: var(--ink-soft); max-width: 40ch; }

/* ============================================================
   LAND ID  (deep brand blue)
   ============================================================ */
.landid { background: var(--blue-dp); }
.landid__grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 6vw, 4rem); align-items: center; }
@media (min-width: 900px) { .landid__grid { grid-template-columns: 1.05fr .95fr; } }
.landid__p { color: rgba(234,240,244,.78); max-width: 46ch; margin: 1.6rem 0 2.2rem; line-height: 1.6; }
.landid__feats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem 2rem; margin-bottom: 2.4rem; }
.landid__feat b { display: block; color: var(--on-dark); font-size: 1.05rem; font-weight: 600; margin-bottom: .35rem; }
.landid__feat b::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--blue-br); border-radius: 50%; margin-right: .6rem; vertical-align: middle; }
.landid__feat span { color: rgba(234,240,244,.6); font-size: .9rem; }
.landid__viz { display: flex; align-items: center; justify-content: center; aspect-ratio: 1/1; }
.landid__viz svg { width: 78%; }
.landid__viz polygon { stroke: var(--on-dark); }
.landid__viz polygon.acc { stroke: var(--blue-br); }

/* ============================================================
   CONTATTI  (near-black)
   ============================================================ */
.contatti { background: var(--dark); }
.contatti__cta { font-family: var(--display); color: var(--on-dark); font-size: clamp(2.6rem, 7vw, 5.5rem); font-weight: 600; letter-spacing: -.03em; line-height: 1; margin-bottom: clamp(2.5rem, 6vh, 4rem); text-wrap: balance; }
.contatti__actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: clamp(3rem, 8vh, 5rem); }
.contatti__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; padding-top: 2.5rem; border-top: 1px solid rgba(234,240,244,.14); }
@media (min-width: 760px) { .contatti__grid { grid-template-columns: repeat(4, 1fr); } }
.cell { display: flex; flex-direction: column; gap: .55rem; }
.cell__l { font-size: .82rem; font-weight: 600; color: var(--blue-br); }
.cell__v { font-size: 1.05rem; color: var(--on-dark); transition: color .25s ease; }
a.cell__v:hover { color: var(--blue-br); }

/* ============================================================
   FOOTER — sitemap + legal row
   ============================================================ */
.footer { background: var(--dark); color: rgba(234,240,244,.5); padding-top: clamp(4rem, 8vh, 6rem); padding-bottom: 2.5rem; }
.footer__grid {
  display: grid; grid-template-columns: 1fr; gap: 2.6rem 2rem;
  padding-bottom: clamp(3rem, 6vh, 4.5rem);
}
@media (min-width: 560px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .footer__grid { grid-template-columns: 1.2fr .9fr 1.3fr .9fr; } }
.footer__brand img { width: 44px; height: 44px; display: block; }
.footer__brand p { margin-top: 1.3rem; font-size: .92rem; line-height: 1.6; color: rgba(234,240,244,.55); }
.footer__col { display: flex; flex-direction: column; gap: .6rem; font-size: .92rem; }
.footer__col b { color: var(--on-dark); font-weight: 600; font-size: .95rem; margin-bottom: .4rem; }
.footer__col a { color: rgba(234,240,244,.55); width: fit-content; transition: color .25s ease, transform .3s var(--ease); }
.footer__col a:hover { color: #fff; transform: translateX(3px); }
.footer__col span { color: rgba(234,240,244,.55); line-height: 1.55; }
.footer__row { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-top: 2rem; border-top: 1px solid rgba(234,240,244,.1); font-size: .88rem; }
.footer__row a { transition: color .25s ease; } .footer__row a:hover { color: var(--on-dark); }

/* ============================================================
   ACCESS GATE
   ============================================================ */
html.is-locked, html.is-locked body { overflow: hidden; }
.gate { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: var(--bg); opacity: 1; transition: opacity .55s var(--ease); }
.gate--hide { opacity: 0; pointer-events: none; }
.gate__card { width: 100%; max-width: 380px; text-align: center; }
.gate__mark { width: 36px; margin: 0 auto 1.8rem; }
.gate__kicker { font-size: .82rem; font-weight: 600; color: var(--blue); margin-bottom: 1rem; }
.gate__title { font-size: clamp(1.8rem, 5vw, 2.4rem); font-weight: 600; letter-spacing: -.02em; margin-bottom: .7rem; }
.gate__sub { color: var(--muted); margin-bottom: 2.2rem; }
.gate__form { display: flex; gap: .6rem; }
.gate__form input { flex: 1; padding: .85rem 1rem; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; color: var(--ink); font-family: var(--font); font-size: 1rem; outline: none; transition: border-color .25s; }
.gate__form input:focus { border-color: var(--blue); }
.gate__form button { padding: .85rem 1.4rem; background: var(--ink); color: #fff; border-radius: 6px; font-weight: 600; font-size: .9rem; transition: background .25s; }
.gate__form button:hover { background: var(--blue); }
.gate__err { min-height: 1.2rem; margin-top: .9rem; font-size: .85rem; color: #C0392B; opacity: 0; transition: opacity .2s; }
.gate__err.is-show { opacity: 1; }

/* ============================================================
   REVEAL
   ============================================================ */
.r { opacity: 0; transform: translateY(20px); }
.is-in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1040px) {
  .nav__links { display: none; }
  .nav .btn--sm { display: none; }
  .nav__burger { display: block; }
}
@media (max-width: 820px) {
  .hero__foot { grid-template-columns: 1fr; align-items: start; }
  .hero__cta { justify-self: start; }
  .svc { grid-template-columns: 2.5rem 1fr auto; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .landid__feats, .numeri { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .r { opacity: 1 !important; transform: none !important; }
  /* collapse the scrollytelling into a single static scene */
  .concept { height: auto; }
  .concept__pin { position: relative; height: 78svh; }
  .cstage[data-stage="3"] { opacity: 1; }
}

/* ============================================================
   MULTIPAGE — nav dropdown, page header, cards, faq, jobs, form
   ============================================================ */

/* ---- nav: active + Servizi dropdown ---- */
.nav__links a[aria-current="page"] { color: var(--ink); }
.nav__item { position: relative; display: inline-flex; }
.nav__top { display: inline-flex; align-items: center; gap: .35rem; }
.nav__caret { font-style: normal; font-size: .68em; transition: transform .25s var(--ease); }
.nav__drop {
  position: absolute; top: 100%; left: 50%; transform: translate(-50%, 8px);
  min-width: 320px; padding: .55rem; margin-top: .2rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 20px 54px rgba(15, 20, 24, .16);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transition: opacity .25s ease, transform .25s var(--ease);
}
.nav__item:hover .nav__drop,
.nav__item:focus-within .nav__drop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav__item:hover .nav__caret { transform: rotate(180deg); }
.nav__drop a { padding: .6rem .8rem; border-radius: 7px; font-size: .9rem; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.nav__drop a:hover { background: var(--surface); color: var(--ink); }
.nav__drop a[aria-current="page"] { background: var(--surface); color: var(--blue); }

/* ---- mobile menu submenu ---- */
.menu { justify-content: flex-start; padding-top: clamp(5.5rem, 14vh, 7rem); overflow-y: auto; }
.menu__links > a { font-size: clamp(1.6rem, 6vw, 2.4rem); }
.menu__sub { display: flex; flex-direction: column; gap: .05rem; margin: .3rem 0 .7rem; padding-left: .15rem; }
.menu__sub a { font-size: 1.02rem; font-weight: 500; opacity: .5; transition: opacity .3s, transform .3s var(--ease); }
.menu__sub a:hover, .menu__sub a[aria-current="page"] { opacity: 1; }
.menu__sub a[aria-current="page"] { color: var(--blue-br); }

/* ---- page header (subpages) ---- */
.pagehero { padding-top: clamp(7rem, 16vh, 10rem); padding-bottom: clamp(2.5rem, 6vh, 4rem); }
.crumbs { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: 1.5rem; }
.crumbs a { transition: color .25s ease; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { color: var(--line-2); }
.pagehero__title { font-family: var(--display); font-size: clamp(2.5rem, 6.5vw, 4.6rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.02; max-width: 18ch; text-wrap: balance; }
.pagehero__lede { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--ink-soft); max-width: 54ch; margin-top: 1.6rem; line-height: 1.55; }

/* ---- service overview cards ---- */
.cards { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.cards--2 { max-width: 920px; }
@media (min-width: 640px) { .cards--2 { grid-template-columns: 1fr 1fr; } }
.card { display: flex; flex-direction: column; gap: .7rem; padding: clamp(1.5rem, 3vw, 2rem); background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: border-color .3s ease, transform .3s var(--ease), box-shadow .3s ease; }
a.card:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: 0 14px 40px rgba(15, 20, 24, .08); }
.card__n { font-size: .8rem; font-weight: 700; color: var(--blue); }
.card__t { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; }
.card__p { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.card__arr { font-size: .9rem; font-weight: 600; color: var(--blue); }

/* ---- feature grid (light) ---- */
.feats { display: grid; grid-template-columns: 1fr; gap: 1.7rem 2.5rem; }
@media (min-width: 640px) { .feats { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .feats { grid-template-columns: repeat(3, 1fr); } }
.feat b { display: block; font-size: 1.05rem; font-weight: 600; margin-bottom: .35rem; }
.feat b::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--blue); border-radius: 50%; margin-right: .6rem; vertical-align: middle; }
.feat span { color: var(--ink-soft); font-size: .95rem; }

/* ---- prose ---- */
.prose { max-width: 64ch; }
.prose p { color: var(--ink-soft); margin-bottom: 1.2rem; font-size: 1.08rem; line-height: 1.6; }
.prose p:last-child { margin-bottom: 0; }

/* ---- CTA band (near-black) ---- */
.cta { background: var(--dark); }
.cta__t { font-family: var(--display); color: var(--on-dark); font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 600; letter-spacing: -.025em; line-height: 1.04; max-width: 22ch; margin-bottom: clamp(1.8rem, 4vh, 2.6rem); text-wrap: balance; }
.cta__actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ---- FAQ ---- */
.faq { border-top: 1px solid var(--line); max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 1.4rem 0; font-size: clamp(1.05rem, 2vw, 1.25rem); font-weight: 600; letter-spacing: -.01em; display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-weight: 600; font-size: 1.4rem; line-height: 1; transition: transform .3s var(--ease); }
.faq details[open] summary::after { content: "–"; }
.faq__a { color: var(--ink-soft); padding-bottom: 1.5rem; max-width: 66ch; line-height: 1.6; }


/* ---- service list with tagline (home) ---- */
.svc__mid { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.svc__tag { font-size: .92rem; font-weight: 400; color: var(--muted); }
.svc:hover .svc__tag { color: var(--ink-soft); }

/* ---- ticks (what's included) ---- */
.ticks { display: grid; gap: .9rem; max-width: 62ch; margin: 0; padding: 0; }
.ticks li { list-style: none; display: flex; gap: .8rem; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.5; }
.ticks li::before { content: "✓"; color: var(--blue); font-weight: 700; flex: none; }

/* ---- process flow ---- */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem .35rem; }
.flow__step { display: inline-flex; align-items: center; gap: .55rem; padding: .6rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: .92rem; font-weight: 500; }
.flow__step b { color: var(--blue); font-weight: 700; font-size: .76rem; }
.flow__sep { color: var(--line-2); }

/* ---- service meta (timeline / price) ---- */
.svcmeta { display: flex; gap: 2.5rem 3.5rem; flex-wrap: wrap; margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.svcmeta b { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--blue); margin-bottom: .35rem; }
.svcmeta span { font-size: 1.02rem; color: var(--ink); }

/* ---- step bullet sublist (approach / hiring) ---- */
.step__list { margin: 1.1rem 0 0; padding: 0; display: grid; gap: .5rem; }
.step__list li { list-style: none; display: flex; gap: .6rem; font-size: .92rem; color: var(--ink-soft); }
.step__list li::before { content: ""; width: 6px; height: 6px; margin-top: .5em; background: var(--blue); border-radius: 50%; flex: none; }

/* ---- mission / vision duo ---- */
.duo { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.5rem); }
@media (min-width: 760px) { .duo { grid-template-columns: 1fr 1fr; } }
.duo__p { color: var(--ink-soft); font-size: 1.08rem; line-height: 1.6; max-width: 48ch; }
.byline { color: var(--muted); font-style: italic; }

/* ---- certifications ---- */
.certs { display: grid; grid-template-columns: 1fr; gap: 1.2rem; margin-top: 1rem; }
@media (min-width: 760px) { .certs { grid-template-columns: 1fr 1fr; } }
.cert { padding: clamp(1.6rem, 3vw, 2.2rem); background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.cert__t { font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: .8rem; }
.cert__t::before { content: ""; display: block; width: 26px; height: 2px; background: var(--blue); margin-bottom: 1rem; }
.cert__p { color: var(--ink-soft); font-size: .95rem; line-height: 1.6; }
.note { color: var(--muted); font-size: .9rem; margin-top: 2rem; }
.note a { color: var(--blue); font-weight: 600; }

/* ---- job cards ---- */
.jobs { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
@media (min-width: 760px) { .jobs { grid-template-columns: 1fr 1fr; } }
.jobcard { display: flex; flex-direction: column; gap: .5rem; padding: clamp(1.6rem, 3vw, 2.2rem); background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: border-color .3s ease; }
.jobcard:hover { border-color: var(--blue); }
.jobcard__t { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; }
.jobcard__m { font-size: .85rem; font-weight: 600; color: var(--blue); }
.jobcard__d { color: var(--ink-soft); font-size: .95rem; line-height: 1.55; flex: 1; }
.jobcard__a { font-size: .9rem; font-weight: 600; color: var(--ink); margin-top: .4rem; transition: color .25s; }
.jobcard__a:hover { color: var(--blue); }

/* ---- contact page ---- */
.contact { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 6vw, 4rem); }
.opt { color: var(--muted); font-weight: 400; }
@media (min-width: 880px) { .contact { grid-template-columns: 1.3fr .7fr; } }
.form { display: grid; gap: 1.2rem; }
.form__row { display: grid; gap: 1.2rem; }
@media (min-width: 560px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: .5rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea { padding: .85rem 1rem; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; color: var(--ink); font-family: var(--font); font-size: 1rem; outline: none; transition: border-color .25s; }
.field input:focus, .field textarea:focus { border-color: var(--blue); }
.field textarea { min-height: 150px; resize: vertical; }
.form__note { font-size: .85rem; color: var(--muted); }
.form__note a { color: var(--blue); font-weight: 600; }
/* honeypot — offscreen, never focusable by a real user */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { font-size: .9rem; font-weight: 600; min-height: 1.4em; }
.form__status:empty { display: none; }
.form__status.is-busy { color: var(--muted); }
.form__status.is-ok { color: var(--blue); }
.form__status.is-err { color: #B4362F; }
.form button[type="submit"]:disabled { opacity: .55; cursor: progress; }
.contact__aside { display: flex; flex-direction: column; gap: 1.6rem; }
.cell--ink .cell__l { color: var(--blue); }
.cell--ink .cell__v { color: var(--ink); }
a.cell--ink .cell__v:hover { color: var(--blue); }

/* ============================================================
   REAL LOGO — nav mark + gate lockup
   ============================================================ */
.nav__mark { height: 30px; width: 30px; transition: transform .4s var(--ease); }
.nav__logo:hover .nav__mark { transform: scale(1.08); }
.nav__mark--light { display: none; }
body.menu-open .nav__mark--dark { display: none; }
body.menu-open .nav__mark--light { display: block; }
.gate__logo { width: 132px; height: auto; margin: 0 auto 1.7rem; }

/* ============================================================
   HERO — cinematic full-bleed
   ============================================================ */
.hero--cine { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: clamp(7rem, 16vh, 10rem); padding-bottom: clamp(2.5rem, 6vh, 4rem); color: var(--on-dark); overflow: hidden; }
.hero--cine .hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero--cine .hero__bg img { width: 100%; height: 116%; object-fit: cover; will-change: transform; }
.hero--cine .hero__scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(15,20,24,.55) 0%, rgba(15,20,24,.2) 38%, rgba(15,20,24,.8) 100%); }
.hero--cine .hero__inner { position: relative; z-index: 2; }
.hero--cine .hero__title { color: #fff; }
.hero--cine .hero__title .accent { color: var(--blue-br); }
.hero--cine .hero__lede { color: rgba(255,255,255,.84); }
.hero__hint { position: absolute; left: 50%; bottom: 1.1rem; transform: translateX(-50%); z-index: 2; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.hero__hint::after { content: ""; display: block; width: 1px; height: 26px; background: rgba(255,255,255,.45); margin: .5rem auto 0; transform-origin: top; animation: hintpulse 1.8s var(--ease) infinite; }
@keyframes hintpulse { 0%,100% { transform: scaleY(.3); opacity: .3; } 50% { transform: scaleY(1); opacity: .9; } }

/* ============================================================
   CONCEPT → COMPLETION  (scrollytelling, sticky)
   ============================================================ */
.concept { position: relative; height: 400vh; background: var(--blue-dp); }
.concept__pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; align-items: flex-end; }
.concept__stages { position: absolute; inset: 0; z-index: 0; }
.cstage { position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease), transform .9s var(--ease); transform: scale(1.03); display: flex; align-items: center; justify-content: center; }
.cstage.is-active { opacity: 1; transform: scale(1); }
.cstage--photo img { width: 100%; height: 100%; object-fit: cover; }
.cstage__art { width: min(62%, 640px); opacity: .92; }
.cstage__iso { width: min(44%, 460px); }
.concept [data-iso] polygon { stroke: #cfe2f0; }
.concept [data-iso] polygon.acc { stroke: var(--blue-br); }
.concept__scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(17,53,76,.25) 0%, rgba(17,53,76,.4) 50%, rgba(17,53,76,.9) 100%); }
.concept__ui { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(2.5rem, 8vh, 5.5rem); color: var(--on-dark); }
.concept__cap { font-family: var(--display); color: #fff; font-size: clamp(1.8rem, 4.4vw, 3.4rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.06; max-width: 20ch; margin: .7rem 0 1.7rem; text-wrap: balance; }
.concept__steps { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; }
.cstep { font-size: .92rem; color: rgba(234,240,244,.4); transition: color .4s ease; }
.cstep b { font-weight: 700; margin-right: .35rem; color: rgba(234,240,244,.4); transition: color .4s ease; }
.cstep.is-on { color: #fff; } .cstep.is-on b { color: var(--blue-br); }
.concept__bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: rgba(234,240,244,.14); z-index: 3; }
.concept__bar span { display: block; height: 100%; width: 0; background: var(--blue-br); }

/* ============================================================
   PROGETTI  (horizontal gallery)
   ============================================================ */
.proj { padding-block: var(--sec); overflow: hidden; }
.proj__head { margin-bottom: clamp(2rem, 5vh, 3rem); }
.proj__note { color: var(--muted); font-size: .9rem; margin-top: .6rem; }
.proj__viewport { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; cursor: grab; padding-inline: var(--gut); scrollbar-width: none; }
.proj__viewport::-webkit-scrollbar { display: none; }
.proj__viewport.is-drag { cursor: grabbing; }
.proj__track { display: flex; gap: clamp(1rem, 2vw, 1.6rem); width: max-content; }
.proj__track::after { content: ""; flex: 0 0 var(--gut); }
.projc { flex: 0 0 auto; width: clamp(280px, 42vw, 520px); scroll-snap-align: start; }
.projc__img { aspect-ratio: 4/3; overflow: hidden; border-radius: 10px; background: var(--panel); }
.projc__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.projc:hover .projc__img img { transform: scale(1.05); }
.projc__meta { display: flex; flex-direction: column; gap: .2rem; margin-top: 1rem; }
.projc__t { font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
.projc__m { font-size: .9rem; color: var(--muted); }
.projc--cta { display: flex; align-items: stretch; width: clamp(260px, 32vw, 400px); }
.projc__metabig { background: var(--blue-dp); color: #fff; border-radius: 10px; width: 100%; aspect-ratio: 4/3; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(1.4rem, 3vw, 2rem); transition: background .3s ease; }
.projc__metabig > span:first-child { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.projc__arrow { font-size: 1.7rem; color: var(--blue-br); }
.projc--cta:hover .projc__metabig { background: var(--blue); }

/* ============================================================
   PRIMA / DOPO  (before-after slider)
   ============================================================ */
.ba { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; user-select: none; touch-action: pan-y; --pos: 50%; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; display: block; }
.ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0; z-index: 3; }
.ba__line { position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; }
.ba__grip { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; box-shadow: 0 6px 20px rgba(0,0,0,.28); cursor: ew-resize; }
.ba__tag { position: absolute; top: 1rem; padding: .3rem .7rem; font-size: .74rem; font-weight: 600; letter-spacing: .04em; border-radius: 4px; background: rgba(15,20,24,.6); color: #fff; z-index: 2; backdrop-filter: blur(4px); }
.ba__tag--l { left: 1rem; } .ba__tag--r { right: 1rem; }

/* ============================================================
   SERVICES — calm editorial hover (mouse-follow removed for restraint)
   ============================================================ */
.svc-cursor { display: none !important; }
/* hovered row reads forward, the rest recede gently — no jumpy follow image */
@media (hover: hover) and (pointer: fine) {
  .svc-list .svc { transition: padding-left .45s var(--ease), opacity .4s ease, color .35s ease; }
  .svc-list:hover .svc:not(:hover) { opacity: .5; }
}

/* ============================================================
   ████ FANCY LAYER (homepage only — new scoped classes) ████
   ============================================================ */

/* ---------- grain overlay (subtle, whole page) ---------- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 3000; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- inline typo-pill inside the H1 ---------- */
.tpill {
  display: inline-block; vertical-align: baseline;
  height: .56em; aspect-ratio: 2.3 / 1; border-radius: 999px; overflow: hidden;
  margin: 0 .14em; transform: translateY(.06em);
  box-shadow: inset 0 0 0 1px rgba(20,24,28,.08);
}
.tpill img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) contrast(1.05); }

/* ---------- infinite marquee band ---------- */
.mq { overflow: hidden; border-block: 1px solid var(--line); padding-block: clamp(1.1rem, 2.4vh, 1.7rem); background: var(--bg); }
.mq__track { display: flex; width: max-content; animation: mqslide 30s linear infinite; }
.mq__seq {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-size: clamp(1.5rem, 3.6vw, 2.7rem); font-weight: 700; letter-spacing: -.02em; color: var(--ink);
}
.mq__seq em { font-style: normal; color: transparent; -webkit-text-stroke: 1.4px var(--ink-soft); }
.mq__seq i { font-style: normal; color: var(--blue); margin-inline: .7em; font-weight: 400; }
@keyframes mqslide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .mq__track { animation: none; } }

/* ---------- scrubbing text reveal (chi siamo) — full width, two columns ---------- */
/* ---------- chi siamo: two-column editorial ---------- */
.studio2 { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 900px) {
  .studio2 { grid-template-columns: .9fr 1.1fr; }
  .studio2__left { position: sticky; top: 7rem; }
  /* inside the half column: single text column, 2-up feats, no extra top gap */
  .studio2 .scrub { grid-template-columns: 1fr; margin-top: 0; }
  .studio2 .feats { grid-template-columns: 1fr 1fr; }
}
.studio2__left .btn { margin-top: 1.6rem; }
.studio2 .studio__feats { margin-top: clamp(1.6rem, 3.5vh, 2.4rem); }

.scrub { margin-top: clamp(1.8rem, 4vh, 2.6rem); display: grid; gap: 1.2rem clamp(2.5rem, 5vw, 4rem); }
.scrub p {
  font-size: clamp(1.15rem, 1.9vw, 1.6rem); font-weight: 500; line-height: 1.45;
  letter-spacing: -.01em; color: var(--ink); margin-bottom: 0; max-width: 62ch;
}
@media (min-width: 900px) { .scrub { grid-template-columns: 1fr 1fr; } }
.scrub .w { opacity: .13; }
.scrub.scrub--plain .w { opacity: 1; }
.studio__feats { margin-top: clamp(2rem, 4.5vh, 3rem); }

/* ---------- servizi: pinned split ---------- */
.svcsplit__grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 4.5rem); }
.svcsplit__sticky { position: sticky; top: clamp(6rem, 14vh, 9rem); }
.svcsplit__count {
  margin-top: clamp(1.8rem, 4vh, 2.8rem);
  font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -.03em;
  font-size: clamp(2.6rem, 5.5vw, 4.6rem); line-height: 1; color: var(--ink);
  display: flex; align-items: baseline; gap: .18em;
}
.svcsplit__count #svcCur { color: var(--blue); }
.svcsplit__sep { color: var(--line-2); font-weight: 400; }
.svcsplit__count > span:last-child { font-size: .45em; color: var(--muted); font-weight: 600; }
@media (min-width: 980px) {
  .svcsplit__grid { grid-template-columns: .85fr 1.15fr; align-items: start; }
}
/* row thumb — slot is always reserved; image unclips on hover (no reflow) */
.svcsplit .svc { grid-template-columns: 3.5rem 1fr auto auto; }
.svcsplit .svc__thumb {
  width: 128px; height: 72px; border-radius: 8px; overflow: hidden; flex: none;
  clip-path: inset(0 100% 0 0 round 8px); opacity: 0;
  transition: clip-path .55s var(--ease), opacity .35s ease;
}
.svcsplit .svc__thumb img { width: 128px; height: 72px; object-fit: cover; }
.svcsplit .svc:hover .svc__thumb { clip-path: inset(0 0 0 0 round 8px); opacity: 1; }
@media (max-width: 1040px) { .svcsplit .svc__thumb { display: none; } .svcsplit .svc { grid-template-columns: 2.5rem 1fr auto; } }

/* ---------- progetti: pinned horizontal scrub ---------- */
.hproj { position: relative; background: var(--bg); }
.hproj__pin {
  position: sticky; top: 0; min-height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(3.5rem, 8vh, 6rem);
}
.hproj__head { margin-bottom: clamp(2rem, 5vh, 3.2rem); }
.hproj__note { color: var(--muted); font-size: .9rem; margin-top: .6rem; }
.hproj__stage { padding-inline: var(--gut); overflow: visible; }
.hproj__track { display: flex; gap: clamp(1rem, 2vw, 1.6rem); width: max-content; will-change: transform; }
.hproj__bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--line); }
.hproj__bar span { display: block; height: 100%; width: 0; background: var(--blue); }
/* fallback: no JS pin (reduced motion / track fits) -> native horizontal scroll */
.hproj--static .hproj__pin { position: static; min-height: 0; }
.hproj--static .hproj__stage { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hproj--static .hproj__stage::-webkit-scrollbar { display: none; }
.hproj--static .hproj__bar { display: none; }

/* ---------- approccio: sticky stacking cards ---------- */
.stack { padding-block: var(--sec); }
.stack__cards { display: grid; gap: clamp(1.4rem, 3vh, 2.2rem); }
.scard {
  position: sticky; top: clamp(5rem, 12vh, 7rem);
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: clamp(1.8rem, 4vw, 3.2rem);
  min-height: clamp(320px, 52vh, 440px);
  box-shadow: 0 24px 60px rgba(15, 20, 24, .07);
  will-change: transform; transform-origin: center top;
  display: flex; align-items: center;
}
/* per-position sticky offsets (supports stacks of up to 5) */
.stack__cards .scard:nth-child(2) { top: calc(clamp(5rem, 12vh, 7rem) + 1.4rem); }
.stack__cards .scard:nth-child(3) { top: calc(clamp(5rem, 12vh, 7rem) + 2.8rem); }
.stack__cards .scard:nth-child(4) { top: calc(clamp(5rem, 12vh, 7rem) + 4.2rem); }
.stack__cards .scard:nth-child(5) { top: calc(clamp(5rem, 12vh, 7rem) + 5.6rem); }
.scard--mid { background: var(--panel); }
.scard--deep { background: var(--blue-dp); border-color: transparent; }
.scard__row { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.4rem, 3vw, 2.8rem); align-items: center; width: 100%; }
.scard__n { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; letter-spacing: -.03em; color: var(--blue); font-variant-numeric: tabular-nums; align-self: start; }
.scard__t { font-size: clamp(1.4rem, 2.8vw, 2.1rem); font-weight: 600; letter-spacing: -.02em; margin-bottom: .7rem; }
.scard__p { color: var(--ink-soft); max-width: 44ch; }
.scard__art { display: none; }
.scard__art img, .scard__art svg { width: 100%; }
.scard__art--photo img { border-radius: 12px; aspect-ratio: 4 / 3; object-fit: cover; }
.scard__art [data-iso] polygon { stroke: var(--ink); }
.scard__art [data-iso] polygon.acc { stroke: var(--blue); }
.scard--deep .scard__t { color: #fff; }
.scard--deep .scard__n { color: var(--blue-br); }
.scard--deep .scard__p { color: rgba(234,240,244,.78); }
.scard--deep .step__list li { color: rgba(234,240,244,.7); }
.scard--deep .step__list li::before { background: var(--blue-br); }
@media (min-width: 900px) {
  .scard__row { grid-template-columns: auto 1.15fr .85fr; }
  .scard__art { display: block; }
}

/* ---------- valori: horizontal accordion ---------- */
.acc { display: flex; flex-direction: column; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.acc--studio { margin-top: clamp(3rem, 7vh, 4.5rem); }
.acc__item { border-bottom: 1px solid var(--line); cursor: pointer; }
.acc__item:last-child { border-bottom: 0; }
.acc__inner { padding: 1.4rem 0; }
.acc__t { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.acc__t::before { content: ""; display: block; width: 26px; height: 2px; background: var(--blue); margin-bottom: 1rem; transition: width .45s var(--ease); }
.acc__p { color: var(--ink-soft); max-width: 40ch; margin-top: .6rem; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease), opacity .4s ease, margin-top .4s ease; }
.acc__item.is-open .acc__p { max-height: 200px; opacity: 1; }
.acc__item.is-open .acc__t::before { width: 52px; }
@media (min-width: 860px) {
  .acc { flex-direction: row; height: clamp(320px, 44vh, 420px); border-bottom: 1px solid var(--line); }
  .acc__item { flex: 1; min-width: 0; border-bottom: 0; border-left: 1px solid var(--line); transition: flex .65s var(--ease), background .5s ease; position: relative; overflow: hidden; }
  .acc__item:first-child { border-left: 0; }
  .acc__item.is-open { flex: 2.6; background: #fff; }
  .acc__inner { padding: 1.6rem 1.4rem; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
  .acc__t { white-space: nowrap; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 1.15rem; color: var(--ink-soft); transition: color .4s ease; }
  .acc__t::before { display: none; }
  .acc__item.is-open .acc__t { writing-mode: horizontal-tb; transform: none; white-space: normal; font-size: 1.45rem; color: var(--ink); }
  .acc__item.is-open .acc__p { margin-top: .9rem; }
}

/* ---------- land id: gapless bento ---------- */
.lbento { position: relative; overflow: hidden; }
.lbento::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(234,240,244,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234,240,244,.055) 1px, transparent 1px);
  background-size: 56px 56px;
}
.lbento .wrap { position: relative; }
.lbento .landid__p { margin: 1.6rem 0 0; }
.lbento__grid {
  display: grid; grid-template-columns: 1fr 1fr 1.05fr; grid-auto-flow: dense;
  gap: 10px; margin-top: clamp(2.2rem, 5vh, 3.2rem);
}
.lbento__cell {
  background: rgba(234,240,244,.05); border: 1px solid rgba(234,240,244,.14);
  border-radius: 14px; padding: clamp(1.2rem, 2.5vw, 1.7rem);
  transition: background .4s ease, border-color .4s ease;
}
.lbento__cell:hover { background: rgba(234,240,244,.09); border-color: rgba(234,240,244,.26); }
.lbento__cell b { display: block; color: var(--on-dark); font-size: 1.05rem; font-weight: 600; margin-bottom: .4rem; }
.lbento__cell span { color: rgba(234,240,244,.62); font-size: .92rem; line-height: 1.5; }
.lbento__cell--viz { grid-column: 3; grid-row: 1 / span 2; display: flex; align-items: center; justify-content: center; }
.lbento__cell--viz svg { width: 72%; }
.lbento__cell--viz [data-iso] polygon { stroke: var(--on-dark); }
.lbento__cell--viz [data-iso] polygon.acc { stroke: var(--blue-br); }
@media (max-width: 860px) {
  .lbento__grid { grid-template-columns: 1fr 1fr; }
  .lbento__cell--viz { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
}

/* ---------- certificazioni: PDF download slots ---------- */
.cert__dl {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.1rem;
  font-size: .9rem; font-weight: 600; color: var(--blue);
  border-bottom: 1px solid currentColor; padding-bottom: .15em; width: fit-content;
  transition: color .25s ease;
}
.cert__dl:hover { color: var(--ink); }
.cert__soon { display: inline-block; margin-top: 1.1rem; font-size: .82rem; font-weight: 600; color: var(--muted); }

/* ---------- lavora con noi: candidatura block ---------- */
.apply {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.6rem 2.5rem; margin-top: 2.4rem; padding: clamp(1.6rem, 3vw, 2.4rem);
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
}
.apply__t { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: .4rem; }
.apply__p { color: var(--ink-soft); max-width: 46ch; }
.apply__p b { font-weight: 600; color: var(--ink); }
.apply__actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ---------- pagehero: word-mask entrance (subpage dynamism) ---------- */
.pagehero__title .wm { display: inline-block; overflow: hidden; vertical-align: bottom; }
.pagehero__title .wi { display: inline-block; transform: translateY(112%); }
.pagehero__title.title-in .wi { transform: none; }

/* ---------- contatti: ambient radial ---------- */
.contatti { position: relative; overflow: hidden; }
.contatti::before {
  content: ""; position: absolute; inset: -20%; pointer-events: none;
  background: radial-gradient(640px 420px at 82% 18%, rgba(47,136,196,.16), transparent 62%);
}
.contatti .wrap { position: relative; }
.btn--mag { will-change: transform; }

/* ============================================================
   ████ SUBPAGE FANCY LAYER ████
   ============================================================ */

/* ---------- service pagehero: giant outlined index watermark + blueprint lines ---------- */
.pagehero--svc { position: relative; overflow: hidden; }
.pagehero--svc::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(20,24,28,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,24,28,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 82%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 82%);
}
.pagehero--svc .wrap { position: relative; }
.pagehero__num {
  position: absolute; right: -.04em; top: 44%; transform: translateY(-50%);
  font-size: clamp(9rem, 26vw, 22rem); font-weight: 800; letter-spacing: -.05em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(20,24,28,.10);
  pointer-events: none; user-select: none; z-index: 0;
  font-variant-numeric: tabular-nums;
}

/* ---------- prev/next service pagination ---------- */
.pnav { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--line); }
.pnav a {
  display: flex; flex-direction: column; gap: .55rem;
  padding: clamp(2rem, 5vh, 3.2rem) clamp(1.2rem, 3vw, 2.5rem);
  transition: background .35s ease;
}
.pnav a:hover { background: var(--surface); }
.pnav a:last-child { align-items: flex-end; text-align: right; border-left: 1px solid var(--line); }
.pnav__l { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pnav__t { font-size: clamp(1.15rem, 2.4vw, 1.8rem); font-weight: 600; letter-spacing: -.015em; display: inline-flex; align-items: center; gap: .55rem; }
.pnav__t i { font-style: normal; color: var(--blue); transition: transform .35s var(--ease); }
.pnav a:first-child:hover .pnav__t i { transform: translateX(-6px); }
.pnav a:last-child:hover .pnav__t i { transform: translateX(6px); }
@media (max-width: 640px) {
  .pnav { grid-template-columns: 1fr; }
  .pnav a:last-child { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- FAQ: sticky category + numbered questions ---------- */
.faqgroup + .faqgroup { margin-top: clamp(3.5rem, 8vh, 5.5rem); }
@media (min-width: 900px) {
  .faqgroup { display: grid; grid-template-columns: .32fr .68fr; gap: 2rem 3rem; align-items: start; }
  .faqgroup > .kicker { position: sticky; top: clamp(6rem, 14vh, 8rem); }
}
.faq { max-width: none; counter-reset: q; }
.faq summary {
  font-size: clamp(1.1rem, 2vw, 1.45rem); padding: 1.6rem 0;
  justify-content: flex-start; transition: color .25s ease;
}
.faq summary::before {
  counter-increment: q; content: counter(q, decimal-leading-zero);
  font-size: .82rem; font-weight: 700; color: var(--muted);
  min-width: 2.4rem; font-variant-numeric: tabular-nums; padding-top: .25em;
  transition: color .25s ease;
}
.faq summary::after { margin-left: auto; }
.faq summary:hover { color: var(--blue); }
.faq details[open] summary { color: var(--blue); }
.faq details[open] summary::before { color: var(--blue); }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq__a { padding-left: 2.4rem; animation: none; }
.faq details[open] .faq__a { animation: faqin .45s var(--ease); }
@keyframes faqin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- contatto: underline form + sticky aside ---------- */
.contact { align-items: start; }
.contact__aside { position: sticky; top: clamp(6rem, 14vh, 8rem); }
.form .field input, .form .field textarea {
  border: 0; border-bottom: 1.5px solid var(--line-2); border-radius: 0;
  background: transparent; padding: .8rem .1rem;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.form .field input:focus, .form .field textarea:focus {
  border-bottom-color: var(--blue); box-shadow: 0 1.5px 0 var(--blue);
}
.form .field label { font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- deep stacking card: cert link colors ---------- */
.scard--deep .cert__dl { color: var(--blue-br); }
.scard--deep .cert__dl:hover { color: #fff; }
.scard--deep .cert__soon { color: rgba(234,240,244,.5); }
.scard__body .cert__dl { margin-top: 1.2rem; }

/* ---------- marquee: smaller variant for subpages ---------- */
.mq--sub .mq__seq { font-size: clamp(1.2rem, 2.8vw, 2rem); }

/* ============================================================
   PROGETTI — scattered collage (mouse-follow + hover info)
   ============================================================ */
.pscat { padding-block: var(--sec); overflow: hidden; }
.pscat__stage { position: relative; height: clamp(620px, 110vh, 980px); }
.pscat__center {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
}
.pscat__center .kicker { margin-bottom: 1.2rem; }
.pscat__title { font-size: clamp(3rem, 9vw, 7.5rem); font-weight: 700; letter-spacing: -.035em; line-height: .95; }
.pscat__note { margin-top: 1.5rem; color: var(--muted); font-size: .9rem; }
.pcard {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); z-index: 2;
  display: block; border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 20, 24, .16); will-change: transform;
}
.pcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.pcard:hover img { transform: scale(1.06); }
.pcard__info {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.4rem 1.1rem 1rem;
  background: linear-gradient(180deg, transparent, rgba(15, 20, 24, .84));
  color: #fff; display: flex; flex-direction: column; gap: .12rem;
  opacity: 0; transform: translateY(10px);
  transition: opacity .4s ease, transform .45s var(--ease);
}
.pcard:hover .pcard__info { opacity: 1; transform: none; }
.pcard__info b { font-size: 1.02rem; font-weight: 600; letter-spacing: -.01em; }
.pcard__info span { font-size: .82rem; color: rgba(255, 255, 255, .75); }
.pcard__info i { font-style: normal; font-size: .76rem; font-weight: 600; color: var(--blue-br); margin-top: .3rem; }
@media (hover: none) { .pcard__info { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .pscat__stage { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
  .pscat__center { position: static; order: -1; grid-column: 1 / -1; padding-block: 1.5rem 2.5rem; }
  .pcard { position: static; width: 100%; }
}

/* ============================================================
   BRAND ICON — faint background presence
   ============================================================ */
#numeri { position: relative; overflow: hidden; }
#numeri::after {
  content: ""; position: absolute; right: -6%; bottom: -14%; width: min(46vmin, 420px); aspect-ratio: 1;
  background: url("/assets/img/icon.png") center / contain no-repeat;
  opacity: .05; pointer-events: none;
}
#numeri .wrap { position: relative; }
.contatti::after {
  content: ""; position: absolute; right: -4%; top: 50%; transform: translateY(-50%) rotate(-6deg);
  width: min(52vmin, 480px); aspect-ratio: 1;
  background: url("/assets/img/icon-neg.png") center / contain no-repeat;
  opacity: .05; pointer-events: none;
}
.pagehero:not(.pagehero--svc) { position: relative; overflow: hidden; }
.pagehero:not(.pagehero--svc)::after {
  content: ""; position: absolute; right: -3%; top: 16%; width: min(34vmin, 300px); aspect-ratio: 1;
  background: url("/assets/img/icon.png") center / contain no-repeat;
  opacity: .045; pointer-events: none;
}
.pagehero .wrap { position: relative; }

/* ============================================================
   ████ TEXTURE LAYER — awwwards micro-details ████
   ============================================================ */

/* ---------- scroll progress bar ---------- */
.progress { position: fixed; top: 0; left: 0; height: 2.5px; width: 0; background: var(--blue); z-index: 200; pointer-events: none; }

/* ---------- custom cursor (fine pointers, JS-gated via html.has-cur) ---------- */
html.has-cur body, html.has-cur a, html.has-cur button, html.has-cur summary { cursor: none; }
.cur { position: fixed; top: 0; left: 0; z-index: 4000; pointer-events: none; }
.cur__dot {
  position: fixed; top: -3px; left: -3px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue); will-change: transform;
}
.cur__ring {
  position: fixed; top: -17px; left: -17px; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid rgba(47, 136, 196, .5); will-change: transform;
  transition: width .3s var(--ease), height .3s var(--ease), top .3s var(--ease), left .3s var(--ease), border-color .3s ease, background .3s ease;
}
.cur.is-link .cur__ring {
  width: 52px; height: 52px; top: -26px; left: -26px;
  background: rgba(47, 136, 196, .12); border-color: rgba(47, 136, 196, .75);
}
.cur.is-text .cur__dot, .cur.is-text .cur__ring { opacity: 0; }
.cur.is-down .cur__ring { width: 26px; height: 26px; top: -13px; left: -13px; }

/* ---------- word-mask reveal (generic, used by h2 split) ---------- */
.wsplit .wm { display: inline-block; overflow: hidden; vertical-align: bottom; }
.wsplit .wi { display: inline-block; transform: translateY(112%); }
.wsplit.wsplit-in .wi { transform: none; }

/* ---------- CTA band: outlined words fill on scroll + faint icon ---------- */
.cta { position: relative; overflow: hidden; }
.cta::after {
  content: ""; position: absolute; right: -5%; bottom: -18%; width: min(44vmin, 400px); aspect-ratio: 1;
  background: url("/assets/img/icon-neg.png") center / contain no-repeat;
  opacity: .045; pointer-events: none;
}
.cta .wrap { position: relative; }
.cw { color: transparent; -webkit-text-stroke: 1.3px rgba(234, 240, 244, .42); }
.cta-plain .cw { color: inherit; -webkit-text-stroke: 0; }

/* ---------- rotating text badge ---------- */
.rotbadge { width: clamp(96px, 12vw, 136px); aspect-ratio: 1; position: relative; pointer-events: none; }
.rotbadge svg { width: 100%; height: 100%; animation: rbspin 16s linear infinite; }
.rotbadge svg text {
  font-size: 10.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  fill: currentColor;
}
.rotbadge img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 26%; }
@keyframes rbspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rotbadge svg { animation: none; } }
/* placements */
.hero__media .rotbadge {
  position: absolute; right: clamp(1rem, 3vw, 2.5rem); bottom: clamp(1rem, 3vw, 2.5rem);
  color: #fff; filter: drop-shadow(0 6px 24px rgba(15, 20, 24, .35));
}
.hero__media { position: relative; }
.pagehero .rotbadge { position: absolute; right: var(--gut); top: 50%; transform: translateY(-38%); color: var(--ink-soft); }
@media (max-width: 860px) { .pagehero .rotbadge { display: none; } }

/* service names: no weight change on hover — variable-font wght shifts glyph
   widths and makes the row text jitter. Color + arrow carry the hover. */
.svc__name { transition: color .35s ease; }
.footer__col a { font-variation-settings: "wght" 430; transition: color .25s ease, transform .3s var(--ease), font-variation-settings .35s ease; }
.footer__col a:hover { font-variation-settings: "wght" 640; }

/* ---------- ticks: rows nudge on hover ---------- */
.ticks li { transition: transform .35s var(--ease); }
.ticks li:hover { transform: translateX(6px); }

/* ============================================================
   Intrinsic width/height attributes (added for CLS) act as CSS
   presentation hints. Where the layout sizes an image by width
   alone, the height hint must be released again.
   ============================================================ */
.cstage__art,
.scard__art img,
.scard__art svg,
.pcard img { height: auto; }
