/* -----------------------------------------------------
   VERITROOPER — Marketing site, first draft
   Palette: navy primary, red accent, cream surface
   Typography: Fraunces (serif display) + Inter (sans)
   ----------------------------------------------------- */

:root {
  --navy: #0B1F3A;
  --navy-deep: #06152A;
  --navy-soft: #15335A;
  --red: #D92D20;
  --red-deep: #A61C12;
  --cream: #F8F5EE;
  --cream-soft: #ECE7DA;
  --ink: #0A0E14;
  --muted: #6C7280;
  --line: rgba(11, 31, 58, 0.12);

  --serif: "Fraunces", "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(11, 31, 58, 0.06);
  --shadow-md: 0 10px 30px rgba(11, 31, 58, 0.12);

  --container: 1120px;
  --nav-h: 68px;
  --bottom-h: 76px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  color: var(--cream);
  background: #000;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
body {
  padding-bottom: var(--bottom-h); /* clear the fixed bottom bar so the footer isn't covered */
}

/* Page-level dark overlay on top of the fixed slideshow so text stays legible over the photos */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.40) 0%, rgba(0,0,0,0.62) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Every section (and footer) sits above the fixed slideshow, overlay, and
   airspace — so nav/content always stays in front of the plane + paradogs. */
section, .footer {
  position: relative;
  z-index: 3;
}

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

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
p { line-height: 1.6; }

/* -----------------------------------------------------
   Airspace — overlay where the C-130 flies
   ----------------------------------------------------- */
#airspace {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;            /* above slideshow (0) and dark overlay (1), but behind content (3+) */
  overflow: hidden;
}

/* -----------------------------------------------------
   Nav
   ----------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  height: var(--nav-h);
  background: var(--navy);
  color: var(--cream);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Patent-pending banner — centered overlay in the navy nav bar.
   Absolutely positioned so it does not disturb the brand/tabs flex layout;
   pointer-events:none so it can never intercept a tab click. */
.hero-patent {
  display: block;
  margin: 2px auto 12px;
  height: 50px;
  width: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cream);
  font-family: var(--serif);
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 22px;
}
.brand-seal { height: 38px; width: auto; display: block; }
.brand-accent { color: var(--red); }

.tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tab {
  position: relative;
  display: inline-block;
  padding: 10px 16px;
  color: var(--cream);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: background 160ms ease, color 160ms ease;
}
.tab:hover { background: rgba(255,255,255,0.06); }
.tab.active { color: #fff; }
.tab.active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}
.tab.just-landed {
  animation: tabPulse 900ms ease-out;
}
@keyframes tabPulse {
  0%   { box-shadow: 0 0 0 0 rgba(217,45,32,0.55); background: rgba(217,45,32,0.18); }
  60%  { box-shadow: 0 0 0 10px rgba(217,45,32,0);  background: rgba(217,45,32,0.10); }
  100% { box-shadow: 0 0 0 0 rgba(217,45,32,0);     background: transparent; }
}

/* -----------------------------------------------------
   Hero
   ----------------------------------------------------- */
.hero {
  position: relative;
  background: transparent;
  color: var(--cream);
  padding: 36px 32px 72px;
  min-height: calc(100vh - var(--nav-h) - var(--bottom-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Rotating character photo background, ~50% alpha, slow crossfade — fixed to viewport so it persists across scroll */
.hero-bg-slideshow {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-size: auto 100%;      /* height fills the visible hero; width stays proportional */
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  animation: heroSlide 70s infinite ease-in-out;
  will-change: opacity;
}
/* 7 slides × 10s each = 70s cycle.
   Per slide: 1s fade-in, 8s hold, 1s fade-out. */
.hero-bg-slide:nth-child(1) { animation-delay:   0s; }
.hero-bg-slide:nth-child(2) { animation-delay: -10s; }
.hero-bg-slide:nth-child(3) { animation-delay: -20s; }
.hero-bg-slide:nth-child(4) { animation-delay: -30s; }
.hero-bg-slide:nth-child(5) { animation-delay: -40s; }
.hero-bg-slide:nth-child(6) { animation-delay: -50s; }
.hero-bg-slide:nth-child(7) { animation-delay: -60s; }
@keyframes heroSlide {
  0%     { opacity: 0; }
  1.43%  { opacity: 0.5; }    /* fade in over 1s */
  12.86% { opacity: 0.5; }    /* hold 8s */
  14.29% { opacity: 0; }      /* fade out over 1s */
  100%   { opacity: 0; }
}
/* Hero-specific dark overlay removed — replaced by the page-level body::before overlay. */

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.hero-banner {
  width: 100%;
  max-width: 680px;
  height: auto;
  filter: drop-shadow(0 14px 32px rgba(0,0,0,0.35));
  margin: 0;
}
.hero-title {
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.04;
  max-width: 14ch;
  margin-top: 4px;
}
.hero-title-accent { color: var(--red); }
.hero-sub {
  font-size: clamp(16px, 1.4vw, 19px);
  color: rgba(248,245,238,0.82);
  max-width: 58ch;
  margin: 0;
}
.hero-punch {
  margin: 6px auto 0;
  max-width: 720px;
  padding: 14px 22px;
  background: var(--navy);
  color: var(--cream);
  border: 1px solid rgba(255,255,255,0.18);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  font-size: clamp(14.5px, 1.25vw, 17px);
  line-height: 1.5;
  text-align: center;
}
.hero-punch strong { color: #fff; }
.hero-punch em { color: rgba(248,245,238,0.78); font-style: italic; }
.th-sub {
  display: block;
  font-weight: 500;
  font-size: 0.82em;
  opacity: 0.78;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.contact-download-line { margin: 6px 0 0; }
.contact-download {
  display: inline-block;
  margin-top: 4px;
  padding: 9px 18px;
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.contact-download:hover {
  background: rgba(255,255,255,0.08);
  border-color: #fff;
  transform: translateY(-1px);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1320px;
  margin-top: 8px;
}
.stat {
  position: relative;
  background: #faf8f2;
  border: 1px solid rgba(11,31,58,0.14);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.stat:hover,
.stat:focus-within {
  background: #ffffff;
  border-color: rgba(11,31,58,0.28);
  box-shadow: 0 16px 36px rgba(0,0,0,0.34);
  transform: translateY(-2px);
  outline: none;
}

/* Popup revealed on hover/focus — opens upward above the stat box */
.stat-popup {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 18px);
  transform: translateX(-50%) translateY(6px);
  width: min(520px, 92vw);
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  padding: 18px 20px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms ease;
  z-index: 30;
  text-align: left;
}
.stat-popup::before {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #fff;
}
.stat:hover .stat-popup,
.stat:focus-within .stat-popup {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.popup-title {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  font-size: 15px;
  margin-bottom: 10px;
}
.popup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  color: var(--ink);
}
.popup-table thead th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px 8px;
  border-bottom: 1px solid var(--line);
}
.popup-table thead th:not(:first-child) { text-align: right; }
.popup-table tbody td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.popup-table tbody td:not(:first-child) { text-align: right; }
.popup-table tbody tr:last-child td { border-bottom: none; }
.popup-table .g { color: var(--red); font-weight: 700; }

.popup-table.simple th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  width: 46%;
}
.popup-table.simple td {
  text-align: right;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.popup-table.simple tr:last-child th,
.popup-table.simple tr:last-child td { border-bottom: none; }

.popup-foot {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.45;
}
.stat-num {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1.05;
  color: var(--navy);
}
.stat-unit {
  font-size: 0.55em;
  color: var(--red);
  margin-left: 4px;
  font-weight: 700;
}
.stat-label {
  margin-top: 10px;
  font-size: 13.5px;
  color: #46536b;
  line-height: 1.45;
}
.hero-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}
.cta {
  display: inline-block;
  padding: 13px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: transform 140ms ease, background 140ms ease, border 140ms ease;
}
.cta.primary { background: var(--red); color: #fff; }
.cta.primary:hover { background: var(--red-deep); transform: translateY(-1px); }
.cta.secondary {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(255,255,255,0.35);
}
.cta.secondary:hover { border-color: #fff; transform: translateY(-1px); }
.cta.tertiary {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(255,255,255,0.22);
  opacity: 0.88;
}
.cta.tertiary:hover {
  border-color: rgba(255,255,255,0.55);
  opacity: 1;
  transform: translateY(-1px);
}

/* -----------------------------------------------------
   Section scaffolding
   ----------------------------------------------------- */
section { scroll-margin-top: calc(var(--nav-h) + 16px); }
.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 96px 32px;
}
.section-title {
  font-size: clamp(32px, 4vw, 48px);
  color: #fff;
}
.section-sub {
  margin-top: 10px;
  color: rgba(248, 245, 238, 0.78);
  font-size: 17px;
  max-width: 100%;
}

/* Results */
.results { background: transparent; }
.table-wrap {
  margin-top: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  color: var(--ink);
}
.results-table th,
.results-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.results-table thead th {
  background: var(--navy);
  color: var(--cream);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.results-table tbody tr:last-child td { border-bottom: none; }
.results-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.results-table .delta {
  color: var(--red);
  font-weight: 700;
}
.audit-band {
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--navy);
  color: var(--cream);
  border-radius: var(--radius);
  font-size: 14px;
  letter-spacing: 0.01em;
}

/* How it works */
.how { background: transparent; }

/* Interactive pipeline arc */
.pipeline-arc {
  position: relative;
  margin: 44px auto 0;
  max-width: 1000px;
  width: 100%;
  aspect-ratio: 1000 / 720;
}
.arc-parachute {
  position: absolute;
  left: 50%;
  top: 14%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}
.arc-line-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 1;
}
.arc-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 2;
  stroke-dasharray: 4 8;
}

/* Numbered nodes positioned along the arc */
.arc-node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  padding: 0;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
  z-index: 2;
}
.arc-node:hover,
.arc-node:focus-visible {
  background: var(--red);
  border-color: #fff;
  transform: translate(-50%, -50%) scale(1.12);
  outline: none;
  box-shadow: 0 10px 28px rgba(217, 45, 32, 0.45);
}
.arc-node.active {
  background: var(--red);
  border-color: #fff;
  box-shadow: 0 8px 24px rgba(217, 45, 32, 0.55);
}
.arc-node .node-num { line-height: 1; }

/* Central popup box — sits inside the dome, content swaps on node hover */
.arc-popup-box {
  position: absolute;
  left: 50%;
  top: 61%;
  transform: translate(-50%, -50%);
  width: min(630px, 92%);
  min-height: 240px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 30px 36px;
  color: var(--cream);
  pointer-events: none;
  z-index: 1;
}
.arc-popup-content { transition: opacity 180ms ease; }
.arc-popup-content[hidden] { display: none; }

.popup-eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 9px;
}
.popup-head {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  color: #fff;
  margin: 0 0 15px;
  letter-spacing: -0.01em;
}
.popup-body {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: rgba(248, 245, 238, 0.88);
}

/* About */
.about { background: transparent; }
.about-prose {
  margin: 32px auto 0;
  max-width: 720px;
  font-size: 16.5px;
  line-height: 1.7;
  color: rgba(248, 245, 238, 0.92);
}
.about-prose p {
  margin: 0 0 1.15em;
}
.about-prose p:last-child {
  margin-bottom: 0;
}

/* Contact */
.contact { background: transparent; color: var(--cream); }
.contact-block {
  margin-top: 32px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.contact-email {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid var(--red);
  padding-bottom: 4px;
}
.contact-email:hover { color: var(--red); }
.contact-line { margin: 0; color: rgba(248,245,238,0.65); font-size: 14px; }

/* Footer */
.footer {
  background: rgba(0, 0, 0, 0.55);
  color: rgba(248,245,238,0.75);
  font-size: 13px;
  backdrop-filter: blur(4px);
}
.footer-inner {
  padding: 24px 32px !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-seal { width: 22px; height: 22px; opacity: 0.8; }
.footer-right { display: flex; gap: 18px; }

/* -----------------------------------------------------
   C-130 plane + dogatroopers (spawned by script.js)
   ----------------------------------------------------- */
.plane {
  position: absolute;
  top: 0;
  left: 0;
  width: 260px;              /* native image width; scale() handles apparent distance */
  height: auto;
  transform-origin: center;
  transform: translate(var(--x0, 0px), var(--y0, 0px)) scale(var(--s0, 1));
  will-change: transform;
}
.plane.flying {
  animation: planeFly var(--flight-ms, 6000ms) linear forwards;
}
@keyframes planeFly {
  from { transform: translate(var(--x0, 0px), var(--y0, 0px)) scale(var(--s0, 1)); }
  to   { transform: translate(var(--x1, 0px), var(--y1, 0px)) scale(var(--s1, 1)); }
}

/* Paradog drop — bloodhound paratrooper, parachute baked into image.
   Drifts down from under the cargo bay, sways on the wind, fades out around
   75% of the viewport height. */
.paradog-drop {
  position: absolute;
  top: 0;
  left: 0;
  width: 84px;
  transform-origin: 50% 18%;
  transform: translate(var(--x0, 0px), var(--y0, 0px)) scale(var(--scale, 1));
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.paradog-drop.falling {
  animation: paradogFall var(--fall-ms, 7500ms) linear forwards;
}
.paradog-sway {
  animation: paradogSway 2.6s ease-in-out infinite alternate;
  transform-origin: 50% 12%;     /* pivot near the top of the chute */
}
.paradog-img {
  width: 100%;
  height: auto;
  display: block;
}
@keyframes paradogFall {
  0%   { transform: translate(var(--x0, 0px), var(--y0, 0px))                             scale(var(--scale, 1)); opacity: 0; }
  2%   {                                                                                                          opacity: 0.95; }
  60%  {                                                                                                          opacity: 0.95; }
  100% { transform: translate(calc(var(--x0, 0px) + var(--drift, 0px)), 75vh)             scale(var(--scale, 1)); opacity: 0; }
}
@keyframes paradogSway {
  from { transform: rotate(-4deg); }
  to   { transform: rotate(4deg); }
}

/* -----------------------------------------------------
   Sample Output Modal
   ----------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-backdrop[aria-hidden="false"] { opacity: 1; pointer-events: auto; }

.modal-card {
  position: relative;
  width: min(1200px, 100%);
  height: min(860px, 100%);
  background: #fff;
  color: var(--ink);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(8px);
  transition: transform 240ms ease;
}
.modal-backdrop.open .modal-card { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(11, 31, 58, 0.08);
  color: var(--navy);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 140ms ease, transform 140ms ease;
}
.modal-close:hover {
  background: rgba(217, 45, 32, 0.12);
  color: var(--red);
  transform: rotate(90deg);
}

.modal-header {
  padding: 26px 32px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.modal-title-wrap { flex: 1; min-width: 0; }
.modal-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  color: var(--navy);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.modal-sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.modal-counter {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--navy);
  padding: 4px 14px;
  background: var(--cream-soft);
  border-radius: 999px;
  white-space: nowrap;
}
.modal-counter-sep { color: var(--muted); font-weight: 400; margin: 0 2px; }

.modal-stage {
  flex: 1;
  overflow-y: auto;
  padding: 26px 32px;
  background: #fcfaf5;
}

.modal-screen { animation: screenFadeIn 280ms ease; }
@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.screen-head { margin-bottom: 20px; }
.screen-kind {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.screen-kind.kind-qa { background: rgba(217, 45, 32, 0.12); color: var(--red-deep); }
.screen-kind.kind-reporter { background: rgba(11, 31, 58, 0.10); color: var(--navy); }
.screen-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  color: var(--navy);
  margin: 0 0 6px;
}
.screen-sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Q&A grid */
.qa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.qa-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qa-card strong { color: var(--navy); font-weight: 600; }
.qa-q { font-size: 14px; color: var(--ink); }
.qa-gt { color: var(--ink); }
.qa-base {}
.qa-base .quoted { font-style: italic; color: #444; }
.qa-verdict {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.qa-verdict.bad { background: rgba(217,45,32,0.10); color: var(--red-deep); }
.qa-doc {
  background: var(--cream-soft);
  border-left: 3px solid var(--navy);
  padding: 10px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
}
.doc-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 6px;
  letter-spacing: 0.02em;
  color: #fff;
  vertical-align: baseline;
}
.doc-chip.doc-default { background: var(--navy); }
.doc-chip.doc-pi      { background: #6E3E9C; }
.doc-chip.doc-no      { background: var(--red-deep); }

/* Reporter card */
.reporter-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 26px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink);
}
.reporter-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}
.reporter-prose {
  margin: 10px 0;
  color: var(--ink);
}
.reporter-prose strong { color: var(--navy); }
.reporter-list, .reporter-recs {
  margin: 10px 0;
  padding-left: 22px;
}
.reporter-list li { margin-bottom: 6px; }
.reporter-recs li { margin-bottom: 12px; }
.reporter-list strong, .reporter-recs strong { color: var(--navy); }
.reporter-failure {
  background: var(--cream-soft);
  border-left: 3px solid var(--red);
  padding: 14px 18px;
  margin: 12px 0;
  border-radius: 0 8px 8px 0;
  font-size: 13.5px;
}
.reporter-failure-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--red-deep);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 8px;
}
.reporter-failure p { margin: 6px 0; }
.verdict-bad {
  display: inline-block;
  background: rgba(217,45,32,0.12);
  color: var(--red-deep);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.reporter-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* Document snapshot inside a sample-modal screen (e.g. the EU Annex IV record) */
.screen-image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* Reporter callout — emphasizes a quotable line within a Reporter narrative */
.reporter-callout {
  margin: 18px 0;
  padding: 16px 20px;
  background: var(--cream-soft);
  border-left: 4px solid var(--red);
  border-radius: 0 8px 8px 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}
.reporter-callout strong { color: var(--red-deep); }

/* Reporter-embedded table — scaled-down version of results-table for use inside reporter-card */
.reporter-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  color: var(--ink);
  margin: 10px 0 4px;
}
.reporter-table th,
.reporter-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.reporter-table thead th {
  background: var(--navy);
  color: var(--cream);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.reporter-table tbody tr:last-child td { border-bottom: none; }
.reporter-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.reporter-table .delta {
  color: var(--red);
  font-weight: 700;
}
.reporter-table tr.row-total td {
  background: rgba(217,45,32,0.06);
  border-top: 2px solid var(--navy);
  border-bottom: none;
  font-size: 14.5px;
}

/* Modal navigation */
.modal-nav {
  padding: 16px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
}
.modal-prev, .modal-next {
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
  font-family: var(--sans);
}
.modal-prev:hover, .modal-next:hover { background: var(--navy-soft); transform: translateY(-1px); }
.modal-prev:disabled, .modal-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.modal-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(11, 31, 58, 0.22);
  cursor: pointer;
  padding: 0;
  transition: background 140ms ease, transform 140ms ease;
}
.dot:hover { background: rgba(11, 31, 58, 0.45); }
.dot.active { background: var(--red); transform: scale(1.25); }

/* Lock body scroll when modal open */
body.modal-open { overflow: hidden; }

/* -----------------------------------------------------
   Integrity teaser section + modal grid
   ----------------------------------------------------- */
.integrity-creed {
  margin: 30px 0 14px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 26px);
  color: #fff;
  letter-spacing: -0.01em;
}
.integrity-cta { margin-top: 0; }

.integrity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.integ-group {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
}
.integ-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  color: var(--navy);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.integ-num {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  border-radius: 6px;
  padding: 2px 8px;
  line-height: 1.5;
  flex: none;
}
.integ-lead {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13.5px;
  font-style: italic;
}
.integ-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.integ-list li {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
}
.integ-list li strong { color: var(--navy); font-weight: 600; }
@media (max-width: 760px) {
  .integrity-grid { grid-template-columns: 1fr; }
}

/* -----------------------------------------------------
   Bottom bar — permanent action row, mirrors the top nav
   ----------------------------------------------------- */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;                /* same tier as the top nav */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 32px;
  min-height: var(--bottom-h);
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Visually-hidden helper (still readable by screen readers) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* -----------------------------------------------------
   Cast Modal — image-dominant, black bottom band
   Independent of the sample-output modal styling.
   ----------------------------------------------------- */
/* Cast backdrop pushes the card to near-fullscreen so the character art has every pixel it can get. */
.cast-backdrop { padding: 8px; }

/* When the cast modal is open, lift the airspace above it so the C-130 + paradogs
   fly over the character portrait instead of disappearing behind it. */
body.cast-open #airspace { z-index: 200; }

.cast-card {
  width: min(1600px, 99vw);
  height: 96vh;
  background: #000;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.65);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cast-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000;
}

.cast-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  animation: castFadeIn 260ms ease;
}
.cast-screen[hidden] { display: none; }

@keyframes castFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.cast-image-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  padding: 4px;
}
.cast-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.cast-text-band {
  flex: 0 0 auto;
  background: #000;
  color: #fff;
  padding: 14px 32px 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.cast-role {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 4px;
}
.cast-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: 0.01em;
  margin: 0 0 6px;
  color: #fff;
}
.cast-description {
  margin: 0;
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.55;
  color: rgba(248, 245, 238, 0.86);
  max-width: none;
}

.cast-nav {
  flex: 0 0 auto;
  background: #000;
  border-top: 1px solid rgba(255,255,255,0.10);
  padding: 10px 24px 12px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.cast-nav-side { display: flex; align-items: center; }
.cast-nav-left { justify-content: flex-start; }
.cast-nav-right { justify-content: flex-end; }
.cast-nav-center {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.cast-counter {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.10em;
  color: rgba(248, 245, 238, 0.55);
}
.cast-btn {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.45);
  padding: 9px 22px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 4px;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.cast-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: #fff;
  transform: translateY(-1px);
}
.cast-btn:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.cast-btn:disabled {
  opacity: 0.30;
  cursor: not-allowed;
  transform: none;
}

/* Cast modal responsive — collapse the 3-column nav to a single centered row on narrow screens */
@media (max-width: 720px) {
  .cast-text-band { padding: 12px 18px; }
  .cast-nav {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 14px 12px;
  }
  .cast-nav-left { justify-content: center; order: 3; }
  .cast-nav-center { order: 1; flex-wrap: wrap; }
  .cast-nav-right { justify-content: center; order: 2; }
  .cast-btn { padding: 8px 16px; font-size: 12.5px; }
}

/* -----------------------------------------------------
   Responsive
   ----------------------------------------------------- */
@media (max-width: 1100px) {
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; }
}
@media (max-width: 880px) {
  .hero-stats { grid-template-columns: 1fr; }
  .nav { padding: 0 18px; }
  .tab { padding: 10px 10px; font-size: 13px; }
  .section-inner, .hero { padding-left: 20px; padding-right: 20px; }
  .flowchart { padding: 10px; }
  .qa-grid { grid-template-columns: 1fr; }
  .modal-header { padding: 20px 20px 14px; flex-wrap: wrap; }
  .modal-stage { padding: 20px; }
  .modal-nav { padding: 14px 18px; }
  .modal-title { font-size: 22px; }
  .bottom-bar { padding: 10px 14px; gap: 8px; }
  .bottom-bar .cta { padding: 10px 14px; font-size: 13px; }
}
@media (max-width: 560px) {
  .brand-text { display: none; }
  .results-table th, .results-table td { padding: 12px 10px; font-size: 13px; }
  .modal-prev, .modal-next { padding: 8px 12px; font-size: 13px; }
  .dot { width: 8px; height: 8px; }
}

/* ============================================================
   PENTAGON HERO (desktop) — reflow the 5 .stat cards into a
   5-point formation with the popup recentered. 2026-06-01.
   ============================================================ */
@media (min-width: 860px) {
  .hero-stats {
    display: block;
    position: relative;
    width: 780px;
    height: 720px;
    max-width: none;
    margin: 96px auto 0;   /* push the whole star formation clear of the reviewer pill above */
  }
  .hero-stats .stat {
    position: absolute;
    width: 176px;
    height: 108px;
    padding: 12px 14px;
    margin-left: -88px;   /* center card on its point (x) */
    margin-top: -54px;    /* center on its point (y) */
    display: flex; flex-direction: column; justify-content: center;
    overflow: hidden;
  }
  .hero-stats .stat .stat-num   { font-size: 17px; }
  .hero-stats .stat .stat-label { font-size: 12px; line-height: 1.32; margin-top: 4px; }

  /* star points: top, upper-right, lower-right, lower-left, upper-left
     (measured from veritrooper_star.png tips; card centered on each tip) */
  .hero-stats .stat:nth-child(1) { left: 50%; top: 4%; }
  .hero-stats .stat:nth-child(2) { left: 92%; top: 37%; }
  .hero-stats .stat:nth-child(3) { left: 78%; top: 93%; }
  .hero-stats .stat:nth-child(4) { left: 21%; top: 93%; }
  .hero-stats .stat:nth-child(5) { left: 8%; top: 37%; }

  /* no transform on hover (would re-anchor the fixed popup) */
  .hero-stats .stat:hover,
  .hero-stats .stat:focus-within { transform: none; }

  /* recenter the popup in the middle of the formation (screen-centered) */
  .hero-stats .stat-popup {
    position: fixed;
    left: 50%;
    top: 52%;
    bottom: auto;
    transform: translate(-50%, -50%) scale(.98);
    width: min(540px, 92vw);
    max-height: 80vh;
    overflow: auto;
  }
  .hero-stats .stat-popup::before { display: none; }   /* drop the up-arrow */
  .hero-stats .stat:hover .stat-popup,
  .hero-stats .stat:focus-within .stat-popup {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ===== Pentagon center stage (popups recentered in the formation) ===== */
@media (min-width: 860px) {
  .hero-stats .stat {            /* uniform trigger cards */
    min-height: 98px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .hero-stats .stat:hover,
  .hero-stats .stat:focus-within { z-index: 5; }

  .penta-core {                  /* true center of the 780x720 formation */
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, 60%);
    z-index: 20;
    pointer-events: none;        /* empty center never blocks the cards behind */
  }
  .penta-core .pcore { pointer-events: auto; }
  .pcore {
    background: #fff;
    color: var(--ink);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px rgba(0,0,0,0.45);
    padding: 16px 18px;
    text-align: left;
    max-height: 70vh;
    overflow: auto;
  }
  .pcore[hidden] { display: none; }
  .pcore-default {
    background: rgba(11,31,58,0.55);
    color: rgba(248,245,238,0.88);
    border: 1px dashed rgba(255,255,255,0.32);
    box-shadow: none;
    text-align: center;
    font-size: 13px;
    padding: 26px 18px;
  }
}
/* mobile: pentagon collapses to a stack, center stage flows under the cards */
@media (max-width: 859px) {
  .pcore { background:#fff; color:var(--ink); border-radius: var(--radius-lg); padding: 14px 16px; margin-top: 8px; }
  .pcore[hidden] { display: none; }
  .pcore-default { display: none; }
}

/* ===== Pentagon backdrop — large blue panel BEHIND the cards ===== */
@media (min-width: 860px) {
  .hero-stats .penta-backdrop {
    position: absolute;
    top: 2%; left: 2%; right: 2%; bottom: 2%;
    z-index: 3;                          /* above shield(1) & cards(2), below popups(20) */
    display: flex;
    align-items: flex-start;             /* prompt sits in the upper metal of the shield */
    justify-content: center;
    padding-top: 18%;
    pointer-events: none;
  }
  .hero-stats .penta-backdrop span {
    max-width: 300px;
    text-align: center;
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: 0.02em;
    color: rgba(248, 245, 238, 0.95);
    background: rgba(11, 31, 58, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 7px 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  }
  .hero-stats .stat { z-index: 2; }      /* cards float on top of the backdrop */

  /* shield outline, layered ON the blue panel but BEHIND the cards */
  .hero-stats .penta-shield {
    position: absolute;
    top: 2%; left: 2%; right: 2%; bottom: 2%;
    z-index: 1;
    background: url('Images/veritrooper_star.png') center/contain no-repeat;
    opacity: 1;
    pointer-events: none;
  }
}
@media (max-width: 859px) {
  .hero-stats .penta-backdrop,
  .hero-stats .penta-shield { display: none; }
}

/* ===== 3-up per-domain results tables ===== */
.tri-tables{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-top:20px; }
.tri-table{ background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.12); border-radius:14px; padding:14px 14px 10px; }
.tri-table h3{ font-family:var(--serif); color:var(--cream); font-size:17px; margin:0 0 2px; text-align:center; }
.tri-table .tri-sub{ color:rgba(248,245,238,0.55); font-size:11px; text-align:center; margin-bottom:10px; min-height:28px; }
.tri-table table{ width:100%; border-collapse:collapse; font-size:12.5px; }
.tri-table thead th{ font-size:10px; text-transform:uppercase; letter-spacing:0.04em; color:rgba(248,245,238,0.6); font-weight:600; padding:4px 4px; border-bottom:1px solid rgba(255,255,255,0.2); text-align:right; }
.tri-table thead th:first-child{ text-align:left; }
.tri-table tbody td{ padding:5px 4px; border-bottom:1px solid rgba(255,255,255,0.07); text-align:right; color:var(--cream); }
.tri-table tbody td:first-child{ text-align:left; white-space:nowrap; }
.tri-table tbody td.g{ color:#7ee0a0; font-weight:600; }
.tri-table tbody td.pend{ color:rgba(248,245,238,0.42); font-style:italic; text-align:center; }
/* domain results: horizontal scroll with a peeking 4th box */
.tri-tables.domain-scroll{ display:flex; grid-template-columns:none; overflow-x:auto; gap:16px; padding-bottom:12px; scroll-snap-type:x proximity; -webkit-overflow-scrolling:touch; scrollbar-width:thin; }
.tri-tables.domain-scroll .tri-table{ flex:0 0 300px; scroll-snap-align:start; }
.tri-tables.domain-scroll::-webkit-scrollbar{ height:8px; }
.tri-tables.domain-scroll::-webkit-scrollbar-thumb{ background:rgba(255,255,255,0.25); border-radius:8px; }
.repeat-tables{ grid-template-columns:repeat(2,minmax(260px,340px)); justify-content:center; align-items:center; }
.repeat-tables .tri-table tbody td{ font-size:14px; }
.repeat-tables .tri-table tbody td:last-child{ font-weight:600; }
.repeat-note{ margin:18px auto 0; font-size:13px; color:rgba(248,245,238,0.72); line-height:1.6; max-width:760px; text-align:center; }
.results-foot{ margin:16px auto 0; font-size:12.5px; color:rgba(248,245,238,0.62); line-height:1.55; max-width:1040px; }
@media (max-width:820px){ .tri-tables{ grid-template-columns:1fr; } .repeat-tables{ grid-template-columns:minmax(0,420px); } }

/* ============================================================
   3-page split (2026-06): product cards
   ============================================================ */
.products-section { padding: 52px 0; }
.product-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:24px; margin-top:24px; max-width:980px; margin-left:auto; margin-right:auto; }
.product-grid-single { grid-template-columns:1fr; max-width:560px; }
@media (max-width:859px){ .product-grid{ grid-template-columns:1fr; } }
.product-card { position:relative; background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.14); border-radius:18px; padding:30px 28px; text-align:center; display:flex; flex-direction:column; align-items:center; }
.product-card .pc-emblem { height:176px; width:auto; margin:0 0 14px; }
.product-card .pc-title { font-family:var(--serif); color:var(--cream); font-size:24px; margin:0 0 10px; }
.product-card .pc-desc { color:rgba(248,245,238,0.82); font-size:15px; line-height:1.6; margin:0 0 22px; }
.product-card .cta { margin-top:auto; }
.pc-badge { display:inline-block; font-size:11px; font-weight:700; letter-spacing:0.06em; text-transform:uppercase; padding:3px 12px; border-radius:999px; margin:0 0 12px; }
.pc-now { background:rgba(31,122,77,0.22); color:#7ee0a8; border:1px solid rgba(126,224,168,0.40); }
.pc-soon { background:rgba(217,45,32,0.16); color:#ff9f97; border:1px solid rgba(255,159,151,0.40); }

/* inline text link */
.inline-link { color:#9fc6ff; text-decoration:underline; }
