/* Ohio Space Systems - Main Stylesheet */
/* Responsive-first design with military/defense aesthetic */

/* CSS Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

/* CSS Custom Properties */
:root {
  /* Brand Colors */
  --navy: #0B1222;
  --gunmetal: #1F2A37;
  --steel-gray: #6B7280;
  --safety-red: #D7263D;
  --utility-green: #2F8F46;
  
  /* Typography */
  --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, Arial, sans-serif;
  --font-size-base: 1rem;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Layout */
  --container-max: 1280px;
  --header-height: 4rem;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-system);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--steel-gray);
  background-color: var(--navy);
  overflow-x: hidden;
}

/* Typography - Mobile First */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: white;
  margin-bottom: var(--space-4);
}

h1 {
  font-size: clamp(var(--font-size-2xl), 6vw, var(--font-size-4xl));
  line-height: 1.1;
}

h2 {
  font-size: clamp(var(--font-size-xl), 5vw, var(--font-size-3xl));
  line-height: 1.2;
}

h3 {
  font-size: clamp(var(--font-size-lg), 4vw, var(--font-size-2xl));
  line-height: 1.3;
}

h4 {
  font-size: clamp(var(--font-size-base), 3vw, var(--font-size-xl));
}

h5 {
  font-size: clamp(var(--font-size-base), 2.5vw, var(--font-size-lg));
}

p {
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Responsive Lists */
ul, ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

li {
  margin-bottom: var(--space-2);
  line-height: 1.6;
}

a {
  color: var(--steel-gray);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover,
a:focus {
  color: white;
}

/* Skip to Content Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--safety-red);
  color: white;
  padding: 8px;
  z-index: 1000;
  text-decoration: none;
  border-radius: 4px;
}

.skip-link:focus {
  top: 6px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  background: rgba(11, 18, 34, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gunmetal);
  z-index: 100;
  height: var(--header-height);
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
}

.ohio-badge {
  background: var(--utility-green);
  color: white;
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: var(--space-3);
}

/* Navigation */
.nav {
  display: none;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: var(--space-6);
}

.nav-link {
  color: var(--steel-gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--font-size-sm);
  position: relative;
}

.nav-link:hover,
.nav-link:focus {
  color: white;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--safety-red);
  transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: block;
  background: none;
  border: none;
  color: white;
  font-size: var(--font-size-xl);
  cursor: pointer;
  padding: var(--space-2);
}

/* Mobile Navigation */
.nav-mobile {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--navy);
  border-top: 1px solid var(--gunmetal);
  padding: var(--space-4);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.nav-mobile.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.nav-mobile .nav-list {
  flex-direction: column;
  gap: var(--space-4);
}

/* Container - Mobile First */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
  width: 100%;
}

/* Section - Mobile First */
.section {
  padding: var(--space-8) 0;
}

.section-sm {
  padding: var(--space-6) 0;
}

/* Mobile-specific adjustments */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-3);
  }
  
  .section {
    padding: var(--space-6) 0;
  }
  
  .section-sm {
    padding: var(--space-4) 0;
  }
  
  .card {
    padding: var(--space-4);
  }
  
  .team-card {
    padding: var(--space-4);
    gap: var(--space-4);
  }
  
  .grid {
    gap: var(--space-4);
  }
}

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

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

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

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

/* Hero Section */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
  padding: var(--space-8) 0;
}

/* Hero with background image (home page) */
.hero:has(.hero-background) {
  min-height: 100vh;
  padding: 0;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.4) contrast(1.1);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(135deg, rgba(11, 18, 34, 0.85) 0%, rgba(31, 42, 55, 0.7) 50%, rgba(11, 18, 34, 0.9) 100%),
    radial-gradient(ellipse at center, rgba(215, 38, 61, 0.1) 0%, transparent 70%);
  z-index: 2;
}

.hero-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="%23374151" stroke-width="1" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>'),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"><path d="M50 200 L150 100 L250 120 L350 80 L350 150 L300 200 L350 250 L300 320 L200 350 L100 300 L50 250 Z" fill="none" stroke="%236B7280" stroke-width="2" opacity="0.08"/></svg>');
  background-size: 100px 100px, 400px 400px;
  background-position: 0 0, right bottom;
  background-repeat: repeat, no-repeat;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 100%;
  text-align: left;
}

.hero h1 {
  font-size: clamp(var(--font-size-2xl), 5vw, var(--font-size-5xl));
  margin-bottom: var(--space-6);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  line-height: 1.1;
  color: white;
}

.hero-subline {
  font-size: clamp(var(--font-size-base), 2.5vw, var(--font-size-xl));
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-4);
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  max-width: 800px;
}

.hero-logistics {
  font-size: clamp(var(--font-size-sm), 2vw, var(--font-size-lg));
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-8);
  font-style: italic;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  max-width: 700px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--space-4) var(--space-6);
  border: none;
  border-radius: 4px;
  font-family: var(--font-system);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--safety-red);
  color: white;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #B91C2E;
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--steel-gray);
  border: 2px solid var(--steel-gray);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--steel-gray);
  color: var(--navy);
}

/* Cards */
.card {
  background: var(--gunmetal);
  border: 1px solid rgba(107, 114, 128, 0.2);
  border-radius: 8px;
  padding: var(--space-6);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--steel-gray);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--safety-red);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  font-size: var(--font-size-xl);
  color: white;
}

.card h3 {
  color: white;
  margin-bottom: var(--space-3);
}

.card p {
  color: var(--steel-gray);
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
}

.card-link {
  color: var(--safety-red);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--font-size-sm);
}

.card-link:hover {
  color: white;
}

/* Badges */
.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: 20px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-green {
  background: var(--utility-green);
  color: white;
}

.badge-red {
  background: var(--safety-red);
  color: white;
}

/* Progress Bars */
.progress-bar {
  background: var(--gunmetal);
  border-radius: 4px;
  overflow: hidden;
  margin: var(--space-2) 0;
}

.progress-fill {
  height: 8px;
  background: var(--utility-green);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-sm);
  color: var(--steel-gray);
  margin-bottom: var(--space-1);
}

/* Team Section */
.team-card {
  background: var(--gunmetal);
  border-radius: 8px;
  padding: var(--space-6);
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

.team-image {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  justify-self: center;
}

.team-content h3 {
  margin-bottom: var(--space-2);
}

.team-title {
  background: var(--safety-red);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: 4px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-bottom: var(--space-4);
}

/* Form Styles */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  color: white;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3);
  background: var(--gunmetal);
  border: 2px solid rgba(107, 114, 128, 0.3);
  border-radius: 4px;
  color: white;
  font-family: var(--font-system);
  font-size: var(--font-size-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--safety-red);
}

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

/* Hidden honeypot field */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--utility-green);
  color: white;
  padding: var(--space-4);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.toast.show {
  transform: translateX(0);
}

.toast-error {
  background: var(--safety-red);
}

/* Footer */
.footer {
  background: var(--gunmetal);
  border-top: 1px solid rgba(107, 114, 128, 0.2);
  padding: var(--space-12) 0 var(--space-8);
}

.footer-content {
  display: grid;
  gap: var(--space-8);
}

.footer-section h4 {
  color: white;
  margin-bottom: var(--space-4);
}

.footer-section p,
.footer-section a {
  color: var(--steel-gray);
  font-size: var(--font-size-sm);
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(107, 114, 128, 0.2);
  padding-top: var(--space-6);
  margin-top: var(--space-8);
  text-align: center;
  color: var(--steel-gray);
  font-size: var(--font-size-sm);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  background: var(--safety-red);
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #B91C2E;
  transform: translateY(-2px);
}

/* Floating Ohio Badge */
.ohio-float {
  position: fixed;
  bottom: var(--space-4);
  left: var(--space-4);
  background: var(--utility-green);
  color: white;
  padding: var(--space-2) var(--space-3);
  border-radius: 20px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.ohio-float.show {
  opacity: 1;
  visibility: visible;
}

/* Responsive Design */

/* Small Mobile (480px) */
@media (max-width: 480px) {
  .hero {
    min-height: 100vh;
    padding: var(--space-4) 0;
  }
  
  .hero-content {
    text-align: center;
  }
  
  .hero-actions {
    align-items: center;
    width: 100%;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
  }
}

/* Medium screens (640px) */
@media (min-width: 640px) {
  .container {
    padding: 0 var(--space-5);
  }
  
  .section {
    padding: var(--space-12) 0;
  }
  
  .section-sm {
    padding: var(--space-8) 0;
  }
  
  .grid {
    gap: var(--space-6);
  }
  
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Tablet (768px) */
@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-6);
  }
  
  .section {
    padding: var(--space-16) 0;
  }
  
  .section-sm {
    padding: var(--space-12) 0;
  }
  
  .hero {
    min-height: 90vh;
  }
  
  .hero-content {
    text-align: left;
  }
  
  .hero-actions {
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: nowrap;
  }
  
  .btn {
    width: auto;
  }
  
  .grid {
    gap: var(--space-8);
  }
  
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .team-card {
    grid-template-columns: 200px 1fr;
  }
  
  .team-image {
    justify-self: start;
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop (1024px) */
@media (min-width: 1024px) {
  .nav {
    display: block;
  }
  
  .menu-toggle {
    display: none;
  }
  
  .nav-mobile {
    display: none;
  }
  
  .hero {
    min-height: 95vh;
  }
  
  .hero-image {
    object-position: center;
  }
  
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Large Desktop (1280px) */
@media (min-width: 1280px) {
  .container {
    padding: 0 var(--space-6);
  }
  
  .hero {
    min-height: 100vh;
  }
  
  .hero-content {
    max-width: 1000px;
  }
}

/* Ultra-wide screens (1920px+) */
@media (min-width: 1920px) {
  .hero-image {
    object-position: center top;
  }
  
  .hero-overlay {
    background: 
      linear-gradient(135deg, rgba(11, 18, 34, 0.8) 0%, rgba(31, 42, 55, 0.6) 50%, rgba(11, 18, 34, 0.85) 100%),
      radial-gradient(ellipse at center, rgba(215, 38, 61, 0.08) 0%, transparent 70%);
  }
}

/* Accessibility */
@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;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --steel-gray: #E5E7EB;
    --gunmetal: #000000;
  }
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--safety-red);
  outline-offset: 2px;
}

/* Screen reader only text */
.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;
}
