/* =========================================================================
   Automation Tech — foglio di stile principale
   Direzione: tecnica e pulita. Pagina bianca, card scure (blu notte, blu profondo, grafite),
   accento blu elettrico dai LED della Drilling Tech, linee "blueprint",
   tipografia Space Grotesk / Inter / JetBrains Mono (self-hosted, OFL).
   I colori sono token: le superfici scure li ridefiniscono (vedi blocco dedicato).
   ========================================================================= */

@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk-var.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-var.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --line: rgba(12, 30, 60, 0.1);
  --line-strong: rgba(12, 30, 60, 0.18);
  --text: #0b1424;
  --muted: #4b5870;
  --dim: #6b778c;
  --accent: #1f6bff;
  --accent-hi: #3b82ff;
  --accent-2: #0a58cc;
  --accent-soft: rgba(31, 107, 255, 0.1);
  --ghost-bg: rgba(255, 255, 255, 0.75);
  --hover-bg: rgba(12, 30, 60, 0.05);
  --ok: #12804f;
  --err: #cc2f2f;

  /* Superfici scure delle card */
  --navy-1: #13203a;
  --navy-2: #0b1426;
  --blue-1: #16439a;
  --blue-2: #0b2a66;
  --graphite-1: #2a313d;
  --graphite-2: #171c25;

  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
  --section: clamp(72px, 10vw, 128px);
  --shadow: 0 30px 60px -30px rgba(11, 20, 36, 0.35);
  --shadow-card: 0 18px 40px -24px rgba(11, 20, 36, 0.45);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Superfici scure: token ridefiniti (testo chiaro, accenti ciano) ---------- */
.card, .cert, .news-feature, .cta-band__box, .plate, .specs, .stats, .service-row,
.info-card, .site-footer, .page-hero--image {
  --bg: #0b1426;
  --bg-2: #0e1830;
  --surface: #111c30;
  --surface-2: #17243d;
  --line: rgba(170, 200, 240, 0.14);
  --line-strong: rgba(170, 200, 240, 0.28);
  --text: #eef3fa;
  --muted: #b1bdd0;
  --dim: #8795ab;
  --accent-2: #6fd6ff;
  --accent-soft: rgba(111, 214, 255, 0.12);
  --ghost-bg: rgba(255, 255, 255, 0.06);
  --hover-bg: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.narrow { max-width: 820px; }
.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: -60px; z-index: 100; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 12px; }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
.note { color: var(--dim); font-size: 0.85rem; margin-top: 16px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 0.78rem/1 var(--font-mono);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 20px;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; opacity: 0.7; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--muted); }
.display { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.h-sm { font-size: 1.1rem; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 24px; }

/* ---------- Pulsanti e link ---------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--btn-bg); color: var(--text);
  font: 500 0.95rem/1.2 var(--font-body); text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.25s var(--ease); }
.btn small { color: var(--dim); font-size: 0.78rem; }
.btn:hover { color: var(--text); border-color: var(--accent); }
.btn:hover svg:last-child { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn--primary { --btn-bg: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 10px 30px -10px rgba(59, 130, 255, 0.7); }
.btn--primary:hover { --btn-bg: var(--accent-hi); color: #fff; box-shadow: 0 14px 36px -10px rgba(59, 130, 255, 0.85); }
.btn--ghost { background: var(--ghost-bg); backdrop-filter: blur(6px); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 0.9rem; }
.btn--block { width: 100%; margin-top: 24px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-2); font-weight: 500; text-decoration: none; }
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.site-header.is-scrolled { background: rgba(255, 255, 255, 0.86); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom-color: var(--line); }
/* Con il menu aperto niente backdrop-filter: renderebbe l'header il contenitore del pannello fixed. */
.nav-open .site-header, .nav-open .site-header.is-scrolled { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: var(--line); }
.site-header__inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); flex: none; }
.brand img { width: 40px; height: 40px; }
.brand__text { font: 500 1.12rem/1 var(--font-display); letter-spacing: -0.01em; }
.brand__text b { font-weight: 700; color: var(--accent-2); margin-left: 2px; }
.brand:hover { color: var(--text); }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav ul a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--muted); font-size: 0.93rem; text-decoration: none; white-space: nowrap;
  transition: color 0.2s, background-color 0.2s;
}
.main-nav ul a:hover { color: var(--text); background: var(--hover-bg); }
.main-nav ul a[aria-current='page'] { color: var(--text); }
.main-nav ul a[aria-current='page']::after { content: ''; display: block; height: 2px; margin-top: 4px; border-radius: 2px; background: var(--accent); }
.main-nav__extra { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; font: 500 0.82rem var(--font-mono); color: var(--muted); text-decoration: none; }
.lang-switch svg { width: 16px; height: 16px; }
.lang-switch:hover { color: var(--text); background: var(--hover-bg); }

.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 10px; background: transparent; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle__close { display: none; }
.nav-open .nav-toggle__open { display: none; }
.nav-open .nav-toggle__close { display: block; }

@media (max-width: 1179px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 24px;
    padding: 24px var(--gutter) 40px;
    background: var(--bg); overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }
  .nav-open .main-nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav-open body { overflow: hidden; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul a { padding: 16px 4px; font: 500 1.5rem/1.2 var(--font-display); color: var(--text); border-bottom: 1px solid var(--line); border-radius: 0; }
  .main-nav ul a[aria-current='page'] { color: var(--accent-2); }
  .main-nav ul a[aria-current='page']::after { display: none; }
  .main-nav__extra { justify-content: space-between; }
}

/* ---------- Griglia blueprint di sfondo ---------- */
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 20%, transparent 75%);
  opacity: 0.8;
}

/* ---------- Hero home ---------- */
.hero { position: relative; margin-top: calc(-1 * var(--header-h)); padding: calc(var(--header-h) + clamp(48px, 8vw, 96px)) 0 clamp(64px, 9vw, 120px); overflow: hidden; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: -20% -10% auto 40%; height: 90%; background: radial-gradient(closest-side, rgba(31, 107, 255, 0.12), transparent); z-index: -1; }
.hero__inner { display: grid; grid-template-columns: 1.35fr 0.65fr; align-items: center; gap: clamp(32px, 6vw, 80px); }
.hero__title { font-size: clamp(2.2rem, 4.6vw, 3.9rem); margin-bottom: 24px; }
.hero__lead { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--muted); max-width: 40em; margin-bottom: 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 40px; color: var(--muted); font-size: 0.88rem; }
.hero__badges li { display: inline-flex; align-items: center; gap: 8px; }
.hero__badges svg { width: 16px; height: 16px; color: var(--accent-2); }
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.word__inner { display: inline-block; }

.blueprint { position: relative; aspect-ratio: 1; width: min(100%, 460px); margin-inline: auto; color: var(--text); }
.blueprint__guides { position: absolute; inset: 0; width: 100%; height: 100%; }
.bp-line { stroke: var(--line-strong); stroke-width: 1; }
.bp-dash { stroke-dasharray: 4 6; }
.bp-text { fill: var(--dim); font: 10px var(--font-mono); letter-spacing: 0.1em; }
.at-mark { position: absolute; inset: 12%; width: 76%; height: 76%; }
.at-mark--hero { color: var(--text); filter: drop-shadow(0 8px 18px rgba(31, 107, 255, 0.22)); }
.motion .at-mark--hero { opacity: 0; }
.blueprint__glow { position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(closest-side, rgba(31, 107, 255, 0.16), transparent); z-index: -1; }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; }
  .blueprint { width: min(62vw, 300px); }
}

/* ---------- Sezioni ---------- */
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: clamp(48px, 7vw, 88px); }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head__lead { color: var(--muted); font-size: 1.08rem; }
.section-head--split { max-width: none; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px 64px; align-items: end; }
.section-head--split h2 { margin: 0; }
.section-head--split .section-head__lead { margin: 0; }
.section-foot { margin-top: 32px; }
@media (max-width: 800px) { .section-head--split { grid-template-columns: 1fr; } }

/* ---------- Filiera ---------- */
.chain { border-block: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.chain__steps { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; counter-reset: step; }
.chain__track { position: absolute; left: 22px; right: 22px; top: 22px; height: 1px; background: var(--line-strong); }
.chain__progress { position: absolute; inset: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: left; }
.motion .chain__progress { transform: scaleX(0); }
.chain__step { position: relative; }
.chain__node {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 20px;
  border-radius: 50%; border: 1px solid var(--accent); background: var(--accent); color: #fff;
  font: 500 0.82rem var(--font-mono);
}
.motion .chain__node { background: var(--bg); color: var(--muted); }
.chain__step h3 { font-size: 1.08rem; margin-bottom: 6px; }
.chain__step p { color: var(--muted); font-size: 0.93rem; margin: 0; }
@media (max-width: 900px) {
  .chain__steps { grid-template-columns: 1fr; gap: 28px; }
  .chain__track { left: 22px; right: auto; top: 22px; bottom: 22px; width: 1px; height: auto; }
  .chain__progress { transform-origin: top; }
  .chain__step { display: grid; grid-template-columns: 44px 1fr; column-gap: 20px; }
  .chain__node { grid-row: span 2; margin: 0; }
}

/* ---------- Card con spotlight ---------- */
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 28px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--card-1, var(--navy-1)), var(--card-2, var(--navy-2)));
  border: 1px solid var(--line);
  color: var(--text); text-decoration: none; overflow: hidden; isolation: isolate;
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card--blue { --card-1: var(--blue-1); --card-2: var(--blue-2); }
.card--graphite { --card-1: var(--graphite-1); --card-2: var(--graphite-2); }
.card--spot::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(59, 130, 255, 0.16), transparent 45%);
  transition: opacity 0.3s;
}
.card--spot:hover::before, .card--spot:focus-visible::before { opacity: 1; }
a.card:hover { border-color: rgba(111, 214, 255, 0.45); transform: translateY(-4px); color: var(--text); box-shadow: 0 26px 50px -24px rgba(11, 20, 36, 0.55); }
.card__icon {
  display: grid; place-items: center; flex: none;
  width: 48px; height: 48px; margin-bottom: 24px;
  border-radius: 12px; border: 1px solid rgba(59, 130, 255, 0.35);
  background: var(--accent-soft); color: var(--accent-2);
}
.card__icon svg { width: 24px; height: 24px; }
.card__title { font-size: 1.15rem; margin-bottom: 8px; }
.card__text { color: var(--muted); font-size: 0.95rem; margin: 0; }
.card__arrow { position: absolute; top: 24px; right: 24px; color: var(--dim); transition: color 0.3s, transform 0.3s var(--ease); }
.card__arrow svg { width: 20px; height: 20px; }
a.card:hover .card__arrow { color: var(--accent-2); transform: translate(2px, -2px); }

.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; gap: 16px; }
.bento__item { min-height: 220px; }
.bento__item--wide { grid-column: span 2; }
.bento__item--wide .card__title { font-size: 1.45rem; }
@media (max-width: 1000px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; } .bento__item--wide { grid-column: auto; } .bento__item { min-height: 0; } }

.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.team-grid--3 { grid-template-columns: repeat(3, 1fr); }
.team-card .card__title { margin: 0; }
.team-grid > .card:nth-child(2), .link-cards > .card:nth-child(2) { --card-1: var(--blue-1); --card-2: var(--blue-2); }
.team-grid > .card:nth-child(4), .team-grid--3 > .card:nth-child(3) { --card-1: var(--graphite-1); --card-2: var(--graphite-2); }
@media (max-width: 900px) { .team-grid, .team-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .team-grid, .team-grid--3 { grid-template-columns: 1fr; } }

.link-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.link-card { flex-direction: row; align-items: flex-start; gap: 20px; padding-right: 56px; }
.link-card .card__icon { margin: 0; }
@media (max-width: 700px) { .link-cards { grid-template-columns: 1fr; } }

/* ---------- Showcase Drilling Tech (home) ---------- */
.showcase { background: var(--bg-2); border-block: 1px solid var(--line); }
.showcase__inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.showcase__media { position: relative; border-radius: calc(var(--radius) + 4px); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.showcase__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.showcase__tag { position: absolute; left: 16px; bottom: 16px; padding: 6px 12px; border-radius: 999px; background: rgba(7, 11, 18, 0.7); backdrop-filter: blur(8px); font: 500 0.75rem var(--font-mono); color: #dfe7f2; border: 1px solid rgba(255, 255, 255, 0.15); }
.showcase__copy .display { margin-bottom: 16px; }
@media (max-width: 900px) { .showcase__inner { grid-template-columns: 1fr; } }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 32px 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.stats__item { background: var(--bg); padding: 20px; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; }
.stats dt { color: var(--muted); font-size: 0.85rem; }
.stats dd { margin: 0; font: 600 clamp(1.5rem, 2.6vw, 2rem)/1.1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stats small { font: 500 0.8rem var(--font-mono); color: var(--accent-2); margin-left: 4px; letter-spacing: 0; }

/* ---------- Certificazioni ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cert {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 28px 24px; border-radius: var(--radius); overflow: hidden; isolation: isolate;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--card-1, var(--navy-1)), var(--card-2, var(--navy-2)));
  box-shadow: var(--shadow-card);
}
.cert:nth-child(even) { --card-1: var(--blue-1); --card-2: var(--blue-2); }
.cert::after { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, #6fd6ff, transparent); }
.cert__seal { color: var(--accent-2); margin-bottom: 14px; }
.cert__seal svg { width: 32px; height: 32px; }
.cert__code { font: 600 1.35rem/1.2 var(--font-display); }
.cert__name { color: var(--muted); font-size: 0.93rem; }
.cert__issuer { margin-top: auto; padding-top: 14px; font: 500 0.78rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-2); }
.cert-grid--lg .cert { padding: 36px 28px; min-height: 260px; }
.cert.card--spot::before, .cert[data-spotlight]::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(59, 130, 255, 0.14), transparent 45%); transition: opacity 0.3s;
}
.cert[data-spotlight]:hover::before { opacity: 1; }
@media (max-width: 1000px) { .cert-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cert-grid { grid-template-columns: 1fr; } }

/* ---------- Partner marquee ---------- */
.partners { padding-block: 40px 56px; border-block: 1px solid var(--line); background: var(--bg-2); }
.partners__title { font: 500 0.78rem var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); text-align: center; margin-bottom: 28px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; gap: 20px; padding-right: 20px; }
.marquee__group li { flex: none; display: grid; place-items: center; height: 72px; padding: 0 28px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.marquee__group img { max-height: 40px; width: auto; }
.marquee__group .marquee__text { background: var(--navy-2); border-color: var(--navy-2); color: #eef3fa; font: 600 1.05rem var(--font-display); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- News ---------- */
.news-feature { display: grid; grid-template-columns: auto 1fr; gap: 32px; padding: clamp(28px, 4vw, 48px); border-radius: calc(var(--radius) + 4px); border: 1px solid var(--line); background: linear-gradient(135deg, var(--blue-1), var(--navy-2) 70%); box-shadow: var(--shadow-card); }
.news-feature h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.news-feature p { color: var(--muted); max-width: 62ch; }
.news-feature__icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 16px; background: var(--accent-soft); color: var(--accent-2); border: 1px solid rgba(59, 130, 255, 0.35); }
.news-feature__icon svg { width: 30px; height: 30px; }
@media (max-width: 640px) { .news-feature { grid-template-columns: 1fr; gap: 20px; } }

.logo-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.logo-chip { display: inline-grid; place-items: center; height: 64px; padding: 0 22px; border-radius: 12px; background: #fff; border: 1px solid rgba(12, 30, 60, 0.1); }
.logo-chip img { max-height: 36px; width: auto; }
.logo-row--lg .logo-chip { height: 88px; padding: 0 32px; }
.logo-row--lg .logo-chip img { max-height: 48px; }

/* ---------- CTA band ---------- */
.cta-band { padding-block: 0 var(--section); }
.cta-band__box {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px;
  padding: clamp(32px, 5vw, 64px); border-radius: calc(var(--radius) + 8px);
  border: 1px solid rgba(59, 130, 255, 0.35);
  background: radial-gradient(ellipse 70% 120% at 100% 0%, rgba(59, 130, 255, 0.45), transparent 60%), linear-gradient(160deg, var(--blue-2), var(--navy-2));
  box-shadow: var(--shadow);
}
.cta-band__box::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(111, 214, 255, 0.12), transparent 50%); transition: opacity 0.3s; }
.cta-band__box:hover::before { opacity: 1; }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); max-width: 22ch; }
.cta-band p { color: var(--muted); margin: 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero pagine interne ---------- */
.page-hero { position: relative; margin-top: calc(-1 * var(--header-h)); padding: calc(var(--header-h) + clamp(56px, 9vw, 112px)) 0 clamp(48px, 7vw, 88px); overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.page-hero::before { content: ''; position: absolute; inset: -30% 40% auto -10%; height: 100%; background: radial-gradient(closest-side, rgba(31, 107, 255, 0.1), transparent); z-index: -1; }
.page-hero__inner { position: relative; max-width: 900px; margin-inline: auto; margin-left: max(var(--gutter), calc((100% - var(--container)) / 2)); }
.page-hero__title { font-size: clamp(2.2rem, 5vw, 4rem); margin-bottom: 20px; }
.page-hero__lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 44em; margin-bottom: 0; }
.page-hero .hero__actions { margin-top: 32px; }
.page-hero--image { margin-top: 0; padding-top: clamp(96px, 14vw, 180px); min-height: min(86vh, 760px); display: flex; align-items: flex-end; background: var(--bg); }
.page-hero--image::before { display: none; }
.page-hero__bg { position: absolute; inset: 0; z-index: -1; }
.page-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.page-hero__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 11, 18, 0.92) 0%, rgba(7, 11, 18, 0.6) 50%, rgba(7, 11, 18, 0.15) 100%), linear-gradient(0deg, rgba(7, 11, 18, 0.7) 0%, transparent 40%); }
.page-hero--image .page-hero__inner { max-width: 760px; }
@media (max-width: 700px) {
  .page-hero__bg::after { background: linear-gradient(0deg, var(--bg) 25%, rgba(7, 11, 18, 0.55) 100%); }
}

/* ---------- Chi siamo ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split__media { position: relative; border-radius: calc(var(--radius) + 4px); overflow: hidden; border: 1px solid var(--line); }
.split__media img:first-child { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split__logo { position: absolute; right: 20px; bottom: 20px; width: 88px; height: 88px; padding: 12px; border-radius: 50%; background: rgba(7, 11, 18, 0.7); backdrop-filter: blur(6px); }
.values { counter-reset: v; display: grid; gap: 28px; margin-top: 32px; }
.values li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.values__n { font: 500 0.9rem var(--font-mono); color: var(--accent-2); }
.values h3 { margin-bottom: 6px; }
.values p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- Servizi ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 40px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 0.88rem; text-decoration: none; transition: border-color 0.2s, color 0.2s, background-color 0.2s; }
.chip svg { width: 16px; height: 16px; color: var(--accent-2); }
.chip:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.service-list { display: grid; gap: clamp(20px, 3vw, 32px); }
.service-row { display: grid; grid-template-columns: 0.9fr 1.1fr; align-items: stretch; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); overflow: hidden; background: linear-gradient(160deg, var(--card-1, var(--navy-1)), var(--card-2, var(--navy-2))); box-shadow: var(--shadow-card); }
.service-row:nth-child(3n+2) { --card-1: var(--blue-1); --card-2: var(--blue-2); }
.service-row:nth-child(3n) { --card-1: var(--graphite-1); --card-2: var(--graphite-2); }
.service-row--rev { grid-template-columns: 1.1fr 0.9fr; }
.service-row--rev .service-row__media { order: 2; }
.service-row__media { display: grid; place-items: center; min-height: 260px; padding: 24px; background: #fff; }
.service-row__media img { max-height: 280px; width: auto; max-width: 100%; object-fit: contain; border-radius: 8px; }
.service-row__copy { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; }
.service-row__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.service-row__head .card__icon { margin: 0; }
.service-row__n { font: 500 0.82rem var(--font-mono); color: var(--dim); }
.service-row h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.service-row .lead { margin: 0; }
@media (max-width: 800px) {
  .service-row, .service-row--rev { grid-template-columns: 1fr; }
  .service-row--rev .service-row__media { order: 0; }
  .service-row__media { min-height: 200px; }
}

/* ---------- Checklist ---------- */
.checklist { display: grid; gap: 14px; margin-top: 24px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 1.05rem; }
.checklist svg { width: 22px; height: 22px; color: var(--accent-2); margin-top: 2px; }
.checklist--sm li { font-size: 0.95rem; color: var(--muted); }
.checklist--sm svg { width: 18px; height: 18px; }

/* ---------- Drilling Tech: piastra animata ---------- */
.flow { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-block: 1px solid var(--line); }
.flow__inner { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.plate { margin: 0; padding: 20px; border-radius: calc(var(--radius) + 4px); border: 1px solid var(--line); background: linear-gradient(160deg, var(--navy-1), var(--navy-2)); box-shadow: var(--shadow); }
.plate svg { width: 100%; height: auto; overflow: visible; }
.plate figcaption { margin-top: 12px; font: 500 0.78rem var(--font-mono); color: var(--dim); letter-spacing: 0.06em; }
.plate__sheet { fill: #1a2433; stroke: var(--line-strong); }
.plate__gridline { stroke: rgba(140, 170, 210, 0.08); stroke-width: 1; }
.plate__dims path { stroke: var(--dim); stroke-width: 1; fill: none; }
.plate__dims text, .plate__readout { fill: var(--muted); font: 11px var(--font-mono); letter-spacing: 0.06em; }
.plate__readout { fill: var(--accent-2); }
.plate__hole { fill: var(--bg); stroke: var(--accent-2); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; }
.plate__slot { fill: var(--bg); fill-opacity: 1; stroke: var(--accent-2); stroke-width: 1.5; }
.plate__spindle { color: var(--accent); }
.plate__spindle path { stroke: var(--accent-2); stroke-width: 1.2; }
.plate__spindle-ring { fill: rgba(59, 130, 255, 0.18); stroke: var(--accent); stroke-width: 1.5; }
.plate__spindle-dot { fill: #fff; }
@media (max-width: 900px) { .flow__inner { grid-template-columns: 1fr; } .plate { padding: 12px; } }

/* ---------- Drilling Tech: specifiche ---------- */
.specs-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.specs { position: sticky; top: calc(var(--header-h) + 24px); padding: clamp(24px, 3vw, 36px); border-radius: calc(var(--radius) + 4px); border: 1px solid var(--line); background: linear-gradient(160deg, var(--graphite-1), var(--graphite-2)); box-shadow: var(--shadow); }
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.spec-table th, .spec-table td { padding: 14px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table th { width: 42%; padding-right: 16px; font: 500 0.78rem/1.5 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--dim); }
.spec-table td { color: var(--text); }
.prose--tight p { color: var(--muted); }
.specs-layout .h-sm { margin-top: 40px; }
@media (max-width: 900px) { .specs-layout { grid-template-columns: 1fr; } .specs { position: static; } }
@media (max-width: 480px) { .spec-table th, .spec-table td { display: block; width: 100%; } .spec-table th { border-bottom: 0; padding-bottom: 2px; } }

/* ---------- Galleria + lightbox ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.gallery li { grid-column: span 4; }
.gallery li:nth-child(1), .gallery li:nth-child(2) { grid-column: span 6; }
.gallery a { display: block; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 3 / 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease), filter 0.3s; filter: saturate(0.9); }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.04); filter: saturate(1.1); }
.gallery li:last-child { grid-column: 1 / -1; }
.gallery li:last-child a { aspect-ratio: 3 / 1; }
@media (max-width: 700px) {
  .gallery li, .gallery li:nth-child(1), .gallery li:nth-child(2) { grid-column: span 6; }
  .gallery li:last-child { grid-column: 1 / -1; }
  .gallery li:last-child a { aspect-ratio: 2 / 1; }
}

.lightbox { width: min(96vw, 1400px); max-height: 92vh; padding: 0; border: 0; border-radius: var(--radius); background: #000; color: #fff; overflow: visible; }
.lightbox::backdrop { background: rgba(3, 6, 10, 0.88); backdrop-filter: blur(6px); }
.lightbox img { width: 100%; max-height: 92vh; object-fit: contain; border-radius: var(--radius); }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(7, 11, 18, 0.7); cursor: pointer; }
.lightbox__btn svg { width: 22px; height: 22px; }
.lightbox__btn:hover { background: var(--accent); }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; translate: 0 -50%; }
.lightbox__prev svg { transform: rotate(180deg); }
.lightbox__next { right: 12px; top: 50%; translate: 0 -50%; }

/* ---------- Video ---------- */
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.video { aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; }
.video__facade { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.video__facade img { width: 100%; height: 100%; object-fit: cover; opacity: 0.65; transition: opacity 0.3s, transform 0.6s var(--ease); }
.video__facade:hover img { opacity: 0.85; transform: scale(1.03); }
.video__play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 10px rgba(59, 130, 255, 0.25); transition: transform 0.3s var(--ease); }
.video__play svg { width: 24px; height: 24px; margin-left: 3px; color: #fff; }
.video__facade:hover .video__play { transform: scale(1.08); }
.video__label { position: absolute; left: 14px; bottom: 12px; font: 500 0.78rem var(--font-mono); color: #fff; }
@media (max-width: 800px) { .videos { grid-template-columns: 1fr; } }

/* ---------- Contatti e form ---------- */
.contact-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-layout--quote { align-items: center; }
.quote-img { margin-top: 32px; border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.contact-info { display: grid; gap: 12px; }
.info-card { display: grid; grid-template-columns: 48px 1fr; gap: 20px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, var(--card-1, var(--navy-1)), var(--card-2, var(--navy-2))); box-shadow: var(--shadow-card); }
.info-card:first-child { --card-1: var(--blue-1); --card-2: var(--blue-2); }
.info-card .card__icon { margin: 0; }
.info-card__label { font: 500 0.75rem/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin: 0 0 4px; }
.info-card p { margin: 0 0 12px; }
.info-card p:last-child { margin-bottom: 0; }
.info-card a { text-decoration: none; overflow-wrap: anywhere; }
.info-card > div, .contact-layout > * { min-width: 0; }
.form-panel { padding: clamp(24px, 4vw, 44px); border-radius: calc(var(--radius) + 4px); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.form-panel > h2 { font-size: 1.6rem; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }

.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.88rem; color: var(--muted); }
.field__opt { color: var(--dim); }
.field input[type='text'], .field input[type='email'], .field input[type='tel'], .field textarea {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--text);
  font: inherit; transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 107, 255, 0.2); background: #fff; }
.field [aria-invalid='true'] { border-color: var(--err); }
.field__error { color: var(--err); font-size: 0.82rem; min-height: 0; }
.field__error:empty { display: none; }
.field--check { grid-template-columns: 22px 1fr; align-items: start; column-gap: 12px; }
.field--check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.field--check label { font-size: 0.88rem; }
.field--check .field__error { grid-column: 2; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 6px; }
.form__status { margin: 0; font-size: 0.92rem; }
.form__status.is-ok { color: var(--ok); }
.form__status.is-error { color: var(--err); }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }

/* ---------- Testi lunghi (privacy, cookie) ---------- */
.prose { color: var(--muted); }
.prose h2 { font-size: 1.3rem; color: var(--text); margin-top: 2.2em; }
.prose ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.35em; }
.prose a { color: var(--accent-2); }
.prose strong { color: var(--text); }
.prose code { font-family: var(--font-mono); font-size: 0.9em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--navy-2); padding: 64px 0 28px; font-size: 0.92rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 0.8fr 1fr 1fr; gap: 40px; }
.site-footer__brand p { color: var(--muted); margin-top: 20px; max-width: 30ch; }
.site-footer__brand .brand img { width: 48px; height: 48px; }
.site-footer__title { font: 500 0.75rem var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; }
.site-footer__links { display: grid; gap: 10px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer__contact { display: grid; gap: 14px; color: var(--muted); }
.site-footer__contact li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; }
.site-footer__contact svg { width: 18px; height: 18px; color: var(--accent-2); margin-top: 3px; }
.site-footer__meta { display: grid; gap: 8px; color: var(--muted); word-break: break-word; }
.group-links { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.group-links__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.group-links__list a { position: relative; display: grid; gap: 4px; height: 100%; padding: 18px 44px 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; transition: border-color 0.2s, background-color 0.2s; }
.group-links__list a:hover { border-color: var(--line-strong); background: var(--hover-bg); }
.group-links__list strong { color: var(--text); font-weight: 600; }
.group-links__list span { color: var(--muted); font-size: 0.86rem; }
.group-links__list svg { position: absolute; top: 18px; right: 16px; width: 16px; height: 16px; color: var(--accent-2); }
@media (max-width: 800px) { .group-links__list { grid-template-columns: 1fr; } }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--dim); font-size: 0.84rem; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 20px; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---------- Selettore proposte (solo presentazione) ---------- */
.variant-switch { position: fixed; left: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; background: #0b1426; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5); font: 600 0.8rem var(--font-mono); }
.variant-switch__label { padding: 0 8px 0 10px; color: #b1bdd0; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; }
.variant-switch a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #eef3fa; text-decoration: none; }
.variant-switch a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.variant-switch a[aria-current] { background: #fff; color: #0b1426; }

/* ---------- Stati iniziali delle animazioni (solo con JS e movimento consentito) ---------- */
.motion [data-reveal], .motion [data-reveal-item], .motion [data-chain-step] { opacity: 0; }
.motion [data-hero-item] { opacity: 0; }
.motion .blueprint__guides, .motion .blueprint__glow { opacity: 0; }
.motion .plate__slot { fill-opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .marquee__track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .marquee__group[aria-hidden='true'] { display: none; }
  .marquee { mask-image: none; -webkit-mask-image: none; }
  .marquee__group { flex-wrap: wrap; justify-content: center; padding: 0 var(--gutter); }
}
