/* ============================================================
 * Rayl Defense — division page. Anduril/Palantir-inspired:
 * austere black, hairline grids, sharp corners, mono numbering,
 * HUD graphics. Loaded after styles.css.
 * ============================================================ */

.def-page {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(90rem 50rem at 50% -20%, rgba(148, 243, 63, 0.05), transparent 60%),
    #000000;
  background-size: 72px 72px, 72px 72px, 100% 100%, 100% 100%;
}

/* Sharper geometry across the division page */
.def-page .primary-button,
.def-page .secondary-button,
.def-page .nav-cta {
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.def-hero {
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
  padding: 96px 0 40px;
  text-align: left;
}

.def-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono, ui-monospace), ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--green);
}

.def-hero .eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--green);
}

.def-hero h1 {
  margin: 22px 0 0;
  font-size: clamp(44px, 7.4vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  max-width: 13ch;
}

.def-hero .def-sub {
  margin: 26px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.55;
  font-weight: 500;
}

.def-hero .hero-buttons {
  margin-top: 36px;
}

/* ---------- Stat/claims band ---------- */
.def-band {
  width: min(100% - 48px, var(--max));
  margin: 56px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.def-band > div {
  padding: 18px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.def-band > div:last-child {
  border-right: 0;
}

.def-band i {
  width: 6px;
  height: 6px;
  background: var(--green);
  flex: 0 0 auto;
}

/* ---------- HUD frame ---------- */
.def-hud {
  position: relative;
  width: min(100% - 48px, var(--max));
  margin: 64px auto 0;
  aspect-ratio: 16 / 7.2;
  min-height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  background:
    radial-gradient(60% 90% at 24% 30%, rgba(44, 79, 40, 0.5), transparent 70%),
    radial-gradient(50% 70% at 74% 66%, rgba(38, 52, 44, 0.55), transparent 70%),
    radial-gradient(30% 40% at 56% 22%, rgba(30, 41, 59, 0.5), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    #060806;
  background-size: 100% 100%, 100% 100%, 100% 100%, 44px 44px, 44px 44px, 100% 100%;
}

/* Corner brackets */
.def-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--green);
  z-index: 3;
}
.def-corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.def-corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.def-corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.def-corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* Center crosshair */
.def-cross span {
  position: absolute;
  background: rgba(148, 243, 63, 0.4);
}
.def-cross span:first-child {
  top: 50%;
  left: 50%;
  width: 120px;
  height: 1px;
  transform: translate(-50%, -50%);
}
.def-cross span:last-child {
  top: 50%;
  left: 50%;
  width: 1px;
  height: 120px;
  transform: translate(-50%, -50%);
}
.def-cross::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 243, 63, 0.55);
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

/* Track boxes */
.def-track {
  position: absolute;
  border: 1px solid var(--green);
  box-shadow: 0 0 0 1px rgba(148, 243, 63, 0.15), 0 0 24px rgba(148, 243, 63, 0.12);
}
.def-track i {
  position: absolute;
  top: -22px;
  left: -1px;
  padding: 3px 8px;
  background: rgba(6, 10, 6, 0.9);
  border: 1px solid rgba(148, 243, 63, 0.5);
  font-style: normal;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--green);
  white-space: nowrap;
}
.def-track.t1 { top: 26%; left: 17%; width: 12%; height: 20%; }
.def-track.t2 { top: 56%; left: 63%; width: 15%; height: 24%; }
.def-track.t3 { top: 18%; left: 71%; width: 7%; height: 13%; opacity: 0.75; }

/* Sweep line */
@keyframes defSweep {
  0% { top: -4%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { top: 104%; opacity: 0; }
}
.def-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 243, 63, 0.65), transparent);
  animation: defSweep 5.5s linear infinite;
}

/* Mono readouts */
.def-read {
  position: absolute;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.6);
  z-index: 3;
}
.def-read.tl-read { top: 14px; left: 16px; }
.def-read.tr-read { top: 14px; right: 16px; color: var(--green); }
.def-read.bl-read { bottom: 14px; left: 16px; }
.def-read.br-read { bottom: 14px; right: 16px; }

/* ---------- Sections ---------- */
.def-section {
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
  padding: 110px 0 0;
}

.def-kicker {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0;
}

.def-section h2 {
  margin: 14px 0 0;
  font-size: clamp(34px, 4.6vw, 64px);
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.def-lede {
  margin: 18px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 500;
}

/* Capability grid */
.def-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.def-cap {
  background: #000;
  padding: 30px 26px 34px;
  position: relative;
  transition: background 240ms var(--ease-out, ease);
}

.def-cap:hover {
  background: #0a0f0a;
}

.def-cap::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green);
  transition: width 340ms var(--ease-out, ease);
}

.def-cap:hover::after {
  width: 100%;
}

.def-cap .def-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.26em;
  color: rgba(255, 255, 255, 0.35);
}

.def-cap h3 {
  margin: 16px 0 10px;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.def-cap p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  font-weight: 500;
}

/* ---------- Sentinel split ---------- */
.def-split {
  margin-top: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.def-split ul {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
}

.def-split li {
  position: relative;
  padding: 12px 0 12px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 14.5px;
  font-weight: 500;
}

.def-split li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--green);
}

.def-specs {
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.def-specs > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.def-specs > div:last-child {
  border-bottom: 0;
}

.def-specs span {
  color: rgba(255, 255, 255, 0.4);
}

.def-specs b {
  color: #fff;
  font-weight: 600;
  text-align: right;
}

.def-specs b.ok {
  color: var(--green);
}

.def-mini-hud {
  margin-top: 22px;
  aspect-ratio: 16 / 8;
  min-height: 0;
  width: 100%;
}

/* ---------- Doctrine ---------- */
.def-statement {
  margin: 44px 0 0;
  font-size: clamp(30px, 4.4vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 20ch;
}

.def-statement em {
  font-style: normal;
  color: var(--green);
}

.def-callout {
  margin-top: 44px;
  max-width: 720px;
  border: 1px solid rgba(148, 243, 63, 0.35);
  padding: 22px 26px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  line-height: 1.9;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.def-callout b {
  color: var(--green);
  font-weight: 600;
}

/* ---------- Eligibility rows ---------- */
.def-rows {
  margin-top: 52px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.def-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 28px;
  align-items: baseline;
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.def-row .def-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.26em;
  color: rgba(255, 255, 255, 0.35);
}

.def-row h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.def-row p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  font-weight: 500;
}

/* ---------- Final CTA ---------- */
.def-cta {
  width: min(100% - 48px, var(--max));
  margin: 120px auto 96px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: clamp(40px, 6vw, 84px);
  text-align: center;
  position: relative;
  background:
    radial-gradient(50rem 20rem at 50% 120%, rgba(148, 243, 63, 0.09), transparent 70%),
    #000;
}

.def-cta h2 {
  margin: 0;
  font-size: clamp(34px, 5.4vw, 72px);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
}

.def-cta p {
  margin: 18px auto 0;
  max-width: 540px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
}

.def-cta .hero-buttons {
  margin-top: 34px;
  justify-content: center;
}

.def-cta .def-note {
  margin-top: 26px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .def-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .def-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .def-band {
    grid-template-columns: repeat(2, 1fr);
  }
  .def-band > div:nth-child(2) {
    border-right: 0;
  }
  .def-band > div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 640px) {
  .def-grid {
    grid-template-columns: 1fr;
  }
  .def-hud {
    aspect-ratio: 4 / 3;
  }
  .def-track i {
    font-size: 8px;
  }
  .def-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .def-section {
    padding-top: 84px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .def-scan {
    animation: none;
    opacity: 0;
  }
}

/* ============================================================
 * Homepage product card variant (index.html loads this file too)
 * ============================================================ */
.branch-card-defense {
  background: #000;
  border-radius: 4px;
}

.def-hud-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(60% 90% at 24% 30%, rgba(44, 79, 40, 0.5), transparent 70%),
    radial-gradient(50% 70% at 74% 66%, rgba(38, 52, 44, 0.55), transparent 70%),
    radial-gradient(30% 40% at 56% 22%, rgba(30, 41, 59, 0.5), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    #060806;
  background-size: 100% 100%, 100% 100%, 100% 100%, 44px 44px, 44px 44px, 100% 100%;
}

.def-hud-card .def-corner {
  width: 16px;
  height: 16px;
}

.def-hud-card .def-track.t1 { top: 16%; left: 14%; width: 16%; height: 24%; }
.def-hud-card .def-track.t2 { top: 40%; left: 60%; width: 17%; height: 26%; }
