/* Vanguard X — redesign of the live home. Tokens, type, nav, buttons, footer. */

:root {
  --black: #000;
  --graphite: #1a1a1a;          /* the live site's own dark */
  --graphite-2: #232323;
  --paper: #f3f4f6;             /* cool light, never cream */
  --white: #fff;
  --orange: #ec6219;            /* brand: acts and live states only */
  --orange-soft: rgba(236, 98, 25, .16);
  --blue: #0160e7;              /* brand: explore and code */
  --run: #2bb673;               /* "running" status, semantic only */
  --ink: #1a1a1a;
  --mute-d: #9a9fa8;            /* secondary text on dark */
  --mute-l: #5d636d;            /* secondary text on light */
  --line-d: rgba(255, 255, 255, .12);
  --line-l: rgba(26, 26, 26, .12);

  --f-display: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-text: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-code: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --side: clamp(16px, 5vw, 80px);
  --max: 1440px;
  --nav-h: 72px;

  --t-hero: clamp(40px, min(5vw, 9.4svh), 72px);
  --t-h2: clamp(30px, 3.3vw, 50px);
  --t-h3: clamp(19px, 1.55vw, 24px);
  --t-lead: clamp(17px, 1.3vw, 20px);
  --t-body: 16px;
  --t-small: 14px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--f-text);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--orange); color: var(--white); padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- type ---------- */
.h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--t-h2);
  line-height: 1.08;
  letter-spacing: -.03em;
}
.h2-sm { font-size: var(--t-h2); }
.lead {
  font-size: var(--t-lead);
  line-height: 1.5;
  max-width: 42ch;
}
.dark .lead, .graphite .lead { color: var(--mute-d); }
.light .lead, .paper .lead { color: var(--mute-l); }

/* ---------- surfaces ---------- */
.dark { background: var(--black); color: var(--white); }
.graphite { background: var(--graphite); color: var(--white); }
.light { background: var(--white); color: var(--ink); color-scheme: light; }
.paper { background: var(--paper); color: var(--ink); color-scheme: light; }

section { position: relative; }
.services, .work, .tech, .why, .reviews, .articles, .expertise, .numbers {
  padding-block: clamp(80px, 11vw, 160px);
}

/* chapter head: headline left, the supporting line right */
.head {
  max-width: var(--max);
  margin: 0 auto clamp(40px, 6vw, 88px);
  padding-inline: var(--side);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 24px;
  align-items: end;
}
.head .h2 { grid-column: 1 / span 7; }
.head-side { grid-column: 9 / span 4; display: grid; gap: 24px; justify-items: start; }
.head-row { align-items: end; }
.head-row .h2 { grid-column: 1 / span 8; }
.head-row > :last-child:not(.h2) { grid-column: 10 / span 3; justify-self: end; }
@media (max-width: 900px) {
  .head .h2, .head-side, .head-row .h2, .head-row > :last-child:not(.h2) { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 24px;
  border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: -.005em;
  white-space: nowrap;
  transition: background-color .25s, color .25s, border-color .25s;
  will-change: transform;
}
.btn-lg { height: 56px; padding: 0 30px; font-size: 16px; }
.btn-orange { background: var(--orange); color: var(--white); }
.btn-orange:hover { background: #d9550f; }
.btn-line { border: 1px solid currentColor; }
.light .btn-line:hover, .paper .btn-line:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.dark .btn-line:hover, .graphite .btn-line:hover { background: var(--white); color: var(--black); border-color: var(--white); }

.link {
  display: inline-block;
  font-weight: 600;
  color: var(--blue);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .35s var(--ease-out);
  padding-bottom: 2px;
}
.link:hover { background-size: 100% 1px; }

/* Clutch badge (hero + testimonials) */
.clutch {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "a s" "b c";
  column-gap: 12px; row-gap: 2px;
  align-items: center;
  line-height: 1.1;
}
.clutch-a { grid-area: a; font-size: 12px; color: var(--mute-d); }
.clutch-b { grid-area: b; font-family: var(--f-display); font-weight: 600; font-size: 21px; letter-spacing: -.03em; }
.clutch .stars { grid-area: s; display: flex; gap: 3px; }
.clutch .stars i {
  width: 13px; height: 13px; background: var(--orange);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.clutch-c { grid-area: c; font-size: 13px; color: var(--mute-d); }
.clutch-dark .clutch-a, .clutch-dark .clutch-c { color: var(--mute-l); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--nav-h);
  transition: background-color .4s, backdrop-filter .4s, transform .5s var(--ease-out);
}
.nav.is-solid {
  background: rgba(12, 12, 12, .72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 -1px 0 var(--line-d);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav-in {
  height: 100%;
  max-width: var(--max); margin: 0 auto; padding-inline: var(--side);
  display: flex; align-items: center; gap: 28px;
}
.nav-logo img { height: 22px; width: auto; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 500; }
.nav-links > a, .nav-trigger { opacity: .86; transition: opacity .2s; display: inline-flex; align-items: center; gap: 6px; height: var(--nav-h); }
.nav-links > a:hover, .nav-trigger:hover, .nav-drop.is-open .nav-trigger { opacity: 1; }
.nav-trigger svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .3s; }
.nav-drop.is-open .nav-trigger svg { transform: rotate(180deg); }
.nav-contact { display: none !important; }
.nav-drop { position: relative; }
.nav-panel {
  position: absolute; top: calc(var(--nav-h) - 8px); left: -24px;
  min-width: 240px;
  padding: 22px 24px;
  border-radius: 18px;
  background: rgba(20, 20, 20, .94);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 0 0 1px var(--line-d), 0 30px 60px -20px rgba(0, 0, 0, .6);
  display: grid; gap: 4px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .25s, transform .35s var(--ease-out), visibility 0s .35s;
}
.nav-drop.is-open .nav-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .35s var(--ease-out); }
.nav-panel a { display: block; padding: 6px 0; color: var(--mute-d); font-weight: 500; transition: color .2s; white-space: nowrap; }
.nav-panel a:hover { color: var(--white); }
.nav-panel-h { font-family: var(--f-text); font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 6px; }
.nav-panel-h a { color: var(--white); padding: 0; }
.nav-panel-services { grid-template-columns: auto auto; column-gap: 48px; }
.nav-panel-services > div { display: grid; gap: 4px; align-content: start; }
.nav-panel-industries { left: -120px; }
.nav-cols { display: grid; grid-template-columns: repeat(3, auto); column-gap: 36px; }
.nav-cta { height: 42px; padding: 0 20px; font-size: 14px; }
.nav-burger { display: none; width: 44px; height: 44px; margin-left: auto; position: relative; }
.nav-burger i { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .35s var(--ease-out); }
.nav-burger i:first-child { top: 17px; }
.nav-burger i:last-child { top: 26px; }
.nav-burger[aria-expanded="true"] i:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] i:last-child { transform: translateY(-4.5px) rotate(-45deg); }

@media (max-width: 1080px) {
  .nav-burger { display: block; }
  .nav-cta { display: none; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px var(--side) 40px;
    background: var(--black);
    overflow-y: auto;
    font-family: var(--f-display); font-size: 22px; font-weight: 400; letter-spacing: -.03em;
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s;
  }
  .nav.is-menu .nav-links { opacity: 1; visibility: visible; transition: opacity .3s; }
  .nav.is-menu { background: var(--black); }
  .nav-links > a, .nav-trigger { height: auto; padding: 16px 0; border-bottom: 1px solid var(--line-d); width: 100%; justify-content: space-between; opacity: 1; }
  .nav-contact { display: flex !important; }
  .nav-panel {
    position: static; opacity: 1; visibility: visible; transform: none;
    background: none; box-shadow: none; padding: 8px 0 16px; border-radius: 0;
    display: none; font-family: var(--f-text); font-size: 16px; letter-spacing: 0;
  }
  .nav-drop.is-open .nav-panel { display: grid; }
  .nav-panel-services, .nav-cols { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .nav-panel a { white-space: normal; }
}

/* ---------- footer ---------- */
.foot { background: var(--graphite); color: var(--white); padding: 88px var(--side) 40px; }
.foot-in {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
}
.foot-brand img { height: 26px; width: auto; }
.foot-brand p { margin-top: 20px; color: var(--mute-d); }
.foot-col { display: grid; gap: 8px; align-content: start; }
.foot-col a { color: var(--mute-d); transition: color .2s; }
.foot-col a:hover { color: var(--white); }
.foot-h { font-family: var(--f-text); font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.foot-h a { color: var(--white); }
.foot-all { color: var(--white) !important; font-weight: 600; margin-top: 6px; }
.foot-legal {
  max-width: var(--max); margin: 72px auto 0; padding-top: 24px;
  border-top: 1px solid var(--line-d);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--mute-d);
}
.foot-legal a:hover { color: var(--white); }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }

/* ---------- shared media ---------- */
.vid-wrap video, video.fill { width: 100%; height: 100%; object-fit: cover; }

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

::selection { background: var(--orange); color: var(--white); }

/* film grain over the full-bleed footage, so every shot reads as the same shoot */
.grain::after {
  content: ""; position: absolute; inset: -60%; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .16; mix-blend-mode: overlay;
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); } 40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); } 80% { transform: translate(5%, 4%); } 100% { transform: translate(0, 0); }
}
/* the frozen last frame that fades out while a video starts its next loop */
.vx-xfade { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; z-index: 0; }
