/* ============================================================
   SPIDYNEX — Light-First Design System
   65% Light / 25% Dark / 10% Accent
   Typography: Inter
   ============================================================ */

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

/* ── GLOBAL ───────────────────────────────────────────────── */
body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: #F8FAFC;
  color: #334155;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: -0.025em;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
button { border: none; background: none; cursor: pointer; font-family: inherit; color: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font-family: 'Inter', system-ui, sans-serif; }
::selection { background: #7C3AED; color: #fff; }

/* Gradient headings for sub-pages */
.text-gradient {
  background: linear-gradient(135deg, #7C3AED 0%, #06B6D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-violet {
  background: linear-gradient(135deg, #7C3AED 0%, #A78BFA 60%, #06B6D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #090A0F; }
::-webkit-scrollbar-thumb { background: #1E293B; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #7C3AED; }

/* Focus visible */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #7C3AED;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #heroCanvas { display: none !important; }
}

/* ── DARK SECTION GLASS NAV ──────────────────────────── */
.glass-dark {
  background: rgba(9, 10, 15, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-light {
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #E2E8F0;
}

/* ── GRID BACKGROUNDS ────────────────────────────────── */
.bg-grid-dark {
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}

.bg-grid-light {
  background-image: radial-gradient(#CBD5E1 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── REVEAL ANIMATIONS ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 80ms; }
.reveal-d2 { transition-delay: 160ms; }
.reveal-d3 { transition-delay: 240ms; }
.reveal-d4 { transition-delay: 320ms; }

/* ── KEYFRAMES ───────────────────────────────────────── */
@keyframes pulseSubtle {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes nodePulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── LOADER ──────────────────────────────────────────── */
#siteLoader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #090A0F;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

#siteLoader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-bar {
  width: 100px; height: 2px;
  background: #1E293B;
  border-radius: 999px;
  overflow: hidden;
}

.loader-bar span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #7C3AED, #22D3EE);
  border-radius: 999px;
  animation: loadBar 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loadBar { to { width: 100%; } }

/* ── MOBILE MENU ─────────────────────────────────────── */
#mobileDrawer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
#mobileDrawer.open { max-height: 500px; }

/* ── SPA VIEWS ───────────────────────────────────────── */
#app-root > div { animation: fadeInUp 0.4s ease forwards; }

/* ── CARD HOVERS ─────────────────────────────────────── */
.card-lift {
  transition: transform 0.2s, box-shadow 0.2s;
}
.card-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

/* ── ANIMATED PROCESS STEP CARDS ─────────────────────── */
.process-step-card {
  position: relative;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.process-step-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.process-step-card:hover::before {
  opacity: 1;
}
.process-step-card:hover {
  transform: translateY(-5px);
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 20px 40px -10px rgba(124, 58, 237, 0.18);
}
@keyframes stepBadgeGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(124, 58, 237, 0.4); }
  50% { box-shadow: 0 0 25px rgba(6, 182, 212, 0.6); }
}
.badge-glow {
  animation: stepBadgeGlow 3s ease-in-out infinite;
}

/* ── JOB CARD ────────────────────────────────────────── */
.job-card-hover {
  transition: border-color 0.2s, box-shadow 0.2s;
}
.job-card-hover:hover {
  border-color: #7C3AED;
  box-shadow: 0 0 0 1px #7C3AED;
}

/* ── NAV ACTIVE STATE ────────────────────────────────── */
.nav-link {
  transition: background-color 0.2s, color 0.2s;
  position: relative;
}

.nav-link.text-white {
  font-weight: 700;
}

/* ── INLINE SVG IN TEXT ──────────────────────────────── */
span > svg, a > svg, button > svg, div > svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── FORM SUCCESS ANIMATION ─────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── PAGE SECTION TRANSITIONS ───────────────────────── */
#app-root > section:first-child {
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── FORM VALIDATION SHAKE ──────────────────────────── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

input.border-red-400, select.border-red-400, textarea.border-red-400 {
  animation: shake 0.3s ease;
}

/* ── COUNTER NUMBER ─────────────────────────────────── */
[data-counter] {
  font-variant-numeric: tabular-nums;
}

/* ── SMOOTH SCROLL FOR ANCHOR LINKS ─────────────────── */
[id] {
  scroll-margin-top: 100px;
}

/* ── STAT CARDS ─────────────────────────────────────── */
.stat-glow {
  text-shadow: 0 0 30px rgba(124, 58, 237, 0.3);
}

/* ── SCREENING CARD PULSE ───────────────────────────── */
@keyframes screenPulse {
  0%, 100% { border-color: rgba(255,255,255,0.1); }
  50% { border-color: rgba(124,58,237,0.3); }
}

/* ── RESPONSIVE TWEAKS ──────────────────────────────── */
@media (max-width: 640px) {
  .grid-cols-2 { grid-template-columns: 1fr !important; }
  h1 { font-size: 1.875rem !important; }
}

@media (min-width: 641px) and (max-width: 768px) {
  h1 { font-size: 2.25rem !important; }
}

/* ── ADMIN DASHBOARD ──────────────────────────────────── */
.admin-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: border-color 0.2s ease;
}
.admin-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}
.admin-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  display: block;
  transition: all 0.2s ease;
}
.admin-stat-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
}
.admin-action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}
.admin-action-btn:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.3);
  color: #fff;
}
.bg-obsidian-card { background: rgba(255, 255, 255, 0.03); }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
