/* ================= BEKA — design tokens ================= */
:root {
  --porcelain: #f5f7f9;
  --paper: #ffffff;
  --ink: #121c26;
  --slate: #5c6b7c;
  --hairline: #dde3ea;
  --cobalt: #1740e8;
  --cobalt-deep: #0f2fb0;
  --cobalt-wash: #e9edfd;

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --max-w: 1120px;
  --pad-x: clamp(20px, 5vw, 48px);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--porcelain);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* subtle plotted-grid ambience */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(18, 28, 38, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(18, 28, 38, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 38%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 38%);
  z-index: 0;
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.02em; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ================= header ================= */
.site-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 26px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.wordmark-dot { color: var(--cobalt); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
}

.site-nav a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--slate);
  transition: color 0.15s ease;
}

.site-nav a:hover { color: var(--ink); }

.nav-cta {
  color: var(--cobalt) !important;
  border: 1px solid var(--cobalt);
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease !important;
}

.nav-cta:hover {
  background: var(--cobalt);
  color: #fff !important;
}

/* ================= hero ================= */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--pad-x) clamp(56px, 8vw, 110px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.eyebrow-tick {
  width: 22px;
  height: 1px;
  background: var(--cobalt);
  flex: none;
  position: relative;
}

.eyebrow-tick::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2.5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cobalt);
}

.hero h1 {
  font-size: clamp(44px, 6.5vw, 76px);
  font-weight: 700;
  margin-bottom: 24px;
}

.accent { color: var(--cobalt); }

.lede {
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--slate);
  max-width: 34em;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15.5px;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  display: inline-block;
}

.btn-primary {
  background: var(--cobalt);
  color: #fff;
  box-shadow: 0 6px 18px rgba(23, 64, 232, 0.28);
}

.btn-primary:hover {
  background: var(--cobalt-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(23, 64, 232, 0.34);
}

.btn-ghost {
  border: 1px solid var(--hairline);
  color: var(--ink);
  background: var(--paper);
}

.btn-ghost:hover { border-color: var(--slate); }

.btn-lg { font-size: clamp(16px, 2.4vw, 20px); padding: 16px 34px; }

/* ---------- hero schematic ---------- */
.hero-schematic { min-width: 0; }

#schematic { width: 100%; height: auto; display: block; }

.node {
  fill: var(--paper);
  stroke: var(--hairline);
  stroke-width: 1.5;
}

.node-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  fill: var(--slate);
  text-anchor: middle;
}

.core-rect {
  fill: var(--cobalt);
  stroke: none;
  filter: drop-shadow(0 8px 18px rgba(23, 64, 232, 0.35));
}

.core-label {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.06em;
  fill: #fff;
  text-anchor: middle;
}

.out-node { stroke: var(--cobalt); stroke-width: 1.5; fill: var(--cobalt-wash); }
.out-label { fill: var(--cobalt-deep); font-weight: 500; }

.wire {
  stroke: var(--slate);
  stroke-width: 1.3;
  opacity: 0.45;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: draw 1.1s ease-out forwards;
}

.wire:nth-of-type(1) { animation-delay: 0.25s; }

.node-group { opacity: 0; animation: rise 0.6s ease-out forwards; }
.node-group[data-delay="0"] { animation-delay: 0.05s; }
.node-group[data-delay="1"] { animation-delay: 0.15s; }
.node-group[data-delay="2"] { animation-delay: 0.25s; }
.node-group[data-delay="3"] { animation-delay: 0.35s; }
.node-group[data-delay="4"] { animation-delay: 0.65s; }
.node-group[data-delay="5"] { animation-delay: 0.95s; }
.node-group[data-delay="6"] { animation-delay: 1.05s; }
.node-group[data-delay="7"] { animation-delay: 1.15s; }

.pulse { fill: var(--cobalt); opacity: 0; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.schematic-caption {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  text-align: center;
  margin-top: 14px;
}

/* ================= sections ================= */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--pad-x);
}

.section-alt {
  max-width: none;
  background: var(--paper);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.section-alt > * {
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}

.section-head { max-width: 640px; margin-bottom: clamp(40px, 5vw, 64px); }

.section-head h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 600;
}

/* ---------- cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 30px 28px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(23, 64, 232, 0.35);
  box-shadow: 0 14px 34px rgba(18, 28, 38, 0.08);
}

.card-glyph {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--cobalt-wash);
  color: var(--cobalt);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}

.card-glyph svg { width: 26px; height: 26px; }

.card h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; }

.card p { color: var(--slate); font-size: 15.5px; }

/* ---------- steps ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.step {
  position: relative;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}

.step::before {
  content: "";
  position: absolute;
  top: -3.5px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cobalt);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cobalt);
  display: block;
  margin-bottom: 12px;
}

.step h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }

.step p { color: var(--slate); font-size: 15px; }

/* ---------- why ---------- */
.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 6vw, 80px);
}

.why-head { margin-bottom: 0; }

.why-lede { color: var(--slate); margin-top: 18px; }

.why-list {
  list-style: none;
  display: grid;
  gap: 8px;
}

.why-list li {
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
}

.why-list li:first-child { border-top: 1px solid var(--hairline); }

.why-list h3 { font-size: 17.5px; font-weight: 600; margin-bottom: 6px; }

.why-list p { color: var(--slate); font-size: 15.5px; }

/* ================= contact ================= */
.contact {
  background: var(--ink);
  color: #f2f5f8;
}

.contact-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 130px) var(--pad-x);
  text-align: center;
}

.contact-eyebrow { justify-content: center; color: #93a3b5; }

.contact h2 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 600;
  max-width: 18em;
  margin: 0 auto 20px;
}

.contact-lede {
  color: #a9b7c6;
  max-width: 36em;
  margin: 0 auto 40px;
}

/* ================= footer ================= */
.site-footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 30px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-mark { font-size: 17px; }

.footer-legal { font-size: 13.5px; color: var(--slate); }

/* ================= responsive ================= */
@media (max-width: 920px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-schematic { width: 100%; max-width: 520px; margin: 0 auto; min-width: 0; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); }
}

/* ================= reduced motion ================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wire { animation: none; stroke-dashoffset: 0; }
  .node-group { animation: none; opacity: 1; }
  .pulse { display: none; }
  .btn, .card { transition: none; }
}
