/* ════════════════════════════════════════════════════════════════
   Ignition Agency — shared design system
   Space-theme tokens, nav, footer, cursor, starfield + reusable bits.
   Kept in sync with index.html (the homepage keeps its own inline copy).
   ════════════════════════════════════════════════════════════════ */

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

:root {
  --bg: #03040a;
  --surface: #080b18;
  --surface2: #0d1128;
  --border: rgba(100,140,255,0.12);
  --accent: #4f7cff;
  --accent2: #ff6b35;
  --accent3: #00d4ff;
  --glow: rgba(79,124,255,0.4);
  --text: #e8eaf6;
  --muted: #7b82a8;
  --font: 'Space Grotesk', sans-serif;
  --mono: 'Space Mono', monospace;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
}

a { color: var(--accent); }

/* ── Custom cursor ── */
.cursor {
  position: fixed;
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%,-50%);
  transition: transform 0.1s, width 0.3s, height 0.3s, background 0.3s;
  mix-blend-mode: screen;
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid rgba(79,124,255,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%,-50%);
  transition: transform 0.15s ease-out, width 0.3s, height 0.3s;
}
.cursor.expand { width: 20px; height: 20px; background: var(--accent2); }
.cursor-ring.expand { width: 60px; height: 60px; border-color: var(--accent2); }

/* ── Starfield canvas ── */
#space-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  border-bottom: 1px solid transparent;
  transition: all 0.4s;
}
.nav.scrolled {
  background: rgba(3,4,10,0.85);
  backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}
.logo-text {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #fff;
  text-decoration: none;
}
.logo-dot { color: var(--accent); }
.nav nav { display: flex; }
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.cta-link {
  color: var(--accent);
  border: 1px solid rgba(79,124,255,0.4);
  padding: 0.4rem 1rem;
  border-radius: 2px;
}
.nav-links a.cta-link:hover { background: var(--accent); color: #fff; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

/* ── Buttons ── */
.btn {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.9rem 2.2rem;
  border-radius: 2px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  cursor: none;
  border: none;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}
.btn:hover::before { transform: translateX(100%); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 30px rgba(79,124,255,0.4);
}
.btn-primary:hover {
  background: #6b93ff;
  box-shadow: 0 0 50px rgba(79,124,255,0.6);
  transform: translateY(-2px);
}
.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ── Shared section helpers ── */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; }
h2 em, h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section {
  position: relative;
  z-index: 1;
  padding: 8rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}
.h-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Form fields ── */
input, textarea, select {
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--text);
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,124,255,0.1);
}
textarea { resize: vertical; min-height: 100px; }

/* ── Footer ── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 5rem 3rem 3rem;
  background: rgba(3,4,10,0.9);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-brand p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 1rem;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col ul li { font-size: 0.9rem; color: var(--muted); }
.footer-col ul li a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Reveal — visible by default, JS enhances ── */
.reveal { transition: opacity 0.7s ease, transform 0.7s ease; }
.js-loaded .reveal { opacity: 0; transform: translateY(40px); }
.js-loaded .reveal.in { opacity: 1; transform: translateY(0); }

/* ── Noise overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 9997;
}

/* ── Mobile ── */
@media (max-width: 900px) {
  .nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: rgba(3,4,10,0.97); border-bottom: 1px solid var(--border); flex-direction: column; gap: 0; padding: 1rem 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.9rem 2rem; border-radius: 0; }
  .hamburger { display: flex; }
  .section { padding: 5rem 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
}
