/* =========================================================
   VEIRO STUDIO — style.css
   ========================================================= */

:root {
  --black: #1e1e1e;
  --white: #ffffff;
  --text: #5a6271;
  --gray: #636a74;
  --light: #eef0f6;
  --border: #d0d8e4;
  --surface: #ffffff;
  --header-bg: rgba(255, 255, 255, .82);
  --footer-bg: #1e1e1e;
  --footer-ink: #ffffff;
  --field-hover: #e3e7ef;
  color-scheme: light;

  --font: "Inter Tight", "Inter", Arial, sans-serif;
  --mono: "Chivo Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 3vw, 40px);
  --radius: 14px;
  --ease: cubic-bezier(.65, 0, .35, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* Tema scuro: scelto dal pannello (Scuro) oppure dal dispositivo del visitatore (Automatico) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --black: #f1f1ee; --white: #0e0e0f; --text: #a4a9b1; --gray: #8f959e; --light: #161618; --border: #2d2e33;
    --surface: #1b1b1e; --header-bg: rgba(14, 14, 15, .82); --footer-bg: #1b1b1e; --footer-ink: #f1f1ee; --field-hover: #222226;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .logo-ink { filter: invert(1); }
}
:root[data-theme="dark"] {
  --black: #f1f1ee; --white: #0e0e0f; --text: #a4a9b1; --gray: #8f959e; --light: #161618; --border: #2d2e33;
  --surface: #1b1b1e; --header-bg: rgba(14, 14, 15, .82); --footer-bg: #1b1b1e; --footer-ink: #f1f1ee; --field-hover: #222226;
  color-scheme: dark;
}
:root[data-theme="dark"] .logo-ink { filter: invert(1); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

.container { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 13px; line-height: 1.25; letter-spacing: -.01em; text-transform: uppercase; }
.muted { color: var(--text); }
.eyebrow { display: inline-block; color: var(--gray); margin-bottom: 28px; }
.h2 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  font-weight: 500; line-height: 1.02; letter-spacing: -.035em;
}
.h2 sup { font-size: 13px; vertical-align: top; position: relative; top: .6em; color: var(--gray); letter-spacing: 0; }

.link-u { position: relative; }
.link-u::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.link-u:hover::after { transform: scaleX(1); transform-origin: left; }

/* text roll on hover */
.roll { position: relative; display: inline-block; overflow: hidden; vertical-align: top; }
.roll > .roll__in { display: inline-block; transition: transform .55s var(--ease); }
.roll > .roll__in::after {
  content: attr(data-text); position: absolute; left: 0; top: 100%;
}
a:hover .roll__in, button:hover .roll__in { transform: translateY(-100%); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 8px 8px 8px 22px; border-radius: 100px;
  background: var(--black); color: var(--white);
  font-size: 1.05rem; font-weight: 500; letter-spacing: -.02em;
  transition: background .4s var(--ease);
}
.btn__icon {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; background: var(--white); color: var(--black);
  font-size: 22px; font-weight: 400; line-height: 1;
  transition: transform .6s var(--ease);
}
.btn:hover .btn__icon { transform: rotate(180deg); }
.btn--big { font-size: clamp(1.2rem, 2vw, 1.6rem); padding: 12px 12px 12px 34px; gap: 22px; }
.btn--big .btn__icon { width: 56px; height: 56px; font-size: 30px; }

.arrow {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--border); font-size: 20px;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.arrow:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.arrow:disabled { opacity: .35; pointer-events: none; }

/* ---------- preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 1000; background: var(--white);
  display: grid; place-items: center;
}
.preloader__inner { width: min(420px, 78vw); }
.preloader__logo { width: 100%; clip-path: inset(0 100% 0 0); }
.preloader__bar { height: 1px; background: var(--light); margin: 28px 0 12px; overflow: hidden; }
.preloader__bar span { display: block; height: 100%; background: var(--black); transform: scaleX(0); transform-origin: left; }
.preloader__meta { display: flex; justify-content: space-between; color: var(--gray); }

/* ---------- cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 900; pointer-events: none;
  width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%;
  background: var(--black); color: var(--white);
  display: grid; place-items: center; transform: scale(0);
}
@media (hover: none) { .cursor { display: none; } }

/* ---------- header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 18px var(--gutter);
  transition: transform .6s var(--ease), background .4s var(--ease);
}
.header.is-scrolled { background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.header.is-hidden { transform: translateY(-100%); }
.header__logo img { height: 34px; width: auto; }
.nav { display: flex; gap: 34px; }
.nav__link { display: flex; align-items: flex-start; gap: 6px; font-weight: 500; letter-spacing: -.02em; }
.nav__link .mono { font-size: 11px; color: var(--gray); margin-top: 2px; }
.header__mail { justify-self: end; }

.burger { display: none; justify-self: end; width: 44px; height: 44px; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--black); transition: transform .5s var(--ease); }
.burger span:first-child { top: 18px; }
.burger span:last-child { top: 25px; }
.menu-open .burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .burger span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 90; background: var(--white);
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  padding: 0 var(--gutter);
  clip-path: inset(0 0 100% 0); transition: clip-path .8s var(--ease);
}
.menu-open .mobile-menu { clip-path: inset(0 0 0 0); }
.mobile-menu a { font-size: clamp(2.6rem, 12vw, 4rem); font-weight: 500; letter-spacing: -.04em; display: flex; gap: 10px; align-items: flex-start; }
.mobile-menu a .mono { font-size: 11px; color: var(--gray); margin-top: 12px; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 10px; }
.mobile-menu__foot { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 36px; }
.mobile-menu .mobile-menu__foot a { font-size: 13px; letter-spacing: 0; }

/* ---------- hero ---------- */
.hero { padding-top: 110px; }
.hero__meta { display: flex; justify-content: space-between; color: var(--gray); margin-bottom: clamp(24px, 4vw, 48px); }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: end; gap: clamp(24px, 4vw, 80px);
  margin-bottom: clamp(36px, 4vw, 56px);
}
.hero__logo { overflow: hidden; }
.hero__logo img { width: 100%; max-width: calc(46vh * 2.4); height: auto; }
.hero__bottom { display: flex; flex-direction: column; gap: 28px; padding-bottom: 6px; }
.hero__lead { max-width: 380px; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.3; letter-spacing: -.02em; font-weight: 500; }
.hero__socials { display: flex; gap: 22px; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; width: 100%; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group { display: flex; flex-shrink: 0; }

.marquee--hero .marquee__group { gap: 14px; padding-right: 14px; }
.reel {
  position: relative; flex-shrink: 0;
  width: clamp(200px, 20vw, 300px); aspect-ratio: 2 / 3;
  border-radius: var(--radius); overflow: hidden; background: var(--light);
}
.reel--landscape, .reel--wide { aspect-ratio: 5 / 4; width: clamp(320px, 32vw, 480px); align-self: flex-end; }
.reel--vertical { aspect-ratio: 9 / 16; width: clamp(180px, 16.9vw, 253px); align-self: flex-end; }
.reel--square { aspect-ratio: 1; width: clamp(240px, 24vw, 360px); align-self: flex-end; }
.reel img, .reel video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease-out); }
.reel:hover img, .reel:hover video { transform: scale(1.06); }
.reel__tag {
  position: absolute; left: 12px; top: 12px; font-size: 11px;
  padding: 6px 10px; border-radius: 100px; background: rgba(255,255,255,.9); color: #1e1e1e;
}

/* ---------- statement ---------- */
.statement { padding: clamp(100px, 14vw, 200px) 0 clamp(60px, 8vw, 120px); }
.statement__text {
  font-size: clamp(1.9rem, 4.4vw, 4.2rem); font-weight: 500;
  line-height: 1.06; letter-spacing: -.035em; max-width: 1350px;
}
.clients { margin-top: clamp(80px, 10vw, 150px); }
.clients__label { color: var(--gray); margin-bottom: 26px; }
.marquee--logos { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.marquee--logos .marquee__group { align-items: center; }
.brand {
  display: grid; place-items: center; height: 120px; padding: 0 clamp(36px, 5vw, 72px);
  color: var(--gray); font-size: 1.9rem; white-space: nowrap;
  transition: color .4s var(--ease);
}
.brand:hover { color: var(--black); }
.brand--1 { font-weight: 600; letter-spacing: .08em; }
.brand--2 { font-family: Georgia, serif; font-style: italic; }
.brand--3 { font-weight: 400; letter-spacing: .3em; font-size: 1.3rem; }
.brand--4 { font-family: var(--mono); font-size: 1.5rem; }
.brand--5 { font-weight: 600; font-style: italic; letter-spacing: -.04em; }
.brand--6 { font-family: Georgia, serif; }
.brand--7 { font-weight: 500; letter-spacing: -.03em; }
.brand--8 { font-weight: 600; font-size: 2.2rem; letter-spacing: -.06em; }

/* ---------- section head ---------- */
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding-bottom: 28px; margin-bottom: clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--border);
}

/* ---------- work ---------- */
.work { padding: clamp(80px, 10vw, 140px) 0; }
.work__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 5vw, 80px) clamp(16px, 2.4vw, 36px); }
.project--offset { margin-top: clamp(0px, 8vw, 140px); }
.project--offset + .project { margin-top: 0; }
.project__media { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; background: var(--light); }
.project__media img { width: 100%; height: 118%; object-fit: cover; transition: transform 1.2s var(--ease-out), filter .6s; }
.project:hover .project__media img { transform: scale(1.05); }
.project__info { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: baseline; padding-top: 18px; }
.project__info h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); font-weight: 500; letter-spacing: -.03em; }
.project__info .mono { color: var(--gray); }
.project__info .mono:last-child { color: var(--black); }
.work__grid:hover .project:not(:hover) .project__media img { filter: grayscale(1) opacity(.7); }

/* ---------- services ---------- */
.services { padding: clamp(80px, 10vw, 140px) 0; background: var(--light); }
.services .section-head { border-color: var(--border); }
.services__ctrl { display: flex; gap: 10px; align-items: center; }
.services__ctrl .btn { margin-right: 14px; }
.services__viewport { overflow: hidden; padding-left: var(--gutter); }
.services__track { display: flex; gap: 16px; will-change: transform; transition: transform .9s var(--ease); }
.service {
  flex: 0 0 clamp(290px, 30vw, 440px); min-height: 520px;
  display: flex; flex-direction: column;
  padding: clamp(24px, 2.4vw, 36px); border-radius: var(--radius);
  background: var(--surface); position: relative; overflow: hidden; isolation: isolate;
  transition: color .6s var(--ease);
}
.service::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--black);
  clip-path: circle(0% at 100% 0%); transition: clip-path .8s var(--ease);
}
.service:hover { color: var(--white); }
.service:hover::before { clip-path: circle(150% at 100% 0%); }
.service__num { color: var(--gray); }
.service h3 { font-size: clamp(1.8rem, 2.6vw, 2.5rem); font-weight: 500; letter-spacing: -.035em; line-height: 1; margin: auto 0 20px; padding-top: 120px; }
.service p { color: var(--text); margin-bottom: 26px; max-width: 34ch; transition: color .6s var(--ease); }
.service:hover p { color: inherit; opacity: .72; }
.service ul { border-top: 1px solid currentColor; opacity: .9; }
.service li { padding: 11px 0; border-bottom: 1px solid rgba(99,106,116,.3); font-size: 12px; }

/* ---------- studio ---------- */
.studio { padding: clamp(100px, 12vw, 180px) 0 clamp(80px, 10vw, 140px); }
.studio__title { max-width: 1100px; }
.studio__video { padding: clamp(50px, 6vw, 90px) var(--gutter) 0; }
.studio__frame {
  position: relative; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 16 / 8; max-width: 1600px; margin: 0 auto; background: var(--light);
}
.studio__frame img { width: 100%; height: 120%; object-fit: cover; }
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px; color: #fff;
}
.play__icon {
  display: grid; place-items: center; width: clamp(80px, 9vw, 130px); aspect-ratio: 1;
  border-radius: 50%; background: rgba(255,255,255,.18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.4); font-size: 24px; padding-left: 5px;
  transition: transform .6s var(--ease), background .4s;
}
.play:hover .play__icon { transform: scale(1.12); background: rgba(255,255,255,.3); }
.stats { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); margin-top: clamp(60px, 7vw, 100px); border-top: 1px solid var(--border); }
.stat { display: flex; flex-direction: column; gap: 12px; padding: 30px 20px 0 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--border); }
.stat__num { font-size: clamp(2.6rem, 5vw, 4.8rem); font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.stat .mono { color: var(--gray); }

/* ---------- faq ---------- */
.faq { padding: clamp(80px, 10vw, 140px) 0; border-top: 1px solid var(--border); }
.faq__wrap { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; }
.faq__side { position: sticky; top: 110px; align-self: start; }
.faq__side p { margin-top: 20px; max-width: 30ch; }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__item:first-child { border-top: 1px solid var(--border); }
.faq__item summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 28px 0; font-size: clamp(1.15rem, 1.6vw, 1.45rem); font-weight: 500; letter-spacing: -.02em;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__plus { position: relative; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); transition: background .4s, transform .6s var(--ease); }
.faq__plus::before, .faq__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: var(--black); transform: translate(-50%, -50%); transition: background .4s; }
.faq__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item[open] .faq__plus { background: var(--black); transform: rotate(45deg); }
.faq__item[open] .faq__plus::before, .faq__item[open] .faq__plus::after { background: var(--white); }
.faq__body { overflow: hidden; }
.faq__body p { color: var(--text); padding-bottom: 28px; max-width: 60ch; }

/* ---------- cta ---------- */
.cta { padding: clamp(100px, 14vw, 200px) 0; text-align: center; }
.cta__title {
  font-size: clamp(3rem, 10vw, 10rem); font-weight: 500; letter-spacing: -.045em; line-height: .92;
  max-width: 14ch; margin: 0 auto clamp(40px, 5vw, 64px);
}

/* ---------- footer (compatto) ---------- */
.footer { --gray: #9aa1ab; background: var(--footer-bg); color: var(--footer-ink); padding: clamp(56px, 6vw, 80px) 0 24px; border-radius: 24px 24px 0 0; }
.footer__top { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; }
.footer__logo { width: clamp(130px, 12vw, 170px); height: auto; margin-bottom: 24px; }
.footer__claim { font-size: clamp(1.2rem, 1.6vw, 1.5rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.3; max-width: 24ch; color: rgba(255,255,255,.85); }
.footer__links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.footer__links div { display: flex; flex-direction: column; gap: 10px; }
.footer__links .mono { color: var(--gray); margin-bottom: 8px; }
.footer__links a { width: fit-content; opacity: .85; transition: opacity .3s; }
.footer__links a:hover { opacity: 1; }
.footer__mid {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap;
  margin-top: clamp(44px, 5vw, 64px); padding-top: 28px; border-top: 1px solid rgba(255,255,255,.15);
}
.footer__mail { font-size: clamp(1.4rem, 2.6vw, 2.4rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.2; }
.newsletter { width: min(380px, 100%); }
.newsletter label { color: var(--gray); }
.newsletter__row { display: flex; margin-top: 10px; border-bottom: 1px solid rgba(255,255,255,.3); }
.newsletter input { flex: 1; min-width: 0; background: none; border: 0; color: inherit; font: inherit; font-size: 1.05rem; padding: 10px 0; outline: none; }
.newsletter input::placeholder { color: rgba(255,255,255,.45); }
.newsletter button { font-size: 20px; padding: 0 6px; transition: transform .4s var(--ease); }
.newsletter button:hover { transform: translateX(6px); }
.newsletter__msg { min-height: 1.2em; margin-top: 10px; color: var(--gray); }
.newsletter.is-done .newsletter__row { display: none; }
.footer__bottom { display: flex; justify-content: space-between; gap: 20px; color: var(--gray); margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ---------- drawer contatti ---------- */
.drawer { position: fixed; inset: 0; z-index: 950; pointer-events: none; }
.drawer__overlay { position: absolute; inset: 0; background: rgba(30,30,30,.45); opacity: 0; transition: opacity .6s var(--ease); }
.drawer__panel {
  position: absolute; top: 10px; right: 10px; bottom: 10px; width: min(620px, calc(100% - 20px));
  background: var(--surface); border-radius: 20px; padding: clamp(24px, 3vw, 44px);
  overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(calc(100% + 20px)); transition: transform .8s var(--ease);
}
.drawer.is-open { pointer-events: auto; }
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; color: var(--gray); }
.drawer__close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); font-size: 24px; transition: background .3s, color .3s, transform .5s var(--ease); }
.drawer__close:hover { background: var(--black); color: var(--white); transform: rotate(90deg); }
.drawer__title { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.02; margin: 28px 0 32px; }

.cform { display: flex; flex-direction: column; gap: 18px; }
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field .mono { color: var(--gray); font-size: 11px; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--black); background: var(--light);
  border: 1px solid transparent; border-radius: 10px; padding: 13px 14px; outline: none; width: 100%;
  transition: border-color .3s, background .3s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--black); background: var(--white); }
.chips { border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { color: var(--gray); font-size: 11px; margin-bottom: 10px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 9px 14px; border-radius: 100px; border: 1px solid var(--border);
  font-size: .92rem; cursor: pointer; transition: background .3s, color .3s, border-color .3s;
}
.chip input:checked + span { background: var(--black); color: var(--white); border-color: var(--black); }
.chip input:focus-visible + span { outline: 2px solid var(--black); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--text); }
.check input { margin-top: 3px; accent-color: var(--black); width: 16px; height: 16px; }
.cform__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 8px; }
.cform__msg { color: var(--text); }
.cform__msg.is-error { color: #b42318; }
.cform.is-sending button[type=submit] { opacity: .5; pointer-events: none; }
.cform-done { padding: 40px 0; }
.cform-done p { font-size: 1.3rem; letter-spacing: -.02em; margin-top: 12px; }

/* ---------- lightbox video ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 960; background: rgba(15,15,15,.92);
  display: grid; place-items: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .5s var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__inner { width: min(1200px, 100%); aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.lightbox__inner iframe, .lightbox__inner video { width: 100%; height: 100%; border: 0; display: block; }
.lightbox__close { position: absolute; top: 20px; right: 20px; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: #1e1e1e; font-size: 26px; }

/* ---------- pagine interne ---------- */
.archive, .case { padding-top: 140px; }
.page-hero { padding-bottom: clamp(28px, 4vw, 48px); }
.page-title { font-size: clamp(3.2rem, 11vw, 11rem); font-weight: 500; letter-spacing: -.05em; line-height: .95; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 28px; margin-bottom: 40px; border-bottom: 1px solid var(--border); }
.filter { padding: 10px 16px; border-radius: 100px; border: 1px solid var(--border); font-weight: 500; letter-spacing: -.01em; transition: background .3s, color .3s, border-color .3s; }
.filter sup { font-size: 10px; color: var(--gray); margin-left: 2px; }
.filter:hover { border-color: var(--black); }
.filter.is-active { background: var(--black); color: var(--white); border-color: var(--black); }
.filter.is-active sup { color: inherit; opacity: .6; }
.archive__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 4vw, 56px) clamp(14px, 1.6vw, 24px); padding-bottom: clamp(80px, 10vw, 140px); }
.project--sm .project__info { grid-template-columns: 1fr auto; }
.project--sm .project__info .mono:nth-of-type(1) { grid-row: 2; }
.project--sm h3 { font-size: 1.3rem; }
.project.is-hidden { display: none; }
.empty { padding: 60px 0; }

.case__meta { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); }
.case__meta div { padding: 20px 20px 0 0; }
.case__meta div + div { padding-left: 20px; border-left: 1px solid var(--border); }
.case__meta dt { color: var(--gray); margin-bottom: 8px; }
.case__meta dd { font-weight: 500; letter-spacing: -.01em; }
.case__cover { padding: clamp(40px, 5vw, 70px) var(--gutter) 0; }
.case__cover-frame { position: relative; max-width: 1600px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--light); }
.case__cover-frame img { width: 100%; height: 100%; object-fit: cover; }
.case__body { padding: clamp(70px, 9vw, 130px) var(--gutter); }
.case__lead { font-size: clamp(1.8rem, 3.6vw, 3.4rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.08; max-width: 24ch; }
.case__cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; margin-top: clamp(40px, 5vw, 70px); }
.case__text p { color: var(--text); font-size: 1.1rem; line-height: 1.6; max-width: 62ch; }
.case__text p + p { margin-top: 1em; }
.case__results .mono { color: var(--gray); }
.case__results ul { margin-top: 14px; border-top: 1px solid var(--border); }
.case__results li { padding: 16px 0; border-bottom: 1px solid var(--border); font-size: clamp(1.2rem, 1.8vw, 1.6rem); font-weight: 500; letter-spacing: -.02em; }
/* Galleria a 12 colonne: ogni formato occupa lo spazio giusto (i 9:16 affiancati a tre) */
.case__gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; align-items: start; }
.case__img { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--light); grid-column: span 6; }
.case__img img, .case__img video { width: 100%; height: 100%; object-fit: cover; display: block; }
.case__img--portrait { aspect-ratio: 4 / 5; }
.case__img--square { aspect-ratio: 1; }
.case__img--landscape { aspect-ratio: 16 / 9; grid-column: 1 / -1; }
.case__img--vertical { aspect-ratio: 9 / 16; grid-column: span 4; }
.case__sound {
  position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(30,30,30,.55); color: #fff;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .3s, transform .4s var(--ease);
}
.case__sound:hover { background: #1e1e1e; transform: scale(1.08); }
.case__sound.is-on { background: #fff; color: #1e1e1e; }
.next { display: block; margin-top: clamp(80px, 10vw, 140px); padding: clamp(50px, 6vw, 90px) 0; border-top: 1px solid var(--border); }
.next .mono { color: var(--gray); }
.next__title { display: flex; justify-content: space-between; align-items: center; font-size: clamp(2.6rem, 8vw, 8rem); font-weight: 500; letter-spacing: -.05em; line-height: 1; margin-top: 16px; }
.next__arrow { transition: transform .6s var(--ease); }
.next:hover .next__arrow { transform: translateX(20px); }

.brand--img img { height: 44px; width: auto; max-width: 180px; object-fit: contain; filter: grayscale(1); opacity: .6; transition: opacity .4s, filter .4s; }
.brand--img:hover img { opacity: 1; filter: none; }

/* ---------- SplitText masks: room for ascenders/descenders ---------- */
[data-split] > div { padding: .08em 0 .12em; margin: -.08em 0 -.12em; }

/* ---------- responsive ---------- */
@media (max-width: 991px) {
  .nav, .header__mail { display: none; }
  .burger { display: block; }
  .header { grid-template-columns: 1fr auto; }
  .faq__wrap, .footer__top { grid-template-columns: 1fr; }
  .faq__side { position: static; }
  .stats { grid-template-columns: 1fr 1fr !important; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .archive__grid { grid-template-columns: 1fr 1fr; }
  .case__cols { grid-template-columns: 1fr; }
  .case__meta { grid-template-columns: 1fr 1fr; }
  .case__meta div:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); margin-top: 30px; }
}
@media (max-width: 767px) {
  .hide-m { display: none; }
  .hero__grid { grid-template-columns: 1fr; }
  .work__grid { grid-template-columns: 1fr; }
  .project--offset { margin-top: 0; }
  .project__info { grid-template-columns: 1fr auto; }
  .project__info .mono:nth-of-type(1) { grid-row: 2; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .services__ctrl .btn { margin-right: auto; }
  .service { min-height: 460px; flex-basis: 82vw; }
  .footer__links { grid-template-columns: 1fr 1fr; }
  .archive__grid, .case__gallery { grid-template-columns: 1fr; }
  .cform__row { grid-template-columns: 1fr; }
  .cform__foot { flex-direction: column-reverse; align-items: stretch; }
  .footer__mid { flex-direction: column; align-items: flex-start; }
  .footer__bottom { flex-direction: column; }
  .studio__frame { aspect-ratio: 4 / 5; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* =========================================================
   V3 — reels 9:16, viewer, transizioni, extra
   ========================================================= */

.skip { position: fixed; left: 16px; top: -60px; z-index: 2000; background: var(--black); color: var(--white); padding: 10px 14px; border-radius: 8px; transition: top .3s; }
.skip:focus { top: 16px; }
[data-clock] { font-variant-numeric: tabular-nums; }

/* transizione tra pagine */
.transition {
  position: fixed; inset: 0; z-index: 1500; background: #1e1e1e; pointer-events: none;
  display: grid; place-items: center; transform: translateY(100%);
}
.transition img { width: min(200px, 40vw); opacity: 0; transition: opacity .3s; }
.transition.is-in { transition: transform .7s var(--ease); transform: translateY(0); pointer-events: auto; }
.transition.is-in img { opacity: 1; transition-delay: .25s; }
.transition.is-out { transition: transform .8s var(--ease); transform: translateY(-100%); }

/* barra admin (solo amministratori loggati) */
.adminbar { position: fixed; left: 16px; bottom: 16px; z-index: 800; display: flex; gap: 8px; align-items: center; }
.adminbar a, .adminbar__warn { padding: 9px 14px; border-radius: 100px; background: var(--black); color: var(--white); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.adminbar__warn { background: #b42318; }
.adminbar a:hover { background: #000; }

/* ---------- Sezione Reels ---------- */
.reels { padding: clamp(80px, 10vw, 140px) 0; overflow: hidden; }
.reels .section-head { align-items: flex-end; }
.reels .eyebrow { margin-bottom: 18px; }
.reels__side { display: flex; flex-direction: column; align-items: flex-end; gap: 18px; max-width: 380px; }
.reels__text { text-align: right; }
.reels__ctrl { display: flex; gap: 10px; }
.reels__track {
  display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-left: var(--gutter);
  padding: 4px var(--gutter) 10px; scrollbar-width: none; cursor: grab;
}
.reels__track::-webkit-scrollbar { display: none; }
.reels__track.is-drag { cursor: grabbing; scroll-snap-type: none; }
.reels__track.is-drag .rcard { pointer-events: none; }
.reels__track:focus-visible { outline: 2px solid var(--black); outline-offset: 4px; }
.rcard { flex: 0 0 auto; width: clamp(220px, 21vw, 300px); scroll-snap-align: start; text-align: left; color: #fff; }
.rcard__media { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #111; isolation: isolate; }
.rcard__media video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1s var(--ease-out); }
.rcard:hover .rcard__media video, .rcard:focus-visible .rcard__media video { transform: scale(1.05); }
.rcard:focus-visible { outline: none; }
.rcard:focus-visible .rcard__media { outline: 2px solid var(--black); outline-offset: 3px; }
.rcard__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0) 45%, rgba(0,0,0,0) 80%, rgba(0,0,0,.25)); z-index: 1; }
.rcard__play {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  display: grid; place-items: center; border-radius: 50%; padding-left: 3px;
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.45);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transform: scale(.85); opacity: 0; transition: transform .5s var(--ease), opacity .4s;
}
.rcard:hover .rcard__play, .rcard:focus-visible .rcard__play { transform: scale(1); opacity: 1; }
@media (hover: none) { .rcard__play { opacity: 1; transform: scale(.8); } }
.rcard__views { position: absolute; top: 12px; left: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 100px; background: rgba(0,0,0,.45); font-size: 11px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.rcard__info { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2; display: flex; flex-direction: column; gap: 4px; }
.rcard__info .mono { font-size: 11px; opacity: .8; }
.rcard__title { font-size: 1.1rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }

/* ---------- Reel viewer (stile stories) ---------- */
.rv { position: fixed; inset: 0; z-index: 970; display: grid; place-items: center; background: #0b0b0b; opacity: 0; pointer-events: none; transition: opacity .45s var(--ease); }
.rv.is-open { opacity: 1; pointer-events: auto; }
.rv__bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(40px) brightness(.45) saturate(1.2); transform: scale(1.1); transition: background-image .4s; }
.rv__stage { position: relative; display: flex; align-items: center; gap: 24px; height: 100%; padding: 16px; }
.rv__frame {
  position: relative; height: min(92vh, 92svh, calc((100vw - 32px) * 16 / 9)); aspect-ratio: 9 / 16;
  border-radius: 20px; overflow: hidden; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.5);
  transform: scale(.94); transition: transform .5s var(--ease-out);
}
.rv.is-open .rv__frame { transform: none; }
.rv__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.rv__bars { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 4; display: flex; gap: 4px; }
.rv__bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.rv__bars span i { display: block; height: 100%; width: 0; background: #fff; }
.rv__bars span.is-done i { width: 100%; }
.rv__top { position: absolute; top: 22px; left: 14px; right: 10px; z-index: 5; display: flex; justify-content: space-between; align-items: center; color: #fff; }
.rv__count { opacity: .8; font-size: 11px; }
.rv__tools { display: flex; gap: 6px; }
.rv__btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.35); font-size: 24px; line-height: 1; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .25s; }
.rv__btn:hover { background: rgba(0,0,0,.6); }
.rv__icon-off { display: none; }
.rv.is-muted .rv__icon-on { display: none; }
.rv.is-muted .rv__icon-off { display: block; }
.rv__tap { position: absolute; top: 70px; bottom: 90px; z-index: 3; cursor: pointer; }
.rv__tap--prev { left: 0; width: 30%; }
.rv__tap--play { left: 30%; width: 40%; }
.rv__tap--next { right: 0; width: 30%; }
.rv__paused { position: absolute; left: 50%; top: 50%; z-index: 4; transform: translate(-50%, -50%); padding: 10px 16px; border-radius: 100px; background: rgba(0,0,0,.55); color: #fff; opacity: 0; transition: opacity .25s; pointer-events: none; }
.rv.is-paused .rv__paused { opacity: 1; }
.rv__info { position: absolute; left: 16px; right: 16px; bottom: 22px; z-index: 4; display: flex; flex-direction: column; gap: 6px; color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.4); }
.rv__client { font-size: 11px; opacity: .85; }
.rv__title { font-size: 1.3rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.rv__link { color: #fff; text-decoration: underline; text-underline-offset: 3px; width: fit-content; pointer-events: auto; position: relative; z-index: 6; }
.rv__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.15); z-index: 4; }
.rv__progress span { display: block; height: 100%; width: 0; background: #fff; }
.rv__nav { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 20px; border: 1px solid rgba(255,255,255,.25); transition: background .25s, transform .3s var(--ease); flex-shrink: 0; }
.rv__nav:hover { background: rgba(255,255,255,.25); transform: scale(1.06); }
.rv__nav:disabled { opacity: .25; pointer-events: none; }
.rv__nav--prev { order: -1; }
@media (max-width: 767px) {
  .rv__nav { display: none; }
  .rv__stage { padding: 0; }
  .rv__frame { height: 100%; height: 100svh; width: 100vw; aspect-ratio: auto; border-radius: 0; }
  .rv__top { top: calc(22px + env(safe-area-inset-top)); }
  .rv__bars { top: calc(10px + env(safe-area-inset-top)); }
  .rv__info { bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* ---------- Servizi: CTA per card ---------- */
.service__cta { margin-top: 20px; font-size: 11px; display: inline-flex; gap: 8px; align-items: center; width: fit-content; padding: 10px 14px; border-radius: 100px; border: 1px solid currentColor; opacity: .8; transition: opacity .3s, background .3s, color .3s; }
.service__cta:hover { opacity: 1; background: var(--white); color: var(--black); }

/* ---------- Drawer: WhatsApp ---------- */
.drawer__wa { display: flex; align-items: center; gap: 12px; margin: -12px 0 26px; padding: 14px 16px; border-radius: 12px; background: var(--light); font-size: .95rem; transition: background .3s; }
.drawer__wa:hover { background: var(--field-hover); }
.drawer__wa span:nth-child(2) { flex: 1; }
.drawer__wa-dot { width: 10px; height: 10px; border-radius: 50%; background: #25d366; box-shadow: 0 0 0 4px rgba(37,211,102,.2); }

/* ---------- Pagina progetto: CTA + condivisione ---------- */
.case__cta { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-top: clamp(60px, 8vw, 110px); padding-top: 32px; border-top: 1px solid var(--border); }
.case__cta-title { font-size: clamp(1.8rem, 3.4vw, 3rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; margin-top: 12px; max-width: 18ch; }
.case__cta-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 18px; }
.share { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.share .mono { margin-right: 6px; }
.share__btn { padding: 8px 14px; border-radius: 100px; border: 1px solid var(--border); font-size: .9rem; font-weight: 500; transition: border-color .25s, background .25s, color .25s; }
.share__btn:hover { border-color: var(--black); }
.share__btn.is-done { background: var(--black); color: var(--white); border-color: var(--black); }

/* ---------- 404 ---------- */
.notfound { padding: 160px 0 clamp(80px, 10vw, 140px); }
.notfound__title { font-size: clamp(3rem, 9vw, 9rem); font-weight: 500; letter-spacing: -.05em; line-height: .95; max-width: 12ch; }
.notfound__text { margin-top: 28px; font-size: 1.15rem; }
.notfound__actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 28px 0 clamp(60px, 8vw, 100px); }
.btn--ghost { background: transparent; color: var(--black); border: 1px solid var(--border); padding: 14px 22px; }
.btn--ghost:hover { border-color: var(--black); }

@media (max-width: 991px) {
  .case__img--vertical { grid-column: span 6; }
  .reels__side { align-items: flex-start; }
  .reels__text { text-align: left; }
}
@media (max-width: 767px) {
  .case__gallery { gap: 10px; }
  .case__img, .case__img--vertical { grid-column: 1 / -1; }
  .case__img--vertical { grid-column: span 6; }
  .case__cta-actions { align-items: flex-start; }
  .share { justify-content: flex-start; }
  .rcard { width: 64vw; }
  .reels__ctrl { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .transition { display: none; }
}

html.is-locked, html.is-locked body { overflow: hidden; }
.transition.is-cover { transform: translateY(0); transition: none; }
.transition.is-cover img { opacity: 1; }
.cform__context { display: inline-flex; width: fit-content; padding: 8px 12px; border-radius: 100px; background: var(--black); color: var(--white); font-size: 11px; }
.rv.is-buffering .rv__frame::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; z-index: 4;
  border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: rvspin .8s linear infinite;
}
@keyframes rvspin { to { transform: rotate(360deg); } }
.filter[aria-pressed] { cursor: pointer; }

/* Colori coerenti anche nel tema scuro */
.service:hover { color: var(--white); }
.field input:focus, .field select:focus, .field textarea:focus { background: var(--surface); }
img, video { color-scheme: normal; }
