/* =========================================================
   SecondZero Technology — Shared Site Stylesheet
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root{
  --ease-out: cubic-bezier(.16,1,.3,1);
  color-scheme: dark;
}

*{ scrollbar-color: rgba(148,163,184,.35) transparent; }
html{ scroll-behavior: smooth; }
body{
  font-family: 'Inter', system-ui, sans-serif;
  background-color: #09090b;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1,h2,h3,h4,.font-display{ font-family: 'Space Grotesk', system-ui, sans-serif; }
.font-mono{ font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* Custom scrollbar */
::-webkit-scrollbar{ width: 10px; height: 10px; }
::-webkit-scrollbar-track{ background: transparent; }
::-webkit-scrollbar-thumb{ background: rgba(148,163,184,.25); border-radius: 999px; border: 2px solid #09090b; }
::-webkit-scrollbar-thumb:hover{ background: rgba(148,163,184,.4); }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible{
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Fluid text-balance helper */
.text-balance{ text-wrap: balance; }

/* ---------- Logo ---------- */
.logo-img{ height: 30px; width: auto; display:block; }

/* ---------- Site chrome ---------- */
.site-header{
  position: sticky; top: 0; z-index: 50;
  background: rgba(9,9,11,.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148,163,184,.08);
}

/* Grain / noise overlay for depth */
.grain{
  position: fixed; inset: 0; pointer-events: none; z-index: 40; opacity: .03; mix-blend-mode: overlay;
  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");
}

/* ---------- Cursor particle canvas (main page) ---------- */
#particle-canvas{
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none;
}

/* ---------- Section fade helpers used before GSAP hydrates ---------- */
.gsap-hide{ opacity: 0; }
.no-js .gsap-hide{ opacity: 1 !important; }

/* ---------- Circuit-trace border draw ---------- */
.circuit-card{ position: relative; }
.circuit-card svg.circuit-trace{
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events:none;
}
.circuit-trace path{
  fill:none; stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke;
}

/* ---------- Belief boxes scatter-and-snap ---------- */
.belief-box{ will-change: transform, opacity; }

/* ---------- Generic glass surface ---------- */
.glass{ background: rgba(23,23,23,.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* ---------- Pill chain connector ---------- */
.pill-chain{ display:flex; align-items:center; gap: 0; }
.pill-chain .connector{ flex: 1 1 auto; height: 1px; background: rgba(100,116,139,.4); min-width: 18px; }
.pill{
  padding: .5rem 1rem; border-radius: 999px; font-family:'JetBrains Mono', monospace; font-size: .75rem;
  letter-spacing: .04em; white-space: nowrap; border: 1px solid rgba(100,116,139,.35); color: #94a3b8;
  position: relative;
}
.pill.active{ color:#fff; box-shadow: 0 0 0 1px currentColor, 0 0 24px -4px currentColor; }
.pill.active::after{
  content:''; position:absolute; inset:-6px; border-radius:999px; border:1px solid currentColor; opacity:.35;
  animation: pill-pulse 2.4s ease-in-out infinite;
}
@keyframes pill-pulse{ 0%,100%{ transform: scale(1); opacity:.35;} 50%{ transform: scale(1.08); opacity:0; } }

/* ---------- Adventure rail cards ---------- */
.rail-card{ transition: background-color .2s ease, border-color .2s ease, transform .2s ease; cursor: pointer; }
.rail-card[aria-selected="true"]{ background: rgba(38,38,38,.6); }
.rail-card:hover{ transform: translateX(2px); }

/* ---------- Tab panel utility ---------- */
[role="tabpanel"][hidden]{ display:none; }

/* ---------- Buttons ---------- */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:.5rem; font-weight:600; transition: all .2s ease; }
.btn-primary{ box-shadow: 0 8px 30px -8px var(--btn-glow, rgba(37,99,235,.5)); }
.btn-primary:hover{ transform: translateY(-1px); filter: brightness(1.08); }
.btn-ghost:hover{ background: rgba(148,163,184,.08); }

/* ---------- Form field base ---------- */
.field{
  width:100%; background: rgba(15,15,17,.7); border:1px solid rgba(100,116,139,.3); border-radius: .65rem;
  padding: .75rem .9rem; color:#f1f5f9; font-size:.925rem; transition: border-color .2s ease, box-shadow .2s ease;
}
.field::placeholder{ color:#64748b; }
.field:focus{ outline:none; }

/* ---------- Card hover lift ---------- */
.lift{ transition: transform .25s var(--ease-out), border-color .25s ease, box-shadow .25s ease; }
.lift:hover{ transform: translateY(-4px); }

/* ---------- Marquee-free divider ---------- */
.hairline{ height:1px; background: linear-gradient(90deg, transparent, rgba(148,163,184,.25), transparent); }

/* Utility: aspect frame for media */
.media-frame{ position: relative; border-radius: 1.25rem; overflow: hidden; }
.media-frame video, .media-frame img{ width:100%; height:100%; object-fit: cover; display:block; }
