/* ===== Security Clearance Card — "Government Credential" theme =====
   Palette (sourced from templates/security_clearance_card/css/custom.css):
     brand red #ED1C24 · ink #231F20 · slate #5D5D5D · paper #F4F4F4
   Type: Barlow Condensed (display) · Source Sans 3 (body) · IBM Plex Mono (credential/mono details)
*/
:root {
  --red: #ED1C24;
  --red-dark: #b81017;
  --ink: #231F20;
  --ink-2: #3a3536;
  --slate: #5D5D5D;
  --slate-2: #8a8a8a;
  --paper: #F4F4F4;
  --line: #e2dede;
  --text: #45403f;
  --white: #fff;
  --accent: #5b6067; /* per-site nav accent */
  --radius: 12px;
  --shadow: 0 8px 28px rgba(35, 31, 32, .12);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; height: auto; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 22px; }

h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.12; }
h1 { font-size: clamp(38px, 5.5vw, 58px); font-weight: 700; letter-spacing: .3px; }
h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 700; }
h3 { font-size: 23px; font-weight: 600; }
h4 { color: var(--ink); font-size: 15px; text-transform: uppercase; letter-spacing: 1.2px; }

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--red); margin-bottom: 14px;
}

.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 18px; z-index: 200; }
.skip-link:focus { left: 0; }

/* ===== Buttons ===== */
.btn {
  display: inline-block; font-weight: 600; font-size: 16px; white-space: nowrap;
  border-radius: 8px; padding: 13px 26px; border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(237, 28, 36, .3); }
.btn-red:hover { background: var(--red-dark); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-white { background: #fff; color: var(--red); }
.btn-outline-white { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.55); }
.btn-outline-white:hover { border-color: #fff; }

/* ===== Header ===== */
.site-header { position: relative; z-index: 100; }

/* Utility strip */
.topbar { background: var(--ink); color: #cfe0ee; }
.topbar-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; min-height: 40px; flex-wrap: wrap;
}
.topbar-tag {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 2px;
  text-transform: uppercase; color: #8fb8d6;
}
.topbar-tag::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #4fd08a; box-shadow: 0 0 0 3px rgba(79,208,138,.22);
}
.topbar-links { display: flex; align-items: center; gap: 22px; }
.topbar-links a { color: #cfe0ee; font-weight: 600; font-size: 13px; }
.topbar-links a:hover { color: #fff; text-decoration: none; }
.topbar-phone { font-family: var(--mono); }
.topbar .verify-link { color: #fff; }
.topbar .verify-link::before { content: "✓ "; color: #4fd08a; font-weight: 700; }

/* Main bar (sticky) */
.mainbar {
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
  transition: box-shadow .2s ease;
}
.mainbar.scrolled { box-shadow: 0 8px 26px rgba(22,50,74,.10); }
.header-row { display: flex; align-items: center; gap: 22px; height: 74px; }
.brand { margin-right: auto; display: flex; }
.brand-logo { display: block; width: 170px; height: auto; max-width: none; }

.main-nav { display: flex; align-items: center; gap: 14px; }
#nav-menu { list-style: none; display: flex; align-items: center; gap: 2px; }
#nav-menu > li > a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); font-weight: 600; font-size: 15.5px;
  padding: 9px 14px; border-radius: 9px;
}
#nav-menu > li > a:hover { color: var(--accent); background: var(--paper); text-decoration: none; }
.caret { font-size: 10px; color: var(--accent); transition: transform .2s ease; }
#nav-menu > li.has-sub.open > a { color: var(--accent); background: var(--paper); }
#nav-menu > li.has-sub.open > a .caret { transform: rotate(180deg); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-actions .btn { padding: 11px 22px; font-size: 15px; }
.nav-toggle { display: none; }

/* Dropdown — click-open, no dead gap */
.has-sub { position: relative; }
.has-sub .sub {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 266px;
  list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); flex-direction: column; gap: 0; padding: 9px;
}
.has-sub .sub::before {
  content: ""; position: absolute; top: -1px; left: 16px; right: 16px; height: 3px;
  border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--red));
}
.has-sub.open .sub { display: flex; }
.sub li a { display: block; padding: 10px 14px; border-radius: 8px; font-size: 15px; color: var(--ink); }
.sub li a:hover { background: var(--paper); color: var(--accent); text-decoration: none; }

/* Mobile drawer overlay — z-index below .site-header (100) so the drawer,
   which lives inside the header's stacking context, still paints on top */
.nav-overlay {
  position: fixed; inset: 0; background: rgba(15,30,45,.5);
  opacity: 0; visibility: hidden; transition: opacity .25s ease; z-index: 90;
}
.nav-overlay.show { opacity: 1; visibility: visible; }

/* Drawer close button (injected by JS; only shown inside the mobile drawer) */
.nav-close {
  display: none; position: absolute; top: 14px; right: 16px;
  width: 40px; height: 40px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--paper); color: var(--ink); font-size: 26px; line-height: 1;
}
.nav-close:hover { background: var(--line); }

/* ===== Page hero (inner pages) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--ink) 0%, #4a1416 90%);
  padding: 58px 0 54px; color: #fff;
}
.page-hero h1 { color: #fff; font-size: clamp(32px, 4.5vw, 46px); max-width: 900px; }
.page-hero .eyebrow { color: #ff9a9d; margin-bottom: 8px; }

/* ===== Content pages ===== */
.page-wrap { max-width: 860px; margin: 0 auto; padding: 54px 22px 80px; }
.page-wrap p { margin-bottom: 20px; }
.page-wrap ul, .page-wrap ol { margin: 0 0 20px 26px; }
.page-wrap li { margin-bottom: 8px; }
.page-wrap strong, .page-wrap b { color: var(--ink); }
.page-title { color: var(--ink); margin: 10px 0 24px; }
.section-title { color: var(--ink); font-size: 27px; margin: 38px 0 16px; }
.lead-img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); margin: 4px 0 30px; }
.byline { font-size: 14px; color: var(--slate); border-top: 1px solid var(--line); padding-top: 18px; margin-top: 10px; }
.cta-source { display: inline-block; margin: 6px 0 22px; font-family: var(--mono); font-size: 13px; color: var(--slate); }

/* ===== HOME ===== */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(237,28,36,.08), transparent 60%),
    linear-gradient(180deg, var(--paper), #fff);
  padding: 84px 0 70px; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lead { font-size: 20px; margin: 22px 0 30px; max-width: 520px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 14.5px; color: var(--slate); }
.hero-note strong { color: var(--ink); }

/* Signature: CSS-drawn landscape security clearance card (differentiated from a
   portrait employee-ID badge — clearance-level edge stripe, QR grid, holographic seal) */
.clearance-scene { display: flex; justify-content: center; position: relative; }
.clearance-card {
  width: 380px; background: #fff; border-radius: 14px;
  box-shadow: 0 26px 60px rgba(35,31,32,.28);
  transform: rotate(-3deg);
  border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.cc-level-stripe {
  position: absolute; left: 0; top: 0; bottom: 0; width: 12px;
  background: repeating-linear-gradient(-45deg, var(--red), var(--red) 7px, var(--ink) 7px, var(--ink) 14px);
}
.cc-inner { margin-left: 12px; padding: 16px 20px 0; }
.cc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.cc-agency { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--slate); }
.cc-agency strong { color: var(--ink); display: block; font-family: var(--display); font-size: 16px; letter-spacing: .4px; text-transform: none; margin-top: 2px; }
.cc-level-chip {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  background: var(--red); color: #fff; padding: 4px 9px; border-radius: 4px; transform: rotate(2deg);
}
.cc-body { display: flex; gap: 16px; margin-top: 14px; align-items: center; }
.cc-photo { width: 62px; height: 74px; border-radius: 6px; background: linear-gradient(180deg, #e9e4e4, #cabfbf); position: relative; overflow: hidden; flex: none; }
.cc-photo::before { content: ""; position: absolute; top: 13px; left: 50%; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; background: #fff; }
.cc-photo::after { content: ""; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 50px; height: 30px; border-radius: 50% 50% 0 0; background: #fff; }
.cc-lines { flex: 1; }
.cc-name { font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--ink); }
.cc-role { font-size: 12.5px; color: var(--slate); margin-bottom: 6px; }
.cc-id { font-family: var(--mono); font-size: 11px; color: var(--slate); }
.cc-qr {
  flex: none; width: 46px; height: 46px; display: grid;
  grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); gap: 2px;
  background: #fff; padding: 3px; border: 1px solid var(--line); border-radius: 3px;
}
.cc-qr span { background: var(--ink); border-radius: 1px; }
.cc-qr span:nth-child(3n) { background: transparent; }
.cc-qr span:nth-child(7n) { background: transparent; }
.cc-foot {
  background: var(--ink); margin-top: 16px; padding: 12px 20px 12px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.cc-verified { color: #8fd0a0; font-family: var(--mono); font-size: 11px; letter-spacing: 1px; }
.cc-seal {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: block; object-fit: contain; background: #fff;
  border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--ink);
}

/* Section scaffolding */
.sec { padding: 84px 0; }
.sec-alt { background: var(--paper); }
.sec-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.sec-head p { margin-top: 12px; font-size: 18px; }

/* Feature grid (from "Features of the Security Clearance Card") */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; transition: transform .18s ease, box-shadow .18s ease;
}
.feat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.feat-card h3 { font-size: 20px; margin-bottom: 8px; }
.feat-card p { font-size: 15px; }

/* ID Card audience grid */
.aud-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.aud-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.aud-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); text-decoration: none; }
.aud-card h3 { font-size: 21px; }
.aud-card p { font-size: 15px; flex: 1; }
.aud-more { color: var(--red); font-weight: 600; font-size: 15px; margin-top: 14px; }

/* Why band */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.why-list { list-style: none; margin: 26px 0 30px; }
.why-list li { padding-left: 34px; position: relative; margin-bottom: 13px; color: var(--ink-2); font-weight: 600; }
.why-list li::before {
  content: "✓"; position: absolute; left: 0; top: -1px;
  width: 24px; height: 24px; line-height: 24px; text-align: center;
  border-radius: 50%; background: var(--red); color: #fff; font-size: 13px;
}
.why-card {
  background: var(--ink); color: #fff; border-radius: var(--radius); padding: 34px;
}
.why-card .cc-agency, .why-card .cc-agency strong { color: #fff; }

/* Resource / blog cards */
.res-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.res-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; transition: transform .18s ease, box-shadow .18s ease;
}
.res-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; }
.res-card h3 { font-size: 18px; margin-bottom: 8px; }
.res-card p { font-size: 14.5px; color: var(--text); margin: 0; }
.res-more { text-align: center; margin-top: 36px; }

/* CTA strip */
.cta-strip { background: linear-gradient(120deg, var(--red), #7c0f14); color: #fff; text-align: center; padding: 76px 0; }
.cta-strip h2 { color: #fff; }
.cta-strip p { color: #ffd9db; font-size: 18px; margin: 14px auto 30px; max-width: 560px; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== FAQ page ===== */
.faq-list { list-style: none; margin: 0; }
.faq-item { border-bottom: 1px solid var(--line); padding: 24px 0; }
.faq-item:first-child { padding-top: 0; }
.faq-q { font-family: var(--display); font-weight: 700; color: var(--red); font-size: 20px; margin-bottom: 8px; }
.faq-a { margin: 0; }

/* ===== Contact ===== */
.contact-form { max-width: 620px; }
.contact-form label { display: block; color: var(--ink); font-weight: 600; font-size: 14.5px; margin: 16px 0 5px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 8px;
  font: inherit; color: var(--ink); background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--red); outline: none; }
.contact-form textarea { min-height: 150px; }
.hp-field { display: none; }
.contact-form button { margin-top: 20px; }
.contact-direct { display: flex; gap: 26px; flex-wrap: wrap; margin: 22px 0 8px; }
.contact-direct .cd-item { font-family: var(--mono); font-size: 14.5px; color: var(--slate); }
.contact-direct .cd-item strong { display: block; color: var(--ink); font-family: var(--body); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }

/* ===== Homepage video ===== */
.video-frame {
  position: relative; max-width: 880px; margin: 8px auto 0;
  aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: #000;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: #cbc4c4; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 62px 22px 50px; }
.f-col h4 { color: #fff; margin-bottom: 16px; }
.f-brand-logo { display: block; height: 40px; width: auto; margin-bottom: 14px; }
.f-about p { margin-bottom: 12px; }
.f-phone a { font-family: var(--mono); color: #fff; font-size: 19px; }
.f-mail { color: #ff9a9d; }
.f-list { list-style: none; }
.f-list li { margin-bottom: 9px; }
.f-list a { color: #cbc4c4; }
.f-list a:hover { color: #fff; }
.f-verify { display: flex; gap: 14px; align-items: center; margin-top: 18px; background: rgba(255,255,255,.06); border-radius: 10px; padding: 14px; }
.f-verify img { flex: none; }
.f-verify p { font-size: 13.5px; line-height: 1.5; margin: 0; }
.f-verify strong { color: #fff; }

.network-strip {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 22px 22px 30px; border-top: 1px solid rgba(255,255,255,.12);
}
.network-label { font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: #8a8484; flex: none; }
.network-list { list-style: none; display: flex; gap: 20px; flex-wrap: wrap; }
.network-list a { display: flex; align-items: center; gap: 8px; color: #cbc4c4; font-size: 14px; font-weight: 600; }
.network-list a:hover { color: #fff; }
.network-list img { border-radius: 50%; flex: none; }

.sub-footer { border-top: 1px solid rgba(255,255,255,.12); }
.sub-row { display: flex; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 24px; font-size: 13.5px; flex-wrap: wrap; }
.powered a { color: #ff9a9d; }

/* ===== 404 ===== */
.notfound { text-align: center; padding: 110px 22px 130px; }
.notfound .code { font-family: var(--mono); font-size: 15px; color: var(--red); letter-spacing: 3px; }
.notfound h1 { margin: 10px 0 14px; }
.notfound p { margin-bottom: 28px; }

/* ===== Responsive ===== */
@media (min-width: 981px) { .nav-overlay { display: none; } }

@media (max-width: 980px) {
  .topbar-tag { display: none; }
  .header-row { height: 64px; }
  /* Blur creates a containing block for position:fixed — drop it on mobile
     so the slide-in drawer anchors to the viewport, not the header bar. */
  .mainbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; }

  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 42px; flex-direction: column; gap: 4px;
    background: var(--ink); color: #fff; border: 0; border-radius: 10px;
    cursor: pointer; order: 3;
  }
  .nav-toggle span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; }

  #nav-menu {
    display: none; position: fixed; top: 0; right: 0; bottom: 0;
    width: min(342px, 86vw); flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; box-shadow: -14px 0 44px rgba(22,50,74,.20);
    padding: 74px 16px 26px; overflow-y: auto; z-index: 120;
    transform: translateX(100%); transition: transform .26s ease;
  }
  #nav-menu.open { display: flex; transform: translateX(0); }
  .nav-close { display: block; }
  #nav-menu > li > a { font-size: 17px; padding: 14px 16px; border-radius: 10px; }
  .has-sub .sub {
    position: static; box-shadow: none; border: 0; padding: 2px 0 8px 16px;
    min-width: 0; border-radius: 0;
  }
  .has-sub .sub::before { display: none; }
  .nav-actions { order: 2; }
  .nav-actions .btn { padding: 9px 16px; }

  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .clearance-scene { order: -1; }
  .clearance-card { width: 320px; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .aud-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .res-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* SC2 logo: drop the desktop max-width:none so the brand can shrink */
  .brand-logo { max-width: 100%; width: 140px; }
  /* S1 hero */
  .hero-grid > div:first-child { text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-btns { justify-content: center; }
  /* S3 why */
  .why-grid > div:first-child { text-align: center; }
  .why-list { width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; text-align: left; }
}

@media (max-width: 560px) {
  .feat-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-direct { flex-direction: column; gap: 14px; }
  .sec { padding: 60px 0; }
  .hero { padding: 54px 0 50px; }
  .clearance-card { width: 280px; }
  /* S2 buttons */
  .hero-btns, .cta-btns { flex-direction: column; align-items: stretch; }
  .hero-btns .btn, .cta-btns .btn { width: 100%; text-align: center; }
  .why-grid .btn { white-space: normal; text-align: center; }
  /* S4 footer */
  .f-col { text-align: center; }
  .f-about > img, .f-brand-logo { display: block; margin-left: auto; margin-right: auto; }
  .f-verify { justify-content: center; }
  .network-strip { flex-direction: column; align-items: center; text-align: center; }
  .network-list { justify-content: center; }
  .sub-row { flex-direction: column; align-items: center; text-align: center; gap: 6px; }
  /* SC7 topbar: Login/Register + phone + verify wrap instead of overflowing 375 */
  .topbar-links { flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
}
