:root {
  --ink: #0A1B33;
  --signal: #2F6FED;
  --slate: #3B4A63;
  --mist: #EEF2F8;
  --paper: #121F38;
  --brass: #B78A3D;

  --font-display: 'Sora', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --header-h: 72px;
  --max-w: 1120px;
}

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--signal); color: #fff; padding: 10px 16px;
  z-index: 200; font-family: var(--font-mono); font-size: 0.85rem;
}
.skip-link:focus { left: 12px; top: 12px; }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 0.75rem;
}

.section-inner { max-width: var(--max-w); margin: 0 auto; padding: 6rem 1.5rem; }

/* ---------- Brand mark ---------- */
.mark-spine, .mark-diag { stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.mark-node { fill: var(--ink); }
.mark-center { fill: var(--signal); }
.hero .brand-mark .mark-spine,
.hero .brand-mark .mark-diag { stroke: #fff; }
.hero .brand-mark .mark-node { fill: #fff; }

/* ---------- Header ---------- */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}
#site-header.scrolled {
  background: rgba(10, 27, 51, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.header-inner {
  max-width: var(--max-w); margin: 0 auto; height: 100%;
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: #fff; }
#site-header:not(.scrolled) .brand-word,
#site-header:not(.scrolled) .brand-mark .mark-spine,
#site-header:not(.scrolled) .brand-mark .mark-diag { color: #fff; stroke: #fff; }
#site-header:not(.scrolled) .brand-mark .mark-node { fill: #fff; }

.main-nav { display: flex; gap: 2rem; }
.main-nav a {
  color: rgba(255,255,255,0.82); text-decoration: none;
  font-size: 0.92rem; font-weight: 500;
  position: relative; padding: 6px 0;
}
.main-nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--signal); transition: width 0.25s ease;
}
.main-nav a.active { color: #fff; }
.main-nav a.active::after, .main-nav a:hover::after { width: 100%; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; padding: 0;
  position: relative; z-index: 110;
}
.nav-toggle span {
  width: 22px; height: 2px; background: #fff; display: block; border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  max-height: 0; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--paper);
  padding: 0 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.mobile-nav a {
  color: rgba(255,255,255,0.85); text-decoration: none;
  padding: 0.95rem 0.1rem; font-size: 1.05rem; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
  transition: color 0.2s ease;
}
.mobile-nav a::after { content: '→'; color: rgba(255,255,255,0.3); font-size: 0.9rem; }
.mobile-nav a:hover, .mobile-nav a:active { color: var(--signal); }
.mobile-nav .mobile-cta {
  margin: 1.1rem 0 1.3rem; padding: 0.9rem; border-radius: 8px;
  background: var(--signal); color: #fff; font-weight: 600; text-align: center;
  border-bottom: none; justify-content: center;
}
.mobile-nav .mobile-cta::after { content: none; }
.mobile-nav.open { max-height: 480px; padding: 0.5rem 1.5rem 0.5rem; }

@media (max-width: 760px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  :root { --header-h: 60px; }
  .brand-mark { width: 24px; height: 24px; }
  .brand-word { font-size: 1.02rem; }
  .header-inner { padding: 0 1.1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  background: radial-gradient(120% 90% at 50% 20%, #16294a 0%, var(--ink) 60%, #081426 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding-top: var(--header-h);
}
#hero-canvas-wrap { position: absolute; inset: 0; z-index: 1; }
#hero-canvas { width: 100%; height: 100%; display: block; }

.hero-content {
  position: relative; z-index: 2;
  text-align: center; max-width: 720px; padding: 2.5rem 1.5rem;
  color: #fff;
}
.hero-content::before {
  content: '';
  position: absolute;
  inset: -10% -6%;
  z-index: -1;
  background: radial-gradient(60% 65% at 50% 45%, rgba(10,27,51,0.72) 0%, rgba(10,27,51,0.35) 55%, rgba(10,27,51,0) 80%);
  border-radius: 50%;
}
.hero h1, .hero-intro { text-shadow: 0 2px 20px rgba(0,0,0,0.35); }
.hero .eyebrow { color: #8FB2FF; }
.hero h1 {
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}
.hero-intro {
  font-size: 1.08rem;
  color: rgba(255,255,255,0.82);
  max-width: 560px;
  margin: 0 auto 2.25rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--signal); color: #fff; }
.btn-primary:hover { background: #2560d4; }
.btn-ghost { border-color: rgba(255,255,255,0.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; }

.scroll-cue {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: rgba(255,255,255,0.6);
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.scroll-cue span {
  width: 1px; height: 30px; background: rgba(255,255,255,0.4);
  position: relative; overflow: hidden;
}
.scroll-cue span::after {
  content: ''; position: absolute; top: -30px; left: 0; width: 100%; height: 30px;
  background: var(--signal);
  animation: scrollcue 1.8s ease-in-out infinite;
}
@keyframes scrollcue { 50% { top: 30px; } 100% { top: 30px; } }
.scroll-cue p { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; margin: 0; text-transform: uppercase; }

/* ---------- About ---------- */
.about { background: var(--mist); }
.about h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); max-width: 780px; margin-bottom: 2rem; }
.about-body { max-width: 700px; color: var(--slate); font-size: 1.02rem; }
.about-body p { margin: 0 0 1.2rem; }

/* ---------- Build ---------- */
.build { background: var(--paper); color: #fff; }
.build h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); max-width: 780px; }
.build-lede { color: rgba(255,255,255,0.7); max-width: 640px; margin: 1rem 0 3rem; }

.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  padding: 2rem 1.6rem 1.8rem;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(47,111,237,0.5); background: rgba(255,255,255,0.06); }
.card-node {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 16px 2px rgba(47,111,237,0.65);
  margin-bottom: 1.2rem;
}
.card h3 { font-size: 1.25rem; margin-bottom: 0.7rem; }
.card p { color: rgba(255,255,255,0.72); font-size: 0.94rem; margin: 0; }

.badge {
  display: inline-block; font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.3rem 0.6rem; border-radius: 999px;
  background: rgba(183,138,61,0.18); color: var(--brass);
  border: 1px solid rgba(183,138,61,0.4);
  margin-top: 1.2rem;
}
.badge-live {
  background: rgba(47,111,237,0.18); color: #8FB2FF; border-color: rgba(47,111,237,0.45);
  margin: 0 0 1.2rem;
}

.featured-card {
  background: linear-gradient(135deg, rgba(47,111,237,0.14), rgba(47,111,237,0.02));
  border: 1px solid rgba(47,111,237,0.35);
  border-radius: 16px;
  padding: 2.4rem;
  margin-bottom: 2.5rem;
}
.featured-text h3 { font-size: 1.7rem; margin-bottom: 0.8rem; }
.featured-text p { color: rgba(255,255,255,0.8); max-width: 640px; margin: 0 0 1.2rem; }
.feature-list { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; grid-template-columns: repeat(2, minmax(180px,1fr)); gap: 0.6rem 1.5rem; }
.feature-list li { font-size: 0.92rem; color: #fff; padding-left: 1.3rem; position: relative; }
.feature-list li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.fine-print { font-family: var(--font-mono); font-size: 0.78rem; color: rgba(255,255,255,0.55); margin: 0.9rem 0 0; }

.build-closing { color: rgba(255,255,255,0.7); max-width: 620px; margin-top: 1rem; }

/* ---------- Newsletter ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.newsletter {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.newsletter-inner {
  max-width: 640px;
  text-align: center;
  padding: 5.5rem 1.5rem;
  position: relative;
  z-index: 1;
}
.newsletter-node {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 24px 4px rgba(47,111,237,0.7);
  margin: 0 auto 1.5rem;
}
.newsletter h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.newsletter-body { color: rgba(255,255,255,0.72); max-width: 480px; margin: 0 auto 2rem; }

.newsletter-form {
  display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap;
}
.newsletter-form input {
  flex: 1 1 260px; max-width: 340px;
  font-family: var(--font-body); font-size: 1rem;
  padding: 0.85rem 1rem; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06); color: #fff;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.45); }
.newsletter-form input:focus { border-color: var(--signal); background: rgba(255,255,255,0.1); }
.newsletter .form-status { color: rgba(255,255,255,0.65); margin-top: 1rem; }

/* ---------- Contact ---------- */
.contact { background: var(--mist); }
.contact h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.contact-body { max-width: 560px; color: var(--slate); margin: 1rem 0 2.5rem; }

.contact-form { max-width: 520px; }
.field { margin-bottom: 1.3rem; }
.field label {
  display: block; font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate);
  margin-bottom: 0.4rem;
}
.field input, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem;
  padding: 0.8rem 0.9rem; border-radius: 8px;
  border: 1px solid #C7D1E0; background: #fff; color: var(--ink);
  resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--signal); }
.form-status { font-size: 0.9rem; margin-top: 0.9rem; color: var(--slate); min-height: 1.2em; }
.contact-alt { margin-top: 2rem; color: var(--slate); font-size: 0.95rem; }
.contact-alt a { color: var(--signal); font-weight: 600; text-decoration: none; }
.contact-alt a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.6); border-top: 1px solid rgba(255,255,255,0.08); }
.footer-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 2rem 1.5rem 0.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 0.7rem; }
.footer-inner p { margin: 0; font-size: 0.85rem; }
.site-footer .brand-mark .mark-spine, .site-footer .brand-mark .mark-diag { stroke: rgba(255,255,255,0.7); }
.site-footer .brand-mark .mark-node { fill: rgba(255,255,255,0.7); }

.footer-newsletter-form { flex-wrap: nowrap; gap: 0.5rem; }
.footer-newsletter-form input {
  flex: 0 1 220px; padding: 0.6rem 0.85rem; font-size: 0.9rem;
  border-radius: 7px;
}
.btn-ghost-footer {
  font-family: var(--font-body); font-weight: 600; font-size: 0.88rem;
  padding: 0.6rem 1.1rem; border-radius: 7px;
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer; white-space: nowrap;
}
.btn-ghost-footer:hover { border-color: var(--signal); color: var(--signal); }
.footer-form-status {
  max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem 1.5rem;
  font-size: 0.82rem; text-align: right;
}
@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-newsletter-form { width: 100%; }
  .footer-newsletter-form input { flex: 1 1 auto; }
  .footer-form-status { text-align: left; }
}
