/* ==========================================================================
   PPXR — Meta Quest–inspired redesign
   ========================================================================== */

/* Inter (variable), self-hosted — no requests to third-party font servers */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-wght.woff2') format('woff2');
  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: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext-wght.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}

:root {
  --bg: #000000;
  --bg-alt: #0c0c10;
  --bg-alt-2: #111116;
  --card: #16161c;
  --text: #f5f5f7;
  --text-muted: #9a9aa2;
  --accent: #2e89ff;
  --accent-2: #8b5cf6;
  --gradient: linear-gradient(120deg, #2e89ff 0%, #8b5cf6 100%);
  --border: rgba(255, 255, 255, 0.09);
  --radius-pill: 999px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --max-width: 1240px;
  --nav-h: 76px;
  --peek: 200px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* keep anchored sections clear of the fixed nav */
[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1100;
  background: #fff;
  color: #000;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
}
.skip-link:focus { top: 16px; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------------------------------- */
/* Navigation                         */
/* ---------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0);
  border-bottom: 1px solid transparent;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
}

.nav.scrolled {
  background: rgba(6, 6, 8, 0.78);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.5px;
}

.brand img { height: 36px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  transition: color .2s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

/* home: links sit on the right, just before the CTA */
@media (min-width: 721px) {
  .nav-links-right { margin-left: auto; margin-right: 36px; }
}
.nav-links-right a { color: #fff; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0064e0;
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-cta:hover { transform: translateY(-1px); background: #0057c2; }

/* language switch (EN / IT), next to "Get in touch" like the region code on meta.com */
.lang-switch { position: relative; margin-right: 18px; }
.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-pill);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 7px 12px;
  cursor: pointer;
}
.lang-current svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-current:hover { border-color: rgba(255, 255, 255, 0.6); }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 160px;
  padding: 8px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}
/* invisible bridge so the menu stays open while the pointer moves down to it */
.lang-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.lang-switch:hover .lang-menu,
.lang-switch:focus-within .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .15s ease, transform .15s ease;
}
.lang-menu a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #1c2b33;
  font-size: 14px;
}
.lang-menu a:hover { background: #f0f2f5; }
.lang-menu a[aria-current] { font-weight: 700; }
.lang-menu a[aria-current]::after { content: '✓'; color: #0064e0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px; background: #fff; border-radius: 2px;
}

/* Dropdown mega menu (Meta.com style): full-width light panel, dark text */
@media (min-width: 721px) {
  .nav-inner, .nav-links { height: 100%; }
  .has-menu { height: 100%; display: flex; align-items: center; position: relative; }

  /* the list sits right under its nav link; ::before paints the full-width panel */
  .mega {
    position: absolute;
    top: 100%;
    left: 0;
    width: max-content;
    color: #1c2b33;
    isolation: isolate;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .has-menu:hover > .mega,
  .has-menu:focus-within > .mega {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  /* Works: the list ends under the end of its nav link and runs leftwards */
  .menu-right > .mega { left: auto; right: 0; text-align: right; }
  .menu-right .mega-links { align-items: flex-end; }
  .mega::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: -100vw;
    right: -100vw;
    background: #fff;
    border-top: 1px solid #e4e6eb;
    /* dim the page below the panel, but not the bar above it */
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45);
    clip-path: inset(0 -100vmax -100vmax -100vmax);
  }
  .mega-inner { padding: 32px 0 40px; }
  .mega-links { display: flex; flex-direction: column; gap: 18px; }
  .nav .mega-links a { color: #1c2b33; }
  .nav .mega-links a:hover,
  .nav .mega-links a:focus-visible { color: #1c2b33; text-decoration: underline; text-underline-offset: 5px; }
}

/* ---------------------------------- */
/* Buttons                            */
/* ---------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, opacity .2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { opacity: .88; }

.btn-blue { background: #0064e0; color: #fff; }
.btn-blue:hover { background: #0057c2; }

/* same size and colours as the nav "Get in touch" pill, swapped */
.btn-light-sm { background: #fff; color: #000; padding: 10px 22px; font-size: 14px; border: 0; }
.btn-light-sm:hover { opacity: .9; }
/* same size and colours as the nav "Get in touch" pill */
.btn-blue-sm { background: #0064e0; color: #fff; padding: 10px 22px; font-size: 14px; border: 0; }
.btn-blue-sm:hover { background: #0057c2; }

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}
.btn-outline:hover { background: rgba(255,255,255,0.08); }

.btn-gradient {
  background: var(--gradient);
  color: #fff;
}

.btn-row { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------------------------------- */
/* Hero                               */
/* ---------------------------------- */

.hero {
  position: relative;
  /* stop short of the fold so the next section peeks in */
  min-height: calc(100vh - var(--peek));
  min-height: calc(100svh - var(--peek));
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
  background: #000;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.video-toggle {
  position: absolute;
  right: 32px;
  bottom: 30px;
  z-index: 2;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.video-toggle[hidden] { display: none; }
.video-toggle:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.6); }
.video-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.video-toggle .icon-play { display: none; }
.video-toggle.is-paused .icon-play { display: block; }
.video-toggle.is-paused .icon-pause { display: none; }

/* video in place of a split image */
.media-video { position: relative; }
.media-video video {
  display: block;
  width: 100%;
  height: auto; /* the height="675" attribute would otherwise fix it at 675px */
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}
/* the Remote Assistance clip has black bars baked in: zoom past them inside the
   usual 16:9 frame (its picture is 2:1, so 16:9 needs 9/8 = 1.125x) */
.media-video.crop-bars {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.media-video.crop-bars video { transform: scale(1.125); border: 0; border-radius: 0; }
.media-video.crop-bars.is-fullscreen { border: 0; border-radius: 0; }
.media-video.crop-bars.is-fullscreen video { transform: none; }
.media-video .video-toggle { right: 16px; bottom: 16px; }
.media-video .fullscreen-toggle { right: 68px; }
.fullscreen-toggle svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fullscreen-toggle .icon-collapse,
.media-video.is-fullscreen .fullscreen-toggle .icon-expand { display: none; }
.media-video.is-fullscreen .fullscreen-toggle .icon-collapse { display: block; }

/* full screen: whole video letterboxed on black, controls stay on top */
.media-video.is-fullscreen {
  display: flex;
  align-items: center;
  background: #000;
}
.media-video.is-fullscreen video {
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  border: 0;
  border-radius: 0;
}
.media-video.is-fullscreen .video-toggle { right: 32px; bottom: 30px; }
.media-video.is-fullscreen .fullscreen-toggle { right: 88px; }

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.1) 35%, rgba(0,0,0,.2) 70%, rgba(0,0,0,.55) 100%),
              linear-gradient(90deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,.35) 45%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.tag.tag-blue { color: #0064e0; }
.eyebrow.grad,
.tag.grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
  text-shadow: 0 2px 24px rgba(0,0,0,.45);
}

.hero p.lead {
  font-size: clamp(17px, 2vw, 21px);
  color: rgba(255,255,255,.88);
  text-shadow: 0 1px 12px rgba(0,0,0,.6);
  max-width: 560px;
  margin-bottom: 36px;
  font-weight: 400;
}

/* ---------------------------------- */
/* Sections                           */
/* ---------------------------------- */

section { position: relative; }

.section {
  padding: 140px 0;
  border-top: 1px solid var(--border);
}
.section.alt { background: var(--bg-alt); }
.section.tight { padding: 90px 0; }
.section.tight.light { padding-top: 64px; }

/* white section: the home page alternates these with black ones.
   Redefining the colour tokens flips most components to dark-on-light. */
.section.light {
  --text: #111114;
  --text-muted: #5c5c66;
  --card: #f5f5f7;
  --bg-alt-2: #f5f5f7;
  --border: rgba(0, 0, 0, 0.08);
  background: #fff;
  color: var(--text);
}
.section.light,
.section.light + .section { border-top: 0; }
.section.light .card:hover { background: #ededf0; border-color: rgba(0,0,0,.14); }
.section.light .device-card:hover { border-color: rgba(0,0,0,.18); }
.section.light .btn-outline { color: var(--text); border-color: rgba(0,0,0,.25); }
.section.light .btn-outline:hover { background: rgba(0,0,0,.05); }
.section.light .cta-banner { background: #fff; }
.section.light .cta-banner::before { display: none; }
/* light section on a grey band: inputs and cards turn white to stay visible */
.section.light.alt { background: #f5f5f7; --bg-alt-2: #fff; --card: #fff; }
.section.light .btn-primary { background: #111114; color: #fff; }

/* Solutions: plain label matching the nav links, no pill */
#solutions .tag {
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: #000;
}

.section-head {
  max-width: 680px;
  margin: 0 auto 72px;
  text-align: center;
}
.section-head.left { margin: 0 0 64px; text-align: left; }

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  margin-bottom: 22px;
}

.section h2 {
  font-size: clamp(30px, 4.5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 18px;
}

.section p.desc {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.65;
}

/* feature split (image + text) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split.reverse .split-text { order: 1; }

.split-media img,
.split-media video {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: 100%;
}

.split-text .tag { margin-bottom: 20px; }
.split-text h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  line-height: 1.1;
}
.split-text p {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 14px;
}
.split-text p strong { color: var(--text); font-weight: 600; }

/* benefit list inside a split section */
.checklist {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}
.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  font-size: 15px;
  line-height: 1.55;
}
.checklist li::before {
  content: '✓';
  flex: none;
  font-weight: 800;
  color: var(--accent);
}

/* section heading with an action on the right */
.split-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 48px;
}
.split-head h2 { margin-bottom: 0; }

.work-details { margin-top: 64px; }

/* card grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
@media (max-width: 1199px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.2);
  background: #1a1a21;
}
.card .num {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1.5px;
  margin-bottom: 18px;
}
.card h3 {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.card p {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.65;
}

/* device grid */
.device-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: center;
  transition: transform .3s ease, border-color .3s ease;
}
.device-card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,.25); }
.device-card .img-wrap {
  aspect-ratio: 1/1;
  background: #0a0a0d;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.device-card img { width: 100%; height: 100%; object-fit: contain; }
.device-card .label {
  padding: 16px 12px 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

/* device banner: one row scrolling left in a loop (home, Hardware) */
.marquee {
  overflow: hidden;
  /* fade the cards in and out at the screen edges */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  margin: 0 auto;
}
.marquee-track .device-card { flex: none; width: 290px; }
.marquee-track .device-card:hover { transform: none; }
/* main.js adds .is-looping once the cards are duplicated: the track is then
   two identical halves, so sliding by half its width loops seamlessly */
.marquee.is-looping .marquee-track {
  margin: 0;
  padding-left: 20px;
  animation: marquee-left 50s linear infinite;
}
.marquee.is-looping:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-left {
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee.is-looping .marquee-track { animation: none; }
}

/* gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px;
  background: linear-gradient(0deg, rgba(0,0,0,.85), transparent);
  font-size: 13px; font-weight: 600; letter-spacing: .5px;
}

/* works gallery (home): one card per project, Meta "Success Stories" style */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.story-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.story-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.story-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 24px 28px;
}
.story-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.story-card h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.story-card p {
  flex: 1;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 22px;
}

/* ---------------------------------- */
/* Work story pages (work-*.html)     */
/* Meta "success story" layout        */
/* ---------------------------------- */

.story-hero {
  padding: calc(var(--nav-h) + 72px) 0 80px;
  background:
    radial-gradient(80% 100% at 20% 0%, rgba(46,137,255,0.14), transparent 60%),
    radial-gradient(60% 80% at 90% 10%, rgba(139,92,246,0.14), transparent 60%),
    #000;
}
.story-hero .split { align-items: center; }
.story-hero .tag { margin-bottom: 20px; }
.story-hero h1 {
  font-size: clamp(36px, 5.2vw, 64px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 20px;
}
.story-hero .lead {
  color: var(--text-muted);
  font-size: 19px;
  line-height: 1.6;
  max-width: 520px;
  margin-bottom: 32px;
}
.story-hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.story-hero-media video {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* key facts strip under the hero */
.story-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.story-fact {
  padding: 36px 28px;
  border-left: 1px solid var(--border);
}
.story-fact:first-child { border-left: 0; padding-left: 0; }
.story-fact .label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.story-fact .value {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
}

/* narrative: "The project / The solution / …" */
.story-body {
  max-width: 780px;
  margin: 0 auto;
}
.story-body section + section { margin-top: 64px; }
.story-body h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.story-body p {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.75;
  margin-bottom: 16px;
}
.story-body p strong { color: var(--text); font-weight: 600; }
.story-body .grid-2 { margin-top: 28px; }
.story-figure {
  margin: 72px auto 0;
  max-width: 1040px;
}
.story-figure img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.story-figure-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.story-figure-pair img { aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 720px) { .story-figure-pair { grid-template-columns: 1fr; } }

/* light theme, like Meta's success-story pages. Redefining the colour tokens
   flips text, cards and borders to dark-on-light; the footer stays dark. */
.light-page { background: #fff; }
.light-page main,
.light-page .story-hero {
  --text: #111114;
  --text-muted: #5c5c66;
  --card: #f5f5f7;
  --bg-alt: #f5f5f7;
  --border: rgba(0, 0, 0, 0.08);
  color: var(--text);
}
.light-page .story-hero {
  background:
    radial-gradient(80% 100% at 20% 0%, rgba(46,137,255,0.10), transparent 60%),
    radial-gradient(60% 80% at 90% 10%, rgba(139,92,246,0.10), transparent 60%),
    #fff;
}
.light-page .section.alt .card,
.light-page .section.alt .story-card { background: #fff; }
.light-page .card:hover { background: #fff; border-color: rgba(0, 0, 0, 0.16); }
/* the white "Learn more" pill would vanish on white: dark pill instead */
.light-page .btn-light-sm { background: #1c2b33; color: #fff; }

/* the header bar stays dark on light pages too: always the solid "scrolled" look */
.light-page .nav {
  background: rgba(6, 6, 8, 0.92);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

/* "More real projects" stays dark like the home Works Gallery */
.light-page main .story-dark {
  --text: #f5f5f7;
  --text-muted: #9a9aa2;
  --card: #16161c;
  --border: rgba(255, 255, 255, 0.09);
  background: #000;
  color: var(--text);
}
.light-page main .story-dark .story-card { background: var(--card); }
.light-page main .story-dark .btn-light-sm { background: #fff; color: #000; }
.light-page main .story-more + .story-dark { padding-top: 110px; }

/* ---------------------------------- */
/* Device technical pages             */
/* (device-*.html, Meta "compare")    */
/* ---------------------------------- */

.spec-hero {
  padding: calc(var(--nav-h) + 72px) 0 48px;
  text-align: center;
}
.spec-hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.spec-hero .lead {
  color: var(--text-muted);
  font-size: 19px;
  max-width: 560px;
  margin: 0 auto;
}

/* product card: image on a dark panel, name, device code, actions */
.spec-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  max-width: 1040px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.spec-card-media {
  background: #0a0a0d;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.spec-card-media img { width: 100%; max-width: 420px; }
.spec-card-body {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.spec-card-body h2 {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.spec-meta { margin-bottom: 32px; }
.spec-meta div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.spec-meta dt { color: var(--text-muted); font-size: 14px; }
.spec-meta dd { font-size: 15px; font-weight: 600; }
.btn-outline-sm {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(0, 0, 0, 0.25);
  padding: 9px 21px;
  font-size: 14px;
}
.btn-outline-sm:hover { background: rgba(0, 0, 0, 0.05); }

/* spec list: category on the left, label / value rows on the right */
.spec-table { padding: 96px 0 140px; }
.spec-title {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.02em;
  max-width: 1040px;
  margin: 0 auto 32px;
}
.spec-group {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.spec-group h3 { font-size: 20px; font-weight: 600; }
.spec-group dl div {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.spec-group dl div:first-child { padding-top: 2px; }
.spec-group dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.spec-group dt { color: var(--text-muted); font-size: 15px; }
.spec-group dd { font-size: 16px; line-height: 1.55; }
.spec-note { color: var(--text-muted); font-size: 13px; }
.spec-yes::before { content: '✓ '; color: #1a7f37; font-weight: 700; }
.spec-no { color: var(--text-muted); }
.spec-no::before { content: '✕ '; }

@media (max-width: 860px) {
  .spec-card { grid-template-columns: 1fr; }
  .spec-card-body { padding: 32px 24px; }
  .spec-group { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 560px) {
  .spec-group dl div { grid-template-columns: 1fr; gap: 4px; }
}

/* device cards in the Hardware banner that open a technical page */
a.device-card { display: block; color: inherit; }
a.device-card .label::after { content: ' →'; color: var(--accent); }
a.device-card:hover { border-color: var(--accent); }

/* "Solutions used" and "More works" blocks at the bottom */
.story-more .section-head { margin-bottom: 40px; }
.story-more + .story-more { padding-top: 0; }
.story-more .grid-3 .story-card h3 { font-size: 20px; }
.story-grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 980px) {
  .story-grid { grid-template-columns: 1fr 1fr; }
  .story-facts { grid-template-columns: 1fr 1fr; }
  .story-fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .story-fact:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 720px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-facts { grid-template-columns: 1fr; }
  .story-fact { border-left: 0; padding-left: 0; }
  .story-fact + .story-fact { border-top: 1px solid var(--border); }
}

/* solutions overview (home) */
.solution-card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
}
.solution-card h3 { font-size: 20px; }
.solution-card p { flex: 1; }
.solution-card .more {
  margin-top: 22px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.solution-card:hover .more { color: var(--accent); }

/* team */
.team-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.team-card .role {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.team-card h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 16px; }
.team-photo {
  display: block;
  width: 200px;
  height: 200px;
  border-radius: var(--radius-md);
  object-fit: cover;
  object-position: 50% 30%;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.team-card p { color: var(--text-muted); font-size: 15px; line-height: 1.7; }

/* contact */
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.contact-card .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: #fff;
}
.contact-card .icon svg { width: 22px; height: 22px; }
.contact-card h3 { font-size: 18px; margin-bottom: 8px; }
.contact-card p, .contact-card a { color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.contact-card a:hover { color: var(--text); }
.contact-card p + a { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; }

.form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}
.form .btn { justify-self: start; margin-top: 6px; }
.form .form-note { color: var(--text-muted); font-size: 13.5px; line-height: 1.6; }
.form .form-status {
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(46,137,255,.4);
  background: rgba(46,137,255,.08);
}
.form .form-status a { color: var(--accent); font-weight: 600; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form input, .form textarea {
  width: 100%;
  background: var(--bg-alt-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color .2s ease;
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,137,255,.25);
}
.form textarea { resize: vertical; min-height: 140px; }

/* CTA banner */
.cta-banner {
  border-radius: 32px;
  padding: 90px 60px;
  text-align: center;
  background: radial-gradient(120% 140% at 50% 0%, #1a1230 0%, #000 60%);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: var(--gradient);
  filter: blur(140px);
  opacity: 0.25;
  top: -200px; left: 50%;
  transform: translateX(-50%);
}
.cta-banner h2 { position: relative; margin-bottom: 18px; }
.cta-banner p { position: relative; color: var(--text-muted); font-size: 18px; margin-bottom: 36px; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-banner .btn-row { position: relative; justify-content: center; }
.cta-banner h2 + .btn-row { margin-top: 64px; }
/* banner without the gradient glow (About, Work with us) */
.cta-banner.cta-plain { background: transparent; }
.cta-banner.cta-plain::before { display: none; }

/* ---------------------------------- */
/* Full-screen sections (home, about) */
/* ---------------------------------- */

/* every section fills the screen like the hero, leaving the next one peeking in */
html:has(main.screens) { scroll-snap-type: y proximity; }
.hero,
main.screens > .section { scroll-snap-align: start; }

/* About and other pages: the page header is the first "screen", like the home hero */
.page-hero:has(+ main.screens) {
  min-height: calc(100vh - var(--peek));
  min-height: calc(100svh - var(--peek));
  display: flex;
  align-items: center;
  scroll-snap-align: start;
}
.page-hero:has(+ main.screens) > .wrap { width: 100%; }

main.screens > .section,
main.screens > .section.tight {
  min-height: calc(100vh - var(--peek));
  min-height: calc(100svh - var(--peek));
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* the fixed nav covers the top of a section snapped to the top of the screen */
  padding: calc(var(--nav-h) + 48px) 0 64px;
}
main.screens > .section > .wrap { width: 100%; }

/* Solutions: heading pinned to the top so half of it shows under the hero;
   the cards stretch to fill the rest of the screen */
main.screens > #solutions { justify-content: flex-start; padding-bottom: 40px; }
/* Digital Twins, Staff Training, Assembly, Virtual Meetings: heading centred at the top so it
   peeks in under the previous section, like Solutions under the hero */
main.screens > :is(#know-how, #training, #assembly, #remote-assistance, #virtual-meetings) { justify-content: flex-start; }
#solutions > .wrap { flex: 1; display: flex; flex-direction: column; }
#solutions .grid-5 { flex: 1; }
main.screens > .section[id] { scroll-margin-top: 0; }

/* larger type and spacing to use the extra room */
@media (min-width: 981px) {
  main.screens .section h2 { font-size: clamp(36px, 4.4vw, 60px); }
  main.screens .section-head { max-width: 820px; margin-bottom: 64px; }
  main.screens .section p.desc { font-size: 20px; }

  main.screens .split { gap: 96px; }
  /* About, How we work: photo 1/4 larger than the usual half column */
  main.screens #how-we-work > .wrap { max-width: 1480px; }
  #how-we-work .split { grid-template-columns: 1.1fr 1fr; }
  main.screens .split-text h2 { font-size: clamp(32px, 3.6vw, 50px); margin-bottom: 24px; }
  main.screens .split-text p { font-size: 19.5px; }
  main.screens .checklist li { font-size: 16.5px; padding: 20px 24px; }

  main.screens .solution-card { padding: 30px 26px; min-height: 340px; }
  main.screens .solution-card h3 { font-size: 22px; }
  main.screens .solution-card p { font-size: 15px; line-height: 1.6; }
  /* five cards: give the row more width and keep the heading close */
  main.screens #solutions > .wrap { max-width: 1480px; }
  main.screens #solutions .section-head { margin-bottom: 36px; }
  main.screens #devices .section-head { margin-bottom: 44px; }
  main.screens #works-gallery .section-head { max-width: none; margin-bottom: 40px; }
  main.screens :is(#know-how, #training, #assembly, #remote-assistance, #virtual-meetings) .section-head { max-width: none; margin-bottom: 48px; }
  main.screens :is(#know-how, #training, #assembly, #remote-assistance, #virtual-meetings) .section-head h2 { font-size: clamp(36px, 3.6vw, 52px); }
  /* Remote Assistance also has a checklist: keep it compact so the section fits one screen */
  main.screens #remote-assistance .checklist { gap: 8px; margin-top: 16px; }
  main.screens #remote-assistance .section-head { margin-bottom: 28px; }
  main.screens #remote-assistance .split-text p { font-size: 18px; margin-bottom: 0; }
  main.screens #remote-assistance .checklist li { padding: 12px 18px; font-size: 15px; }
  main.screens #works-gallery .story-card-body { padding: 22px 24px 24px; }
  main.screens .solution-card .more { font-size: 15px; }

  main.screens .device-card .label { font-size: 15.5px; }
  main.screens .gallery-grid { gap: 24px; }

  main.screens .cta-banner { padding: 120px 80px; }
  main.screens .cta-banner p { font-size: 20px; max-width: 640px; }
}

/* page header (non-home pages) */
.page-hero {
  padding: calc(var(--nav-h) + 90px) 0 90px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(80% 100% at 20% 0%, rgba(46,137,255,0.14), transparent 60%),
    radial-gradient(60% 80% at 90% 10%, rgba(139,92,246,0.14), transparent 60%),
    #000;
}
.page-hero .tag { margin-bottom: 22px; }
.page-hero h1.page-hero-small { font-size: 18px; line-height: 1.6; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
/* Contacts header: black-background logo on the left, as tall as the text block on the right */
.contact-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-hero-logo { position: relative; }
.contact-hero-logo img {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  /* a bit taller than the text block beside it, centred on it */
  height: 113.33%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}
@media (max-width: 720px) {
  .contact-hero { grid-template-columns: 1fr; gap: 28px; }
  .contact-hero-logo img { position: static; transform: none; width: 66.67%; height: auto; max-width: 280px; }
}
.page-hero p.lead a:hover { color: var(--text); }
.page-hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  max-width: 820px;
  margin-bottom: 20px;
}
.page-hero p.lead {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 620px;
}

/* works entries */
.work-entry {
  padding: 90px 0;
  border-top: 1px solid var(--border);
}
.work-entry:first-of-type { border-top: none; }
.work-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.work-index {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* footer */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 80px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--border);
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; margin-bottom: 16px; }
.footer-brand img { height: 32px; width: auto; }
.footer-top p { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; max-width: 320px; }
.footer-col .footer-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 14px;
  opacity: .85;
  transition: opacity .2s ease;
}
.footer-col a:hover { opacity: 1; color: var(--accent); }
.footer-col .footer-vat { color: var(--text); font-size: 15px; opacity: .85; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom p { color: var(--text-muted); font-size: 13px; text-align: center; }
.footer-legal { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-legal a { color: var(--text-muted); font-size: 13px; }
.footer-legal a:hover { color: var(--text); }

/* reveal animation — only when JS is running, so content is never stuck hidden */
.js .reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
.js .reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------- */
/* Responsive                         */
/* ---------------------------------- */

@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse .split-media { order: 1; }
  .split.reverse .split-text { order: 2; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-5 { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
  .nav-links { position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: #050507; flex-direction: column; padding: 40px 32px; gap: 28px;
    align-items: flex-start; transform: translateX(100%); visibility: hidden;
    transition: transform .3s ease, visibility 0s linear .3s; }
  .nav-links.open { transform: translateX(0); visibility: visible; transition: transform .3s ease; }
  .nav-links a { font-size: 18px; }
  .nav-links { overflow-y: auto; }
  /* mobile: submenu links listed under their parent, no panel */
  .mega-links { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; padding-left: 16px; }
  .nav-links .mega-links a { font-size: 15px; }
  .nav-cta { display: none; }
  .lang-switch { margin-left: auto; margin-right: 12px; }
  .nav-toggle { display: flex; }
  .section { padding: 90px 0; }
  :root { --peek: 140px; }
  .grid-3, .grid-4, .grid-5, .form-row, .gallery-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .cta-banner { padding: 60px 28px; }
  .hero .video-toggle { right: 20px; bottom: 24px; }
  .footer-bottom { flex-direction: column; align-items: center; }
}
