/* =====================================================
   SipanLabs LLC — style.css
   Brand: Gold #d4af37 + Turquoise #40e0d0 on near-black
   Type:  Bebas Neue (display) · DM Sans (body) · JetBrains Mono (labels)
   Signature: gold→turquoise circuit trace echoing the emblem
   ===================================================== */

:root {
  --gold: #d4af37;
  --gold-dim: #a07d1a;
  --turquoise: #40e0d0;
  --turquoise-dim: #28a89a;
  --bg: #0a0a0a;
  --bg-alt: #0d1117;
  --card: #101418;
  --border: rgba(212, 175, 55, 0.22);
  --border-teal: rgba(64, 224, 208, 0.18);
  --text: #f0f2f0;
  --text-dim: #9aa3a0;
  --text-muted: #5a6560;
  --grid: #141414;

  --font-display: "Bebas Neue", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --maxw: 1080px;
  --pad: clamp(1.25rem, 5vw, 4rem);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.accent-gold { color: var(--gold); }
.accent-turquoise { color: var(--turquoise); }

/* ---------- Ambient background ---------- */
.grid {
  position: fixed; inset: 0;
  background-image: radial-gradient(var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.45; z-index: 1; pointer-events: none;
  animation: gridMove 24s linear infinite;
}
@keyframes gridMove { to { background-position: 32px 32px; } }

#particles { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0.55; }

main, .nav, .footer, .mobile-nav { position: relative; z-index: 3; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem var(--pad);
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; align-items: center; gap: 0.6rem; }
.nav-logo { width: 38px; height: 38px; object-fit: contain; }
.nav-wordmark {
  font-family: var(--font-display); font-size: 1.5rem;
  letter-spacing: 0.06em; color: var(--gold); line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.02em;
  color: var(--text-dim); transition: color 0.2s;
}
.nav-links a:hover { color: var(--turquoise); }
.nav-cta {
  border: 1px solid var(--border); border-radius: 2px;
  padding: 0.5rem 0.9rem; color: var(--gold) !important;
}
.nav-cta:hover { background: var(--gold); color: var(--bg) !important; border-color: var(--gold); }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.hamburger span { width: 24px; height: 2px; background: var(--gold); transition: transform 0.3s, opacity 0.3s; }
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 0; z-index: 19;
  background: rgba(8, 9, 11, 0.97); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.8rem;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.mobile-nav.is-open { opacity: 1; pointer-events: auto; }
.mobile-nav a { font-family: var(--font-display); font-size: 2rem; letter-spacing: 0.05em; color: var(--text); }
.mobile-nav a:hover { color: var(--gold); }

/* ---------- HERO ---------- */
.hero { padding: clamp(3rem, 9vw, 7rem) var(--pad) clamp(3rem, 7vw, 5rem); }
.hero-inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.hero-logo {
  width: clamp(150px, 28vw, 230px); margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 40px rgba(64, 224, 208, 0.18));
}
.eyebrow {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--turquoise); margin-bottom: 1rem;
}
.hero-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 5.2rem); line-height: 0.98; letter-spacing: 0.01em;
  margin-bottom: 1.4rem;
}
.hero-sub {
  max-width: 620px; margin: 0 auto 2.6rem;
  color: var(--text-dim); font-size: clamp(1rem, 2.2vw, 1.15rem);
}

/* Signature circuit */
.circuit { position: relative; max-width: 760px; margin: 0 auto 2.6rem; }
.circuit-trace { width: 100%; height: 60px; display: block; }
.trace-path {
  fill: none; stroke: url(#traceGrad); stroke-width: 2;
  stroke-dasharray: 1200; stroke-dashoffset: 1200;
}
.circuit.visible .trace-path { animation: draw 1.6s 0.3s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.circuit-nodes {
  position: absolute; inset: 0; display: flex; justify-content: space-between;
  align-items: center; padding: 0 0.5rem;
}
.node { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; width: 33%; }
.node-dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}
.node:nth-child(2) .node-dot { background: #79c9bd; box-shadow: 0 0 0 4px rgba(64, 224, 208, 0.13); }
.node:nth-child(3) .node-dot { background: var(--turquoise); box-shadow: 0 0 0 4px rgba(64, 224, 208, 0.16); }
.node-label {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--text); text-transform: uppercase; white-space: nowrap;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-mono); font-size: 0.85rem;
  letter-spacing: 0.04em; padding: 0.85rem 1.7rem; border-radius: 2px;
  border: 1px solid transparent; cursor: pointer; transition: all 0.2s;
}
.btn-primary { background: var(--gold); color: var(--bg); font-weight: 700; }
.btn-primary:hover { background: var(--turquoise); transform: translateY(-2px); }
.btn-ghost { border-color: var(--border-teal); color: var(--turquoise); }
.btn-ghost:hover { border-color: var(--turquoise); background: rgba(64, 224, 208, 0.08); }
.btn-block { width: 100%; }

/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(3.5rem, 9vw, 6rem) var(--pad); }
.section-alt { max-width: none; background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-alt > * { max-width: var(--maxw); margin-inline: auto; }
.section-eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 0.9rem;
}
.section-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.9rem, 5vw, 3.1rem); line-height: 1.04; letter-spacing: 0.01em;
  margin-bottom: 2rem; max-width: 760px;
}
.prose { max-width: 680px; color: var(--text-dim); font-size: 1.06rem; }

/* ---------- Steps (approach) ---------- */
.steps { list-style: none; display: grid; gap: 1.5rem; counter-reset: none; }
.step { display: flex; gap: 1.5rem; align-items: flex-start; padding: 1.5rem; border: 1px solid var(--border); border-radius: 4px; background: rgba(16, 20, 24, 0.5); }
.step-num {
  font-family: var(--font-display); font-size: 2.4rem; line-height: 1;
  color: var(--gold); flex-shrink: 0; min-width: 56px;
}
.step:nth-child(2) .step-num { color: #79c9bd; }
.step:nth-child(3) .step-num { color: var(--turquoise); }
.step-body h3 { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 0.02em; margin-bottom: 0.5rem; font-weight: 400; }
.step-body p { color: var(--text-dim); }

/* ---------- Cards (services) ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.card {
  padding: 1.6rem; border: 1px solid var(--border); border-radius: 4px;
  background: var(--card); transition: transform 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-teal); }
.card-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--turquoise);
  border: 1px solid var(--border-teal); border-radius: 2px; padding: 0.2rem 0.55rem; margin-bottom: 0.9rem;
}
.card h3 { font-family: var(--font-display); font-size: 1.45rem; font-weight: 400; letter-spacing: 0.02em; margin-bottom: 0.5rem; }
.card p { color: var(--text-dim); font-size: 0.96rem; }
.services-note {
  margin-top: 1.5rem; font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--text-muted); letter-spacing: 0.02em;
}

/* ---------- Why ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.why-item { padding: 1.5rem; border-top: 2px solid var(--gold); background: rgba(16, 20, 24, 0.4); }
.why-item:nth-child(2) { border-color: #79c9bd; }
.why-item:nth-child(3) { border-color: var(--turquoise); }
.why-mark { font-size: 1.8rem; color: var(--gold); display: block; margin-bottom: 0.6rem; }
.why-item:nth-child(3) .why-mark { color: var(--turquoise); }
.why-item h3 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 400; letter-spacing: 0.02em; margin-bottom: 0.5rem; }
.why-item p { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- Form ---------- */
.risk-form { max-width: 560px; display: grid; gap: 1.1rem; margin-top: 0.5rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--text-dim); }
.field .optional { color: var(--text-muted); }
.field input, .field select {
  background: var(--card); border: 1px solid var(--border); border-radius: 3px;
  padding: 0.75rem 0.9rem; color: var(--text); font-family: var(--font-body); font-size: 0.98rem;
  transition: border-color 0.2s;
}
.field input::placeholder { color: var(--text-muted); }
.field input:focus, .field select:focus { outline: none; border-color: var(--turquoise); }
.field select { appearance: none; cursor: pointer; }

/* ---------- Footer ---------- */
.footer { padding: 2.5rem var(--pad); border-top: 1px solid var(--border); max-width: var(--maxw); margin: 0 auto; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.footer-mark { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: 0.05em; color: var(--gold); }
.footer-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); }
.footer-fine { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .cards { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .circuit { display: none; } /* trace cramps on mobile; nodes shown as list below instead */
  .step { flex-direction: column; gap: 0.6rem; }
}

/* Mobile fallback for the three outcomes when circuit is hidden */
@media (max-width: 760px) {
  .hero-actions { margin-top: 0.5rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .trace-path { stroke-dashoffset: 0; }
}
