/* Base Styles */
:root {
  --bg: #f7f8fa;            /* neutral canvas */
  --surface: #ffffff;       /* card surfaces */
  --surface-alt: #f2f4f7;   /* section alt */
  --text: #101828;
  --muted: #667085;
  --primary: #2f5ea8;       /* restrained blue */
  --primary-600: #244e8d;
  --accent: #1f3f74;
  --border: #e4e7ec;
  --success: #157347;
  --error: #d92d20;
  --shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* Ensure content stacks above decorative backgrounds */
.site-header, main, .section, .site-footer, .cta-band { position: relative; z-index: 1; }

img { max-width: 100%; display: block; border-radius: 8px; }

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.section { padding: 72px 0; }
.section-alt { background: var(--surface-alt); }
.section-header { max-width: 760px; margin-bottom: 32px; }
.section-header h2 { margin: 6px 0 8px; font-size: 32px; letter-spacing: -0.02em; position: relative; }
.section-header h2::after { content: ""; display: block; width: 48px; height: 2px; background: var(--primary); border-radius: 2px; margin-top: 10px; }
.section-header p { margin: 0; color: var(--muted); }

/* Eyebrow label */
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; font-size: 12px; color: var(--muted); padding: 0; border: 0; border-radius: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1300;
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.04);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
}
.site-header.scrolled { background: #ffffff; box-shadow: 0 4px 14px rgba(16,24,40,0.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.logo-mark { color: var(--primary); filter: none; }
.logo-text { letter-spacing: 0.2px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; align-items: center; }
.site-nav a { color: var(--text); text-decoration: none; padding: 9px 12px; border-radius: 10px; position: relative; transition: color .2s ease, background-color .2s ease; }
.site-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; background: var(--primary); border-radius: 2px; transform: scaleX(0); transform-origin: left center; transition: transform .25s ease; opacity: .9; }
.site-nav a:hover { background: rgba(47,94,168,0.06); color: var(--primary); }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a.active { color: var(--primary); background: rgba(47,94,168,0.08); }
.site-nav a.active::after { transform: scaleX(1); }
.site-nav a:focus-visible { outline: 2px solid #7aa2ff; outline-offset: 2px; }
.nav-toggle { display: none; }

/* Buttons */
.btn { display: inline-block; padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 600; border: 1px solid transparent; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.btn-primary { background: var(--primary); color: #ffffff; border-color: var(--primary-600); box-shadow: none; }
.btn-primary:hover { background: var(--primary-600); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { color: var(--primary); border-color: var(--primary); }
.btn-sm { padding: 8px 12px; font-size: 14px; }

/* Hero */
.hero { padding: 80px 0 48px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: center; }
.hero-copy h1 { margin: 0 0 12px; font-size: 44px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.hero-copy p { margin: 0 0 20px; color: var(--muted); font-size: 18px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-media img { border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 10px; max-height: 420px; width: 100%; object-fit: cover; min-height: 320px; filter: brightness(1.08) contrast(1.06); background: #e8edf5; }
.hero { background: var(--bg); }

/* NASA-inspired dark hero */
.hero-dark {
  background:
    radial-gradient(1200px 600px at 10% -20%, rgba(31,63,116,0.35) 0%, rgba(31,63,116,0) 55%),
    linear-gradient(180deg, #0b1220 0%, #0e1626 100%);
  color: #ffffff;
}
.hero-dark .eyebrow { color: #b6c2d6; }
.hero-dark .hero-copy p { color: #c8d2e0; }
.hero-dark .site-nav a { color: var(--text); }
.hero-dark .btn-secondary { color: #e7ecf3; border-color: rgba(231,236,243,0.35); background: rgba(255,255,255,0.04); }
.hero-dark .btn-secondary:hover { color: #ffffff; border-color: #ffffff; background: rgba(255,255,255,0.08); }
.hero-aside { display: flex; gap: 18px; margin-top: 16px; flex-wrap: wrap; }
.hero-aside .stat { display: grid; gap: 2px; }
.hero-aside .stat-value { font-size: 20px; font-weight: 700; color: #e5efff; }
.hero-aside .stat-label { font-size: 12px; color: #9fb0c9; }

/* Centered hero variant (not in use) */
.hero--centered .hero-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.brand-heading { display: inline-flex; align-items: center; gap: 10px; font-size: 52px; }
.hero--centered .hero-cta { justify-content: center; }

/* Dark section variants (Services, Why) */
#services.section, #why.section {
  background:
    radial-gradient(1200px 600px at 10% -20%, rgba(31,63,116,0.28) 0%, rgba(31,63,116,0) 55%),
    linear-gradient(180deg, #0c1424 0%, #0f1b32 100%);
  color: #e7ecf3;
}
#services .section-header h2, #why .section-header h2 { color: #ffffff; }
#services .section-header p, #why .section-header p { color: #c6d0df; }
#services .section-header h2::after, #why .section-header h2::after { background: #7aa2ff; }
#services .eyebrow, #why .eyebrow { color: #b6c2d6; }

/* Ensure cards and metrics pop on dark backgrounds */
#services .card, #why .metric { background: #ffffff; }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--border); padding: 18px; border-radius: 8px; box-shadow: 0 1px 4px rgba(16,24,40,0.03); }
.feature { transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(16,24,40,0.12); border-color: #d6e3ff; }
.feature-icon { font-size: 22px; }
.feature h3 { margin: 10px 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); }

/* Cards */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 6px rgba(16,24,40,0.04); transition: box-shadow 0.25s ease, transform 0.25s ease; }
.card:hover { box-shadow: 0 10px 22px rgba(16,24,40,0.12); transform: translateY(-6px); }
.card img { transition: transform 0.25s ease; }
.card:hover img { transform: scale(1.03); }
.card-body { padding: 16px; }
.card h3 { margin: 0 0 10px; font-size: 20px; }
.card ul { margin: 0; padding: 0 0 0 18px; color: var(--muted); }
.card:focus-within { box-shadow: 0 0 0 3px rgba(122,162,255,0.35), 0 8px 18px rgba(16,24,40,0.12); border-color: #c9dafc; }

/* Emphasis cards used for key notes within policy/rights sections */
.card.emphasis { border-color: #d6e3ff; box-shadow: 0 4px 14px rgba(47,94,168,0.18); background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); }
.card.emphasis:hover { box-shadow: 0 12px 26px rgba(47,94,168,0.22); }
.card.emphasis h3 { position: relative; color: #0f1b32; }
.card.emphasis h3::after { content: ""; display: block; width: 42px; height: 2px; background: #7aa2ff; border-radius: 2px; margin-top: 8px; opacity: .9; }
.card.emphasis p, .card.emphasis ul { color: #344054; }

/* Insights */
.insights-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.insight { display: grid; grid-template-rows: auto 1fr; background: #ffffff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 6px rgba(16,24,40,0.04); }
.insight img { width: 100%; height: 260px; object-fit: cover; border-bottom: 1px solid var(--border); background: #e8edf5; }
.insight-body { padding: 16px; }
.text-link { color: var(--primary-600); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Metrics */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 18px; text-align: center; box-shadow: 0 1px 6px rgba(16,24,40,0.04); }
.metric-value { font-size: 28px; font-weight: 700; color: var(--primary); }
.metric-label { color: var(--muted); font-size: 14px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: start; }
.contact-details { list-style: none; margin: 16px 0 0; padding: 0; color: var(--muted); }
.contact-details li { margin-bottom: 6px; }
.contact-image { margin-top: 18px; border: 1px solid var(--border); width: 100%; height: 220px; object-fit: cover; border-radius: 10px; }

.contact-form { background: #ffffff; border: 1px solid var(--border); border-radius: 10px; padding: 18px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: grid; gap: 6px; }
label { font-weight: 600; }
input, textarea { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid #d7dde5; background: #ffffff; color: var(--text); }
input::placeholder, textarea::placeholder { color: #8a96a8; }
.error { color: var(--error); font-size: 12px; min-height: 16px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
#form-status { color: var(--success); font-weight: 600; }

/* CTA Band */
.cta-band { background: linear-gradient(180deg, #12203a 0%, #0f1b32 100%); color: #e7ecf3; padding: 48px 0; }
.cta-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 20px; align-items: center; }
.cta-copy h2 { margin: 0 0 8px; font-size: 28px; color: #ffffff; letter-spacing: -0.01em; }
.cta-copy p { margin: 0; color: #c6d0df; }
.cta-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.cta-band .btn-secondary { color: #e7ecf3; border-color: rgba(231,236,243,0.35); }
.cta-band .btn-secondary:hover { border-color: #ffffff; color: #ffffff; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 1500;
  background: #ffffff; color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; box-shadow: 0 10px 24px rgba(16,24,40,0.12);
  min-width: 260px; max-width: 92vw; opacity: 0; transform: translateY(10px);
  pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-color: #ccebd8; box-shadow: 0 10px 24px rgba(31,157,91,0.12); }
.toast.error { border-color: #f3c8c6; box-shadow: 0 10px 24px rgba(217,48,37,0.12); }

/* Per-section decorative floating blue blobs for light sections */
.decor-float { position: relative; overflow: hidden; }
.decor-float::before,
.decor-float::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(24px) saturate(115%);
  opacity: 0.18;
  background: radial-gradient(circle at 30% 30%, rgba(122,162,255,0.55), rgba(47,94,168,0.15) 55%, rgba(47,94,168,0) 70%);
  transform: translateZ(0);
}
.decor-float::before {
  width: 340px; height: 340px;
  top: -120px; left: -100px;
  animation: blobFloatY 16s ease-in-out infinite alternate, blobFloatX 28s linear infinite;
}
.decor-float::after {
  width: 280px; height: 280px;
  bottom: -120px; right: -80px;
  opacity: 0.16;
  background: radial-gradient(circle at 30% 30%, rgba(47,94,168,0.50), rgba(31,63,116,0.15) 55%, rgba(31,63,116,0) 70%);
  animation: blobFloatY 18s ease-in-out infinite alternate-reverse, blobFloatX 24s linear infinite;
}

@keyframes blobFloatY {
  from { transform: translateY(-10px); }
  to   { transform: translateY(10px); }
}
@keyframes blobFloatX {
  from { margin-left: -6px; }
  to   { margin-left: 6px; }
}

/* Floating background orbs (decorative) */
.bg-orbs {
  position: fixed;
  inset: -12vh -12vw;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-orbs .orb {
  position: absolute;
  width: var(--size, 280px);
  height: var(--size, 280px);
  border-radius: 50%;
  opacity: 0.18;
  filter: blur(18px) saturate(110%);
  background: radial-gradient( circle at 30% 30%, rgba(47,94,168,0.55), rgba(31,63,116,0.15) 60%, rgba(31,63,116,0) 70%);
  transform: translate(var(--x, 0), var(--y, 0)) translateZ(0);
  animation:
    floatY var(--tY, 14s) ease-in-out infinite alternate,
    floatX var(--tX, 24s) linear infinite;
}
.bg-orbs .orb.variant-2 { background: radial-gradient(circle at 30% 30%, rgba(122,162,255,0.5), rgba(47,94,168,0.15) 60%, rgba(47,94,168,0) 70%); opacity: 0.16; filter: blur(20px) saturate(120%); }
.bg-orbs .orb.variant-3 { background: radial-gradient(circle at 30% 30%, rgba(21,115,71,0.45), rgba(47,94,168,0.12) 60%, rgba(31,63,116,0) 70%); opacity: 0.14; }

@keyframes floatY {
  from { transform: translate(var(--x, 0), calc(var(--y, 0) - 12px)); }
  to   { transform: translate(var(--x, 0), calc(var(--y, 0) + 12px)); }
}
@keyframes floatX {
  from { margin-left: -8px; }
  to   { margin-left: 8px; }
}

/* Reveal animations */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal="up"] { transform: translateY(18px); }
[data-reveal="down"] { transform: translateY(-18px); }
[data-reveal="left"] { transform: translateX(18px); }
[data-reveal="right"] { transform: translateX(-18px); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* Stagger helper */
.stagger > * { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.stagger.is-visible > * { opacity: 1; transform: none; }
.stagger.is-visible > *:nth-child(1) { transition-delay: .05s; }
.stagger.is-visible > *:nth-child(2) { transition-delay: .12s; }
.stagger.is-visible > *:nth-child(3) { transition-delay: .18s; }
.stagger.is-visible > *:nth-child(4) { transition-delay: .24s; }
.stagger.is-visible > *:nth-child(5) { transition-delay: .30s; }
.stagger.is-visible > *:nth-child(6) { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], .stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .bg-orbs { display: none !important; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; background: #ffffff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr; gap: 20px; align-items: start; }
.footer-brand .logo { margin-bottom: 8px; }
.footer-note { color: var(--muted); margin: 6px 0 0; }
.footer-col h4 { margin: 0 0 8px; font-size: 14px; color: #344054; text-transform: uppercase; letter-spacing: .08em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 980px) {
  .hero-inner, .contact-grid { grid-template-columns: 1fr; }
  .cards-grid, .feature-grid, .insights-grid { grid-template-columns: 1fr 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .site-nav ul { display: none; position: absolute; right: 4%; top: 58px; flex-direction: column; background: #ffffff; border: 1px solid var(--border); border-radius: 12px; padding: 10px; width: 260px; box-shadow: 0 16px 34px rgba(16,24,40,0.14); z-index: 1200; transform-origin: top right; animation: none; }
  .site-nav ul.open { display: flex; animation: menuDrop .18s ease-out both; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text); }
  .hero-copy h1 { font-size: 36px; }
  .cards-grid, .feature-grid, .insights-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@keyframes menuDrop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
