/* Self-hosted fonts */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/archivo-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/archivo-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/archivo-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Michroma"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/michroma-latin-400-normal.woff2") format("woff2"); }

/* ==========================================================================
   Unitronics USA — site styles
   Dark, clean, tech. Mobile-first.
   ========================================================================== */

@view-transition { navigation: auto; }

:root {
  --bg: #050608;
  --bg-2: #0a0c10;
  --surface: #0f1217;
  --surface-2: #151922;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f4f8;
  --muted: #9aa3b2;
  --faint: #5d6574;
  --accent: #1f8bff;
  --accent-2: #7b61ff;
  --accent-glow: rgba(31, 139, 255, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-logo: "Michroma", "Exo 2", system-ui, sans-serif;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::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-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

::selection { background: var(--accent); color: #000; }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--accent); color: #000; padding: 10px 16px; border-radius: 10px;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* Subtle grain + grid backdrop -------------------------------------------- */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--bg);
}

/* Layout ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.section--tight { padding: clamp(56px, 8vw, 96px) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.eyebrow::before {
  content: ""; width: 24px; height: 1px; background: currentColor;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(34px, 6.4vw, 84px); }
h2 { font-size: clamp(26px, 3.8vw, 48px); }
h3 { font-size: clamp(16px, 1.5vw, 19px); letter-spacing: 0.03em; }

p { margin: 0; color: var(--muted); text-wrap: pretty; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: #c3cad6; max-width: 60ch; }

.gradient-text { color: var(--accent); }

.section-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  transform: translateZ(0);
  background: rgba(5, 6, 8, 0);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header.is-scrolled { background: rgba(5, 6, 8, 0.92); border-color: var(--line); }

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

.brand { display: inline-flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--font-logo); font-size: 17px; letter-spacing: 0.08em; white-space: nowrap;
}
.brand__sub {
  font-size: 8.5px; letter-spacing: 0.3em; color: var(--muted);
  align-self: flex-end; margin-top: 4px;
}

.nav__links { display: none; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: block; padding: 10px 14px; border-radius: 999px;
  font-size: 14px; color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav__links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav__links a[aria-current="page"] { color: var(--text); }
.nav__links a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; width: 14px; margin: 4px auto 0;
  border-radius: 2px; background: var(--accent);
}

.nav .nav__cta { display: none; }

.nav__toggle {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line);
  display: grid; place-items: center; cursor: pointer;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  display: block; width: 18px; height: 1.5px; background: var(--text); border-radius: 2px;
  transition: transform 0.35s var(--ease), background 0.2s;
  position: relative;
}
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 0; }
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }
.nav-open .nav__toggle span { background: transparent; }
.nav-open .nav__toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav__toggle span::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(5, 6, 8, 0.96);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0.3s;
  overflow-y: auto;
}
.nav-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu a.mobile-menu__link {
  font-family: var(--font-display); font-size: 24px; padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  transform: translateY(12px); opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), color 0.2s;
}
.mobile-menu a.mobile-menu__link[aria-current="page"] { color: var(--accent); }
.nav-open .mobile-menu a.mobile-menu__link { transform: none; opacity: 1; }
.mobile-menu__contact { margin-top: auto; padding-top: 24px; display: grid; gap: 10px; }
.mobile-menu__contact a { color: var(--muted); font-size: 15px; }

@media (min-width: 960px) {
  .nav__links { display: flex; }
  .nav .nav__cta { display: inline-flex; }
  .nav__toggle, .mobile-menu { display: none; }
}

/* Buttons ----------------------------------------------------------------- */
.btn {
  --btn-bg: var(--text); --btn-fg: #000;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: 15px; letter-spacing: 0.01em;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  will-change: transform;
}
.btn:hover { --btn-bg: #fff; }
.btn--accent:hover { --btn-bg: #4da3ff; }
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--accent { --btn-bg: var(--accent); --btn-fg: #001018; }
.btn--ghost {
  --btn-bg: rgba(255,255,255,0.04); --btn-fg: var(--text);
  border-color: var(--line-strong);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.btn--ghost:hover { --btn-bg: rgba(255,255,255,0.08); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 14px; }

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

/* Hero -------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; align-items: end;
  padding: calc(var(--header-h) + 24px) 0 clamp(40px, 8vh, 96px);
  overflow: hidden;
  isolation: isolate;
}
.hero--page { min-height: 88svh; }

.hero__canvas {
  position: absolute; inset: 0; z-index: -1;
  touch-action: pan-y;
}
.hero__canvas canvas { width: 100% !important; height: 100% !important; cursor: grab; }
.hero__canvas canvas:active { cursor: grabbing; }
.hero__canvas::after {
  /* keep text readable over the model */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(5,6,8,0.6) 28%, transparent 60%),
    linear-gradient(to right, rgba(5,6,8,0.55), transparent 55%);
}

@media (max-width: 700px) {
  .hero, .hero--page { min-height: 0; padding-top: calc(var(--header-h) + min(92vw, 440px)); align-items: start; }
  .hero__canvas { bottom: auto; height: calc(var(--header-h) + min(100vw, 480px)); }
  .hero__canvas::after { background: linear-gradient(to top, var(--bg) 0%, transparent 35%); }
}
.hero__content { display: grid; gap: 24px; max-width: 780px; position: relative; }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span { display: inline-block; }

.hero__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  margin-top: 12px; font-size: 13px; color: var(--faint);
}
.hint {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint);
}
.hint i {
  width: 18px; height: 28px; border: 1.5px solid var(--faint); border-radius: 10px; position: relative;
}
.hint i::after {
  content: ""; position: absolute; left: 50%; top: 5px; width: 2px; height: 6px; margin-left: -1px;
  background: var(--accent); border-radius: 2px; animation: scrollHint 1.8s infinite var(--ease);
}
@keyframes scrollHint { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

.canvas-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--bg);
}

.loader {
  position: absolute; right: var(--gutter); top: calc(var(--header-h) + 16px);
  font-size: 11px; letter-spacing: 0.2em; color: var(--faint); text-transform: uppercase;
  transition: opacity 0.6s;
}
.is-ready .loader { opacity: 0; }

/* Cards ------------------------------------------------------------------- */
.grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 700px) and (max-width: 1023px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }

.card {
  position: relative; overflow: hidden;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  display: grid; gap: 14px; align-content: start;
  transition: border-color 0.3s, transform 0.5s var(--ease);
  transform-style: preserve-3d;
}
.card:hover { border-color: var(--line-strong); }
.card p { font-size: 15px; }

.card__icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(31, 139, 255, 0.08);
  border: 1px solid rgba(31, 139, 255, 0.25);
  color: var(--accent);
  margin-bottom: 8px;
}
.card__icon svg { width: 22px; height: 22px; }

.card__num {
  font-family: var(--font-display); font-size: 12px; color: var(--faint); letter-spacing: 0.1em;
}

.card__link {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); font-size: 14px; font-weight: 600;
}
.card__link svg { width: 14px; height: 14px; transition: transform 0.25s var(--ease); }
.card:hover .card__link svg { transform: translateX(4px); }

.card--link { cursor: pointer; }

/* Split feature ----------------------------------------------------------- */
.split { display: grid; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; } .split--rev > :first-child { order: 2; } }

.stage {
  position: relative; aspect-ratio: 1 / 1; width: 100%;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 40%, #121722, #07080b 70%);
  touch-action: pan-y;
}
.stage canvas { width: 100% !important; height: 100% !important; cursor: grab; }
.stage__label {
  position: absolute; left: 16px; bottom: 14px; font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--faint); pointer-events: none;
}

.checklist { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 14px; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: #c3cad6; }
.checklist li::before {
  content: ""; width: 22px; height: 22px; border-radius: 50%; margin-top: 2px;
  background: rgba(31,139,255,0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f8bff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
  border: 1px solid rgba(31,139,255,0.3);
}

/* Process / timeline ------------------------------------------------------ */
.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step {
  padding: 28px 24px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); display: grid; gap: 10px; position: relative;
}
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-display); font-size: 13px; color: var(--accent);
}

/* Signage band ------------------------------------------------------------ */
.band {
  position: relative; overflow: hidden;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--line-strong);
  padding: clamp(32px, 6vw, 72px);
  background: var(--surface);
  display: grid; gap: 24px; align-items: center;
}
@media (min-width: 900px) { .band { grid-template-columns: 1.4fr auto; } }
.band h2 { font-size: clamp(22px, 3vw, 38px); }
.band__domain { color: var(--accent); word-break: break-word; }

/* Contact ----------------------------------------------------------------- */
.contact-cards { display: grid; gap: 16px; }
@media (min-width: 760px) { .contact-cards { grid-template-columns: repeat(3, 1fr); } }

.contact-card {
  display: grid; gap: 6px; padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color 0.25s, transform 0.4s var(--ease), background 0.25s;
}
.contact-card:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-3px); }
.contact-card__label { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
.contact-card__value {
  font-family: var(--font-display); font-size: clamp(15px, 1.6vw, 19px); color: var(--text);
  word-break: break-word;
}
.contact-card__who { font-size: 14px; color: var(--muted); }
.contact-card .card__icon { margin-bottom: 12px; }

.form { display: grid; gap: 16px; }
@media (min-width: 700px) { .form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } }
.field { display: grid; gap: 8px; margin-bottom: 0; }
@media (max-width: 699px) { .form__row { display: grid; gap: 16px; } }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 50px; padding: 12px 16px;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
}
.form__note { font-size: 13px; color: var(--faint); }

/* Footer ------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
}
.footer__grid { display: grid; gap: 40px; }
@media (min-width: 860px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer__title { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__list a { color: var(--muted); font-size: 15px; transition: color 0.2s; }
.footer__list a:hover { color: var(--text); }
.footer__bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--faint);
}
.footer__tag { margin-top: 14px; font-size: 13px; letter-spacing: 0.2em; color: var(--faint); text-transform: uppercase; }

/* Floating quick-contact -------------------------------------------------- */
.fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 80;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #001018;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  transition: transform 0.3s var(--ease);
}
.fab:hover { transform: scale(1.06); }
.fab svg { width: 24px; height: 24px; }
@media (min-width: 960px) { .fab { right: 28px; bottom: 28px; } }

/* Reveal on scroll -------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

.no-js .reveal { opacity: 1; transform: none; }

/* Progress bar ------------------------------------------------------------ */
.progress {
  position: fixed; left: 0; top: 0; height: 2px; z-index: 110; width: 100%;
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: var(--accent);
}

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

/* 3D model window at the top of a card ------------------------------------ */
.card { --pad: clamp(24px, 3vw, 36px); padding: var(--pad); }
.card__stage {
  position: relative; aspect-ratio: 4 / 3;
  margin: calc(var(--pad) * -1) calc(var(--pad) * -1) 10px;
  border-bottom: 1px solid var(--line);
  background: #0f1217; overflow: hidden;
  touch-action: pan-y; cursor: grab;
}
.card__stage canvas, .stage canvas, .service__stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.card__stage::after {
  content: "Drag · tap"; position: absolute; right: 12px; bottom: 10px;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); pointer-events: none;
}

/* Solutions: service rows with a large model */
.service { display: grid; gap: clamp(20px, 4vw, 56px); align-items: center; padding: clamp(20px, 3vw, 32px); }
@media (min-width: 900px) { .service { grid-template-columns: 1.1fr 1fr; } .service--rev .service__stage { order: 2; } }
.service__stage {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden;
  background: #0f1217; border: 1px solid var(--line); touch-action: pan-y; cursor: grab;
}
.service__body { display: grid; gap: 14px; }

/* Showreel: pinned while you scroll, growing from a card to full screen --- */
.reel-scroll { position: relative; height: 230vh; --p: 0; }
.reel-scroll__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; place-items: center; overflow: hidden;
}
.reel-scroll__frame {
  --w0: min(calc(100vw - 2 * var(--gutter)), var(--max));
  --h0: calc(var(--w0) * 9 / 16);
  position: relative; overflow: hidden; background: #050608;
  width: calc(var(--w0) + (100vw - var(--w0)) * var(--p));
  height: calc(var(--h0) + (100svh - var(--h0)) * var(--p));
  border-radius: calc(var(--radius) * (1 - var(--p)));
  border: 1px solid rgba(255, 255, 255, calc(0.08 * (1 - var(--p))));
  will-change: width, height;
}
.reel__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-scroll__caption {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 8vh;
  display: grid; gap: 12px; justify-items: center; text-align: center; pointer-events: none;
  opacity: calc(1 - var(--p) * 2.5); transform: translateY(calc(var(--p) * 40px));
}
.reel-scroll__caption h2 { text-shadow: 0 2px 24px rgba(0, 0, 0, 0.8); }
@media (max-width: 700px) {
  .reel-scroll__frame {
    --w0: calc(100vw - 2 * var(--gutter));
    --h0: min(calc(var(--w0) * 16 / 9), 78svh);
  }
}





/* Intro: chip boot sequence on arrival / reload --------------------------- */
.intro {
  position: fixed; inset: 0; z-index: 1000; overflow: hidden; cursor: pointer;
  background-color: #050608;
}
.intro::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.85) 100%);
}
.intro__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro__stage, .intro__chip { transform-box: view-box; transform-origin: 50% 50%; }
.intro__chip { transform-box: fill-box; }
.intro.is-leaving { animation: introOut 0.9s cubic-bezier(0.7, 0, 0.3, 1) forwards; }
.intro.is-leaving .intro__stage { animation: introZoom 0.9s cubic-bezier(0.7, 0, 0.3, 1) forwards; }
.intro.is-leaving-fast { animation: introOut 0.35s ease forwards; }
@keyframes introOut { 0%, 45% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes introZoom { to { transform: scale(3.2); } }
.intro__skip {
  position: absolute; right: 20px; bottom: 20px; z-index: 1;
  background: rgba(255,255,255,0.06); color: #9aa3b2; border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px; padding: 8px 16px; font: 500 13px var(--font-body); cursor: pointer;
}
.intro__skip:hover { color: #fff; }
.intro-on body { overflow: hidden; }

/* Blue aura + smoke trail (drawn by assets/js/aura.js) */
.smoke { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }

/* ==========================================================================
   Liquid glass boxes
   ========================================================================== */
.card, .contact-card, .step {
  position: relative;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.085) 0%, rgba(255, 255, 255, 0.02) 42%, rgba(255, 255, 255, 0.035) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(24px) saturate(175%);
  backdrop-filter: blur(24px) saturate(175%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    inset 1px 0 0 rgba(255, 255, 255, 0.07),
    0 1px 1px rgba(0, 0, 0, 0.3),
    0 24px 60px -28px rgba(0, 0, 0, 0.75);
}
/* Refracted rim: bright top-left edge fading to a cool blue bottom-right. */
.card::after, .contact-card::after, .step::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.08) 28%, rgba(255, 255, 255, 0) 55%, rgba(31, 139, 255, 0.35) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
/* Specular sheen that follows the pointer. */
.card::before, .contact-card::before, .step::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: radial-gradient(380px circle at var(--mx, 30%) var(--my, 0%), rgba(255, 255, 255, 0.1), transparent 45%);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.step::before { content: counter(step, decimal-leading-zero); position: static; background: none; opacity: 1; z-index: auto; }
.card:hover::before, .contact-card:hover::before { opacity: 1; }
.card:hover, .contact-card:hover { border-color: rgba(255, 255, 255, 0.18); }
.card > *, .contact-card > * { position: relative; z-index: 2; }
.card__stage { z-index: 0 !important; }

/* Glass icon tiles */
.card__icon {
  width: 52px; height: 52px; border-radius: 16px;
  color: #b3d4ff;
  background: linear-gradient(145deg, rgba(31, 139, 255, 0.22), rgba(31, 139, 255, 0.05));
  border: 1px solid rgba(31, 139, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -8px 16px rgba(0, 0, 0, 0.25), 0 8px 24px -10px rgba(31, 139, 255, 0.5);
}
.card__icon svg { width: 24px; height: 24px; }

.loader.is-error { opacity: 1 !important; color: #ffb3b3; text-transform: none; letter-spacing: 0.02em; max-width: 60vw; text-align: right; }

/* Legal page */
.legal__wrap { max-width: 900px; }
.legal__list { display: grid; gap: 16px; }
.legal__item h2 { font-size: clamp(17px, 2vw, 22px); }
.legal__item p { font-size: 15px; }
.legal__item a { color: var(--accent); }
.legal__item strong { color: var(--text); font-weight: 600; }
.legal__date { color: var(--faint); font-size: 13px; }
.footer__bottom a { color: var(--muted); }
.footer__bottom a:hover { color: var(--text); }

/* ==========================================================================
   Phone layout
   ========================================================================== */
.swipe-hint { display: none; }
@media (max-width: 700px) {
  .section { padding: 56px 0; }
  .section--tight { padding: 36px 0; }
  .section-head { margin-bottom: 26px; gap: 12px; }
  .hero__content { gap: 18px; }

  /* Services: one card at a time, swipe sideways */
  .grid--services {
    display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 14px;
  }
  .grid--services::-webkit-scrollbar { display: none; }
  .grid--services > .card { flex: 0 0 86%; scroll-snap-align: center; }
  .grid--services .card__stage { touch-action: auto; }
  .swipe-hint { display: block; margin-top: 6px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); text-align: center; }

  /* "Built on precision": two by two */
  .grid--4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid--4 .card { --pad: 16px; gap: 8px; }
  .grid--4 .card h3 { font-size: 13px; }
  .grid--4 .card p { font-size: 12.5px; line-height: 1.5; }
  .grid--4 .card__icon { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 2px; }
  .grid--4 .card__icon svg { width: 19px; height: 19px; }

  /* Signage banner */
  .band { padding: 26px 20px; gap: 18px; }
  .band h2 { font-size: 20px; }
  .band__domain { display: block; font-size: 15px; white-space: nowrap; margin-top: 6px; }

  /* Showreel pin is shorter on phones */
  .reel-scroll { height: 170vh; }

  /* Footer in two columns, clear of the chat button */
  .site-footer { padding: 44px 0 96px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer__grid > div:first-child, .footer__grid > div:last-child { grid-column: 1 / -1; }
  .footer__bottom { margin-top: 32px; flex-direction: column; }

  /* Glass look without live blur, so scrolling stays smooth */
  .card, .contact-card, .step {
    -webkit-backdrop-filter: none; backdrop-filter: none;
    background: linear-gradient(150deg, rgba(255,255,255,0.09), rgba(255,255,255,0.025) 45%, rgba(255,255,255,0.05)), rgba(12, 15, 20, 0.78);
  }
}

.reel-scroll__frame.needs-tap::after {
  content: "▶  Tap to play"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 14px 24px; border-radius: 999px; background: rgba(31,139,255,0.92); color: #001018;
  font: 600 16px var(--font-body); pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
@media (max-width: 700px) { .reel-scroll__caption { bottom: 3vh; } }

/* Phones: no pinned scroll effect for the showreel (Safari can't pin it
   reliably), just the video at full width. Less padding under the hero. */
@media (max-width: 700px) {
  .reel-scroll { height: auto; padding: 8px 0 40px; }
  .reel-scroll__sticky { position: relative; height: auto; display: grid; gap: 18px; padding: 0 var(--gutter); }
  .reel-scroll__frame {
    width: 100% !important; height: auto !important; aspect-ratio: 9 / 16; max-height: 80svh;
    border-radius: var(--radius) !important; border: 1px solid var(--line) !important; margin: 0 auto;
  }
  .reel-scroll__caption { position: static; opacity: 1 !important; transform: none !important; order: -1; }
  .hero { padding-bottom: 20px; }
  .hero + .section, .hero + .reel-scroll { padding-top: 24px; }
}

/* Typography: Archivo headings, IBM Plex Sans text (Michroma only for the logo) */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; }
h1 { font-weight: 700; letter-spacing: -0.03em; }
h3 { letter-spacing: -0.005em; font-size: clamp(17px, 1.6vw, 20px); }
.mobile-menu a.mobile-menu__link { font-weight: 600; letter-spacing: -0.01em; font-size: 26px; }
.card__num, .step::before { font-family: var(--font-body); font-weight: 500; letter-spacing: 0.12em; }
.contact-card__value { font-weight: 600; letter-spacing: -0.01em; }
.eyebrow { font-family: var(--font-body); font-weight: 600; letter-spacing: 0.18em; }
body { letter-spacing: 0.002em; }

/* Phones: the finger trail glows over the page (light only, never blocks taps) */
@media (pointer: coarse) {
  .smoke { z-index: 60; mix-blend-mode: screen; opacity: 0.85; }
}
