/* ==========================================================================
   SKYHAWK DESIGN SYSTEM
   Brian Collins Creative Direction
   "Break Through the Power Barrier"
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS CUSTOM PROPERTIES (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Primary: Deep Technical Navy */
  --sky-navy: #0A1628;
  --sky-navy-90: #1A2A42;
  --sky-navy-80: #2A3E5C;
  --sky-navy-70: #3A5276;

  /* Accent: Signal Blue — the color of transmission, of active monitoring */
  --sky-signal: #00D4FF;
  --sky-signal-glow: rgba(0, 212, 255, 0.15);
  --sky-signal-bright: #4DE8FF;
  --sky-signal-dim: rgba(0, 212, 255, 0.08);

  /* Secondary: Sentinel Green — the color of systems nominal, of vigilance */
  --sky-sentinel: #00FF88;
  --sky-sentinel-dim: rgba(0, 255, 136, 0.1);
  --sky-sentinel-glow: rgba(0, 255, 136, 0.2);

  /* Alert: Warm Amber — attention without alarm */
  --sky-alert: #FFB800;
  --sky-alert-dim: rgba(255, 184, 0, 0.1);

  /* Neutrals: Infrastructure Grays */
  --sky-steel: #64748B;
  --sky-steel-light: #94A3B8;
  --sky-mist: #E2E8F0;
  --sky-cloud: #F8FAFC;
  --sky-white: #FFFFFF;

  /* Gradients */
  --gradient-horizon: linear-gradient(180deg, var(--sky-navy) 0%, #0F2847 50%, #142E4F 100%);
  --gradient-signal: linear-gradient(135deg, var(--sky-signal) 0%, var(--sky-sentinel) 100%);
  --gradient-card: linear-gradient(180deg, var(--sky-navy-90) 0%, var(--sky-navy) 100%);
  --gradient-glow: radial-gradient(ellipse at center, var(--sky-signal-glow) 0%, transparent 70%);

  /* Typography Scale */
  --type-display: clamp(2.75rem, 7vw, 5rem);
  --type-h1: clamp(2rem, 5vw, 3.25rem);
  --type-h2: clamp(1.5rem, 3vw, 2rem);
  --type-h3: clamp(1.125rem, 2vw, 1.375rem);
  --type-body: 1.0625rem;
  --type-body-lg: 1.1875rem;
  --type-small: 0.875rem;
  --type-xs: 0.75rem;

  /* Font Weights */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Line Heights */
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  /* Letter Spacing */
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.1em;

  /* Spacing (8px base unit) */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 8rem;
  --space-9: 10rem;
  --space-10: 12rem;

  /* Section Rhythm */
  --section-padding: clamp(4rem, 10vw, 8rem);
  --section-padding-sm: clamp(3rem, 8vw, 5rem);

  /* Container */
  --container-max: 1280px;
  --container-narrow: 960px;
  --container-wide: 1440px;
  --container-padding: clamp(1.5rem, 5vw, 3rem);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 16px 50px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 40px var(--sky-signal-glow);
  --shadow-glow-strong: 0 0 60px rgba(0, 212, 255, 0.3);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-instant: 100ms;
  --duration-fast: 200ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-dramatic: 800ms;

  /* Z-Index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-chat: 500;
  --z-tooltip: 600;
}

/* --------------------------------------------------------------------------
   RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*,
*::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;
}

@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: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: var(--type-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--sky-white);
  background-color: var(--sky-navy);
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.display {
  font-size: var(--type-display);
  font-weight: var(--weight-bold);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h1, .h1 {
  font-size: var(--type-h1);
}

h2, .h2 {
  font-size: var(--type-h2);
}

h3, .h3 {
  font-size: var(--type-h3);
  font-weight: var(--weight-medium);
}

p {
  margin-bottom: var(--space-2);
}

p:last-child {
  margin-bottom: 0;
}

.text-lg {
  font-size: var(--type-body-lg);
  line-height: var(--leading-relaxed);
}

.text-sm {
  font-size: var(--type-small);
}

.text-xs {
  font-size: var(--type-xs);
  letter-spacing: var(--tracking-wide);
}

.text-signal {
  color: var(--sky-signal);
}

.text-sentinel {
  color: var(--sky-sentinel);
}

.text-steel {
  color: var(--sky-steel-light);
}

.text-muted {
  color: var(--sky-steel);
}

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

.uppercase {
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

/* --------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

.section {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
  position: relative;
}

.section--sm {
  padding-top: var(--section-padding-sm);
  padding-bottom: var(--section-padding-sm);
}

/* Flexbox Utilities */
.flex {
  display: flex;
}

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

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

.items-start {
  align-items: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }

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

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

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

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

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

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

/* --------------------------------------------------------------------------
   LINKS & FOCUS STATES (WCAG 2.1 AA Compliant)
   -------------------------------------------------------------------------- */
a {
  color: var(--sky-signal);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out-expo);
}

a:hover {
  color: var(--sky-signal-bright);
}

/* WCAG 2.4.7 - Visible focus indicators (3px for visibility) */
:focus-visible {
  outline: 3px solid var(--sky-signal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Remove default outline only when providing custom */
:focus:not(:focus-visible) {
  outline: none;
}

/* High contrast focus for buttons and interactive elements */
button:focus-visible,
.btn:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid var(--sky-signal);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.25);
}

/* Skip Link - WCAG 2.4.1 (REQUIRED first focusable element) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 1rem 2rem;
  background: var(--sky-signal);
  color: var(--sky-navy);
  font-size: 1rem;
  font-weight: var(--weight-semibold);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: left var(--duration-fast) var(--ease-out-expo);
}

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

/* --------------------------------------------------------------------------
   TOUCH TARGETS - WCAG 2.5.5 (Minimum 44x44px)
   -------------------------------------------------------------------------- */
button,
a,
input,
select,
textarea,
[role="button"] {
  min-height: 44px;
}

/* Inline links can be smaller but need adequate spacing */
p a,
li a {
  min-height: auto;
  padding: 0.125rem 0;
}

/* Navigation links need adequate spacing */
nav a {
  padding: 0.75rem 1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* --------------------------------------------------------------------------
   SELECTION
   -------------------------------------------------------------------------- */
::selection {
  background: var(--sky-signal);
  color: var(--sky-navy);
}

/* --------------------------------------------------------------------------
   SCROLLBAR
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--sky-navy-90);
}

::-webkit-scrollbar-thumb {
  background: var(--sky-navy-70);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--sky-signal);
}

/* --------------------------------------------------------------------------
   UTILITY CLASSES
   -------------------------------------------------------------------------- */
.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;
}

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

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }

.max-w-prose {
  max-width: 65ch;
}

.relative {
  position: relative;
}

.overflow-hidden {
  overflow: hidden;
}
