/* ==========================================================================
   SAFESTOPHELIX - BASE DESIGN SYSTEM & TOKENS
   Theme: Warm Off-White / Editorial Light / Category-Defining AI Fintech
   ========================================================================== */

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

:root {
  /* Surface & Background Colors */
  --bg-primary: #FAF9F5;         /* Warm Ivory / Off-White */
  --bg-secondary: #F2EFE9;       /* Muted Bone Gray */
  --bg-tertiary: #E8E4DA;        /* Subtle Bordering Surface */
  --bg-card: #FFFFFF;            /* Pure Crisp Card Surface */
  --bg-card-hover: #FCFBF9;
  --bg-card-subtle: rgba(255, 255, 255, 0.7);
  --bg-dark: #111317;            /* Deep Obsidian for high-contrast accents */
  --bg-dark-card: #181B21;

  /* Text & Typography Colors */
  --text-primary: #12141A;       /* Near-Black Charcoal */
  --text-secondary: #585D6B;     /* Muted Graphite */
  --text-tertiary: #8A90A0;      /* Soft Slate */
  --text-inverse: #FFFFFF;       /* Pure White Text */
  --text-inverse-muted: #A3A8B8;

  /* Brand Helix Colors */
  --helix-blue: #2563EB;         /* Deep Tech Indigo / Blue */
  --helix-blue-light: #38BDF8;   /* Sky Blue Node Glow */
  --helix-blue-subtle: rgba(37, 99, 235, 0.08);
  --helix-purple: #6366F1;       /* AI Reasoning Violet */
  --helix-teal: #0D9488;         /* Cross-border Bridge Teal */
  --helix-emerald: #059669;      /* Safe / Healthy Emerald */
  --helix-emerald-subtle: rgba(5, 150, 105, 0.08);
  --helix-amber: #D97706;        /* Review / Attention Amber */
  --helix-amber-subtle: rgba(217, 119, 6, 0.08);
  --helix-rose: #DC2626;         /* Urgent Critical Red */
  --helix-rose-subtle: rgba(220, 38, 38, 0.08);

  /* Borders, Strokes & Dividers */
  --border-light: rgba(18, 20, 26, 0.08);
  --border-medium: rgba(18, 20, 26, 0.14);
  --border-focus: rgba(37, 99, 235, 0.4);
  --border-inverse: rgba(255, 255, 255, 0.12);

  /* Shadows & Elevations */
  --shadow-subtle: 0 2px 8px -2px rgba(18, 20, 26, 0.04), 0 1px 4px -1px rgba(18, 20, 26, 0.02);
  --shadow-card: 0 12px 32px -4px rgba(18, 20, 26, 0.05), 0 4px 12px -2px rgba(18, 20, 26, 0.03);
  --shadow-card-hover: 0 24px 48px -8px rgba(18, 20, 26, 0.09), 0 8px 16px -4px rgba(18, 20, 26, 0.04);
  --shadow-float: 0 32px 64px -12px rgba(18, 20, 26, 0.12), 0 12px 24px -6px rgba(18, 20, 26, 0.06);
  --shadow-glow-blue: 0 0 40px rgba(56, 189, 248, 0.25);
  --shadow-glow-helix: 0 0 60px rgba(37, 99, 235, 0.15);

  /* Typography System */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout Spacing */
  --container-max: 1320px;
  --container-narrow: 1080px;
  --header-height: 80px;

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: all 0.25s var(--ease-smooth);
  --transition-slow: all 0.5s var(--ease-spring);
}

/* ==========================================================================
   RESET & CORE HTML
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  font-family: var(--font-sans);
  line-height: 1.65;
  font-weight: 400;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  position: relative;
}

/* Custom Selection */
::selection {
  background: var(--helix-blue);
  color: #FFFFFF;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-base);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   TYPOGRAPHY HIERARCHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.display-1 {
  font-size: clamp(2.75rem, 6.5vw, 5.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.display-2 {
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.heading-1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.heading-2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.heading-3 {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.body-large {
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
  line-height: 1.6;
  color: var(--text-secondary);
}

.body-medium {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.body-small {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.caption {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* Editorial Gradient Text Accent */
.text-gradient {
  background: linear-gradient(135deg, #12141A 20%, #2563EB 80%, #0D9488 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-gradient-subtle {
  background: linear-gradient(135deg, #1E293B 0%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ==========================================================================
   LAYOUT CONTAINERS & UTILITY CLASSES
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
}

.section-spacing {
  padding-top: clamp(4.5rem, 8vw, 8.5rem);
  padding-bottom: clamp(4.5rem, 8vw, 8.5rem);
  position: relative;
}

.section-spacing-sm {
  padding-top: clamp(3rem, 5vw, 5rem);
  padding-bottom: clamp(3rem, 5vw, 5rem);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-12 {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.gap-sm { gap: 0.75rem; }
.gap-md { gap: 1.5rem; }
.gap-lg { gap: 2.5rem; }
.gap-xl { gap: 4rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* Responsive adjustments */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .gap-xl { gap: 2rem; }
}
