/* ==========================================================
   P&E Mission Systems — TARGET-BASED SINGLE SECTION VIEW
   Use this as the FINAL stylesheet approach if you want:
   - ONLY the selected section visible
   - No section bleeding under any viewport size
   - Section panel centered in viewport
   - Content visible via internal panel scrollbar when needed

   Required HTML shape already exists:
   <section id="..." class="section">
     <div class="container section-shell ...">
       ...
     </div>
   </section>
   ========================================================== */

/* ================= Variables ================= */

:root {
  --header-height: 84px;

  /*
    Panel margin inside the visible viewport below the fixed header.
    It scales down on short screens so the panel remains usable.
  */
  --section-y-margin: clamp(28px, 8vh, 115px);
  --section-x-margin: clamp(10px, 2.5vw, 48px);

  --section-width: 95vw;
  --section-max: 1600px;
  --container: 1180px;

  --section-panel-padding: clamp(18px, 2.6vw, 48px);

  --bg: #050607;
  --bg-2: #0a0c0d;
  --panel: rgba(8, 10, 11, 0.78);
  --panel-2: rgba(13, 16, 18, 0.92);

  --text: #f7f1e4;
  --muted: #cbbfac;
  --muted-2: #a89c8a;

  --gold: #d99a2b;
  --gold-light: #f2d391;
  --gold-dark: #8f6425;
  --blue: #42677d;

  --line: rgba(242, 211, 145, 0.20);
  --line-strong: rgba(242, 211, 145, 0.38);

  --radius: 26px;
  --radius-sm: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

/* ================= Base Reset ================= */

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

html {
  width: 100%;
  height: 100%;
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-snap-type: none !important;
}

body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 12%, rgba(217, 154, 43, 0.22), transparent 420px),
    radial-gradient(circle at 88% 8%, rgba(66, 103, 125, 0.20), transparent 460px),
    radial-gradient(circle at 76% 92%, rgba(143, 100, 37, 0.14), transparent 520px),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 48%, #11100c 100%);
  font-family: "Segoe UI", Inter, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(
      118deg,
      transparent 0 16%,
      rgba(255, 255, 255, 0.035) 16.2% 16.9%,
      rgba(255, 255, 255, 0.01) 17% 30%,
      transparent 30.3% 100%
    ),
    linear-gradient(
      72deg,
      transparent 0 58%,
      rgba(217, 154, 43, 0.07) 58.2% 58.9%,
      rgba(217, 154, 43, 0.012) 59% 73%,
      transparent 73.3% 100%
    );
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 0 58%, rgba(0, 0, 0, 0.52) 100%);
}

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

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

p {
  margin: 0;
  color: var(--muted);
}

strong {
  color: var(--gold-light);
}

button,
input,
textarea {
  font: inherit;
}

.cosmic-orbits,
.orbit,
.planet {
  display: none !important;
  visibility: hidden !important;
}

/* ================= Header ================= */

.container {
  width: min(100%, var(--container));
  margin-inline: auto;
  padding-inline: 22px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--gold-light);
  color: #050505;
  font-weight: 800;
}

.site-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  width: 100%;
  height: var(--header-height);
  min-height: var(--header-height);

  background: #050607;
  border-bottom: 1px solid rgba(242, 211, 145, 0.16);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.30);
}

.site-header.scrolled {
  background: #040505;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.header-row {
  height: var(--header-height);
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  order: 2;
}

.brand img {
  width: clamp(122px, 13vw, 178px);
  max-height: 72px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  order: 1;
  min-width: 0;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: #111315;
  font-size: 1.35rem;
  cursor: pointer;
}

.navmenu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navmenu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 999px;
  color: rgba(247, 241, 228, 0.84);
  font-size: clamp(0.72rem, 0.82vw, 0.86rem);
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}

.navmenu a:hover,
.navmenu a.active {
  color: var(--gold-light);
  background: rgba(217, 154, 43, 0.10);
  border-color: rgba(242, 211, 145, 0.16);
}

/* Active nav state using CSS target routing */
body:has(#about:target) .navmenu a[href="#about"],
body:has(#mission:target) .navmenu a[href="#mission"],
body:has(#services:target) .navmenu a[href="#services"],
body:has(#capabilities:target) .navmenu a[href="#capabilities"],
body:has(#careers:target) .navmenu a[href="#careers"],
body:has(#contact:target) .navmenu a[href="#contact"] {
  color: var(--gold-light);
  background: rgba(217, 154, 43, 0.10);
  border-color: rgba(242, 211, 145, 0.16);
}

/* ================= Target-Based Section Router ================= */

/*
  This is the key change:
  The page does not scroll through sections.
  All sections are hidden except the selected target.
*/

main {
  position: fixed !important;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;

  z-index: 1;
  width: 100%;
  height: calc(100dvh - var(--header-height));

  display: grid !important;
  place-items: center !important;

  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* Hide every section by default */
main > .section {
  display: none !important;
}

/* Show the selected section */
main > .section:target {
  display: flex !important;
}

/* Default view: show top when no section is targeted */
main:not(:has(> .section:target)) > #top {
  display: flex !important;
}

/* The selected section fills the viewport area below the header */
main > .section {
  position: relative !important;

  width: 100% !important;
  max-width: none !important;

  height: 100% !important;
  min-height: 0 !important;

  margin: 0 !important;
  padding:
    var(--section-y-margin)
    var(--section-x-margin) !important;

  align-items: center !important;
  justify-content: center !important;

  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;

  overflow: hidden !important;
}

/* Remove old double-panel overlays */
.section-hero::before,
main > .section::before {
  content: none !important;
  display: none !important;
}

/* The visible panel */
main > .section > .section-shell {
  position: relative;
  z-index: 1;

  width: min(var(--section-width), var(--section-max)) !important;
  max-width: min(var(--section-width), var(--section-max)) !important;

  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;

  margin: 0 auto !important;
  padding: var(--section-panel-padding) !important;

  border: 1px solid rgba(242, 211, 145, 0.13);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--panel);
  box-shadow: var(--shadow);

  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

/* Accent panels */
main > .section.section-accent > .section-shell {
  background:
    linear-gradient(135deg, rgba(217, 154, 43, 0.08), rgba(66, 103, 125, 0.07)),
    rgba(8, 10, 11, 0.74);
}

/* Hero panel */
main > .section.section-hero > .section-shell {
  background:
    radial-gradient(circle at 85% 18%, rgba(242, 211, 145, 0.13), transparent 380px),
    linear-gradient(135deg, rgba(217, 154, 43, 0.10), rgba(66, 103, 125, 0.05)),
    var(--panel);
}

/* Internal panel scrollbar */
main > .section > .section-shell::-webkit-scrollbar {
  width: 8px;
}

main > .section > .section-shell::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(242, 211, 145, 0.34);
}

main > .section > .section-shell::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.045);
}

/* Center simple panels */
main > .section > .section-shell:not(.hero-grid):not(.two-col) {
  display: flex;
  align-items: center;
}

/* Content-heavy sections start at top and scroll internally */
#services > .section-shell,
#capabilities > .section-shell {
  display: block;
}

#services > .section-shell,
#capabilities > .section-shell,
#contact > .section-shell {
  align-items: flex-start;
}

/* Two-column panels */
main > .section > .section-shell.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(22px, 3vw, 34px);
  align-items: center;
}

/* Prevent horizontal overflow */
main > .section * {
  max-width: 100%;
}

/* Footer is hidden because this is now a one-section app-style layout */
.site-footer {
  display: none !important;
}

/* ================= Typography ================= */

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  max-width: 900px;
  font-size: clamp(2.75rem, 6.6vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-shadow: 0 0 36px rgba(217, 154, 43, 0.16);
}

h1::after {
  content: "";
  display: block;
  width: min(230px, 42vw);
  height: 2px;
  margin-top: 22px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

h2 {
  font-size: clamp(2.15rem, 4.2vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

h2::before {
  content: "";
  display: block;
  width: 58px;
  height: 3px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--gold);
}

h3 {
  font-size: clamp(1.06rem, 1.35vw, 1.28rem);
  line-height: 1.22;
  color: var(--gold-light);
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.35vw, 1.2rem);
  line-height: 1.62;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ================= Hero ================= */

#top > .section-shell.hero-grid {
  display: grid;
  grid-template-columns: minmax(220px, 30%) minmax(0, 70%);
  align-items: start;
  gap: clamp(22px, 3.5vw, 50px);
}

#top .hero-visual {
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: visible;
}

#top .mission-mark {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: auto;
  overflow: visible;
}

#top .mission-mark img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  object-fit: contain;
  object-position: top left;
  filter:
    drop-shadow(0 0 18px rgba(217, 154, 43, 0.26))
    drop-shadow(0 14px 28px rgba(0, 0, 0, 0.32));
}

#top .hero-copy {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  display: grid;
  align-content: start;
  gap: clamp(12px, 1.7vh, 22px);
}

#top h1,
#top h2 {
  font-size: clamp(2.35rem, 5.8vw, 5.4rem);
}

#top .lead {
  font-size: clamp(0.98rem, 1.2vw, 1.16rem);
  line-height: 1.5;
}

/* ================= Buttons / Hero Details ================= */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  color: #080806;
  background: linear-gradient(135deg, #f5d79b, #c8923f 54%, #9f6d25);
  border: 1px solid rgba(242, 211, 145, 0.55);
  box-shadow: 0 18px 42px rgba(217, 154, 43, 0.22);
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: center;
}

.btn:hover {
  filter: brightness(1.06);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line-strong);
  box-shadow: none;
}

.cred {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cred li {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: clamp(0.78rem, 0.9vw, 0.9rem);
}

.cred span,
.cap-meta strong {
  display: inline-block;
  margin-right: 6px;
  color: var(--gold-light);
  font-weight: 900;
}

/* ================= Content Layout ================= */

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(22px, 3vw, 34px);
  align-items: stretch;
}

.content-stack {
  display: grid;
  align-content: start;
  gap: 16px;
}

.content-wide {
  max-width: 1060px;
}

.card {
  position: relative;
  min-width: 0;
  padding: clamp(14px, 1.6vw, 22px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.016)),
    var(--panel-2);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.30);
}

.card:hover {
  border-color: var(--line-strong);
}

.check-list,
.timeline {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.timeline li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
}

.check-list li::before,
.timeline li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--gold);
  font-size: 0.72rem;
}

.timeline strong {
  color: var(--text);
}

#mission h2 {
  max-width: 1060px;
  font-size: clamp(1.9rem, 4vw, 3.55rem);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.035);
  font-weight: 760;
}

.section-head {
  max-width: 860px;
  margin-bottom: clamp(12px, 1.5vw, 20px);
}

.section-head p:last-child {
  margin-top: 10px;
}

.card-grid {
  display: grid;
  gap: clamp(10px, 1.3vw, 18px);
}

.card-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card h3,
.capability-card h3 {
  margin-bottom: 10px;
}

.service-card p {
  margin-bottom: 12px;
}

.cap-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: clamp(12px, 1.6vw, 20px) 0 clamp(14px, 1.8vw, 22px);
}

.cap-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.83rem;
}

/* ================= Contact ================= */

.contact-grid {
  align-items: center;
}

.form {
  display: grid;
  gap: 16px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--gold-light);
  font-weight: 850;
  letter-spacing: 0.04em;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(242, 211, 145, 0.20);
  border-radius: 16px;
  padding: 14px 15px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.34);
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(217, 154, 43, 0.15);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.form-status {
  min-height: 1.2em;
  font-size: 0.98rem;
}

/* ================= Width / Height Adjustments ================= */

@media (max-width: 1280px) {
  .card-grid-4,
  .card-grid-3,
  .cred {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-height: 850px) and (min-width: 1001px) {
  :root {
    --section-y-margin: clamp(20px, 6vh, 72px);
    --section-panel-padding: clamp(16px, 2vw, 34px);
  }

  h1 {
    font-size: clamp(2.15rem, 4.8vw, 4.7rem);
  }

  h2 {
    font-size: clamp(1.85rem, 3.1vw, 3rem);
  }

  h3 {
    font-size: clamp(0.98rem, 1.05vw, 1.14rem);
  }

  p,
  .check-list li,
  .timeline li {
    font-size: 0.94rem;
    line-height: 1.42;
  }

  .btn {
    min-height: 42px;
    padding: 10px 15px;
  }
}

@media (max-height: 700px) and (min-width: 1001px) {
  :root {
    --section-y-margin: 18px;
    --section-panel-padding: 16px;
  }

  h1 {
    font-size: clamp(1.95rem, 4.2vw, 3.9rem);
  }

  h2 {
    font-size: clamp(1.6rem, 2.8vw, 2.45rem);
  }

  h2::before {
    margin-bottom: 8px;
  }
}

/* ================= Tablet / Mobile ================= */

@media (max-width: 1000px) {
  :root {
    --header-height: 78px;
    --section-y-margin: 32px;
    --section-x-margin: 10px;
    --section-panel-padding: 32px 22px;
  }

  .container {
    padding-inline: 18px;
  }

  .header-row {
    height: var(--header-height);
    min-height: var(--header-height);
  }

  .brand {
    order: 1;
    margin-left: auto;
  }

  .brand img {
    width: clamp(112px, 32vw, 150px);
    max-height: 62px;
  }

  .nav {
    order: 2;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .navmenu {
    position: absolute;
    top: calc(100% + 10px);
    right: 18px;
    width: min(310px, calc(100vw - 36px));
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #050607;
    box-shadow: var(--shadow);
  }

  .navmenu.show {
    display: flex;
  }

  .navmenu a {
    min-height: 44px;
    justify-content: flex-end;
    text-align: right;
  }

  main > .section > .section-shell.two-col,
  #top > .section-shell.hero-grid,
  .hero-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  #top .mission-mark {
    width: min(58vw, 340px);
  }

  .card-grid-4,
  .card-grid-3,
  .cred {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  :root {
    --header-height: 72px;
    --section-y-margin: 20px;
    --section-panel-padding: 26px 16px;
  }

  body {
    font-size: 15px;
  }

  .container {
    padding-inline: 14px;
  }

  .header-row {
    height: var(--header-height);
    min-height: var(--header-height);
    gap: 12px;
  }

  .brand img {
    width: 132px;
    max-height: 54px;
  }

  main > .section > .section-shell {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    border-radius: 20px;
  }

  h1 {
    font-size: clamp(2.35rem, 13vw, 4rem);
  }

  h2 {
    font-size: clamp(2rem, 10vw, 2.9rem);
  }

  #top .mission-mark {
    width: min(78vw, 320px);
  }

  .actions,
  .btn {
    width: 100%;
  }

  .pill-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pill {
    justify-content: center;
    text-align: center;
  }
}

/* ================= Accessibility ================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
