/* ============================================================
   STACKFORT — Landing Page Styles
   ============================================================ */

:root {
  --bg: #0b0d10;
  --bg-alt: #0f1216;
  --surface: #14171c;
  --surface-2: #191d23;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef1f3;
  --text-dim: #a7adb5;
  --text-faint: #7a8087; /* WCAG AA: 4.88:1 on --bg, passes for small text (was #6b7178 at 3.95:1) */
  --accent: #3ee6c4;
  --accent-2: #7c8cff;
  --accent-soft: rgba(62, 230, 196, 0.12);
  --danger-legacy: #ff8a5c;

  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1160px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- background texture ---------- */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

/* ---------- typography helpers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 22px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.section-title {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  font-weight: 600;
  max-width: 720px;
}

.section-sub {
  color: var(--text-dim);
  font-size: 16.5px;
  max-width: 620px;
  margin: 0 0 44px;
}

.text-gradient {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hl { color: var(--text); font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #06110d;
  box-shadow: 0 0 0 rgba(62,230,196,0);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(62,230,196,0.25); }
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 10px 20px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 13, 16, 0.72);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 16px;
  margin-right: auto;
}
.brand-mark { width: 24px; height: 24px; color: var(--accent); }
.brand-mark svg { width: 100%; height: 100%; }

.main-nav {
  display: flex;
  gap: 30px;
  font-size: 14.5px;
  color: var(--text-dim);
}
.main-nav a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px; height: 2px; background: var(--text);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 96px 0 0;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  top: -120px; left: 50%;
  width: 900px; height: 500px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(62,230,196,0.16) 0%, rgba(124,140,255,0.08) 40%, transparent 72%);
  filter: blur(10px);
  z-index: -1;
  pointer-events: none;
}
.hero-inner { max-width: 880px; }
.hero-title {
  font-size: clamp(38px, 6.4vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 26px;
}
.hero-sub {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 0 34px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.hero-note {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}

.hero-stats {
  margin-top: 76px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
}
.stat {
  padding: 26px 24px;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 600;
  color: var(--accent);
}
.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  overflow: hidden;
  background: var(--bg-alt);
}
.marquee { width: 100%; overflow: hidden; }
.marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: scroll-left 30s linear infinite;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}
.marquee-track span::after { content: "•"; margin-left: 48px; color: var(--border-strong); }
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   SECTIONS (generic)
   ============================================================ */
.section { padding: 108px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- services cards ---------- */
.cards.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.card-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  display: block;
  margin-bottom: 18px;
}
.card h3 { font-size: 22px; margin: 0 0 12px; }
.card > p { color: var(--text-dim); font-size: 15px; margin: 0 0 18px; }
.card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.card-list li {
  font-size: 13.5px;
  color: var(--text-dim);
  padding-left: 18px;
  position: relative;
}
.card-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- method grid ---------- */
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.method-item {
  background: var(--bg-alt);
  padding: 30px 26px;
}
.method-num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  display: block;
  margin-bottom: 14px;
}
.method-item h4 { font-size: 17px; margin: 0 0 10px; }
.method-item p { font-size: 14px; color: var(--text-dim); margin: 0; }

/* ---------- impact / stats ---------- */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}
.impact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: left;
}
.impact-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}
.impact-label { font-size: 13.5px; color: var(--text-dim); }

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 22px;
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.chart-head h4 { margin: 0; font-size: 16px; }
.chart-legend {
  display: flex;
  gap: 20px;
  font-size: 12.5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.chart-legend span { display: flex; align-items: center; gap: 7px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.dot-legacy { background: var(--danger-legacy); }
.dot-managed { background: var(--accent); }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-line-legacy { stroke: var(--danger-legacy); }
.chart-line-managed { stroke: var(--accent); }
.chart-caption { margin: 14px 0 0; font-size: 12.5px; color: var(--text-faint); font-family: var(--font-mono); }

/* ---------- timeline ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.timeline-item {
  border-top: 2px solid var(--border-strong);
  padding-top: 20px;
  position: relative;
}
.timeline-item::before {
  content: "";
  position: absolute;
  top: -2px; left: 0;
  width: 36px; height: 2px;
  background: var(--accent);
}
.timeline-index {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}
.timeline-item h4 { font-size: 18px; margin: 0 0 10px; }
.timeline-item p { font-size: 14px; color: var(--text-dim); margin: 0; }

/* ---------- why grid ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.why-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent);
}
.why-item h4 {
  font-size: 18px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.why-item h4::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  flex-shrink: 0;
}
.why-item p { font-size: 14.5px; color: var(--text-dim); margin: 0; }

/* ---------- coverage ---------- */
.coverage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.coverage-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  background: var(--surface);
}
.coverage-icon { color: var(--accent); font-size: 12px; }

/* ---------- team ---------- */
.founders-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin-bottom: 32px;
}
.founder-card { text-align: left; }
.founder-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 18px;
  position: relative;
}
.founder-photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.15) contrast(1.03);
}
.founder-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(11,13,16,0.55) 100%);
  pointer-events: none;
}
.founder-card h3 { margin: 0 0 4px; font-size: 21px; }
.founder-role { margin: 0 0 4px; color: var(--accent); font-size: 14px; font-weight: 600; }
.founder-exp { margin: 0; color: var(--text-dim); font-size: 13.5px; font-family: var(--font-mono); }

.team-plus-card {
  max-width: 900px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 30px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(62,230,196,0.06), rgba(124,140,255,0.04));
}
.team-plus-num {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
}
.team-plus-copy h4 { margin: 0 0 8px; font-size: 17px; }
.team-plus-copy p { margin: 0; font-size: 14px; color: var(--text-dim); max-width: 560px; }

/* ---------- contact ---------- */
.section-contact { padding-bottom: 130px; }
.contact-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-copy .section-sub { margin-bottom: 26px; }
.contact-direct { font-size: 15px; color: var(--text-dim); }
.contact-direct a { color: var(--accent); font-weight: 600; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-form label { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--text-dim); }
.contact-form input,
.contact-form textarea {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14.5px;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-note { font-size: 12px; color: var(--text-faint); margin: 0; text-align: center; }

.cf-turnstile { display: flex; justify-content: center; }
.captcha-warning {
  margin: -8px 0 0;
  font-size: 12.5px;
  color: var(--danger-legacy);
  text-align: center;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-weight: 600; letter-spacing: 0.04em;
}
.footer-brand .brand-mark { width: 20px; height: 20px; color: var(--accent); }
.footer-tag { color: var(--text-dim); font-size: 13.5px; flex: 1 1 260px; }
.footer-links { display: flex; gap: 22px; font-size: 13.5px; color: var(--text-dim); }
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  width: 100%;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .cards.services-grid,
  .method-grid,
  .timeline,
  .impact-grid,
  .why-grid,
  .coverage-grid { grid-template-columns: repeat(2, 1fr); }
  .founders-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .contact-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .main-nav.open {
    display: flex;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px 24px;
    gap: 18px;
  }
  .cards.services-grid,
  .method-grid,
  .timeline,
  .impact-grid,
  .why-grid,
  .coverage-grid,
  .founders-grid { grid-template-columns: 1fr; }
  .team-plus-card { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
  .section { padding: 72px 0; }
  .hero { padding-top: 64px; }
}
