@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #08090B;
  --bg-2: #0C0E12;
  --panel: #11141A;
  --panel-2: #161A22;
  --line: rgba(232, 234, 237, 0.08);
  --line-2: rgba(232, 234, 237, 0.14);
  --text: #E8EAED;
  --text-strong: #F3F5F7;
  --muted: #8B919A;
  --accent: #5B7FF0;
  --accent-deep: #1F4AD8;
  --accent-side: #13308F;
  --accent-2: #C9A06A;
  --ok: #8FB9A8;
  --ink: #0B1020;
  --radius: 8px;
  --header-h: 80px;
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html { scroll-behavior: smooth; background: var(--bg); color: var(--text); }

body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

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

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.skip:focus-visible { box-shadow: var(--focus); }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  background: var(--accent);
  color: var(--ink);
  padding: 8px 12px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  border-radius: 4px;
}
.skip:focus { top: 12px; }

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.wrap { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }

.kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Background grid */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(91, 127, 240, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 127, 240, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 0%, #000 0%, transparent 70%);
  z-index: 0;
}
header, main, footer { position: relative; z-index: 1; }

/* Header */
.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 11, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav .wrap { display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; height: 28px; flex-shrink: 0; }
.logo img { height: 28px; width: auto; animation: logo-in 0.9s var(--ease) both; }
@keyframes logo-in {
  from { opacity: 0; transform: translate3d(0, 6px, 0); }
  to { opacity: 1; transform: none; }
}
.nav-links { display: flex; gap: 28px; margin-left: 8px; }
.nav-links a {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 6px 0;
  position: relative;
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text-strong); }
.nav-links a[aria-current="page"]::after,
.nav-links a:hover::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(1);
  transform-origin: left;
}
.nav-links a:hover::after { background: var(--accent); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  background: none;
  border: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease);
}
.btn:hover { border-color: var(--accent); color: var(--text-strong); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-fill {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
  font-weight: 500;
}
.btn-fill:hover { background: #7a98f4; border-color: #7a98f4; color: var(--ink); }
.btn-ghost { color: var(--muted); }
.btn-lg { height: 44px; padding: 0 18px; }

/* Hero */
.hero { padding: 88px 0 100px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.hero-top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 28px; color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
}
.hero-top .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 4px rgba(143, 185, 168, 0.15);
  animation: dot-pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(143, 185, 168, 0.16); transform: scale(1); }
  50% { box-shadow: 0 0 0 9px rgba(143, 185, 168, 0.32); transform: scale(1.3); }
}
h1 {
  font-size: clamp(2.4rem, 6vw, 4.75rem);
  font-weight: 450;
  letter-spacing: -0.035em;
  line-height: 0.96;
  color: var(--text-strong);
}
h1 em {
  font-style: normal;
  color: var(--accent);
  background: linear-gradient(90deg, #3E63D8 0%, #5B7FF0 30%, #C5D2FF 50%, #5B7FF0 70%, #3E63D8 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-shimmer 3.2s ease-in-out infinite;
}
@keyframes title-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.lede { margin-top: 28px; max-width: 34em; font-size: 17.5px; line-height: 1.6; color: var(--muted); }
.hero-type.is-typing::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 0.95em;
  margin-left: 5px;
  background: var(--accent);
  vertical-align: -2px;
  animation: caret 0.9s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.hero-actions { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }

/* Hero facet glow */
.hero-glow {
  position: absolute;
  right: -8%;
  top: -20%;
  width: 60%;
  height: 120%;
  pointer-events: none;
  z-index: 0;
  filter: blur(50px);
  opacity: 0.5;
}
.hero-glow span {
  position: absolute;
  inset: 10%;
  border-radius: 40% 55% 45% 60%;
  background:
    radial-gradient(circle at 30% 30%, rgba(91, 127, 240, 0.55), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(31, 74, 216, 0.4), transparent 50%);
  animation: drift 7s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  from { transform: translate3d(-6%, -5%, 0) rotate(0deg) scale(1); }
  to { transform: translate3d(7%, 8%, 0) rotate(14deg) scale(1.14); }
}
.hero-grid > * { position: relative; z-index: 1; }

/* Hero mesh */
.hero-viz {
  position: relative;
  aspect-ratio: 560 / 400;
  background: linear-gradient(180deg, #141822 0%, #0E1218 100%);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.04);
}
.hero-viz .mesh-canvas,
.hero-viz svg.mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero-viz.is-live svg.mesh { visibility: hidden; }
.mesh-edge {
  stroke-dasharray: 8 22;
  stroke-dashoffset: 0;
  stroke-opacity: 0.7;
  animation: mesh-dash 2s linear infinite;
}
.mesh-edges .mesh-edge:nth-child(odd) { animation-duration: 2.4s; }
.mesh-edges .mesh-edge:nth-child(3n) { animation-duration: 1.7s; animation-direction: reverse; }
@keyframes mesh-dash { to { stroke-dashoffset: -30; } }
.mesh-facets { animation: facets-in 1.1s var(--ease) 0.15s both; }
@keyframes facets-in { from { opacity: 0; } to { opacity: 1; } }
.mesh-facet { fill-opacity: 0.14; animation: facet-breathe 3.4s ease-in-out infinite; }
.mesh-facet.f2, .mesh-facet.f6 { animation-delay: 0.5s; }
.mesh-facet.f3, .mesh-facet.f8 { animation-delay: 1.1s; }
.mesh-facet.f4, .mesh-facet.f7 { animation-delay: 1.8s; }
@keyframes facet-breathe {
  0%, 100% { fill-opacity: 0.08; }
  50% { fill-opacity: 0.28; }
}
.mesh-node-glow { fill: rgba(91, 127, 240, 0.35); }
.mesh-node {
  transform-box: fill-box;
  transform-origin: center;
  animation: node-pulse 2.2s ease-in-out infinite;
}
.mesh-node.n2 { animation-delay: 0.25s; }
.mesh-node.n3 { animation-delay: 0.5s; }
.mesh-node.n4 { animation-delay: 0.75s; }
.mesh-node.n5 { animation-delay: 0.1s; }
.mesh-node.n6 { animation-delay: 1.0s; }
.mesh-node.n7 { animation-delay: 1.3s; }
@keyframes node-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.35); }
}

/* Section wash */
#services, #our-products, #approach, #contact {
  position: relative;
  overflow: hidden;
}
#services::before, #our-products::before, #approach::before, #contact::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(91, 127, 240, 0.16), transparent 50%),
    radial-gradient(ellipse at 90% 100%, rgba(31, 74, 216, 0.10), transparent 45%);
  animation: wash 10s ease-in-out infinite alternate;
}
#services > *, #our-products > *, #approach > *, #contact > * { position: relative; z-index: 1; }
@keyframes wash {
  from { transform: translate3d(-3%, -2%, 0) scale(1); opacity: 0.7; }
  to { transform: translate3d(4%, 3%, 0) scale(1.08); opacity: 1; }
}

/* Sections */
section { padding: 80px 0; border-bottom: 1px solid var(--line); }
.sec-head { display: grid; grid-template-columns: 220px 1fr; gap: 40px; margin-bottom: 48px; align-items: start; }
.sec-head .kicker { padding-top: 16px; }
.sec-head h2, .page-hero h1, h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 450;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-strong);
}
.sec-head p, .prose { color: var(--muted); max-width: 36em; }
.page-hero { padding: 72px 0 40px; }
.page-hero p { margin-top: 16px; color: var(--muted); max-width: 38em; font-size: 17.5px; }

.svc-grid, .card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.svc, .card, .brand, .principle, form.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, transform 0.25s var(--ease), box-shadow 0.25s ease;
}
.svc, .card { padding: 32px 32px 28px; min-height: 240px; }
.svc:hover, .card:hover, .brand:hover {
  border-color: rgba(91, 127, 240, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -24px rgba(91, 127, 240, 0.45);
}
.svc .idx, .card .idx {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 18px;
}
.svc h3, .card h3, .principle h3 {
  font-size: 24px; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 12px; color: var(--text-strong);
}
.svc p, .card p { color: var(--muted); font-size: 16px; line-height: 1.6; }
.card .go, .brand .go {
  display: inline-block;
  margin-top: 18px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px; color: var(--accent); letter-spacing: 0.04em;
}
.card .go::after, .brand .go::after { content: " →"; }

#our-products, .band { background: var(--bg-2); }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 32px 28px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: border-color 0.25s ease, transform 0.25s var(--ease), box-shadow 0.25s ease;
}
.product-card:hover {
  border-color: rgba(91, 127, 240, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -24px rgba(91, 127, 240, 0.45);
}
.product-card .logo-slot { display: flex; align-items: center; height: 40px; margin-bottom: 22px; }
.product-card .logo-slot img { height: 36px; width: auto; }
.product-card h3 {
  font-size: 24px; font-weight: 500; letter-spacing: -0.02em;
  margin-bottom: 10px; color: var(--text-strong);
}
.product-card p { color: var(--muted); font-size: 16px; line-height: 1.6; }
.product-card .go-row {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.product-card .go {
  display: inline-block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px; color: var(--accent); letter-spacing: 0.04em;
}
.product-card .go::after { content: " →"; }
.product-card {
  position: relative;
  overflow: hidden;
  z-index: 0;
}
.product-card::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: conic-gradient(from 0deg, transparent 0 58%, rgba(91, 127, 240, 0.95), #A8BAFF, rgba(31, 74, 216, 0.9), transparent 72%);
  animation: border-spin 5.5s linear infinite;
  z-index: -2;
}
.product-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius) - 1px);
  background: var(--panel);
  z-index: -1;
  pointer-events: none;
}
@keyframes border-spin { to { transform: rotate(360deg); } }


.principles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.principles article { background: var(--bg); padding: 32px 28px; transition: background 0.25s ease; }
.principles article:hover { background: var(--panel); }
.principles .idx {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px; color: var(--accent-2); letter-spacing: 0.12em; margin-bottom: 16px;
}
.principles h3 { font-size: 18px; }
.principles p { color: var(--muted); font-size: 15px; }

/* Contact / forms */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
form.panel { padding: 28px; display: grid; gap: 14px; }
form.panel:hover { transform: none; box-shadow: none; border-color: var(--line); }
form label {
  display: grid; gap: 6px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
form input, form textarea {
  font-family: "IBM Plex Sans", sans-serif; font-size: 16px; color: var(--text);
  background: #0B0D11; border: 1px solid var(--line-2); border-radius: 4px; padding: 10px 12px; outline: none;
  transition: border-color 0.2s ease;
  width: 100%;
}
form input:hover, form textarea:hover { border-color: rgba(91, 127, 240, 0.35); }
form input:focus, form textarea:focus { border-color: var(--accent); box-shadow: var(--focus); }
form textarea { min-height: 140px; resize: vertical; }
form .btn { justify-self: start; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 15px; padding: 14px 16px; border-radius: 6px; border: 1px solid var(--line); }
.form-status.ok { color: var(--ok); border-color: rgba(143, 185, 168, 0.35); background: rgba(143, 185, 168, 0.06); }
.form-status.err { color: #E8A0A0; border-color: rgba(196, 92, 92, 0.35); background: rgba(196, 92, 92, 0.06); }

.prose h2 { margin: 2rem 0 0.8rem; }
.prose h3 { font-size: 1.15rem; margin: 1.6rem 0 0.6rem; color: var(--text-strong); }
.prose p, .prose li { color: var(--muted); margin-bottom: 0.9rem; }
.prose ul { list-style: disc; padding-left: 1.2rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: #7a98f4; }

footer { padding: 32px 0 40px; }
footer .wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
footer .logo img { height: 22px; animation: none; }
footer p { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
footer .links { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
footer .links a {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px; color: var(--muted);
  transition: color 0.2s ease;
}
footer .links a:hover { color: var(--text-strong); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translate3d(0, 26px, 0); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

/* Mobile */
@media (max-width: 900px) {
  .hero-grid, .sec-head, .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .principles, .svc-grid, .card-grid, .product-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 64px; }
  section { padding: 64px 0; }
  .menu-toggle { display: flex; }
  .nav-links, .nav .btn { display: none; }
  .nav.is-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(8, 9, 11, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
    gap: 4px;
  }
  .nav.is-open .nav-links a { font-size: 14px; padding: 12px 0; }
  .nav.is-open .nav-cta { display: none; }
  .wrap { width: min(1200px, calc(100% - 32px)); }
  footer .links { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Keep gentle fades, glow pulse and slow drift. Drop large motion and parallax only. */
  .svc:hover, .card:hover, .product-card:hover, .btn:hover, .btn:active {
    transform: none;
  }
  .reveal {
    opacity: 0;
    transform: none;
    transition: opacity 0.55s ease;
  }
  .reveal.in { opacity: 1; transform: none; }
  .logo img { animation: logo-in 0.7s ease both; }
  .hero-glow span { animation: drift 14s ease-in-out infinite alternate; }
  .hero-glow { opacity: 0.36; }
  h1 em { animation: title-shimmer 8s ease-in-out infinite; }
  .hero-top .dot { animation: dot-pulse 2.4s ease-in-out infinite; }
  .mesh-edge { animation: mesh-dash 6s linear infinite; }
  .mesh-facet { animation: facet-breathe 7s ease-in-out infinite; }
  .mesh-node { animation: node-pulse 4s ease-in-out infinite; }
  .product-card::before { animation: border-spin 16s linear infinite; }
  #services::before, #our-products::before, #approach::before, #contact::before {
    animation: wash 18s ease-in-out infinite alternate;
  }
  .hero-type.is-typing::after { animation: none; opacity: 0; }
}
