:root {
  --bg: #f3f4f6;
  --bg-soft: #eceff3;
  --panel: #ffffff;
  --text: #5c6878;
  --heading: #667487;
  --muted: #788498;
  --border: #ccd4df;
  --accent: #2f57b0;
  --accent-dark: #26489a;
  --nav: #2b4f9f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(180deg, #f8f9fb 0%, var(--bg) 24%, #eef1f6 100%);
  color: var(--text);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.45;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(38, 72, 154, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 72, 154, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 95%);
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.top-nav {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #f7f8fb 0%, #eef1f6 100%);
  border-bottom: 1px solid #c9d2de;
  z-index: 40;
}

.top-nav::after {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, rgba(47, 87, 176, 0.3), rgba(47, 87, 176, 0.1));
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-name {
  color: #657286;
  font-size: 0.78rem;
  font-weight: 700;
  max-width: 22ch;
  text-transform: uppercase;
}

.header-logo {
  display: block;
  height: 54px;
  width: auto;
}

nav {
  display: flex;
  gap: 0.45rem;
}

nav a {
  color: #2f57b0;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  padding: 0.42rem 0.62rem;
  border-radius: 4px;
  border: 1px solid transparent;
  position: relative;
  isolation: isolate;
  transition: color 160ms ease;
}

nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transform: translateY(1px);
  background: linear-gradient(180deg, #3a64c3 0%, #2d4fa6 100%);
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: opacity 170ms ease, transform 170ms ease;
}

nav a:hover,
nav a:focus-visible {
  color: #f5f8ff;
}

nav a:hover::before,
nav a:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}

.section {
  padding: 4.7rem 0;
}

.bordered {
  border-top: 1px solid rgba(204, 212, 223, 0.75);
}

.status {
  color: #667487;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.status span {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(47, 87, 176, 0.48);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 6.1vw, 4.9rem);
  line-height: 1.05;
  margin-bottom: 1rem;
  max-width: 18ch;
}

h2 {
  color: var(--heading);
  font-size: clamp(1.6rem, 3.2vw, 2.8rem);
  margin-bottom: 1.5rem;
}

h3 {
  color: var(--heading);
  font-size: 1.08rem;
  margin-bottom: 0.75rem;
}

.hero-silver {
  color: #6b798c;
}

.hero-blue {
  color: #3e67bd;
}

.lead {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 1.7rem;
}

.section-intro {
  color: var(--muted);
  max-width: 74ch;
  margin: -0.55rem 0 1.7rem;
}

.cta {
  display: inline-block;
  text-decoration: none;
  background: var(--accent);
  color: #f5f8ff;
  padding: 0.72rem 1.1rem;
  border: 1px solid #365eb8;
  transition: background 160ms ease, transform 160ms ease;
}

.cta:hover {
  background: #3d67c0;
  transform: translateY(-1px);
}

.eyebrow {
  color: #7d899c;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  margin-bottom: 0.8rem;
}

.services-grid,
.project-grid,
.contact-grid {
  display: grid;
  gap: 1rem;
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.services-grid article,
.project-card,
.contact-grid a {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #f6f8fb);
}

.services-grid article {
  padding: 1rem;
  min-height: 180px;
}

.service-num {
  color: #8e9aae;
  font-size: 0.7rem;
  margin-bottom: 0.5rem;
}

.services-grid article p,
.project-card p,
.project-card li {
  color: #7a8698;
  font-size: 0.88rem;
}

.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card {
  padding: 1.1rem;
}

.project-card ul {
  margin: 0.8rem 0 0;
  padding-left: 1.15rem;
}

.project-card li {
  margin-bottom: 0.3rem;
}

.diagram {
  border: 1px solid var(--border);
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  display: grid;
  gap: 0.45rem;
  background: #f1f4f8;
}

.diagram div {
  border: 1px solid #c3ccd9;
  padding: 0.42rem 0.52rem;
  font-size: 0.76rem;
  color: #6f7d90;
}

.diagram .accent {
  border-color: var(--accent);
  color: #3357a8;
  box-shadow: inset 0 0 0 1px rgba(47, 87, 176, 0.24);
}

.stack {
  border: 1px solid var(--border);
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.stack p {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.56rem 0.7rem;
  border-bottom: 1px solid #d3dae4;
}

.stack p:last-child {
  border-bottom: 0;
}

.stack span {
  color: #8391a5;
  font-size: 0.75rem;
}

.stack strong {
  color: #68758a;
  font-size: 0.75rem;
}

.contact-grid {
  max-width: 640px;
}

.contact-grid a {
  color: #5f6d82;
  text-decoration: none;
  padding: 0.88rem 1rem;
  transition: border-color 160ms ease, color 160ms ease;
}

.contact-grid a:hover {
  border-color: #6f8fd5;
  color: #3459aa;
}

footer {
  border-top: 1px solid rgba(204, 212, 223, 0.75);
  background: #edf0f5;
  padding: 1.25rem 0 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #7a879a;
  font-size: 0.75rem;
}

.footer-brand {
  margin: 0;
}

.footer-logo {
  display: block;
  height: 42px;
  width: auto;
}

@media (max-width: 860px) {
  .brand-name {
    display: none;
  }

  .header-logo {
    height: 48px;
  }
}

@media (max-width: 720px) {
  .nav-inner {
    min-height: 78px;
  }

  nav {
    gap: 0.35rem;
  }

  .header-logo {
    height: 46px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .stack p {
    flex-direction: column;
    gap: 0.15rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero h1,
  .hero .lead,
  .hero .cta,
  .services-grid article,
  .project-card {
    opacity: 0;
    transform: translateY(12px);
    animation: reveal 650ms ease forwards;
  }

  .hero .lead {
    animation-delay: 140ms;
  }

  .hero .cta {
    animation-delay: 230ms;
  }

  .services-grid article:nth-child(2),
  .project-card:nth-child(2) {
    animation-delay: 120ms;
  }

  .services-grid article:nth-child(3) {
    animation-delay: 200ms;
  }

  .services-grid article:nth-child(4) {
    animation-delay: 260ms;
  }
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
