/* NixDistraction SDK - Design System */

/* ========================================
   Color Tokens
   ======================================== */
:root {
  /* Base Colors */
  --color-navy-darker: #0B1220;
  --color-navy-dark: #111A2E;
  --color-navy: #1A2332;
  --color-navy-light: #2A3444;
  
  /* Light Surfaces */
  --color-white: #FFFFFF;
  --color-gray-50: #F7F9FC;
  --color-gray-100: #EDF1F7;
  --color-gray-200: #E1E8F0;
  --color-gray-300: #C5D1E0;
  --color-gray-400: #9BA9BC;
  --color-gray-500: #6B7A8F;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  
  /* Primary Accent (Nix Cyan) - tuned for contrast */
  --color-cyan-50: #E6F7FA;
  --color-cyan-100: #B3E8F0;
  --color-cyan-400: #22D3EE;
  --color-cyan-500: #06B6D4;
  --color-cyan-600: #0891B2;
  --color-cyan-700: #0E7490;
  
  /* Secondary Accent (Indigo/Violet) */
  --color-indigo-400: #818CF8;
  --color-indigo-500: #6366F1;
  --color-indigo-600: #4F46E5;
  --color-violet-500: #8B5CF6;
  --color-violet-600: #7C3AED;
  
  /* Semantic Colors */
  --color-success-500: #10B981;
  --color-success-600: #059669;
  --color-amber-50: #FFFBEB;
  --color-amber-400: #FBBF24;
  --color-amber-500: #F59E0B;
  
  /* Semantic Token System */
  --color-bg-primary: var(--color-white);
  --color-bg-secondary: var(--color-gray-50);
  --color-bg-dark: var(--color-navy-dark);
  --color-bg-darker: var(--color-navy-darker);
  
  --color-surface: var(--color-white);
  --color-surface-elevated: var(--color-white);
  --color-surface-dark: var(--color-navy-light);
  
  --color-border: var(--color-gray-200);
  --color-border-light: var(--color-gray-100);
  --color-border-dark: rgba(255, 255, 255, 0.1);
  
  --color-text-primary: var(--color-gray-800);
  --color-text-secondary: var(--color-gray-600);
  --color-text-muted: var(--color-gray-500);
  --color-text-on-dark: var(--color-white);
  --color-text-on-dark-secondary: rgba(255, 255, 255, 0.7);
  
  --color-accent: var(--color-cyan-500);
  --color-accent-hover: var(--color-cyan-600);
  --color-accent-light: var(--color-cyan-50);
  --color-accent-2: var(--color-indigo-500);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-cyan-500) 0%, var(--color-indigo-500) 100%);
  --gradient-hero: radial-gradient(circle at 50% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
  --gradient-mesh: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                   radial-gradient(circle at 80% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
  
  /* Spacing (8px grid) */
  --space-1: 0.5rem;   /* 8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-5: 2.5rem;   /* 40px */
  --space-6: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  --space-10: 5rem;    /* 80px */
  --space-12: 6rem;    /* 96px */
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  
  /* Border Radius */
  --radius-sm: 0.375rem;  /* 6px */
  --radius: 0.5rem;       /* 8px */
  --radius-md: 0.75rem;   /* 12px */
  --radius-lg: 1rem;      /* 16px */
  --radius-xl: 1.5rem;    /* 24px */
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Base Styles
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography improvements */
h1, h2, h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Base link styles */
a {
  color: var(--color-cyan-700);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-cyan-600);
}

/* Lists */
ul, ol {
  padding-left: 1.25rem;
}

nav ul, footer ul, .timeline-stepper ul, #mobile-nav ul {
  padding-left: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-4);
  }
}

/* ========================================
   Header & Navigation
   ======================================== */
header {
  position: sticky;
  top: 0;
  z-index: 1001;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-light);
  transition: all var(--transition-base);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text-primary);
  font-weight: 700;
  font-size: var(--text-lg);
  transition: opacity var(--transition-fast);
}

.logo:hover {
  opacity: 0.8;
}

.logo svg {
  width: 32px;
  height: 32px;
}

/* Hamburger button (mobile only) */
.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--color-accent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hamburger:hover {
  color: var(--color-accent-hover);
}

.hamburger:focus {
  outline: none;
}

.hamburger:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.hamburger svg {
  width: 24px;
  height: 24px;
}

.hamburger-close {
  display: none;
}

@media (min-width: 768px) {
  .hamburger {
    display: none;
  }
}

/* Mobile navigation menu */
#mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 1000;
}

#mobile-nav ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: var(--space-2) 0;
  margin: 0;
  gap: 0;
}

#mobile-nav li {
  border-bottom: 1px solid var(--color-border-light);
}

#mobile-nav li:last-child {
  border-bottom: none;
  padding: var(--space-3) var(--space-3) var(--space-2);
}

#mobile-nav a {
  display: flex;
  align-items: center;
  padding: var(--space-3);
  text-decoration: none;
  color: var(--color-text-primary);
  font-weight: 500;
  font-size: var(--text-base);
  min-height: 44px;
  transition: background var(--transition-fast);
}

#mobile-nav a:hover,
#mobile-nav a:active {
  background: var(--color-gray-50);
}

#mobile-nav .btn {
  margin: 0;
  justify-content: center;
  width: 100%;
  color: #fff;
  font-weight: 600;
}

#mobile-nav .btn:hover,
#mobile-nav .btn:active {
  color: #fff;
}

@media (min-width: 768px) {
  #mobile-nav {
    display: none;
  }
}

/* Desktop nav */
nav ul {
  display: none;
  list-style: none;
  gap: var(--space-4);
  align-items: center;
}

@media (min-width: 768px) {
  nav ul {
    display: flex;
  }
}

nav a {
  text-decoration: none;
  color: var(--color-text-secondary);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
  position: relative;
}

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

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

nav a:hover::after {
  transform: scaleX(1);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: all var(--transition-base);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
}

@media (max-width: 767px) {
  .btn {
    max-width: 100%;
    white-space: normal;
    padding: 0.875rem 1.25rem;
  }
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--color-cyan-700);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
  color: var(--color-cyan-700);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  position: relative;
  background: var(--color-bg-darker);
  color: var(--color-text-on-dark);
  padding: var(--space-12) 0 var(--space-10);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: var(--text-5xl);
  }
}

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

.hero p {
  font-size: var(--text-lg);
  color: var(--color-text-on-dark-secondary);
  margin-bottom: var(--space-4);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   Section Styles
   ======================================== */
section {
  padding: var(--space-10) 0;
}

@media (min-width: 768px) {
  section {
    padding: var(--space-12) 0;
  }
}

section.bg-gray {
  background: var(--color-bg-secondary);
}

section.bg-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}

section h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
  text-align: center;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  section h2 {
    font-size: var(--text-4xl);
  }
}

section .subtitle {
  text-align: center;
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

section.bg-dark .subtitle {
  color: var(--color-text-on-dark-secondary);
}

/* ========================================
   Grid Layouts
   ======================================== */
.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.grid-4 {
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   Cards
   ======================================== */
.card {
  background: var(--color-surface);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--color-accent);
}

.card h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text-primary);
}

.card p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  background: var(--gradient-primary);
}

.icon-box svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-white);
  stroke-width: 2;
  fill: none;
}

/* ========================================
   Code Blocks (Editor Style)
   ======================================== */
.code-window {
  background: var(--color-navy-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  margin: var(--space-4) 0;
}

.code-header {
  background: var(--color-navy-darker);
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid var(--color-border-dark);
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--color-gray-600);
}

.code-dot:nth-child(1) { background: #EC6A5E; }
.code-dot:nth-child(2) { background: #F4BF4F; }
.code-dot:nth-child(3) { background: #61C554; }

.code-filename {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-on-dark-secondary);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.code-copy {
  background: transparent;
  border: 1px solid var(--color-border-dark);
  color: var(--color-text-on-dark-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.code-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-accent);
}

.code-copy.copied {
  background: var(--color-success-600);
  border-color: var(--color-success-600);
  color: white;
}

pre {
  background: var(--color-navy-dark);
  padding: var(--space-4);
  overflow-x: auto;
  margin: 0;
  max-width: 100%;
  word-wrap: normal;
  white-space: pre;
}

pre code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: #E6EDF3;
}

/* Syntax Highlighting */
.code-keyword { color: #FF7B72; }      /* Red */
.code-function { color: #D2A8FF; }     /* Purple */
.code-string { color: #A5D6FF; }       /* Blue */
.code-comment { color: #8B949E; }      /* Gray */
.code-property { color: #79C0FF; }     /* Light Blue */
.code-number { color: #79C0FF; }       /* Light Blue */

/* ========================================
   Trust Strip
   ======================================== */
.trust-strip {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
}

.trust-item svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 2;
}

/* ========================================
   Timeline Stepper
   ======================================== */
.timeline-stepper {
  position: relative;
  display: flex;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
}

.timeline-step {
  position: relative;
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-step:not(:last-child)::before {
  content: '';
  position: absolute;
  top: 30px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.timeline-number {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-2);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-md);
}

.timeline-title {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
  color: var(--color-text-primary);
}

.timeline-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* Timeline on dark backgrounds */
.bg-dark .timeline-title {
  color: #ffffff;
  font-weight: 600;
}

.bg-dark .timeline-desc {
  color: #CBD5E1;
}

/* Mobile Timeline - Vertical Stack */
@media (max-width: 767px) {
  .timeline-stepper {
    flex-direction: column;
    gap: var(--space-4);
    max-width: 100%;
  }
  
  .timeline-step {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    gap: var(--space-3);
    position: relative;
  }
  
  .timeline-step:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 60px;
    left: 30px;
    width: 2px;
    height: calc(100% + var(--space-4) - 60px);
    background: var(--color-border);
    z-index: 0;
  }
  
  .timeline-number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    margin-bottom: 0;
  }
  
  .timeline-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
}

/* ========================================
   Forms
   ======================================== */
form {
  max-width: 700px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--space-4);
}

label {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
}

input, textarea, select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-family: inherit;
  transition: all var(--transition-fast);
  background: var(--color-surface);
  color: var(--color-text-primary);
}

input:hover, textarea:hover, select:hover {
  border-color: var(--color-gray-300);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ========================================
   Alerts
   ======================================== */
.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin: var(--space-4) 0;
  border-left: 4px solid;
}

.alert-info {
  background: var(--color-cyan-50);
  border-color: var(--color-accent);
  color: var(--color-gray-800);
}

.alert-warning {
  background: #FEF3C7;
  border-color: var(--color-amber-500);
  color: #92400E;
}

/* ========================================
   Footer
   ======================================== */
footer {
  background: var(--color-bg-darker);
  color: var(--color-text-on-dark);
  padding: var(--space-8) 0 var(--space-4);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-weight: 700;
  font-size: var(--text-lg);
}

.footer-desc {
  color: var(--color-text-on-dark-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.footer-section h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-on-dark-secondary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-1);
}

.footer-links a {
  color: var(--color-text-on-dark-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-bottom {
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-dark);
  text-align: center;
  color: var(--color-text-on-dark-secondary);
  font-size: var(--text-sm);
}

/* ========================================
   Utility Classes
   ======================================== */
.text-center {
  text-align: center;
}

.hidden {
  display: none;
}

/* Images responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Prevent horizontal overflow */
.card, .use-case {
  max-width: 100%;
  box-sizing: border-box;
}

/* Responsive utilities */
@media (max-width: 767px) {
  .hide-mobile {
    display: none;
  }
  
  /* Force inline grid styles to single column on mobile */
  .grid[style*="grid-template-columns"],
  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Docs content should not have fixed width on mobile */
  div[style*="width"] {
    width: auto !important;
    max-width: 100% !important;
  }
}

@media (min-width: 768px) {
  .hide-desktop {
    display: none;
  }
}

/* ========================================
   Format & Polish Improvements
   ======================================== */

/* Gradient icon tiles (56px with gradient bg) */
.icon-box {
  width: 56px !important;
  height: 56px !important;
  background: var(--gradient-primary) !important;
  border-radius: var(--radius-md);
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  flex-shrink: 0;
}

.icon-box svg {
  width: 28px !important;
  height: 28px !important;
  stroke: var(--color-white) !important;
  fill: none !important;
  color: var(--color-white) !important;
}

/* Price styling */
.price {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-text-primary);
}

/* Reduced .docs-content margins - match production heights */
.docs-content {
  margin: 0 auto;
  max-width: 800px;
}

.docs-content h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.docs-content h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.docs-content h4 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.docs-content p,
.docs-content ul,
.docs-content ol {
  margin-bottom: 0.875rem;
}

.docs-content pre {
  margin-bottom: 0 !important;
}

/* Remove big gap under hero */
.docs-content > h1:first-child {
  margin-top: 0;
}

/* Request form fixes */
.card[style*="padding: 3rem"] {
  padding: 1.25rem !important;
}

@media (min-width: 768px) {
  .card[style*="padding: 3rem"] {
    padding: 3rem !important;
  }
}

input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

label:has(input[type="checkbox"]) {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

button[type="submit"] {
  white-space: nowrap;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  min-height: 44px !important;
  padding: 0.625rem 0.875rem;
}

select {
  height: 44px !important;
}

/* Code block scroll affordance - check actual scrolling element */
pre {
  position: relative;
}

pre.has-overflow::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 2rem;
  background: linear-gradient(to left, var(--color-navy-dark), transparent);
  pointer-events: none;
}

/* Grid-3 with centered last card in 2-column mode */
.grid-3 {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) and (max-width: 1023px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Center last card if odd number */
  .grid-3 > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: calc(50% - var(--space-3));
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Mobile nav - class-based toggle, not forced display */
#mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: calc(100dvh - 70px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#mobile-nav.open {
  display: block;
}

@media (max-width: 1023px) {
  nav ul {
    display: none !important;
  }
  
  .hamburger {
    display: flex !important;
    margin-left: auto;
  }
}

@media (min-width: 1024px) {
  #mobile-nav {
    display: none !important;
  }
  
  .hamburger {
    display: none !important;
  }
}

/* Logo and nav link wrapping */
.logo span {
  white-space: nowrap;
}

nav a {
  white-space: nowrap;
}

/* Tap targets */
footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.logo {
  min-height: 44px;
}

.code-copy {
  min-height: 44px;
  min-width: 44px;
}

/* Two-column list */
.list-columns {
  columns: 1;
  column-gap: var(--space-6);
  list-style-position: outside !important;
  padding-left: 1.25rem !important;
}

.list-columns li {
  break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .list-columns {
    columns: 2;
  }
}

/* Contrast fixes */
.hero .btn-secondary {
  color: var(--color-cyan-100);
  border-color: var(--color-cyan-100);
}

.hero .btn-secondary:hover {
  background: var(--color-cyan-100);
  color: var(--color-navy-dark);
}

/* Footer trademark - lighter */
footer small {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Eyebrow on light background */
.eyebrow {
  color: var(--color-cyan-700);
}

/* Eyebrow on dark backgrounds */
.bg-dark .eyebrow,
.bg-darker .eyebrow,
section[style*="background: var(--color-navy"] .eyebrow {
  color: var(--color-cyan-100);
}

/* Scoped link colors - main content only, not header/footer */
main a:not(.btn),
.docs-content a:not(.btn),
section p a:not(.btn),
.card a:not(.btn) {
  color: var(--color-cyan-700);
}

main a:not(.btn):hover,
.docs-content a:not(.btn):hover,
section p a:not(.btn):hover,
.card a:not(.btn):hover {
  color: var(--color-cyan-600);
}

/* Links on dark backgrounds */
.bg-dark a:not(.btn),
.bg-darker a:not(.btn),
section[style*="background: var(--color-navy"] a:not(.btn) {
  color: var(--color-cyan-100);
}

/* Keep header nav gray */
header nav a {
  color: var(--color-text-secondary);
}

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

/* Keep footer links light */
footer a:not(.btn) {
  color: rgba(255, 255, 255, 0.8);
}

footer a:not(.btn):hover {
  color: var(--color-white);
}

/* Code window filename */
.code-window-title {
  white-space: nowrap;
  overflow: visible !important;
}

@media (min-width: 900px) {
  .code-window-title {
    min-width: max-content;
  }
}

/* Request-access timeline gap */
.timeline-stepper {
  column-gap: var(--space-4);
}

@media (min-width: 768px) {
  .timeline-stepper {
    column-gap: var(--space-6);
  }
}

/* Pricing page - Pricing Details section */
section.bg-gray h2 {
  margin-bottom: 3rem;
}

/* Card headings */
.card > h3:first-child,
.card > h4:first-child {
  margin-top: 0;
}

/* Home: alternate back-to-back section backgrounds */
section:has(+ section.bg-gray).bg-white {
  padding-bottom: 0;
}

section.bg-gray:has(+ section.bg-gray) {
  padding-top: 0;
}

/* Code window filename optimization at 320px */
@media (max-width: 359px) {
  .code-filename {
    font-size: 0.6875rem;
  }
  
  .code-header {
    padding: 0.5rem;
  }
  
  .code-copy {
    padding: 0.25rem 0.5rem;
  }
}
