/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── TOKENS ─── */
:root {
  --bg:         #080810;
  --surface:    #0f0f1a;
  --border:     #1c1c2e;
  --text:       #e2e4f0;
  --muted:      #5a5f7a;
  --accent:     #4f9eff;
  --accent-dim: #1a2f4e;
  --mono:       'JetBrains Mono', monospace;
  --sans:       'Inter', sans-serif;
}

/* ─── BASE ─── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ─── NAV ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(8, 8, 16, 0.88);
  border-color: var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
}

.nav-logo::before {
  content: '// ';
  color: var(--accent);
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.875rem;
  transition: color 0.2s;
}

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

.nav-cta {
  font-family: var(--mono) !important;
  font-size: 0.775rem !important;
  color: var(--accent) !important;
  border: 1px solid var(--accent-dim);
  padding: 0.4rem 1rem;
  border-radius: 4px;
  transition: background 0.2s, border-color 0.2s !important;
}

.nav-cta:hover {
  background: var(--accent-dim);
  border-color: var(--accent) !important;
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 7rem 2rem 5rem;
}

/* dot grid */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #1e1e32 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

/* vignette over grid */
.hero-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 85% at 50% 50%, transparent 30%, var(--bg) 100%);
}

/* content */
.hero-content {
  max-width: 740px;
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.35rem 0.9rem;
  border-radius: 99px;
  margin-bottom: 2.25rem;
  background: var(--surface);
  letter-spacing: 0.03em;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--accent); }
  50%       { opacity: 0.25; box-shadow: none; }
}

.hero-headline {
  font-family: var(--mono);
  font-size: clamp(2.8rem, 8vw, 5.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 1.75rem;
}

.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.175rem);
  color: var(--muted);
  font-weight: 300;
  max-width: 520px;
  margin: 0 auto 2.75rem;
  line-height: 1.75;
}

/* CTA buttons */
.hero-actions {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.8rem 1.875rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #070710;
  font-weight: 700;
}

.btn-primary:hover {
  background: #73b3ff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(79, 158, 255, 0.28);
}

.btn-ghost {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: #3a3a52;
}

/* meta strip */
.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.hero-meta .sep    { opacity: 0.25; }
.hero-meta .accent { color: var(--accent); }

/* ─── DECORATIVE NODES ─── */
.hero-nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.node {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0.18;
}

.node::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

.node-a { width: 14px; height: 14px; top: 22%; left: 15%;  animation: drift 7s  ease-in-out infinite; }
.node-b { width:  9px; height:  9px; top: 38%; right: 18%; animation: drift 9s  ease-in-out infinite 1.2s; }
.node-c { width: 18px; height: 18px; bottom: 28%; left: 28%; animation: drift 8s  ease-in-out infinite 0.6s; }
.node-d { width:  7px; height:  7px; top: 62%; right: 14%; animation: drift 6s  ease-in-out infinite 2s; }
.node-e { width: 11px; height: 11px; bottom: 38%; right: 32%; animation: drift 10s ease-in-out infinite 1.8s; }

@keyframes drift {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-14px); }
}

/* connecting lines SVG */
.node-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.nl {
  stroke: var(--accent);
  stroke-width: 1px;
  opacity: 0.07;
}

/* ─── SHARED SECTION PRIMITIVES ─── */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.label-num {
  color: var(--accent);
  font-weight: 700;
}

.section-heading {
  font-family: var(--mono);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 4rem;
}

/* ─── HOW IT WORKS ─── */
.hiw {
  padding: 7rem 0;
  border-top: 1px solid var(--border);
  position: relative;
}

/* subtle glow behind the section */
.hiw::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.35;
}

/* step grid */
.hiw-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 0;
}

/* connector between steps */
.hiw-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 3.5rem;
  gap: 0.25rem;
  color: var(--accent);
  opacity: 0.3;
}

.connector-line {
  width: 1px;
  height: 40px;
  background: var(--border);
  display: none; /* hidden on desktop, shown on mobile */
}

.connector-arrow {
  font-family: var(--mono);
  font-size: 1.25rem;
  padding: 0 1.25rem;
}

/* individual step card */
.hiw-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem 1.75rem 1.75rem;
  position: relative;
  transition: border-color 0.25s;
}

.hiw-step:hover {
  border-color: #2a2a42;
}

.step-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.step-icon {
  color: var(--accent);
  opacity: 0.75;
  margin-bottom: 1.1rem;
}

.step-title {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.step-body {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

/* inline code-style tag at step bottom */
.step-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  background: rgba(79, 158, 255, 0.06);
  border: 1px solid var(--accent-dim);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

.tag-key   { color: var(--muted); }
.tag-val   { color: var(--text); }
.tag-arrow { color: var(--accent); opacity: 0.5; }
.tag-val.accent { color: var(--accent); }

/* ─── KEY FEATURES ─── */
.features {
  padding: 7rem 0;
  border-top: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.feature-card {
  background: var(--surface);
  padding: 2rem 1.875rem;
  transition: border-color 0.2s;
  outline: 1px solid transparent;
  outline-offset: -1px;
}

.feature-card:hover {
  background: #0d0d1c;
  outline-color: #2a2a3e;
}

.feat-icon {
  color: var(--accent);
  opacity: 0.8;
  margin-bottom: 1.1rem;
}

.feat-title {
  font-family: var(--mono);
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.feat-body {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
  font-weight: 300;
}

/* ─── EARLY ACCESS ─── */
.early-access {
  padding: 7rem 0;
  border-top: 1px solid var(--border);
}

.ea-inner {
  max-width: 540px;
}

.ea-heading {
  margin-bottom: 1rem;
}

.ea-sub {
  font-size: 0.975rem;
  color: var(--muted);
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: 2.25rem;
  max-width: 460px;
}

.form-row {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}

.form-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.825rem;
  padding: 0.8rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}

.form-input::placeholder { color: var(--muted); opacity: 0.6; }

.form-input:focus {
  border-color: var(--accent);
}

.form-btn {
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}

/* loading state */
.btn-loading { display: none; }

.form-btn.loading .btn-label  { visibility: hidden; }
.form-btn.loading .btn-loading {
  display: block;
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  letter-spacing: 0.2em;
  animation: ellipsis 1s steps(3, end) infinite;
}

@keyframes ellipsis {
  0%   { content: '.'; }
  33%  { content: '..'; }
  66%  { content: '...'; }
}

.form-notice {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  opacity: 0.55;
}

/* success / error states */
.ea-success,
.ea-error {
  display: none;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.825rem;
  margin-top: 1rem;
}

.ea-success.visible,
.ea-error.visible  { display: flex; }

.ea-success { color: #5ecb87; }
.ea-error   { color: #e06c75; }

.success-icon {
  font-size: 1rem;
  line-height: 1;
}

/* ─── FOOTER ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.footer-logo::before {
  content: '// ';
  color: var(--accent);
  font-weight: 400;
}

.footer-tagline {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.5;
}

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

.footer-links a {
  font-size: 0.825rem;
  color: var(--muted);
  transition: color 0.2s;
}

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

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .hiw-steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hiw-connector {
    flex-direction: row;
    padding-top: 0;
    padding: 1rem 0;
    justify-content: center;
  }

  .connector-line {
    display: block;
    width: 40px;
    height: 1px;
  }

  .connector-arrow {
    padding: 0 0.5rem;
    font-size: 1rem;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
  }

  .form-btn {
    width: 100%;
    justify-content: center;
  }

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

  .footer-tagline { display: none; }
}
