/*
Theme Name: AegisSwarmAI Systems
Theme URI: https://aegisswarmai.com/
Author: OpenAI Codex
Description: WordPress theme for AegisSwarmAI Systems LLC and the Aegis Shield project.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: aegisswarmai-systems
*/

:root {
  --bg: #eef3f6;
  --paper: #f8fbfc;
  --paper-2: #ffffff;
  --ink: #101a23;
  --muted: #5c6a76;
  --line: rgba(16, 26, 35, 0.1);
  --navy: #091722;
  --navy-2: #102433;
  --teal: #1d6672;
  --teal-soft: #7ec3cc;
  --gold: #8ca3b5;
  --gold-soft: #c5d5e3;
  --white: #ffffff;
  --shadow-lg: 0 26px 72px rgba(7, 18, 28, 0.16);
  --shadow-md: 0 14px 36px rgba(7, 18, 28, 0.1);
  --radius: 24px;
  --radius-sm: 16px;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-head: "Sora", "Segoe UI", sans-serif;
  --transition: 220ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a,
button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  background: none;
}

.container {
  width: min(1380px, calc(100% - 48px));
  margin: 0 auto;
}

.surface-light {
  background: linear-gradient(180deg, var(--paper) 0%, rgba(248, 251, 252, 0.94) 100%);
}

.surface-dark {
  background:
    radial-gradient(circle at top left, rgba(126, 195, 204, 0.12), transparent 30%),
    linear-gradient(180deg, #091722 0%, #0d2230 100%);
  color: var(--white);
}

.surface-accent {
  background:
    linear-gradient(180deg, rgba(197, 213, 227, 0.4) 0%, rgba(238, 243, 246, 0.95) 100%);
}

#navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
  background: rgba(11, 24, 34, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#navbar.scrolled {
  background: rgba(11, 24, 34, 0.9);
}

.nav-shell {
  width: min(1380px, calc(100% - 48px));
  height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
}

.logo-mark {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal-soft), var(--gold));
  box-shadow: 0 0 0 8px rgba(139, 199, 198, 0.12);
}

.logo-accent {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: rgba(255, 255, 255, 0.8);
}

.nav-links a:hover,
.nav-mobile a:hover,
.footer-links a:hover,
.contact-points a:hover {
  color: var(--teal);
}

.nav-cta {
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #c7d3dd, #e3edf4);
  color: #132433;
  font-weight: 700;
}

.nav-hamburger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.nav-hamburger span {
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 999px;
}

.nav-mobile {
  display: none;
  width: min(1380px, calc(100% - 48px));
  margin: 0 auto 18px;
  padding: 10px 0 0;
  flex-direction: column;
  gap: 14px;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  color: rgba(255, 255, 255, 0.84);
}

main section {
  padding: 110px 0;
}

#hero {
  position: relative;
  overflow: clip;
  min-height: calc(100vh - 82px);
  background:
    radial-gradient(circle at top left, rgba(126, 195, 204, 0.14), transparent 28%),
    radial-gradient(circle at right center, rgba(197, 213, 227, 0.16), transparent 32%),
    linear-gradient(180deg, var(--navy) 0%, #102433 100%);
  color: var(--white);
}

.hero-grid,
.hero-orbit {
  position: absolute;
  pointer-events: none;
}

.hero-grid {
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent);
}

.hero-orbit {
  border: 1px solid rgba(126, 195, 204, 0.14);
  border-radius: 999px;
}

.hero-orbit-a {
  width: 520px;
  height: 520px;
  right: -120px;
  top: 90px;
}

.hero-orbit-b {
  width: 760px;
  height: 760px;
  right: -220px;
  top: -10px;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 82px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--teal);
  margin-bottom: 16px;
}

.eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
}

.eyebrow.warm {
  color: var(--gold-soft);
}

.hero-copy h1,
.section-head h2,
.gallery-header h2,
.contact-copy h2 {
  margin: 0;
  font-family: var(--font-head);
  line-height: 1.04;
}

.hero-copy h1 {
  max-width: 10.5ch;
  font-size: clamp(3.8rem, 8vw, 6.7rem);
  letter-spacing: -0.05em;
}

.hero-text,
.section-head p,
.gallery-header p,
.mission-panel p,
.feature-block p,
.tech-card p,
.contact-copy p {
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.1rem;
  max-width: 62ch;
}

.hero-text {
  margin: 24px 0 0;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #c8d5de, #e4edf4);
  color: #0f2230;
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--white);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 42px;
}

.stat-card,
.feature-block,
.tech-card,
.mission-panel,
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat-card {
  padding: 24px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.08);
}

.stat-card strong {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  margin-bottom: 8px;
}

.stat-card span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
}

.hero-visual {
  position: relative;
  min-height: 620px;
}

.hero-panel {
  position: absolute;
  inset: 20px 0 90px 40px;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-kicker {
  color: var(--gold-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
}

.panel-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0 26px;
}

.panel-metrics span {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.panel-metrics strong {
  font-size: 1.15rem;
}

.hero-screen {
  position: relative;
  height: calc(100% - 94px);
  min-height: 380px;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(126, 195, 204, 0.18), transparent 24%),
    linear-gradient(180deg, #132634 0%, #0c1a24 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.screen-map,
.screen-route,
.screen-signal,
.screen-scan,
.screen-track,
.screen-drone-track,
.screen-label {
  position: absolute;
}

.screen-map {
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
}

.screen-scan {
  inset: -10% auto -10% -15%;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(126, 195, 204, 0.14), transparent);
  transform: skewX(-18deg);
  animation: consoleSweep 7.5s linear infinite;
}

.screen-route {
  left: 16%;
  top: 18%;
  width: 64%;
  height: 48%;
  border: 2px dashed rgba(197, 213, 227, 0.42);
  border-radius: 32px;
}

.screen-track {
  border-top: 1px dashed rgba(126, 195, 204, 0.28);
  transform-origin: left center;
}

.screen-track-a {
  top: 24%;
  left: 18%;
  width: 48%;
  transform: rotate(12deg);
}

.screen-track-b {
  top: 58%;
  left: 34%;
  width: 34%;
  transform: rotate(-24deg);
}

.screen-drone-track {
  width: 0;
  height: 0;
}

.screen-drone-track-a {
  top: 24%;
  left: 18%;
  animation: droneTrackA 8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.screen-drone-track-b {
  top: 58%;
  left: 34%;
  animation: droneTrackB 6.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.screen-drone-track-c {
  top: 46%;
  left: 52%;
  animation: droneTrackC 9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.screen-drone-node {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #edf6fb;
  box-shadow:
    0 0 0 6px rgba(197, 213, 227, 0.14),
    0 0 16px rgba(197, 213, 227, 0.4);
}

.screen-drone-node::before,
.screen-drone-node::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.screen-drone-node::before {
  border: 1px solid rgba(126, 195, 204, 0.4);
  transform: scale(1.9);
  animation: dronePulse 2.2s ease-out infinite;
}

.screen-drone-node::after {
  inset: 50% auto auto 50%;
  width: 28px;
  height: 1px;
  background: rgba(126, 195, 204, 0.46);
  transform: translate(4px, -50%);
}

.screen-signal {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #d5e2ec;
  box-shadow: 0 0 0 12px rgba(197, 213, 227, 0.12);
}

.screen-signal-a {
  top: 24%;
  left: 18%;
}

.screen-signal-b {
  top: 38%;
  right: 22%;
  background: var(--teal-soft);
  box-shadow: 0 0 0 12px rgba(126, 195, 204, 0.12);
}

.screen-signal-c {
  bottom: 24%;
  left: 44%;
}

.screen-label {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(9, 23, 34, 0.68);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.screen-label-a {
  top: 14%;
  left: 12%;
}

.screen-label-b {
  top: 52%;
  right: 15%;
}

.screen-label-c {
  bottom: 14%;
  left: 28%;
}

@keyframes consoleSweep {
  0% {
    transform: translateX(-10%) skewX(-18deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateX(370%) skewX(-18deg);
    opacity: 0;
  }
}

@keyframes droneTrackA {
  0%, 100% {
    transform: translate(0, 0);
  }
  30% {
    transform: translate(120px, 22px);
  }
  55% {
    transform: translate(160px, 78px);
  }
  82% {
    transform: translate(236px, 104px);
  }
}

@keyframes droneTrackB {
  0%, 100% {
    transform: translate(0, 0);
  }
  35% {
    transform: translate(62px, -22px);
  }
  70% {
    transform: translate(128px, -56px);
  }
}

@keyframes droneTrackC {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-48px, 16px);
  }
  50% {
    transform: translate(-12px, 58px);
  }
  75% {
    transform: translate(44px, 88px);
  }
}

@keyframes dronePulse {
  0% {
    opacity: 0.8;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

.hero-floating-card {
  position: absolute;
  right: 0;
  bottom: 18px;
  max-width: 280px;
  padding: 22px 24px;
  border-radius: 24px;
  background: rgba(248, 251, 252, 0.96);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

.floating-label {
  display: block;
  margin-bottom: 8px;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 800;
}

.section-head,
.gallery-header {
  display: grid;
  gap: 16px;
  margin-bottom: 42px;
}

.section-head h2,
.gallery-header h2,
.contact-copy h2 {
  font-size: clamp(2.3rem, 4vw, 4rem);
  letter-spacing: -0.04em;
}

.section-head p,
.feature-block p,
.tech-card p,
.contact-copy p,
.contact-points span,
.contact-points a,
.mission-panel p {
  color: var(--muted);
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.feature-block {
  padding: 30px;
  background: var(--paper-2);
  box-shadow: var(--shadow-md);
}

.feature-index {
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--teal);
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.system-strip {
  padding: 28px 0 0;
}

.system-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.system-chip {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(16, 26, 35, 0.08);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(7, 18, 28, 0.05);
}

.system-chip-label {
  display: block;
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.system-chip strong {
  font-size: 0.95rem;
  color: var(--ink);
}

.feature-block h3,
.mission-panel h3,
.tech-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-size: 1.45rem;
}

.gallery-header {
  grid-template-columns: 1.25fr 0.75fr;
  align-items: end;
}

.gallery-header p {
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  position: relative;
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  min-height: 260px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transform: translateY(0);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-card:hover {
  transform: translateY(-4px);
}

.gallery-card:nth-child(1),
.gallery-card:nth-child(6) {
  grid-column: span 5;
}

.gallery-card:nth-child(2),
.gallery-card:nth-child(3),
.gallery-card:nth-child(4),
.gallery-card:nth-child(5),
.gallery-card:nth-child(7),
.gallery-card:nth-child(8) {
  grid-column: span 3;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 260px;
  filter: saturate(0.9) contrast(1.02);
}

.gallery-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 260px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(126, 195, 204, 0.18), transparent 30%),
    linear-gradient(135deg, #0a1823 0%, #123246 100%);
}

.gallery-placeholder-grid,
.gallery-placeholder-orbit,
.gallery-placeholder-path,
.gallery-placeholder-node,
.gallery-placeholder-panel {
  position: absolute;
}

.gallery-placeholder-grid {
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

.gallery-placeholder-orbit {
  border: 1px solid rgba(126, 195, 204, 0.18);
  border-radius: 999px;
}

.gallery-placeholder-orbit-a {
  width: 220px;
  height: 220px;
  right: -40px;
  top: -30px;
}

.gallery-placeholder-orbit-b {
  width: 340px;
  height: 340px;
  right: -120px;
  top: -80px;
}

.gallery-placeholder-path {
  left: 14%;
  right: 14%;
  top: 52%;
  height: 0;
  border-top: 2px dashed rgba(199, 215, 229, 0.45);
  transform: rotate(-12deg);
}

.gallery-placeholder-node {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #edf6fb;
  box-shadow: 0 0 0 8px rgba(237, 246, 251, 0.08);
}

.gallery-placeholder-node-a {
  left: 20%;
  top: 48%;
}

.gallery-placeholder-node-b {
  left: 46%;
  top: 56%;
}

.gallery-placeholder-node-c {
  right: 19%;
  top: 41%;
}

.gallery-placeholder-panel {
  left: 18px;
  top: 18px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(9, 23, 34, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
  backdrop-filter: blur(8px);
}

.gallery-placeholder-panel span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.gallery-placeholder-panel strong {
  display: block;
  max-width: 20ch;
  font-size: 1rem;
  line-height: 1.3;
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 10, 15, 0.82) 100%);
}

.gallery-meta {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--white);
  text-align: left;
}

.gallery-meta strong {
  font-size: 1.05rem;
}

.gallery-meta span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.mission-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
}

.tab-btn.active {
  background: #0f2230;
  color: var(--white);
  border-color: #0f2230;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.mission-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  padding: 34px;
  background: var(--paper-2);
  box-shadow: var(--shadow-md);
}

.mission-panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
}

.mission-panel li + li {
  margin-top: 10px;
}

.tech-layout {
  display: grid;
  gap: 40px;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.tech-card {
  padding: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-md);
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 30px;
  align-items: start;
}

.contact-points {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.contact-form {
  padding: 28px;
  background: var(--paper-2);
  box-shadow: var(--shadow-md);
}

.contact-form label,
.form-row {
  display: grid;
  gap: 10px;
}

.form-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-form span {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: rgba(31, 104, 112, 0.55);
  box-shadow: 0 0 0 4px rgba(31, 104, 112, 0.12);
}

.contact-form label + label,
.form-row + label {
  margin-top: 14px;
}

.full-width {
  width: 100%;
  margin-top: 20px;
}

.form-success {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(31, 104, 112, 0.1);
  color: var(--teal);
  border: 1px solid rgba(31, 104, 112, 0.18);
}

#footer {
  padding: 34px 0 44px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.76);
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(6, 12, 18, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.gallery-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.gallery-modal-inner {
  width: min(1100px, 100%);
  background: #0a1620;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
}

.gallery-modal img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #050b10;
}

.gallery-modal-copy {
  padding: 20px 22px 24px;
  color: var(--white);
}

.gallery-modal-copy h3 {
  margin: 0 0 8px;
  font-family: var(--font-head);
}

.gallery-modal-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.gallery-close {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  cursor: pointer;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 560ms ease, transform 560ms ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1200px) {
  .hero-layout,
  .contact-layout,
  .mission-panel,
  .gallery-header,
  .system-strip-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 520px;
  }

  .hero-panel {
    inset: 0 0 90px 0;
  }

  .hero-stats,
  .platform-grid,
  .tech-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-card:nth-child(n) {
    grid-column: span 6;
  }
}

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

  .nav-hamburger {
    display: inline-flex;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(3rem, 14vw, 4.6rem);
  }

  .hero-stats,
  .platform-grid,
  .tech-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .gallery-card:nth-child(n) {
    grid-column: span 12;
  }

  main section {
    padding: 84px 0;
  }

  .hero-visual {
    min-height: 420px;
  }
}

@media (max-width: 560px) {
  .container,
  .nav-shell,
  .nav-mobile {
    width: min(100% - 28px, 1380px);
  }

  .hero-panel,
  .hero-floating-card,
  .feature-block,
  .tech-card,
  .mission-panel,
  .contact-form,
  .gallery-modal-inner {
    border-radius: 22px;
  }

  .hero-panel {
    padding: 22px;
  }

  .panel-metrics {
    grid-template-columns: 1fr;
  }

  .gallery-modal {
    padding: 16px;
  }
}
