:root {
  color-scheme: dark;
  --bg: #101418;
  --bg-deep: #0a0d10;
  --surface: rgba(20, 27, 32, 0.82);
  --surface-strong: rgba(25, 33, 39, 0.95);
  --line: rgba(231, 236, 229, 0.16);
  --text: #f4f1ea;
  --muted: #aeb9b7;
  --accent: #48c6a8;
  --accent-strong: #f2c14e;
  --rust: #e06f45;
  --blue: #75a7ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 20%, rgba(72, 198, 168, 0.16), transparent 28rem),
    radial-gradient(circle at 80% 12%, rgba(242, 193, 78, 0.14), transparent 24rem),
    linear-gradient(180deg, var(--bg), var(--bg-deep) 72%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

#networkCanvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.48;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(14px);
}

.brand,
.nav-links,
.hero-actions,
.proof-strip,
.site-footer,
.status-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.7rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #111715;
  font-weight: 900;
}

.nav-links {
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a {
  padding: 0.4rem 0.2rem;
}

.nav-links a:hover,
.header-action:hover {
  color: var(--text);
}

.header-action {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.section-band {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: clamp(2rem, 4vw, 4rem);
  min-height: calc(100vh - 74px);
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 1.2rem;
  font-size: clamp(3.1rem, 7vw, 6.6rem);
  line-height: 0.95;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h1 span {
  display: block;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.08rem;
}

p {
  color: var(--muted);
  line-height: 1.72;
  overflow-wrap: break-word;
}

.hero-text {
  max-width: 720px;
  font-size: clamp(1.02rem, 1.7vw, 1.28rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0.84rem 1.05rem;
  font-weight: 800;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.primary-button {
  border: 1px solid transparent;
  background: var(--accent);
  color: #07100d;
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.hero-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2vw, 1.4rem);
}

.status-row {
  gap: 0.7rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 22px var(--accent);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.metric-grid div {
  min-height: 120px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.metric-grid strong {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text);
  font-size: 1.8rem;
}

.metric-grid span {
  color: var(--muted);
}

.proof-strip {
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1rem 0 3.8rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.proof-strip span {
  padding-left: 0.9rem;
  border-left: 2px solid var(--accent-strong);
}

.content-section,
.split-section,
.contact-section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.section-heading {
  max-width: 850px;
  margin-bottom: 2rem;
}

.section-heading.compact {
  max-width: 470px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.service-card,
.case-list article,
.stack-node,
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.service-card {
  min-height: 260px;
  padding: 1.25rem;
}

.card-icon {
  display: inline-flex;
  margin-bottom: 2rem;
  color: var(--accent-strong);
  font-weight: 900;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 4vw, 4rem);
}

.case-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.case-list article {
  min-height: 170px;
  padding: 1.25rem;
}

.case-list article:nth-child(2) {
  border-color: rgba(72, 198, 168, 0.38);
}

.case-list article:nth-child(3) {
  border-color: rgba(242, 193, 78, 0.36);
}

.stack-section {
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.stack-map {
  display: grid;
  grid-template-columns: 1fr 60px 1fr 60px 1fr;
  align-items: stretch;
  gap: 0.75rem;
}

.stack-node {
  min-height: 180px;
  padding: 1.25rem;
  background: var(--surface-strong);
}

.stack-node strong {
  display: block;
  margin-bottom: 0.7rem;
  font-size: 1.25rem;
}

.stack-node span {
  color: var(--muted);
  line-height: 1.6;
}

.stack-line {
  align-self: center;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
  border-top: 1px solid var(--line);
}

.contact-form {
  position: relative;
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.5rem);
}

.contact-sink {
  position: absolute;
  width: 1px;
  height: 1px;
  border: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
}

.contact-form label {
  display: grid;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 0.9rem;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(72, 198, 168, 0.14);
}

.contact-form textarea {
  resize: vertical;
}

.form-button {
  width: 100%;
  cursor: pointer;
}

.form-note {
  min-height: 1.5rem;
  margin: 0;
  font-size: 0.9rem;
}

.site-footer {
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a:hover {
  color: var(--text);
}

code {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 0.08rem 0.28rem;
}

.simple-page {
  min-height: 100vh;
}

.simple-layout {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.simple-layout .brand {
  width: fit-content;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.simple-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.simple-panel h1 {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
}

.legal-copy h2 {
  margin-top: 2rem;
  margin-bottom: 0.55rem;
  font-size: 1.25rem;
}

.legal-copy .primary-button {
  margin-top: 1rem;
}

@media (max-width: 920px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .hero,
  .split-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 4rem;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stack-map {
    grid-template-columns: 1fr;
  }

  .stack-line {
    width: 1px;
    height: 44px;
    justify-self: center;
    background: linear-gradient(180deg, transparent, var(--accent), transparent);
  }
}

@media (max-width: 620px) {
  .site-header,
  .section-band,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .header-action {
    display: none;
  }

  h1 {
    font-size: clamp(2.35rem, 10.8vw, 3rem);
    line-height: 1.02;
  }

  h2 {
    font-size: clamp(1.8rem, 9vw, 2.55rem);
  }

  .hero-text {
    max-width: 100%;
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  .proof-strip,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .service-grid,
  .case-list,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: auto;
  }

  .metric-grid div {
    min-height: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .primary-button,
  .secondary-button {
    transition: none;
  }
}
