/* M7 Security Group — site styles. Navy and white, one brass accent, no imagery. */

:root {
  --navy-950: #07111d;
  --navy-900: #0a1726;
  --navy-800: #11243a;
  --navy-700: #1c3552;
  --ink: #0f1b2a;
  --slate: #46566a;
  --line: #d8dde4;
  --mist: #f3f5f7;
  --paper: #ffffff;
  --on-navy: #eef2f6;
  --on-navy-muted: #a7b4c3;
  --brass: #ffb400;       /* logo gold; accent on navy */
  --brass-ink: #8a5f00;   /* darker gold; accent on white */
  --focus: #f2c46d;

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Mock-up only: banner and placeholder highlighting. Remove before launch. */
.mock-banner {
  background: #fff4d6;
  color: #4a3a12;
  font-size: .875rem;
  text-align: center;
  padding: .45rem var(--gutter);
}
.ph {
  background: rgba(242, 196, 109, .22);
  outline: 1px dashed rgba(192, 154, 94, .9);
  outline-offset: 1px;
  border-radius: 2px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.875rem;
  padding: .7rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary { background: var(--brass); color: var(--navy-950); }
.btn-primary:hover { background: #ffc53d; }
.btn-ghost { border-color: rgba(238, 242, 246, .45); color: var(--on-navy); }
.btn-ghost:hover { border-color: var(--on-navy); }
.btn-dark { background: var(--navy-900); color: var(--on-navy); }
.btn-dark:hover { background: var(--navy-700); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-950);
  color: var(--on-navy);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.brand { display: inline-flex; flex-shrink: 0; }
.brand img { width: auto; height: 22px; }
@media (max-width: 26rem) { .brand img { height: 17px; } }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(238, 242, 246, .35);
  color: var(--on-navy);
  font: inherit;
  font-size: .9rem;
  padding: .45rem .9rem;
  border-radius: 2px;
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--on-navy-muted);
  text-decoration: none;
  font-size: .92rem;
  letter-spacing: .03em;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--on-navy); }
.site-nav a.btn,
.site-nav a.btn[aria-current="page"] { color: var(--navy-950); }

@media (max-width: 64rem) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--navy-950);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem var(--gutter) 1.25rem;
  }
  .site-nav li a:not(.btn) {
    display: block;
    padding: .8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-size: 1rem;
  }
  .site-nav .btn { margin-top: 1rem; width: 100%; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background:
    radial-gradient(ellipse 60% 70% at 85% 20%, rgba(28, 53, 82, .9), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 22px),
    var(--navy-900);
  color: var(--on-navy);
  padding-block: clamp(4.5rem, 12vw, 8.5rem) clamp(5.5rem, 13vw, 9.5rem);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3rem), 50% 100%, 0 calc(100% - 3rem));
}
/* Faint M7 monogram behind the hero text. Decorative only. */
.hero .wrap { position: relative; }
.hero .wrap > * { position: relative; z-index: 1; }
.hero .wrap::before {
  content: "";
  position: absolute;
  z-index: 0;
  right: var(--gutter);
  top: 50%;
  width: min(56%, 36rem);
  aspect-ratio: 1123 / 721;
  transform: translateY(-50%);
  background: url("/assets/img/m7-mark.svg") center / contain no-repeat;
  opacity: .2;
  pointer-events: none;
}
@media (max-width: 48rem) {
  .hero .wrap::before {
    top: -1.5rem;
    width: 85%;
    transform: none;
    opacity: .12;
  }
}

.eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--brass);
}
.hero h1 {
  margin-top: 1.25rem;
  max-width: 14ch;
  font-size: clamp(2.6rem, 7vw, 4.75rem);
  font-weight: 300;
  letter-spacing: -.01em;
}
.hero .lead {
  margin-top: 1.5rem;
  max-width: 38rem;
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--on-navy-muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2.5rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.75rem;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
  font-size: .85rem;
  letter-spacing: .06em;
  color: var(--on-navy-muted);
}
.hero-meta li { display: flex; align-items: center; gap: .6rem; }
.hero-meta li + li::before {
  content: "";
  width: 4px; height: 4px;
  background: var(--brass);
  border-radius: 50%;
  margin-left: -1.1rem;
}
@media (max-width: 34rem) {
  .hero-meta { flex-direction: column; gap: .35rem; }
  .hero-meta li + li::before { display: none; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(4rem, 9vw, 6.5rem); }
.section-mist { background: var(--mist); }
.section-navy { background: var(--navy-900); color: var(--on-navy); }

.section-label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--brass-ink);
}
.section-navy .section-label { color: var(--brass); }

.section h2 {
  margin-top: .75rem;
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  font-weight: 400;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.split .prose p + p { margin-top: 1.1rem; }
.prose { color: var(--slate); font-size: 1.125rem; }
@media (max-width: 48rem) { .split { grid-template-columns: 1fr; } }

/* Capabilities */
.capabilities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(2rem, 5vw, 4rem);
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}
.capability {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0 .5rem;
  padding: 1.9rem 0;
  border-top: 1px solid var(--line);
}
.capability-num {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--brass-ink);
  padding-top: .3rem;
}
.capability h3 { font-size: 1.25rem; font-weight: 600; }
.capability p { margin-top: .5rem; color: var(--slate); }
@media (max-width: 48rem) { .capabilities { grid-template-columns: 1fr; } }

.text-link {
  display: inline-block;
  margin-top: 2rem;
  font-weight: 600;
  color: var(--brass-ink);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.text-link:hover { color: var(--ink); }

/* Process */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.step {
  counter-increment: step;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(238, 242, 246, .18);
}
.step::before {
  content: "0" counter(step);
  display: block;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--brass);
}
.step h3 { margin-top: .9rem; font-size: 1.2rem; font-weight: 600; }
.step p { margin-top: .5rem; color: var(--on-navy-muted); }
@media (max-width: 48rem) { .steps { grid-template-columns: 1fr; } }

/* Sectors */
.sectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sectors li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
@media (max-width: 34rem) { .sectors { grid-template-columns: 1fr; } }

/* Credentials */
.credentials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  margin: 0;
}
.credentials div { border-left: 1px solid var(--brass); padding-left: 1rem; }
.credentials dt {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--slate);
}
.credentials dd { margin: .35rem 0 0; font-weight: 600; }
@media (max-width: 40rem) { .credentials { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  margin-top: 2.5rem;
}
@media (max-width: 52rem) { .contact-grid { grid-template-columns: 1fr; } }

.form { display: grid; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 34rem) { .form-row { grid-template-columns: 1fr; } }

.field { display: grid; gap: .4rem; }
.field label { font-size: .9rem; font-weight: 600; }
.field .req { color: var(--brass-ink); }
.field input,
.field textarea {
  width: 100%;
  padding: .75rem .85rem;
  border: 1px solid #8a96a5;
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus-visible,
.field textarea:focus-visible { outline-offset: 0; border-color: var(--navy-700); }

.form-note { font-size: .9rem; color: var(--slate); }
.form-status { font-weight: 600; }

.contact-details { display: grid; gap: 1.75rem; align-content: start; }
.contact-details h3 {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--slate);
}
.contact-details p,
.contact-details address { margin-top: .4rem; font-style: normal; font-size: 1.05rem; }
.contact-details a { text-decoration: none; border-bottom: 1px solid var(--line); }
.contact-details a:hover { border-color: currentColor; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-950);
  color: var(--on-navy-muted);
  font-size: .9rem;
  padding-block: 3.5rem 2rem;
}
/* Faint M7 monogram in the footer, matching the hero. Decorative only. */
.site-footer .wrap { position: relative; }
.site-footer .wrap > * { position: relative; z-index: 1; }
.site-footer .wrap::before {
  content: "";
  position: absolute;
  z-index: 0;
  right: var(--gutter);
  top: 0;
  width: min(22%, 16rem);
  aspect-ratio: 1123 / 721;
  background: url("/assets/img/m7-mark.svg") center / contain no-repeat;
  opacity: .2;
  pointer-events: none;
}
@media (max-width: 48rem) {
  .site-footer .wrap::before { width: 45%; opacity: .12; }
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 48rem) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--on-navy);
}
.site-footer ul { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .4rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--on-navy); text-decoration: underline; }
.site-footer address { font-style: normal; margin-top: .75rem; }
.footer-brand p { margin-top: 1rem; max-width: 26rem; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 2rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .82rem;
}
.footer-legal ul { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0; }
.new-tab { font-size: .85em; }

/* ---------- Inner pages ---------- */

.hero--page {
  padding-block: clamp(3.5rem, 8vw, 5.5rem) clamp(4.5rem, 9vw, 6.5rem);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2rem), 50% 100%, 0 calc(100% - 2rem));
}
.hero--page h1 { max-width: 22ch; font-size: clamp(2.1rem, 5vw, 3.4rem); }
.hero--page .wrap::before { width: min(34%, 22rem); opacity: .16; }
.hero--page .eyebrow a { color: inherit; text-decoration: underline; text-underline-offset: .25em; }
.hero--page .eyebrow a:hover { text-decoration-thickness: 2px; }
@media (max-width: 48rem) {
  .hero--page .wrap::before { width: 60%; opacity: .1; top: -1rem; }
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 56rem) { .content-grid { grid-template-columns: 1fr; } }

.body-copy { color: var(--slate); font-size: 1.0625rem; }
.body-copy > * + * { margin-top: 1.1rem; }
.body-copy h2 {
  margin-top: 2.75rem;
  color: var(--ink);
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 400;
}
.body-copy h2:first-child { margin-top: 0; }
.body-copy h3 { margin-top: 1.75rem; color: var(--ink); font-size: 1.15rem; font-weight: 600; }
.body-copy .intro { color: var(--ink); font-size: 1.2rem; line-height: 1.6; }
.body-copy a { color: var(--brass-ink); }
.body-copy a:hover { color: var(--ink); }
.body-copy a.btn-dark,
.body-copy a.btn-dark:hover { color: var(--on-navy); }

.checklist { list-style: none; padding: 0; display: grid; gap: 0; }
.checklist li {
  position: relative;
  padding: .8rem 0 .8rem 1.75rem;
  border-bottom: 1px solid var(--line);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: .2rem;
  top: 1.45rem;
  width: .55rem;
  height: 1px;
  background: var(--brass-ink);
}
.checklist strong { color: var(--ink); font-weight: 600; }

.aside-card {
  position: sticky;
  top: 6.5rem;
  padding: 1.75rem;
  background: var(--navy-900);
  color: var(--on-navy);
}
.aside-card h2 { font-size: 1.25rem; font-weight: 500; }
.aside-card p { margin-top: .75rem; color: var(--on-navy-muted); font-size: .98rem; }
.aside-card .btn { width: 100%; margin-top: 1.25rem; }
.aside-card .aside-phone { margin-top: 1rem; text-align: center; }
.aside-card .aside-phone a { color: var(--on-navy); text-decoration: none; font-weight: 600; }
.aside-card .aside-phone a:hover { text-decoration: underline; }
@media (max-width: 56rem) { .aside-card { position: static; } }

.notice {
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--brass-ink);
  background: var(--mist);
  color: var(--ink);
}

/* Related links and service directory */
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-top: 1px solid var(--line); }
.link-list li:last-child { border-bottom: 1px solid var(--line); }
.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.link-list a::after { content: "\2192"; color: var(--brass-ink); transition: transform .15s; }
.link-list a:hover::after { transform: translateX(4px); }
.link-list .link-desc { display: block; margin-top: .2rem; color: var(--slate); font-weight: 400; font-size: .95rem; }
@media (prefers-reduced-motion: reduce) { .link-list a::after { transition: none; } }

.service-group + .service-group { margin-top: clamp(3rem, 7vw, 4.5rem); }
.service-group-head { margin-bottom: 1.5rem; }
.service-group-head p { margin-top: .75rem; color: var(--slate); max-width: 40rem; }
.service-group .split { align-items: start; }

.cta-band { padding-block: clamp(3rem, 7vw, 4.5rem); }
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.cta-inner .hero-actions { margin-top: 0; }

/* Extra form fields */
.field select,
.field input[type="file"] {
  width: 100%;
  padding: .7rem .85rem;
  border: 1px solid #8a96a5;
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.field .hint { font-size: .88rem; color: var(--slate); }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.field legend { font-size: .9rem; font-weight: 600; padding: 0; margin-bottom: .4rem; }
.choice { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; }
.choice input { width: 1.1rem; height: 1.1rem; accent-color: var(--navy-700); }

/* 404 */
.not-found { text-align: left; }
.not-found .link-list { margin-top: 2rem; max-width: 32rem; }

ol.checklist { counter-reset: item; }
ol.checklist li { counter-increment: item; padding-left: 2.25rem; }
ol.checklist li::before {
  content: "0" counter(item);
  top: .85rem;
  left: 0;
  width: auto;
  height: auto;
  background: none;
  color: var(--brass-ink);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
}

/* Form results and spam trap */
.form-status:empty { display: none; }
.form-status {
  padding: .9rem 1.1rem;
  border-left: 3px solid var(--slate);
  background: var(--mist);
}
.form-status.is-success { border-left-color: #1f7a4d; }
.form-status.is-error { border-left-color: #b3261e; color: #8c1d18; }
.form-status:focus { outline: none; }
.form-status:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.field [aria-invalid="true"] { border-color: #b3261e; box-shadow: 0 0 0 1px #b3261e; }
.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.body-copy address { font-style: normal; color: var(--ink); line-height: 1.8; }
.capability h3 a { color: inherit; text-decoration: none; }
.capability h3 a:hover { text-decoration: underline; }

/* Accessibility (WCAG 2.2 AA) refinements */
/* Keep focused and linked-to elements clear of the sticky header (2.4.11 Focus Not Obscured). */
html { scroll-padding-top: 6rem; }
/* Hero text can sit over the faint M7 watermark; a lighter grey keeps contrast above 4.5:1 there. */
.hero .lead,
.hero-meta { color: #c9d2dc; }
/* Header fits at 320px wide (1.4.10 Reflow): smaller logo and gap on the narrowest phones. */
@media (max-width: 22rem) {
  .header-inner { gap: .75rem; }
  .brand img { height: 14px; }
}
/* Comfortable click and tap targets (2.5.8 Target Size). */
.brand { min-height: 2.75rem; align-items: center; }
.choice input { width: 1.5rem; height: 1.5rem; }

/* Careers: license number fields */
.form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 48rem) { .form-row-3 { grid-template-columns: 1fr; } }
fieldset.licenses { display: grid; gap: .9rem; }
fieldset.licenses .hint { margin: 0; }
.photo-status:empty { display: none; }
.photo-status { font-weight: 600; color: var(--ink); }

/* Uniform form boxes: same height everywhere, and boxes in a row line up even when one label
   wraps onto two lines (the label grows upward instead of pushing its box down). */
.form-row > .field { grid-template-rows: 1fr auto; }
.form-row > .field > label { align-self: end; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.field select { height: 2.875rem; }
.field input[type="file"] { height: 2.875rem; padding-block: .45rem; }
