/* ============================================
   AEGISCYBER — Design System
   Critical Infrastructure Cybersecurity
   ============================================ */

:root {
  /* Brand Colors */
  --navy-deep: #0A2540;
  --navy-mid: #1A3A5C;
  --navy-light: #2D5380;
  --silver-light: #C0C8D1;
  --silver-mid: #9DAAB8;
  --silver-dark: #7B8794;

  /* Functional Colors */
  --text-primary: #0A2540;
  --text-secondary: #5F6B78;
  --text-tertiary: #9DAAB8;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F7F9FB;
  --bg-tertiary: #EEF2F5;
  --border-light: #E5E9ED;
  --border-mid: #C5CDD6;

  /* Semantic */
  --success: #047857;
  --success-light: #ECFDF5;
  --warning: #B45309;
  --warning-light: #FEF3C7;
  --info: #1E40AF;
  --info-light: #EFF6FF;
  --danger: #B91C1C;
  --danger-light: #FEE2E2;

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Sizing */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.04);
  --shadow-md: 0 4px 12px rgba(10, 37, 64, 0.06);
  --shadow-lg: 0 12px 32px rgba(10, 37, 64, 0.08);
  --shadow-xl: 0 24px 60px rgba(10, 37, 64, 0.12);

  /* Transitions */
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--navy-mid);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--navy-deep); }

a:focus-visible {
  outline: 2px solid var(--navy-mid);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol { list-style-position: inside; }

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--navy-deep);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; font-weight: 600; }

.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--silver-dark);
  display: inline-block;
  margin-bottom: 0.75rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5rem 0; }

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.logo-mark {
  width: 44px;
  height: 56px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--navy-deep);
  letter-spacing: 0.01em;
}

.logo-name strong { font-weight: 600; }

.logo-tagline {
  font-size: 0.65rem;
  color: var(--silver-dark);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.main-nav a {
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  font-weight: 500;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--bg-tertiary);
  color: var(--navy-deep);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border-light);
}

.lang-switcher a {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-radius: var(--radius-sm);
}

.lang-switcher a.active {
  background: var(--navy-deep);
  color: white;
}

.menu-toggle {
  display: none;
  font-size: 1.4rem;
  color: var(--navy-deep);
  padding: 0.5rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--navy-deep);
  color: white;
}

.btn-primary:hover {
  background: var(--navy-mid);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--navy-deep);
  border-color: var(--border-mid);
}

.btn-outline:hover {
  background: var(--navy-deep);
  color: white;
  border-color: var(--navy-deep);
}

.btn-ghost {
  color: var(--navy-mid);
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  color: var(--navy-deep);
  background: var(--bg-tertiary);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  padding: 6rem 0 5rem;
  background: linear-gradient(135deg, #0A2540 0%, #1A3A5C 50%, #0A2540 100%);
  color: white;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(192, 200, 209, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(192, 200, 209, 0.06) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -100px;
  transform: translateY(-50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192, 200, 209, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: rgba(192, 200, 209, 0.1);
  border: 1px solid rgba(192, 200, 209, 0.2);
  border-radius: 100px;
  color: var(--silver-light);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #34D399;
  border-radius: 50%;
  box-shadow: 0 0 8px #34D399;
}

.hero h1 {
  color: white;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.hero h1 strong {
  font-weight: 600;
  color: var(--silver-light);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--silver-light);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 650px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-actions .btn-primary {
  background: white;
  color: var(--navy-deep);
}

.hero-actions .btn-primary:hover {
  background: var(--silver-light);
}

.hero-actions .btn-outline {
  color: white;
  border-color: rgba(192, 200, 209, 0.3);
}

.hero-actions .btn-outline:hover {
  background: rgba(192, 200, 209, 0.1);
  border-color: var(--silver-light);
  color: white;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(192, 200, 209, 0.15);
  position: relative;
  z-index: 2;
}

.hero-stat-value {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: white;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--silver-mid);
  letter-spacing: 0.05em;
}

/* ============================================
   CARDS
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
}

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

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  color: var(--navy-deep);
  font-size: 1.4rem;
}

.card h3 {
  margin-bottom: 0.75rem;
  color: var(--navy-deep);
}

.card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

.card-meta {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver-dark);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  width: 100%;
}

/* Service Cards with framework badge */
.service-card {
  position: relative;
}

.service-card .badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  background: var(--info-light);
  color: var(--info);
  letter-spacing: 0.05em;
}

/* ============================================
   COMPLIANCE BADGES
   ============================================ */
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.compliance-item {
  background: white;
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--navy-mid);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: all var(--transition);
}

.compliance-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.compliance-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy-mid);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.compliance-title {
  font-weight: 600;
  color: var(--navy-deep);
  margin-bottom: 0.25rem;
}

.compliance-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   SECURITY BADGES (Footer trust signals)
   ============================================ */
.security-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: rgba(192, 200, 209, 0.08);
  border: 1px solid rgba(192, 200, 209, 0.15);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--silver-light);
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: all var(--transition);
}

.security-badge:hover {
  background: rgba(192, 200, 209, 0.12);
  border-color: rgba(192, 200, 209, 0.25);
  color: white;
}

.security-badge-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
  background: linear-gradient(135deg, #F7F9FB 0%, #EEF2F5 100%);
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.page-header h1 {
  margin-bottom: 1rem;
}

.page-header .lead {
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   ARTICLE CONTENT (About, Compliance pages)
   ============================================ */
.article-content {
  max-width: 720px;
  margin: 0 auto;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--navy-mid);
}

.article-content p {
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.75;
}

.article-content ul, .article-content ol {
  margin: 1rem 0 1rem 1.5rem;
  color: var(--text-primary);
}

.article-content ul li,
.article-content ol li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-content strong { color: var(--navy-deep); }

.callout {
  background: var(--info-light);
  border-left: 4px solid var(--info);
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

.callout-success {
  background: var(--success-light);
  border-left-color: var(--success);
}

.callout-warning {
  background: var(--warning-light);
  border-left-color: var(--warning);
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.contact-info h3 {
  margin-bottom: 1.5rem;
  color: var(--navy-deep);
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.95rem;
}

.contact-method:last-child { border-bottom: none; }

.contact-method-icon {
  width: 32px;
  height: 32px;
  background: var(--navy-deep);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.contact-method-label {
  font-size: 0.7rem;
  color: var(--silver-dark);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.contact-method-value {
  color: var(--navy-deep);
  font-weight: 500;
}

.contact-method-value a { color: inherit; }

.form-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form-label .required { color: var(--danger); }

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: white;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--navy-deep);
  box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.08);
}

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

.form-checkbox-group {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.85rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  margin-bottom: 0.75rem;
}

.form-checkbox-group input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--navy-deep);
}

.form-checkbox-group label {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--navy-deep);
  color: var(--silver-mid);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-brand {
  max-width: 350px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo .logo-name {
  color: white;
}

.footer-logo .logo-tagline {
  color: var(--silver-mid);
}

.footer-brand-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--silver-mid);
  margin-bottom: 1.5rem;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  margin-bottom: 1.25rem;
}

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

.footer-col li { margin-bottom: 0.6rem; }

.footer-col a {
  color: var(--silver-mid);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color var(--transition);
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding: 2rem 1.5rem 0;
  border-top: 1px solid rgba(192, 200, 209, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--silver-dark);
}

.footer-legal { display: flex; gap: 1.5rem; flex-wrap: wrap; }

.footer-legal a { color: var(--silver-dark); }

/* ============================================
   ALERTS / NOTICES
   ============================================ */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  display: none;
}

.alert.show { display: block; }

.alert-error {
  background: var(--danger-light);
  color: var(--danger);
  border-left: 3px solid var(--danger);
}

.alert-success {
  background: var(--success-light);
  color: var(--success);
  border-left: 3px solid var(--success);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 980px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    gap: 0.25rem;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    width: 100%;
    padding: 0.75rem 1rem;
  }
  .lang-switcher {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
    width: 100%;
    justify-content: center;
  }

  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  section { padding: 3.5rem 0; }
  .hero { padding: 4rem 0 3rem; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .logo-tagline { display: none; }
}
