/* Orion Defense Solutions
   Palette is derived from the logo navy. --navy is the logo colour itself;
   it is too dark to read as text on the near-black page, so it is only used
   as a fill behind white text. --accent is the same hue lifted for type,
   links, and focus rings. Copper only appears in the hero board. */

:root {
  --navy: #034c87;
  --navy-hi: #0a62a8;
  --accent: #6cb4ec;
  --accent-dim: #3b86c4;
  --copper: #c9854a;

  --bg: #050b14;
  --bg-2: #0a1320;
  --bg-3: #0f1b2c;
  --line: rgba(160, 190, 225, 0.12);
  --line-2: rgba(160, 190, 225, 0.24);

  --text: #e9eff6;
  --muted: #9aabbf;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 1180px;
  --gut: clamp(16px, 5vw, 48px);
  --header-h: 64px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #9fd0f6; }
::selection { background: var(--navy-hi); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 6px;
  background: var(--accent); color: #04101e; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(5, 11, 20, 0.94);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--text); }
.brand-mark { width: 36px; height: 36px; max-width: none; flex: none; }
.brand-text {
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap;
  color: var(--muted);
}
.brand-text b { color: var(--text); font-weight: 700; letter-spacing: 0.24em; margin-right: 0.3em; }

.nav { display: flex; align-items: center; gap: clamp(4px, 2vw, 20px); }
.nav a {
  display: inline-block; padding: 10px 8px;
  color: var(--muted); text-decoration: none;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
}
.nav a:hover { color: var(--text); }
.nav .nav-cta {
  padding: 9px 14px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text);
}
.nav .nav-cta:hover { border-color: var(--accent); }

@media (max-width: 560px) {
  .brand-text { display: none; }
  .nav { gap: 2px; }
  .nav a { padding: 10px 7px; font-size: 0.74rem; letter-spacing: 0.08em; }
  .nav .nav-cta { padding: 8px 12px; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(calc(100svh - var(--header-h)), 900px);
  display: flex; align-items: center;
  padding-block: clamp(56px, 10vh, 120px);
  overflow: hidden;
  /* The fallback, and what shows before/without WebGL: a lit board edge. */
  background:
    radial-gradient(60% 70% at 78% 40%, rgba(201, 133, 74, 0.16), transparent 70%),
    radial-gradient(50% 60% at 90% 90%, rgba(10, 98, 168, 0.30), transparent 70%),
    linear-gradient(160deg, #071324 0%, var(--bg) 60%);
}
.hero-canvas {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero.is-live .hero-canvas { opacity: 1; }
/* Scrim: keeps the copy legible over the brightest traces. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 11, 20, 0.92) 0%, rgba(5, 11, 20, 0.70) 45%, rgba(5, 11, 20, 0.10) 80%),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%);
}
@media (max-width: 760px) {
  .hero::after {
    background:
      linear-gradient(180deg, rgba(5, 11, 20, 0.35) 0%, rgba(5, 11, 20, 0.72) 38%, rgba(5, 11, 20, 0.78) 80%, var(--bg) 100%);
  }
}

.hero-inner { max-width: var(--wrap); }
.hero-logo { margin-bottom: clamp(28px, 4vw, 44px); }
.hero-logo img { width: clamp(240px, 42vw, 460px); height: auto; }
.hero-lede {
  max-width: 19ch;
  font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.08; font-weight: 700; letter-spacing: -0.025em;
  margin-bottom: 0.45em;
  text-wrap: balance;
}
.hero-sub { max-width: 46ch; color: #c4d0de; font-size: clamp(1.02rem, 1.5vw, 1.2rem); margin-bottom: 2em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: 600 0.95rem/1 var(--sans); letter-spacing: 0.02em; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--navy); border-color: #1a6fb3; color: #fff; }
.btn-primary:hover { background: var(--navy-hi); color: #fff; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- sections ---------- */

.section { padding-block: clamp(72px, 10vw, 128px); }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.label {
  font: 500 0.82rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.section-title {
  max-width: 24ch;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 700;
  margin-bottom: clamp(36px, 5vw, 56px);
}

/* services: open 2x2 grid, a copper trace over each item instead of a box */
.services {
  display: grid; gap: clamp(36px, 5vw, 56px) clamp(32px, 6vw, 80px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}
.service { position: relative; padding-top: 28px; border-top: 1px solid var(--line); }
.service::before {
  content: ""; position: absolute; left: 0; top: -1px; width: 72px; height: 2px;
  background: linear-gradient(90deg, var(--copper), transparent);
}
.service-icon {
  width: 36px; height: 36px; margin-bottom: 18px;
  color: var(--accent);
}
.service h3 { font-size: 1.25rem; margin-bottom: 10px; }
.service p { color: var(--muted); max-width: 42ch; }

/* process */
.steps {
  counter-reset: step;
  display: grid; gap: 0;
  grid-template-columns: repeat(4, 1fr);
}
.step { position: relative; padding: 46px 28px 0 0; }
.step::before {
  /* the trace connecting the steps */
  content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 2px;
  background: linear-gradient(90deg, var(--accent-dim), rgba(59, 134, 196, 0.25));
}
.step::after {
  /* the via on the trace */
  content: ""; position: absolute; left: 0; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg-2); border: 3px solid var(--accent);
}
.step:last-child::before { right: auto; width: 16px; }
.step-num { display: block; font: 500 0.8rem/1 var(--mono); color: var(--accent); margin-bottom: 10px; letter-spacing: 0.08em; }
.step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.95rem; }

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .step { padding: 0 0 34px 44px; }
  .step::before { left: 7px; right: auto; top: 0; bottom: 0; width: 2px; height: auto;
    background: linear-gradient(180deg, var(--accent-dim), rgba(59, 134, 196, 0.25)); }
  .step::after { top: 0; }
  .step:last-child::before { display: none; }
  .step:last-child { padding-bottom: 0; }
}

/* contact */
.contact { display: grid; gap: clamp(32px, 6vw, 80px); grid-template-columns: 1fr; }
@media (min-width: 900px) { .contact { grid-template-columns: 5fr 6fr; } }
.contact-intro > p:not(.label) { color: var(--muted); max-width: 44ch; }
.contact-alt { margin-top: 1.5em; }

.contact-form {
  display: grid; gap: 18px; align-content: start; align-self: start;
  padding: clamp(20px, 4vw, 32px);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.94rem; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; min-height: 48px;
  padding: 11px 13px;
  font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 1px; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: #ff8f8f; }
.field-hint { color: var(--muted); font-size: 0.86rem; margin: 0; }
.field-error { color: #ffadad; font-size: 0.88rem; margin: 0; }
.field-error:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* Turnstile runs invisibly (interaction-only) and only takes space if it
   needs the visitor to click. */
.cf-turnstile:empty { display: none; }
.btn-submit { justify-self: start; }
.form-status { margin: 0; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-ok { color: #9be3b4; }
.form-status.is-error { color: #ffadad; }
.contact-form.is-sent .field, .contact-form.is-sent .cf-turnstile, .contact-form.is-sent .btn-submit { display: none; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding-block: 28px; font-size: 0.9rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ---------- simple pages (404, form fallback) ---------- */

.plain { min-height: calc(100svh - var(--header-h) - 90px); display: grid; place-items: center; padding-block: 64px; }
.plain .wrap { max-width: 680px; }
.plain h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.4em; }
.plain p { color: var(--muted); margin-bottom: 1.6em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-canvas, .btn { transition: none; }
}
