/* ===================================
   SHARED STYLES FOR SUB-PAGES
   =================================== */

/* CSS VARIABLES & DESIGN SYSTEM */
:root {
  /* Colors */
  --primary: #0047FF;
  --primary-light: #47B5FF;
  --primary-glow: rgba(0, 71, 255, 0.3);
  --dark: #0A0A0F;
  --dark-surface: #121218;
  --dark-border: #1a1a24;
  --light: #FAFAFA;
  --light-surface: #F5F5F7;
  --accent: #FFB800;
  --text-light: #FFFFFF;
  --text-muted: #767676;
  --text-dark: #1A1A1A;

  /* Particle colors */
  --particle-color-r: 0;
  --particle-color-g: 71;
  --particle-color-b: 255;
  --particle-opacity: 0.8;

  /* Layout */
  --header-h: 72px;
  --max-width: 1200px;
  --section-padding: 100px;

  /* Typography */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Source Code Pro', 'Courier New', monospace;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
  --transition-slow: 0.6s ease;
}

/* RESET & BASE STYLES */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--light);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* HEADER / NAVIGATION */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 71, 255, 0.15);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-light);
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  position: relative;
}

.logo-mark::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: var(--dark);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

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

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition-medium);
}

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

nav a:hover::after {
  width: 100%;
}

nav a.active {
  color: var(--primary-light);
}

nav a.active::after {
  width: 100%;
}

.nav-cta {
  background: var(--primary);
  color: var(--text-light) !important;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.nav-cta:hover {
  background: #0055ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--primary-glow);
}

.nav-cta::after {
  display: none;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 1rem;
  transition: color var(--transition-fast);
}

.mobile-menu-btn:hover {
  color: var(--primary-light);
}

/* PAGE HERO */
.page-hero {
  background: var(--dark);
  padding: calc(var(--header-h) + 80px) clamp(1.5rem, 5vw, 4rem) 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(0, 71, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero-content {
  position: relative;
  z-index: 10;
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-hero .section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  display: block;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.page-hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* SECTIONS */
section {
  padding: var(--section-padding) clamp(1.5rem, 5vw, 4rem);
}

.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.125rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
}

/* CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all var(--transition-medium);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 71, 255, 0.1);
  border-color: var(--primary);
}

.card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(0, 71, 255, 0.1) 0%, rgba(71, 181, 255, 0.1) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--primary);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.card p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* DARK SECTION */
.dark-section {
  background: var(--dark);
  color: var(--text-light);
}

.dark-section .section-title {
  color: var(--text-light);
}

.dark-section .section-subtitle {
  color: var(--text-muted);
}

.dark-section .card {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--dark-border);
}

.dark-section .card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dark-section .card h3 {
  color: var(--primary-light);
}

.dark-section .card p {
  color: var(--text-muted);
}

/* CONTENT SECTIONS */
.content-section {
  background: var(--light);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.content-grid.reverse {
  direction: rtl;
}

.content-grid.reverse > * {
  direction: ltr;
}

.content-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.content-text p {
  font-size: 1.125rem;
  color: #555;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.content-text ul {
  list-style: none;
  margin-bottom: 2rem;
}

.content-text li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: #555;
}

.content-text li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

.content-visual {
  background: linear-gradient(135deg, var(--dark) 0%, #1a1a2e 100%);
  border-radius: 24px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-light);
}

.btn-primary:hover {
  background: #0055ff;
  transform: translateY(-3px);
  box-shadow: 0 10px 40px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-dark);
  border: 2px solid var(--dark-border);
}

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

/* CTA SECTION */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, #0033cc 100%);
  text-align: center;
  padding: 100px clamp(1.5rem, 5vw, 4rem);
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-light);
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-section .btn-primary {
  background: var(--text-light);
  color: var(--primary);
}

.cta-section .btn-outline {
  color: var(--text-light);
  border-color: rgba(255, 255, 255, 0.5);
}

.cta-section .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-light);
  color: var(--text-light);
}

/* FOOTER */
footer {
  background: var(--dark);
  color: var(--text-light);
  padding: 80px clamp(1.5rem, 5vw, 4rem) 40px;
  border-top: 1px solid var(--dark-border);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
}

.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.footer-brand .parent-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-brand .parent-link:hover {
  color: var(--primary-light);
}

.footer-nav h4,
.footer-connect h4 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.footer-nav ul {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 0.75rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--text-light);
  padding-left: 4px;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dark-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-light);
  transform: translateY(-3px);
}

.footer-email {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.footer-email:hover {
  color: var(--primary-light);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--dark-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-bottom .patent-badge {
  background: rgba(0, 71, 255, 0.1);
  color: var(--primary-light);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-legal-links a,
.footer-legal-links a:visited {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer-legal-links a:hover,
.footer-legal-links a:focus {
  color: var(--primary-light);
  text-decoration: none;
}

.footer-legal-links .separator {
  color: var(--dark-border);
  font-size: 0.75rem;
}

/* TEXT UTILITIES */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.highlight {
  color: var(--primary-light);
}

/* PROGRESSIVE NAV COLLAPSE - hide items one at a time */
@media (max-width: 1280px) {
  .nav-solutions { display: none; }
  .mobile-menu-btn { display: block; }
}

@media (max-width: 1150px) {
  .nav-about { display: none; }
}

@media (max-width: 1050px) {
  .nav-impact { display: none; }
}

@media (max-width: 950px) {
  .nav-contact { display: none; }
}

@media (max-width: 850px) {
  .nav-tech { display: none; }
}

@media (max-width: 750px) {
  .nav-home { display: none; }
}

@media (max-width: 650px) {
  .nav-cta { display: none; }
}

/* Mobile menu - shows all items when open */
nav.mobile-open {
  display: flex !important;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.98);
  flex-direction: column;
  padding: 1.5rem;
  gap: 0;
  border-bottom: 1px solid var(--dark-border);
}

nav.mobile-open a {
  display: block !important;
  padding: 1rem;
  border-bottom: 1px solid var(--dark-border);
  width: 100%;
  text-align: left;
}

nav.mobile-open a:last-child {
  border-bottom: none;
}

nav.mobile-open a::after {
  display: none;
}

nav.mobile-open .nav-cta {
  margin-top: 1rem;
  text-align: center;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .content-grid.reverse {
    direction: ltr;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px;
    --header-h: 64px;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .cta-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}
