/* 2A Engineering — brand colours come from the logo kit (logos/…/logo-kit-masters) */
:root {
  --bg: #121417;
  --bg-2: #181b1f;
  --fg: #f4f3ef;
  --muted: #8a8f98;
  --dim: #4a4f57;
  --line: rgba(244, 243, 239, 0.08);
  --line-strong: rgba(244, 243, 239, 0.18);
  --signal: #4ade80;

  --sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", "JetBrains Mono", Consolas, monospace;

  --gutter: clamp(16px, 5vw, 64px);
  --max: 1200px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
p { margin: 0; }
.muted { color: var(--muted); }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* ---------- background grid + progress ---------- */
.grid-bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none;
}
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  background: var(--fg); transform-origin: 0 50%; transform: scaleX(0);
  z-index: 100;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  transition: padding .4s;
}
/* The blurred bar lives on a pseudo-element: backdrop-filter on .nav itself would
   make it the containing block for the fixed mobile menu and squash it into the bar. */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: rgba(18, 20, 23, .78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  opacity: 0; transition: opacity .4s;
}
.nav.is-scrolled::before { opacity: 1; }
.nav.is-scrolled { padding-top: 10px; padding-bottom: 10px; }
.nav__brand img { height: 40px; width: auto; }
.nav__links { display: flex; gap: 32px; align-items: center; }
.nav__links a {
  font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); transition: color .2s;
}
.nav__links a:hover { color: var(--fg); }
.nav__links .nav__cta {
  color: var(--fg); border: 1px solid var(--line-strong); padding: 8px 16px; border-radius: 999px;
  transition: background .2s, color .2s;
}
.nav__links .nav__cta:hover { background: var(--fg); color: var(--bg); }
.nav__toggle { display: none; }

@media (max-width: 760px) {
  .nav__toggle {
    display: grid; place-content: center; gap: 6px; width: 44px; height: 44px;
    background: none; border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer;
  }
  .nav__toggle span { display: block; width: 18px; height: 1.5px; background: var(--fg); transition: transform .3s var(--ease); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav__links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; gap: 28px;
    background: var(--bg);
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; }
  .nav__links a { font-size: 18px; }
  .nav__brand img { height: 34px; }
}

/* ---------- shared ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(96px, 14vw, 180px) var(--gutter) 0; }
.section__head { margin-bottom: clamp(48px, 7vw, 88px); }
.section h2 { font-size: clamp(36px, 6vw, 72px); }
.label, .eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 24px;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line-strong); padding: 6px 14px; border-radius: 999px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 0 var(--signal); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.6); } 70%, 100% { box-shadow: 0 0 0 10px rgba(74,222,128,0); } }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 15px;
  transition: transform .3s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--fg); color: var(--bg); }
.btn--ghost { border: 1px solid var(--line-strong); }
.btn--ghost:hover { border-color: var(--fg); }

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 48px;
  max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter) 80px;
}
.hero__title { font-size: clamp(48px, 9vw, 112px); margin-bottom: 32px; }
.hero__title .line { display: block; }
.hero__title em {
  font-style: normal; position: relative; display: inline-block;
}
.hero__title em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .09em;
  background: var(--muted); transform-origin: left; animation: bar 1.2s var(--ease) .6s both;
}
@keyframes bar { from { transform: scaleX(0); } }
.hero__title em.is-swapping { animation: glitch .45s steps(2) both; }
@keyframes glitch {
  0% { clip-path: inset(0 0 0 0); transform: translateX(0); }
  25% { clip-path: inset(10% 0 55% 0); transform: translateX(-3px); }
  50% { clip-path: inset(55% 0 10% 0); transform: translateX(3px); }
  100% { clip-path: inset(0 0 0 0); transform: translateX(0); }
}
.caret { display: inline-block; width: .06em; height: .8em; margin-left: .04em; background: var(--fg); vertical-align: -.02em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__lead { max-width: 520px; color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); margin-bottom: 40px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero__mark { margin: 0; position: relative; will-change: transform; }
.hero__mark svg { width: 100%; overflow: visible; }
.mark-2a {
  fill: var(--fg); fill-opacity: 0; stroke: var(--fg); stroke-width: .6;
  stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000);
}
.mark-bar { fill: var(--muted); transform-box: fill-box; transform-origin: left; transform: scaleX(0); }
.hero__mark.is-drawn .mark-2a { animation: draw 2.2s var(--ease) .2s forwards, fill .8s ease 1.9s forwards; }
.hero__mark.is-drawn .mark-bar { animation: grow .9s var(--ease) 2.2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fill { to { fill-opacity: 1; stroke-opacity: 0; } }
@keyframes grow { to { transform: scaleX(1); } }

.coords {
  display: flex; gap: 20px; flex-wrap: wrap; margin-top: 32px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--dim);
}
.hero__scroll {
  position: absolute; left: var(--gutter); bottom: 32px;
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.hero__scroll i { position: relative; width: 1px; height: 44px; background: var(--line-strong); overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--fg); animation: drip 2s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 110px; padding-bottom: 120px; gap: 24px; }
  .hero__mark { order: -1; max-width: 200px; }
  .coords { display: none; }
}

/* ---------- ticker ---------- */
.ticker {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.ticker__track span {
  font-family: var(--mono); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  padding: 0 28px; white-space: nowrap;
}
.ticker__track span::before { content: "◆"; margin-right: 28px; color: var(--dim); font-size: 9px; vertical-align: 2px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- services ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card {
  position: relative; background: var(--bg); padding: clamp(28px, 3vw, 44px);
  overflow: hidden; transition-property: opacity, transform, background;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(244,243,239,.07), transparent 60%);
}
.card:hover::before { opacity: 1; }
.card__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 56px; }
.card__idx { font-family: var(--mono); font-size: 13px; letter-spacing: .12em; color: var(--muted); }
.card__icon { width: 48px; height: 48px; fill: none; stroke: var(--fg); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.card__icon * { stroke-dasharray: 200; stroke-dashoffset: 200; transition: stroke-dashoffset 1.8s var(--ease) .3s; }
.card.is-in .card__icon * { stroke-dashoffset: 0; }
.card h3 { font-size: 26px; margin-bottom: 14px; }
.card p { color: var(--muted); margin-bottom: 28px; }
.card ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.card li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; display: flex; gap: 12px; }
.card li::before { content: "→"; color: var(--dim); font-family: var(--mono); }
.card:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* ---------- stats ---------- */
.stats {
  max-width: var(--max); margin: clamp(96px, 12vw, 160px) auto 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.stat { border-top: 1px solid var(--line-strong); padding-top: 24px; }
.stat__num { display: block; font-size: clamp(56px, 8vw, 96px); font-weight: 600; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__label { display: block; margin-top: 12px; font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }

/* ---------- process ---------- */
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 27px; top: 0; bottom: 0; width: 1px; background: var(--line);
}
.steps::after {
  content: ""; position: absolute; left: 27px; top: 0; width: 1px; height: calc(var(--progress, 0) * 100%);
  background: var(--fg);
}
.step { display: grid; grid-template-columns: 56px 1fr; gap: clamp(20px, 4vw, 56px); padding: 0 0 clamp(40px, 6vw, 72px); }
.step__no {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--bg);
  font-family: var(--mono); font-size: 14px; transition: background .4s, color .4s;
}
.step.is-active .step__no { background: var(--fg); color: var(--bg); }
.step h3 { font-size: clamp(26px, 3.4vw, 40px); margin: 6px 0 12px; }
.step p { color: var(--muted); max-width: 560px; }

/* ---------- about ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.about__portrait {
  position: relative; aspect-ratio: 4 / 5; display: grid; place-items: center;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--bg-2);
}
.about__portrait img { width: 55%; }
.corner { position: absolute; width: 18px; height: 18px; border-color: var(--fg); border-style: solid; border-width: 0; }
.corner--tl { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.corner--tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.corner--bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.corner--br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }
.about__text p { font-size: clamp(18px, 1.8vw, 22px); line-height: 1.55; margin-bottom: 24px; }
.about__text p + p { color: var(--muted); }
.facts { margin: 40px 0 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.facts div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; }
@media (max-width: 800px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__portrait { max-width: 320px; aspect-ratio: 1; }
}

/* ---------- contact ---------- */
.contact { padding-bottom: clamp(96px, 12vw, 160px); }
.contact__title { font-size: clamp(40px, 7vw, 88px) !important; margin-bottom: 48px; }
.contact__mail {
  display: inline-flex; align-items: center; gap: 20px; max-width: 100%;
  text-decoration: none; font-size: clamp(20px, 4vw, 48px); font-weight: 500; letter-spacing: -0.02em;
  padding-bottom: 8px; background: linear-gradient(var(--fg), var(--fg)) 0 100% / 0 1px no-repeat;
  transition: background-size .6s var(--ease);
}
.contact__mail:hover { background-size: 100% 1px; }
.contact__mail-text { overflow-wrap: anywhere; }
.contact__arrow { transition: transform .4s var(--ease); }
.contact__mail:hover .contact__arrow { transform: translate(4px, -4px); }
.copy {
  display: block; margin-top: 24px; background: none; border: 1px solid var(--line-strong); color: var(--muted);
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px; cursor: pointer; transition-property: opacity, transform, color, border-color;
}
.copy:hover { color: var(--fg); border-color: var(--fg); }

/* ---------- footer ---------- */
.footer {
  max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  border-top: 1px solid var(--line); font-family: var(--mono); font-size: 13px; color: var(--muted);
}
.footer img { height: 32px; width: auto; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--fg); }

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