/* ============================================================
   CLEAN IN PROGRESS — Design system
   Deep navy + electric blue, Manrope, premium & technical
   ============================================================ */

:root {
  /* Surfaces */
  --bg:        #06121F;
  --bg-2:      #0A1B2E;
  --surface:   #0E2238;
  --surface-2: #142B45;
  --line:      rgba(255,255,255,0.08);
  --line-2:    rgba(255,255,255,0.14);

  /* Text */
  --ink:       #F4F8FC;
  --ink-mute:  #A8BACB;
  --ink-dim:   #6B7E92;

  /* Accent */
  --blue:      #1FA9F0;     /* logo bright blue */
  --blue-2:    #5BC2F5;
  --blue-deep: #1786C4;
  --blue-glow: rgba(31,169,240,0.25);

  /* Status */
  --ok:        #3DDC97;
  --warn:      #F2B544;

  /* Layout */
  --radius:    14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --maxw:      1440px;
  --gutter:    clamp(20px, 4vw, 56px);

  /* Type */
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(31,169,240,0.10), transparent 70%),
    radial-gradient(700px 500px at -10% 30%, rgba(31,169,240,0.06), transparent 70%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* Subtle grid texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 100%);
}

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

/* ===== Type ===== */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 .4em;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; }
h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.08; }
h3 { font-size: clamp(20px, 2vw, 24px); line-height: 1.2; }
p  { color: var(--ink-mute); text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--blue);
}

/* ===== Layout ===== */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

section { padding-block: clamp(64px, 10vw, 120px); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--blue);
  color: #02101E;
  box-shadow: 0 10px 30px -10px var(--blue-glow), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { background: var(--blue-2); box-shadow: 0 14px 40px -10px rgba(31,169,240,.55); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-2); }

.btn-mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(6, 18, 31, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-block: 16px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 16px;
  margin-right: auto;
}
.nav-logo img {
  width: 38px; height: 38px;
  border-radius: 8px;
  object-fit: cover;
}
.nav-logo b { color: var(--blue); font-weight: 800; }
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-mute);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface); }
.nav-links a.active { color: var(--ink); background: var(--surface); }
.nav-cta { margin-left: 12px; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink);
  width: 40px; height: 40px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 920px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 70px; left: var(--gutter); right: var(--gutter);
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
  }
  .nav.open .nav-cta { display: inline-flex; margin: 12px 0 0 0; }
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding-block: 56px 28px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 16px;
}
.footer-grid ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-grid a { color: var(--ink-mute); font-size: 14px; }
.footer-grid a:hover { color: var(--blue); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-dim);
  font-size: 12px;
  font-family: var(--font-mono);
}
.footer-brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.footer-brand img { width: 36px; height: 36px; border-radius: 8px; }
.footer-tag { color: var(--ink-mute); font-size: 14px; max-width: 320px; }

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}

/* ===== Cards & shared blocks ===== */
.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line-2), transparent);
  border: 0;
  margin: 0;
}

/* Tag chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(31,169,240,0.10);
  color: var(--blue);
  border: 1px solid rgba(31,169,240,0.25);
}
.chip-mute {
  background: var(--surface);
  color: var(--ink-mute);
  border-color: var(--line);
}

/* Page hero (non-home) */
.page-hero {
  padding-block: 100px 60px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 80% 0%, rgba(31,169,240,0.18), transparent 70%);
  pointer-events: none;
}
.page-hero h1 { max-width: 14ch; }
.page-hero p { max-width: 56ch; font-size: 18px; }

/* Big stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.stat {
  border-top: 1px solid var(--line-2);
  padding-top: 18px;
}
.stat .num {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.stat .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* Form base */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
}
.field input, .field select, .field textarea {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--ink);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(31,169,240,0.12);
}
.field textarea { resize: vertical; min-height: 120px; }

/* Image placeholder (striped) */
.img-placeholder {
  background-color: var(--surface);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255,255,255,0.04) 0 12px,
    transparent 12px 24px
  );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  min-height: 220px;
}

/* Utility */
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-mute); }
.dim { color: var(--ink-dim); }
.center { text-align: center; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.spacer-lg { height: 80px; }

/* Anim */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.fade-up { animation: fadeUp .7s ease both; }
