/* ==========================================================================
   Emara Servizi - foglio di stile principale
   Struttura: font > token > base > layout > componenti > pagine > motion
   ========================================================================== */

/* ---------- Font (self-hosted, nessuna richiesta a terzi) ---------- */
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-400-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-500-latin-ext.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-600-latin-ext.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-700-latin-ext.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("../fonts/barlow-semi-condensed-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("../fonts/barlow-semi-condensed-600-latin-ext.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("../fonts/barlow-semi-condensed-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("../fonts/barlow-semi-condensed-700-latin-ext.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Token ---------- */
:root {
  color-scheme: light dark;

  /* Colori - tema chiaro (acciaio freddo, nessun beige) */
  --bg: #f1f2f3;
  --bg-2: #e6e8ea;
  --surface: #fafbfb;
  --ink: #111316;
  --ink-2: #464c54;
  --ink-3: #61676f;
  --line: rgb(17 19 22 / 0.12);
  --line-strong: rgb(17 19 22 / 0.22);
  --accent: #ee6418;          /* riempimenti: bottoni, barre */
  --accent-ink: #ac430a;      /* testo accento su sfondo chiaro (AA) */
  --on-accent: #150b05;
  --header-bg: rgb(241 242 243 / 0.78);
  --shadow: 0 1px 0 rgb(255 255 255 / 0.6) inset, 0 18px 40px -24px rgb(17 19 22 / 0.35);

  /* Sezioni fotografiche: sempre scure perché poggiano su foto */
  --photo-ink: #f3f4f5;
  --photo-ink-2: #c9ccd1;

  /* Tipografia */
  --font-sans: "Barlow", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Semi Condensed", "Barlow", ui-sans-serif, system-ui, sans-serif;

  /* Spaziatura (scala 4/8) */
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1360px;
  --section: clamp(72px, 10vw, 136px);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;
  --dur: 320ms;
  --dur-slow: 800ms;

  /* Livelli */
  --z-header: 40;
  --z-panel: 50;
  --z-dialog: 100;

  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e10;
    --bg-2: #141619;
    --surface: #1a1d21;
    --ink: #eceef0;
    --ink-2: #a8adb4;
    --ink-3: #848a92;
    --line: rgb(255 255 255 / 0.1);
    --line-strong: rgb(255 255 255 / 0.2);
    --accent: #ff6b1f;
    --accent-ink: #ff8b4f;
    --on-accent: #150b05;
    --header-bg: rgb(13 14 16 / 0.72);
    --shadow: 0 1px 0 rgb(255 255 255 / 0.06) inset, 0 18px 40px -24px rgb(0 0 0 / 0.7);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.08; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
dl, dd, figure, blockquote { margin: 0; }
::selection { background: var(--accent); color: var(--on-accent); }

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

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: currentColor;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: calc(var(--z-dialog) + 1);
  padding: 12px 18px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Tipografia ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.h1 { font-size: clamp(2.625rem, 6.4vw, 5.5rem); }
.h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
.h3 { font-size: clamp(1.3125rem, 1.8vw, 1.5rem); font-weight: 700; letter-spacing: -0.005em; line-height: 1.2; }
.lead { font-size: clamp(1.125rem, 1.5vw, 1.3125rem); line-height: 1.55; color: var(--ink-2); max-width: 58ch; }
.body { color: var(--ink-2); max-width: 65ch; }
.accent { color: var(--accent-ink); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
}
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section); }
.section--tint { background: var(--bg-2); }
.section-head {
  display: grid;
  gap: 20px;
  margin-bottom: clamp(40px, 6vw, 72px);
  max-width: 820px;
}
.section-head .body { font-size: 1.125rem; }

/* ---------- Bottoni ---------- */
.btn {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  --btn-line: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--btn-line);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  transition:
    background-color var(--dur-fast) ease-out,
    border-color var(--dur-fast) ease-out,
    color var(--dur-fast) ease-out,
    transform 100ms ease-out;
}
.btn .icon { transition: transform var(--dur) var(--ease-out); }
.btn:hover .icon { transform: translateX(4px); }
.btn:active { transform: scale(0.97); }
.btn--primary {
  --btn-bg: var(--accent);
  --btn-ink: var(--on-accent);
  --btn-line: var(--accent);
}
.btn--primary:hover { --btn-bg: #ff7e3a; --btn-line: #ff7e3a; }
.btn--ghost:hover { --btn-line: var(--ink); }
.btn--on-photo {
  --btn-ink: var(--photo-ink);
  --btn-line: rgb(255 255 255 / 0.36);
  --btn-bg: rgb(13 14 16 / 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn--on-photo:hover { --btn-line: rgb(255 255 255 / 0.8); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 0.9375rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 6px;
  transition: border-color var(--dur-fast) ease-out, gap var(--dur) var(--ease-out);
}
.link-arrow:hover { border-color: var(--accent); gap: 14px; }
.link-arrow .icon { color: var(--accent-ink); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  height: var(--header-h);
  color: var(--ink);
  transition: background-color var(--dur) ease-out, color var(--dur) ease-out, box-shadow var(--dur) ease-out;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 1px 0 var(--line);
  transition: opacity var(--dur) ease-out;
}
/* Sopra un hero fotografico l'header è trasparente con testo chiaro */
.site-header.is-overlay { color: var(--photo-ink); }
.site-header.is-overlay::before { opacity: 0; }
.site-header.is-overlay .btn--primary:focus-visible { outline-color: #fff; }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand__mark {
  width: 14px;
  height: 14px;
  background: var(--accent);
  transform: rotate(45deg);
  flex: none;
}
.brand__name {
  display: grid;
  line-height: 1;
}
.brand__name strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand__name span {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 3px;
}

.nav { display: none; }
.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  border: 0;
  background: none;
  color: inherit;
  font-weight: 600;
  font-size: 0.9688rem;
  text-decoration: none;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link .icon { width: 0.875em; height: 0.875em; transition: transform var(--dur) var(--ease-out); }
.nav__item--has-menu { position: relative; }
.nav__item--has-menu[data-open="true"] .nav__link .icon { transform: rotate(90deg); }

.nav__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 300px;
  padding: 8px;
  list-style: none;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transform-origin: top left;
  transition: opacity var(--dur-fast) ease-out, transform var(--dur) var(--ease-out), visibility 0s linear var(--dur);
}
.nav__item--has-menu[data-open="true"] .nav__menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity var(--dur-fast) ease-out, transform var(--dur) var(--ease-out), visibility 0s;
}
.nav__menu a {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  text-decoration: none;
  transition: background-color var(--dur-fast) ease-out;
}
.nav__menu a:hover { background: var(--bg-2); }
.nav__menu strong { font-weight: 700; }
.nav__menu span { font-size: 0.875rem; color: var(--ink-3); }

.header-cta { display: none; }

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-right: -10px;
  border: 0;
  background: none;
  color: inherit;
}
.menu-toggle .icon { width: 28px; height: 28px; }

@media (min-width: 1024px) {
  .nav { display: block; }
  .header-cta { display: inline-flex; }
  .menu-toggle { display: none; }
}

/* Pannello mobile */
.mobile-panel {
  position: fixed;
  inset: 0;
  z-index: var(--z-panel);
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter) calc(24px + env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--ink);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity var(--dur) ease-out, transform var(--dur) var(--ease-out), visibility 0s linear var(--dur);
}
.mobile-panel[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity var(--dur) ease-out, transform var(--dur) var(--ease-out), visibility 0s;
}
.mobile-panel__top {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
}
.mobile-panel nav { margin-top: 16px; }
.mobile-panel ul { list-style: none; }
.mobile-panel li + li { border-top: 1px solid var(--line); }
.mobile-panel a.mobile-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  text-decoration: none;
}
.mobile-panel a.mobile-link[aria-current="page"] { color: var(--accent-ink); }
.mobile-panel .sub {
  display: grid;
  gap: 4px;
  padding: 0 0 16px 16px;
}
.mobile-panel .sub a { padding: 8px 0; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.mobile-panel__foot {
  margin-top: auto;
  padding-top: 32px;
  display: grid;
  gap: 16px;
}
.mobile-panel__foot .btn { width: 100%; }
.mobile-panel__foot p { color: var(--ink-3); font-size: 0.9375rem; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  background: #0d0e10;
  color: var(--photo-ink);
  isolation: isolate;
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 35%;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(10 11 13 / 0.92) 0%, rgb(10 11 13 / 0.78) 38%, rgb(10 11 13 / 0.2) 72%, rgb(10 11 13 / 0.1) 100%),
    linear-gradient(0deg, rgb(10 11 13 / 0.85) 0%, rgb(10 11 13 / 0) 40%);
}
.hero__inner {
  align-self: end;
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: clamp(48px, 8vw, 96px);
}
.hero__content {
  display: grid;
  gap: 28px;
  max-width: 760px;
}
.hero .eyebrow { color: #ff8b4f; }
.hero h1 { color: var(--photo-ink); }
.hero h1 em { font-style: normal; color: #ff8b4f; }
.hero .lead { color: var(--photo-ink-2); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

@media (max-width: 767px) {
  .hero__media img { object-position: 68% 30%; }
  .hero::before {
    background:
      linear-gradient(0deg, rgb(10 11 13 / 0.95) 0%, rgb(10 11 13 / 0.7) 55%, rgb(10 11 13 / 0.35) 100%);
  }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* ---------- Marquee settori ---------- */
.marquee {
  border-block: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg);
  padding-block: 22px;
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: 0;
}
.marquee__group {
  display: flex;
  align-items: center;
  list-style: none;
  flex: none;
}
.marquee__group li {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  font-size: clamp(1.125rem, 1.8vw, 1.5rem);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-2);
}
.marquee__group li::after {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: rotate(45deg);
}
@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: marquee 48s linear infinite; }
  .marquee:hover .marquee__track { animation-play-state: paused; }
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Bento servizi ---------- */
.bento {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  min-height: 0;
  padding: clamp(24px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}
.tile__icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border: 1px solid var(--line-strong);
  color: var(--accent-ink);
}
.tile__icon .icon { width: 24px; height: 24px; }
.tile h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-family: var(--font-display); font-weight: 700; line-height: 1; }
.tile p { color: var(--ink-2); max-width: 46ch; }

.tile--photo { color: var(--photo-ink); background: #0d0e10; border-color: transparent; justify-content: flex-end; min-height: 300px; }
.tile--photo img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1200ms var(--ease-out);
}
.tile--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgb(10 11 13 / 0.92) 0%, rgb(10 11 13 / 0.55) 45%, rgb(10 11 13 / 0.1) 100%);
}
.tile--photo p { color: var(--photo-ink-2); }
.tile--photo .tile__icon { border-color: rgb(255 255 255 / 0.3); color: #ff8b4f; }
.tile--photo:hover img { transform: scale(1.04); }

.tile--accent { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.tile--accent p { color: rgb(21 11 5 / 0.82); }
.tile--accent .tile__icon { border-color: rgb(21 11 5 / 0.35); color: var(--on-accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chips li {
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-2);
}

@media (min-width: 768px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile--a { grid-column: 1 / -1; min-height: 420px; }
}
@media (min-width: 1024px) {
  .bento {
    grid-template-columns: 7fr 5fr;
    grid-template-areas:
      "a b"
      "a c"
      "e d";
  }
  .tile--a { grid-area: a; grid-column: auto; min-height: 520px; }
  .tile--b { grid-area: b; }
  .tile--c { grid-area: c; }
  .tile--d { grid-area: d; }
  .tile--e { grid-area: e; }
}
.bento__foot { margin-top: 40px; }

/* ---------- Perché sceglierci (split con colonna sticky) ---------- */
.reasons {
  display: grid;
  gap: 48px;
}
.reasons__intro { display: grid; gap: 24px; align-content: start; }
.reasons__list {
  display: grid;
  gap: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.reason {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding-block: 32px;
}
.reason + .reason { border-top: 1px solid var(--line); }
.reason__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: var(--bg-2);
  color: var(--accent-ink);
}
.section--tint .reason__icon { background: var(--surface); }
.reason__icon .icon { width: 26px; height: 26px; }
.reason h3 { margin-bottom: 8px; }
.reason p { color: var(--ink-2); }
@media (min-width: 1024px) {
  .reasons { grid-template-columns: 5fr 7fr; gap: 96px; }
  .reasons__intro { position: sticky; top: calc(var(--header-h) + 48px); }
}

/* ---------- Striscia galleria (scroll-snap) ---------- */
.strip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}
.strip-controls { display: none; gap: 8px; }
@media (min-width: 768px) { .strip-controls { display: flex; } }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  transition: border-color var(--dur-fast) ease-out, background-color var(--dur-fast) ease-out, transform 100ms ease-out;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn:disabled { opacity: 0.4; cursor: default; }

.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 420px);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding-inline: var(--gutter);
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  list-style: none;
}
@media (min-width: 1024px) {
  .strip {
    padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2));
    scroll-padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2));
  }
}
.strip li { scroll-snap-align: start; }
.strip a {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-2);
}
.strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1000ms var(--ease-out);
}
.strip a:hover img { transform: scale(1.04); }
.strip figcaption {
  margin-top: 12px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

/* ---------- Squadra / titolare (collage foto reali) ---------- */
.crew {
  display: grid;
  gap: 56px;
  align-items: center;
}
.crew__text { display: grid; gap: 24px; }
.quote {
  margin: 8px 0 0;
  padding-left: 24px;
  border-left: 3px solid var(--accent);
}
.quote p {
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.quote footer { margin-top: 12px; color: var(--ink-3); font-size: 0.9375rem; }
.quote cite { font-style: normal; font-weight: 700; color: var(--ink-2); }

.crew__photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: start;
}
.crew__photos figure { margin: 0; overflow: hidden; background: var(--bg-2); }
.crew__photos img { width: 100%; aspect-ratio: 9 / 19; object-fit: cover; }
.crew__photos figure:nth-child(2) { margin-top: 48px; }
.crew__photos figure:nth-child(3) { margin-top: 96px; }
@media (min-width: 1024px) {
  .crew { grid-template-columns: 5fr 7fr; gap: 80px; }
}

/* ---------- Metodo di lavoro ---------- */
.process {
  display: grid;
  gap: 12px;
  list-style: none;
  counter-reset: step;
}
.process li {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 28px 24px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  counter-increment: step;
}
.process li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--accent-ink);
}
.process li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-slow) var(--ease-out);
}
.process li.is-in::after { transform: scaleX(1); }
.process li:nth-child(2)::after { transition-delay: 120ms; }
.process li:nth-child(3)::after { transition-delay: 240ms; }
.process li:nth-child(4)::after { transition-delay: 360ms; }
.process h3 { font-size: 1.375rem; }
.process p { color: var(--ink-2); font-size: 1rem; }
@media (min-width: 768px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .process { grid-template-columns: repeat(4, 1fr); } }

/* ---------- CTA finale ---------- */
.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #0d0e10;
  color: var(--photo-ink);
}
.cta-band > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(10 11 13 / 0.94) 0%, rgb(10 11 13 / 0.8) 50%, rgb(10 11 13 / 0.45) 100%);
}
.cta-band__inner {
  display: grid;
  gap: 32px;
  padding-block: clamp(80px, 11vw, 152px);
}
.cta-band h2 { max-width: 14ch; color: var(--photo-ink); }
.cta-band p { color: var(--photo-ink-2); max-width: 48ch; font-size: 1.125rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-band__phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 8px;
  font-weight: 700;
  color: var(--photo-ink);
  text-decoration: none;
}
.cta-band__phone .icon { color: #ff8b4f; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding-top: clamp(56px, 8vw, 96px);
  font-size: 0.9688rem;
}
.footer-grid {
  display: grid;
  gap: 40px;
  padding-bottom: 56px;
}
.footer-grid h2 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; display: grid; gap: 10px; }
.footer-grid a { text-decoration: none; color: var(--ink-2); }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-about p { color: var(--ink-2); max-width: 36ch; margin-top: 20px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.footer-contact .icon { margin-top: 3px; color: var(--accent-ink); }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 24px calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.8125rem;
}
.footer-legal p { max-width: 90ch; }
.footer-legal a { color: inherit; }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; }
  .footer-about { grid-column: auto; }
}

/* ==========================================================================
   Pagine interne
   ========================================================================== */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  min-height: min(72dvh, 680px);
  background: #0d0e10;
  color: var(--photo-ink);
}
.page-hero > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(10 11 13 / 0.9) 0%, rgb(10 11 13 / 0.6) 55%, rgb(10 11 13 / 0.25) 100%),
    linear-gradient(0deg, rgb(10 11 13 / 0.8) 0%, rgb(10 11 13 / 0) 50%);
}
.page-hero__inner {
  align-self: end;
  display: grid;
  gap: 20px;
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: clamp(48px, 7vw, 88px);
}
.page-hero h1 { color: var(--photo-ink); max-width: 16ch; }
.page-hero .lead { color: var(--photo-ink-2); }
.page-hero .eyebrow { color: #ff8b4f; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--photo-ink-2);
}
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: 0.6; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--photo-ink); }

/* ---------- Chi siamo: storia ---------- */
.story-intro {
  display: grid;
  gap: 32px;
}
.story-intro .big {
  font-size: clamp(1.5rem, 3vw, 2.375rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 30ch;
}
.story-intro .cols { display: grid; gap: 24px; color: var(--ink-2); }
@media (min-width: 1024px) {
  .story-intro { grid-template-columns: 7fr 5fr; gap: 80px; align-items: start; }
  .story-intro .cols { padding-top: 10px; }
}

.timeline {
  display: grid;
  gap: 0;
  list-style: none;
  position: relative;
}
.milestone {
  display: grid;
  gap: 16px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.milestone__when {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--accent-ink);
}
.milestone h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-family: var(--font-display); font-weight: 700; line-height: 1; }
.milestone p { color: var(--ink-2); max-width: 60ch; }
.milestone figure { margin: 0; overflow: hidden; background: var(--bg-2); }
.milestone img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 1024px) {
  .milestone {
    grid-template-columns: 2fr 5fr 5fr;
    gap: 48px;
    align-items: start;
  }
  .milestone__body { display: grid; gap: 16px; }
  .milestone figure.tall img { aspect-ratio: 3 / 4; }
}

.letter {
  display: grid;
  gap: 48px;
  align-items: center;
}
.letter__photo { margin: 0; position: relative; }
.letter__photo img { width: 100%; max-height: 760px; object-fit: cover; object-position: center 20%; }
.letter__photo figcaption { margin-top: 12px; font-size: 0.875rem; color: var(--ink-3); }
.letter__body { display: grid; gap: 22px; }
.letter__body p { color: var(--ink-2); font-size: 1.125rem; max-width: 60ch; }
.letter__body p.salute { color: var(--ink); font-weight: 600; }
.signature { display: grid; gap: 2px; margin-top: 8px; }
.signature strong { font-size: 1.375rem; font-family: var(--font-display); font-weight: 700; }
.signature span { color: var(--ink-3); font-size: 0.9375rem; }
@media (min-width: 1024px) {
  .letter { grid-template-columns: 5fr 7fr; gap: 96px; }
}

.values {
  display: grid;
  gap: 12px;
  list-style: none;
}
.values li {
  display: grid;
  gap: 12px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.values li:first-child { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.values li:first-child p { color: rgb(21 11 5 / 0.82); }
.values li:first-child .icon { color: var(--on-accent); }
.values .icon { width: 32px; height: 32px; color: var(--accent-ink); margin-bottom: 12px; }
.values h3 { font-size: 1.5rem; font-family: var(--font-display); font-weight: 700; }
.values p { color: var(--ink-2); }
@media (min-width: 768px) {
  .values { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .values { grid-template-columns: 1.3fr 1fr 1fr; }
  .values li:first-child { grid-row: span 2; align-content: end; }
}

.facts {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.facts > div {
  display: grid;
  gap: 6px;
  padding: 22px 24px;
  background: var(--surface);
}
.facts dt {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.facts dd { font-weight: 600; overflow-wrap: anywhere; }
@media (min-width: 768px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .facts { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Servizi ---------- */
.service-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 5;
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.service-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.service-nav a {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
}
.service-nav a:hover { color: var(--ink); }
.service-nav a.is-active { color: var(--ink); border-color: var(--accent); }

.service {
  display: grid;
  gap: 48px;
}
.service__media { margin: 0; position: relative; overflow: hidden; background: var(--bg-2); }
.service__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.service__body { display: grid; gap: 28px; align-content: start; }
.service__body .h2 { max-width: 14ch; }
.feature-list {
  display: grid;
  gap: 0;
  list-style: none;
}
.feature-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  padding-block: 16px;
}
.feature-list li + li { border-top: 1px solid var(--line); }
.feature-list .icon { color: var(--accent-ink); margin-top: 3px; }
.feature-list strong { display: block; font-weight: 700; }
.feature-list span { color: var(--ink-2); font-size: 1rem; }
@media (min-width: 1024px) {
  .service { grid-template-columns: 5fr 7fr; gap: 96px; align-items: start; }
  .service__media { position: sticky; top: calc(var(--header-h) + 80px); }
  .service--flip .service__media { order: 2; }
}

.sectors {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  list-style: none;
}
.sectors li {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.sectors .icon { width: 28px; height: 28px; color: var(--accent-ink); }
.sectors strong { font-size: 1.0625rem; font-weight: 700; line-height: 1.25; }
@media (min-width: 768px) { .sectors { grid-template-columns: repeat(3, 1fr); } }

.faq { display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 920px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  font-size: 1.1875rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform var(--dur) var(--ease-out); color: var(--accent-ink); }
.faq details[open] summary .icon { transform: rotate(90deg); }
.faq details p { padding: 0 0 24px; color: var(--ink-2); max-width: 70ch; }

/* ---------- Galleria ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
@media (max-width: 639px) {
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    margin-bottom: 24px;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; }
}
.filter {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-weight: 600;
  color: var(--ink-2);
  transition: background-color var(--dur-fast) ease-out, color var(--dur-fast) ease-out, border-color var(--dur-fast) ease-out, transform 100ms ease-out;
}
.filter:hover { color: var(--ink); border-color: var(--ink); }
.filter:active { transform: scale(0.97); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter .count { font-family: var(--font-sans); font-size: 0.75rem; margin-left: 6px; opacity: 0.7; }

/* Griglia regolare a tutte le dimensioni: 2 / 3 / 4 / 5 colonne */
.masonry {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  list-style: none;
}
@media (min-width: 640px) { .masonry { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
@media (min-width: 1024px) { .masonry { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
@media (min-width: 1280px) { .masonry { grid-template-columns: repeat(5, 1fr); } }
.masonry li[hidden] { display: none; }
.masonry button {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
  text-align: left;
}
/* Telefono: didascalie solo nel visualizzatore */
@media (max-width: 639px) {
  .masonry button::after,
  .masonry .cap { display: none !important; }
}
.masonry img { width: 100%; height: 100%; object-fit: cover; transition: transform 1000ms var(--ease-out), opacity var(--dur) ease-out; }
.masonry button:hover img { transform: scale(1.03); }
.masonry button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(10 11 13 / 0.7), rgb(10 11 13 / 0) 45%);
  opacity: 0;
  transition: opacity var(--dur) ease-out;
}
.masonry button:hover::after,
.masonry button:focus-visible::after { opacity: 1; }
.masonry .cap {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  color: var(--photo-ink);
  font-weight: 600;
  font-size: 0.9375rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur) ease-out, transform var(--dur) var(--ease-out);
}
.masonry button:hover .cap,
.masonry button:focus-visible .cap { opacity: 1; transform: none; }
@media (hover: none) {
  .masonry button::after, .masonry .cap { opacity: 1; transform: none; }
}

.gallery-empty {
  display: grid;
  gap: 12px;
  place-items: start;
  padding: 48px;
  border: 1px dashed var(--line-strong);
  color: var(--ink-2);
}
.gallery-empty[hidden] { display: none; }

.gallery-note {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 56px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.gallery-note p { color: var(--ink-2); max-width: 60ch; }

/* Lightbox */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #08090a;
  color: var(--photo-ink);
  overflow: hidden;
}
.lightbox::backdrop { background: rgb(8 9 10 / 0.6); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px var(--gutter);
  padding-top: max(12px, env(safe-area-inset-top));
}
.lightbox__count { font-family: var(--font-sans); font-size: 0.875rem; color: var(--photo-ink-2); }
.lightbox .icon-btn { color: var(--photo-ink); border-color: rgb(255 255 255 / 0.25); }
.lightbox .icon-btn:hover { border-color: rgb(255 255 255 / 0.8); }
.lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 var(--gutter);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
/* L'immagine occupa esattamente l'area disponibile e si adatta senza tagli,
   sia per foto verticali sia orizzontali */
.lightbox__stage img {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--gutter);
  right: var(--gutter);
  width: calc(100% - var(--gutter) * 2);
  height: 100%;
  max-width: none;
  object-fit: contain;
  will-change: transform;
  cursor: grab;
}
@media (min-width: 768px) {
  /* Lascia spazio alle frecce laterali */
  .lightbox__stage img {
    left: calc(var(--gutter) + 68px);
    right: calc(var(--gutter) + 68px);
    width: calc(100% - (var(--gutter) + 68px) * 2);
  }
}
.lightbox__stage img.is-dragging { cursor: grabbing; }
.lightbox__nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  display: none;
}
.lightbox__nav--prev { left: var(--gutter); }
.lightbox__nav--next { right: var(--gutter); }
@media (min-width: 768px) { .lightbox__nav { display: inline-grid; } }
.lightbox__caption {
  padding: 16px var(--gutter) max(20px, env(safe-area-inset-bottom));
  text-align: center;
  color: var(--photo-ink-2);
  font-size: 0.9375rem;
}

/* ---------- Contatti / preventivo ---------- */
.contact-layout {
  display: grid;
  gap: 56px;
}
@media (min-width: 1024px) {
  .contact-layout { grid-template-columns: 7fr 5fr; gap: 80px; align-items: start; }
  .contact-aside { position: sticky; top: calc(var(--header-h) + 32px); }
}

.channels {
  display: grid;
  gap: 12px;
  list-style: none;
}
@media (min-width: 768px) { .channels { grid-template-columns: 1fr 1fr; } .channels li:first-child { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .channels { grid-template-columns: 1.4fr 1fr 1fr; } .channels li:first-child { grid-column: auto; } }
.channels li { display: grid; }
.channel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 300px;
  padding: clamp(24px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--dur-fast) ease-out, transform 100ms ease-out;
}
.channel:hover { border-color: var(--ink-3); }
.channel:active { transform: scale(0.99); }
.channel__icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border: 1px solid var(--line-strong);
  color: var(--accent-ink);
}
.channel__icon .icon { width: 28px; height: 28px; }
.channel__label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.channel__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.channel__text { color: var(--ink-2); max-width: 40ch; }
.channel__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
  font-weight: 700;
}
.channel__cta .icon { color: var(--accent-ink); transition: transform var(--dur) var(--ease-out); }
.channel:hover .channel__cta .icon { transform: translateX(4px); }

.channel--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.channel--primary:hover { border-color: var(--on-accent); }
.channel--primary .channel__icon { border-color: rgb(21 11 5 / 0.35); color: var(--on-accent); }
.channel--primary .channel__label,
.channel--primary .channel__text { color: rgb(21 11 5 / 0.82); }
.channel--primary .channel__cta .icon { color: var(--on-accent); }
.channel--primary .channel__title { font-size: clamp(1.75rem, 3vw, 2.5rem); font-family: var(--font-display); font-weight: 700; line-height: 1.05; }

.checklist-intro { margin: 20px 0 16px; }

.contact-card {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}
.contact-card > * { padding: 24px 28px; }
.contact-card > * + * { border-top: 1px solid var(--line); }
.contact-card h2 { font-size: 1.5rem; font-family: var(--font-display); font-weight: 700; }
.contact-item { display: grid; grid-template-columns: 24px 1fr; gap: 14px; }
.contact-item .icon { color: var(--accent-ink); margin-top: 2px; }
.contact-item dt { font-size: 0.8125rem; color: var(--ink-3); font-family: var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase; }
.contact-item dd { font-weight: 600; overflow-wrap: anywhere; }
.contact-item a { text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }
.contact-card .contact-list { display: grid; gap: 20px; }

/* ---------- Testo legale ---------- */
.prose { max-width: 72ch; display: grid; gap: 18px; color: var(--ink-2); }
.prose h2 { margin-top: 24px; font-size: 1.625rem; color: var(--ink); }
.prose ul { padding-left: 1.2em; display: grid; gap: 6px; }
.prose strong { color: var(--ink); }

/* ---------- 404 ---------- */
.notfound {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  gap: 24px;
  padding-top: var(--header-h);
}

/* ==========================================================================
   Motion: rivelazioni allo scroll (solo con JS e senza riduzione movimento)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js [data-reveal="2"] { transition-delay: 80ms; }
  .js [data-reveal="3"] { transition-delay: 160ms; }
  .js [data-reveal="4"] { transition-delay: 240ms; }

  /* Ingresso hero */
  .js .hero__media img,
  .js .page-hero > img {
    animation: settle 1600ms var(--ease-out) both;
  }
  .js .hero__content > *,
  .js .page-hero__inner > * {
    animation: rise 900ms var(--ease-out) both;
  }
  .js .hero__content > :nth-child(2), .js .page-hero__inner > :nth-child(2) { animation-delay: 90ms; }
  .js .hero__content > :nth-child(3), .js .page-hero__inner > :nth-child(3) { animation-delay: 180ms; }
  .js .hero__content > :nth-child(4), .js .page-hero__inner > :nth-child(4) { animation-delay: 270ms; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
@keyframes settle {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header::before, .service-nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .btn--on-photo { backdrop-filter: none; -webkit-backdrop-filter: none; background: #15171a; }
}

@media print {
  .site-header, .mobile-panel, .marquee, .cta-band, .lightbox { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Utility aggiunte ---------- */
.scroll-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 40px;
  pointer-events: none;
}
.nav__link.is-current::after { transform: scaleX(1); }
.milestone__body { display: grid; gap: 16px; }
.milestone .milestone__when { color: var(--accent-ink); }
.letter__body .eyebrow { color: var(--accent-ink); font-size: 0.8125rem; }
.prose .breadcrumb { color: var(--ink-3); }
.prose .breadcrumb [aria-current] { color: var(--ink); }
main > .section:first-child:not(.page-hero) { padding-top: calc(var(--header-h) + 56px); }

/* ---------- Rifiniture tipografiche (Barlow) ---------- */
.btn { font-weight: 600; letter-spacing: 0.01em; }
.eyebrow { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.12em; }
.chips li { font-size: 0.875rem; font-weight: 500; }
.footer-grid h2, .facts dt, .channel__label, .contact-item dt {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.nav__link { font-weight: 500; font-size: 1rem; }
.lead { line-height: 1.5; }
