/* ============================================================
   Kgosi Labs — shared stylesheet
   Loaded by every page. Tailwind handles utility classes;
   this file owns the design tokens, animations, and components.
============================================================ */

/* ---------- Base ---------- */
*, *::before, *::after {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  background: #050505 !important;
  color: #ffffff;
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  letter-spacing: -0.005em;
}
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

.font-display       { font-family: 'Geist', system-ui, sans-serif; letter-spacing: -0.015em; }
.font-italic-serif  { font-family: 'Instrument Serif', serif; font-style: italic; letter-spacing: 0; font-weight: 400; }
.font-mono          { font-family: 'JetBrains Mono', ui-monospace, monospace; }

::selection { background: rgba(52, 245, 168, 0.25); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #1f1f1f; border-radius: 10px; border: 2px solid #050505; }
::-webkit-scrollbar-thumb:hover { background: #2a2a2a; }

/* ---------- Animation keyframes ---------- */
@keyframes drift1     { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,40px) scale(1.1); } }
@keyframes drift2     { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px,30px) scale(1.15); } }
@keyframes drift3     { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-40%,-60%) scale(1.2); } }
@keyframes pulseRing  { 0% { transform: translate(-50%,-50%) scale(0.7); opacity: 0; } 50% { opacity: 0.55; } 100% { transform: translate(-50%,-50%) scale(1.4); opacity: 0; } }
@keyframes marquee    { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes growBar    { from { width: 0; } }
@keyframes blink      { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }
@keyframes fadeIn     { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 900ms cubic-bezier(0.16,1,0.3,1), transform 900ms cubic-bezier(0.16,1,0.3,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Layout ---------- */
.container-shell { max-width: 1280px; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; }
@media (min-width: 768px) { .container-shell { padding-left: 2.5rem; padding-right: 2.5rem; } }

/* ---------- Glass cards ---------- */
.glass {
  position: relative; overflow: hidden; border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.glass-glow {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 30px 60px -30px rgba(11,223,134,0.15);
}

/* ---------- Atmosphere ---------- */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  mix-blend-mode: overlay; opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.45 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border-radius: 999px; border: 1px solid rgba(52,245,168,0.3);
  background: rgba(255,255,255,0.025);
  padding: 4px 12px;
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: #34f5a8; backdrop-filter: blur(8px);
}
.eyebrow.gold { border-color: rgba(230,192,103,0.3); color: #e6c067; }
.eyebrow .dot { display: inline-block; width: 6px; height: 6px; border-radius: 999px; background: #34f5a8; box-shadow: 0 0 10px #34f5a8; }
.eyebrow.gold .dot { background: #e6c067; box-shadow: 0 0 10px #e6c067; }

/* ---------- Buttons ---------- */
.btn-primary {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; background: #0bdf86;
  padding: 12px 24px; font-size: 14px; font-weight: 500; color: #000;
  cursor: pointer; border: 0;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 0 0 1px rgba(11,223,134,0.45), 0 10px 40px -10px rgba(11,223,134,0.5);
  text-decoration: none;
}
.btn-primary:hover { background: #34f5a8; }
.btn-primary svg { transition: transform 0.2s ease; }
.btn-primary:hover svg { transform: translateX(2px); }
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%); transition: transform 0.7s ease;
}
.btn-primary:hover::after { transform: translateX(100%); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.035); backdrop-filter: blur(10px);
  padding: 12px 24px;
  font-size: 14px; font-weight: 500; color: #fff;
  cursor: pointer; text-decoration: none;
  transition: border 0.2s ease, background 0.2s ease;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.07); }
.btn-ghost svg { transition: transform 0.2s ease; }
.btn-ghost:hover svg { transform: translate(2px, -2px); }

.btn-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: #34f5a8;
  cursor: pointer; background: transparent; border: 0;
  text-decoration: none;
  transition: color 0.2s ease;
}
.btn-link:hover { color: #5af9b9; }
.btn-link svg { transition: transform 0.2s ease; }
.btn-link:hover svg { transform: translateX(3px); }

/* ---------- Form inputs ---------- */
.input {
  width: 100%; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.4);
  padding: 12px 16px; font-size: 14px; color: #fff;
  outline: none; transition: border 0.2s ease, background 0.2s ease;
  font-family: inherit;
}
.input::placeholder { color: rgba(255,255,255,0.35); }
.input:focus { border-color: rgba(52,245,168,0.5); background: rgba(0,0,0,0.6); }

/* ---------- Italic accent ---------- */
.accent-italic {
  font-family: 'Instrument Serif', serif; font-style: italic;
  color: #e6c067; font-weight: 400; letter-spacing: 0;
}

/* ---------- Marquee ---------- */
.marquee-track {
  display: flex; gap: 56px; white-space: nowrap;
  animation: marquee 38s linear infinite;
}

/* ---------- Stat counter ---------- */
.stat-num { font-family: 'Geist', sans-serif; letter-spacing: -0.025em; }

/* ---------- Hero pulse rings ---------- */
.pulse-ring {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%); border-radius: 999px;
  border: 1px solid rgba(11,223,134,0.12);
  animation: pulseRing 6s ease-in-out infinite;
}

/* ---------- Security bar grow ---------- */
.bar-fill { animation: growBar 1400ms ease-out backwards; }

/* ---------- Terminal caret ---------- */
.caret {
  display: inline-block; width: 8px; height: 14px;
  background: rgba(52,245,168,0.85);
  animation: blink 1s steps(2) infinite;
  vertical-align: text-bottom; margin-left: 4px;
}

/* ---------- Hover card effects ---------- */
.feat-card { transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease; }
.feat-card:hover { background: #0d0d0d; }

/* ---------- Nav pill ---------- */
.nav-pill {
  position: relative; border-radius: 999px;
  padding: 8px 14px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.62);
  background: transparent; border: 0;
  cursor: pointer; text-decoration: none;
  transition: color 0.2s ease;
}
.nav-pill:hover { color: #fff; }
.nav-pill.active { color: #fff; background: rgba(255,255,255,0.06); }

/* ---------- Mobile drawer ---------- */
.mobile-nav {
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height 0.5s ease, opacity 0.4s ease, margin 0.5s ease;
}
.mobile-nav.open { max-height: 600px; opacity: 1; margin-top: 12px; }

/* ---------- Misc ---------- */
.no-select { user-select: none; -webkit-user-select: none; }
@media (max-width: 380px) { .hide-xs { display: none; } }

/* ---------- Logo brandmark inside header ---------- */
.brand-mark {
  width: 28px; height: 28px;
  display: block; flex-shrink: 0;
}

/* ---------- Page entry animation ---------- */
main { animation: fadeIn 380ms ease-out; }
