/* ============================================================
   Helicon Defense — v5 additions (loaded AFTER styles.css)
   Implements the P1 "one primary navigation" masthead, one semantic
   breadcrumb, and the figure block (SVG primary / PNG fallback /
   vertical stack below 768px). Brand tokens are inherited from
   styles.css — no new colours, no new typefaces.
   ============================================================ */

/* ---------- Masthead: one primary navigation + language + Contact ---------- */
.mast {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(13, 27, 42, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-d);
}
.mast-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px var(--pad);
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.mast-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex: 0 0 auto;
}
.mast-mark { width: 34px; height: 34px; flex: 0 0 34px; display: block; }
.mast-word {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.13em;
  color: #fff;
  white-space: nowrap;
}
.mast-brand:hover .mast-word { color: var(--gold); }

.mast-nav { flex: 1 1 auto; }
.mast-nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  flex-wrap: nowrap;
}
.mast-nav a,
.mast-res-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 9px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #E5EDF5;                      /* AA contrast on navy — replaces the low-contrast gray tier */
  text-decoration: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}
.mast-nav a:hover,
.mast-res-btn:hover { color: #fff; border-bottom-color: var(--orange); }
.mast-nav a.is-current { color: #fff; border-bottom-color: var(--gold); }
.mast-nav a:focus-visible,
.mast-res-btn:focus-visible,
.mast-cta:focus-visible,
.mast-toggle:focus-visible,
.lang-chip:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.mast-res { position: relative; }
.mast-caret { margin-left: 5px; font-size: 10px; }
.mast-res-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 240px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--navy-2);
  border: 1px solid var(--line-d);
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  display: block;
}
.mast-res-menu[hidden] { display: none; }
.mast-res-menu a { display: flex; width: 100%; padding: 8px 10px; border-bottom: 0; }
.mast-res-menu a:hover { background: rgba(227, 100, 20, 0.14); color: #fff; }

.mast-right { display: flex; align-items: center; gap: 0.6rem; flex: 0 0 auto; }
.mast .lang-chip { display: inline-flex; align-items: center; min-height: 44px; }
.mast-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  padding: 9px 14px;
  border: 1px solid var(--orange);
  border-radius: 2px;
  white-space: nowrap;
}
.mast-cta:hover { background: var(--orange); color: #fff; }
.mast-toggle {
  display: none;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  cursor: pointer;
}
.mast-toggle:hover { border-color: var(--orange); }

@media (max-width: 1180px) {
  .mast-nav > ul { gap: 0; }
  .mast-nav a, .mast-res-btn { font-size: 12.5px; padding: 4px 7px; }
}
@media (max-width: 1080px) {
  .mast-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .mast-inner { flex-wrap: wrap; }
  .mast-nav {
    order: 4;
    flex: 1 0 100%;
    display: none;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 6px;
  }
  .mast-nav.is-open { display: block; }
  .mast-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .mast-nav a, .mast-res-btn {
    font-size: 15px;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
  }
  .mast-res { position: static; }
  .mast-res-menu { position: static; box-shadow: none; margin: 4px 0 8px; background: rgba(255,255,255,0.04); }
}
@media (max-width: 420px) {
  .mast-word { font-size: 12.5px; letter-spacing: 0.08em; }
  .mast-mark { width: 26px; height: 26px; flex-basis: 26px; }
  .mast-cta { padding: 9px 10px; font-size: 11px; }
  .mast-inner { gap: 0.5rem; padding: 10px 12px; }
}

/* ---------- One semantic breadcrumb per interior page ---------- */
.crumbs { background: var(--navy-2); border-bottom: 1px solid var(--line-d); }
.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0.55rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.5rem;
  font-size: 0.84rem;
}
.crumbs a { color: #C9D6E4; text-decoration: none; font-weight: 600; border-bottom: 1px solid transparent; }
.crumbs a:hover, .crumbs a:focus { color: var(--gold); border-bottom-color: var(--gold); }
.crumbs .crumbs-sep { color: rgba(201, 214, 228, 0.55); }
.crumbs .crumbs-current { color: #fff; font-weight: 700; }
/* Belt-and-braces: never allow a second trail to render */
.hlc-breadcrumbs, .breadcrumb-nav, .breadcrumb { display: none !important; }

/* ---------- Figures: SVG primary, PNG fallback, vertical stack < 768px ---------- */
.hfig {
  margin: 1.6rem 0 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 1200px;
}
.hfig img { width: 100%; height: auto; display: block; }
.hfig figcaption {
  padding: 10px 14px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--slate);
  border-top: 1px solid var(--line);
}
.section--navy .hfig figcaption,
.section--navy2 .hfig figcaption { color: var(--text-on-dark-dim); }

/* ---------- Content polish for the rebuilt pages ---------- */
.checklist { margin: 0.6rem 0 0; padding-left: 1.15rem; }
.checklist li { margin-bottom: 0.45rem; line-height: 1.55; color: var(--ink-2); }
.card .checklist li { font-size: 0.95rem; }
.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--orange-d);
}
.page-hero .notbox p, .hero .notbox p,
.section--navy .notbox p, .section--navy2 .notbox p { color: var(--text-on-dark); }
/* styles.css only lifts the notbox label to gold inside .section--navy*; the dark
   orange label failed contrast inside .page-hero / .hero. */
.page-hero .notbox p.notbox-title, .hero .notbox p.notbox-title { color: var(--gold); }
.page-hero .notbox, .hero .notbox {
  background: rgba(227, 100, 20, 0.12);
  border-color: rgba(241, 178, 74, 0.5);
}
.card-link a { font-weight: 700; text-decoration: none; }
.card-link a:hover { text-decoration: underline; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }

/* Touch targets: 44x44 house standard. (WCAG 2.2 AA 2.5.8 minimum is 24x24;
   44x44 is the stricter AAA/mobile-usability target, not an AA requirement.) */
@media (pointer: coarse) {
  .btn, .mast-nav a, .mast-cta, .lang-chip, .crumbs a { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* Founder-record attribution (formal review items 2, 3) */
.proof-attribution {
  max-width: 760px;
  margin: 0.6rem 0 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-on-dark-dim);
}

/* Rebuilt pages: keep a 45-75 character reading measure but align every block to the
   same left grid edge as the hero (carried-over pages keep their centred measure). */
.hd-page .container.measure { max-width: var(--max); }
.hd-page .container.measure > *:not(.hfig) { max-width: 820px; }
