/* ============================================
   GRAVITY VAULT — Design System Variables
   ============================================ */

:root {
  /* Backgrounds */
  --bg-primary:   #0A0A0F;
  --bg-secondary: #141420;
  --bg-surface:   #1A1A2E;
  --bg-elevated:  #242438;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-active: rgba(255, 255, 255, 0.12);

  /* Text */
  --text-primary:   #F5F5F7;
  --text-secondary: #A0A0B0;
  --text-tertiary:  #6B6B7B;
  --text-inverse:   #0A0A0F;

  /* Accents */
  --accent-primary:  #6366F1;
  --accent-security: #00D084;
  --accent-warning:  #F59E0B;
  --accent-danger:   #EF4444;
  --accent-glow:     rgba(99, 102, 241, 0.4);

  /* Gradients */
  --gradient-hero:     linear-gradient(135deg, #0A0A0F 0%, #1A1A2E 50%, #0F1729 100%);
  --gradient-glass:    linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  --gradient-security: linear-gradient(90deg, #00D084 0%, #6366F1 100%);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;

  /* Type scale — hero scaled up for bold 2026 impact */
  --text-hero:    clamp(2.5rem, 7vw, 5.5rem);
  --text-section: clamp(1.75rem, 4vw, 2.5rem);
  --text-card:    clamp(1.25rem, 3vw, 1.5rem);

  /* Spacing (4px grid) */
  --space-xs:  4px;
  --space-s:   8px;
  --space-m:   16px;
  --space-l:   24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 120px;

  /* Transitions */
  --transition-fast:   0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* Border radius */
  --radius-s:    8px;
  --radius-m:    12px;
  --radius-l:    16px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* FAQ card gradient — using CSS vars not hardcoded hex */
  --faq-card-bg: linear-gradient(145deg, var(--bg-surface), var(--bg-secondary));
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  color: var(--text-primary);
  line-height: 1.2;
}

h1 {
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--text-section);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--text-card);
  font-weight: 600;
  line-height: 1.3;
}

h4 {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--text-primary); }

ul, ol { list-style: none; }

img, svg { max-width: 100%; display: block; }

/* ============================================
   ACCESSIBILITY
   ============================================ */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-m);
  background: var(--accent-primary);
  color: #ffffff;
  padding: var(--space-s) var(--space-m);
  border-radius: var(--radius-s);
  font-weight: 600;
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-m);
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
  border-radius: var(--radius-s);
}

:focus:not(:focus-visible) {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   UTILITY
   ============================================ */

.mono {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent-security);
  background: rgba(0, 208, 132, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.text-gradient {
  background: var(--gradient-security);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   NOISE OVERLAY
   SVG feTurbulence grain — adds warmth/depth
   ============================================ */

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.035;
  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%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}
