/* ============================================================
   Retail Security Group — site styles
   Direction A · "Institutional Trust"
   Light, Swiss grid, hairline rules, navy accent, Libre Franklin.
   ============================================================ */

:root {
  --font: 'Libre Franklin', system-ui, -apple-system, sans-serif;
  --ink: #14171c;
  --ink2: #565b63;
  --ink3: #8b9098;
  --line: #e4e6e2;
  --line-strong: #d2d5d0;
  --bg: #ffffff;
  --bg2: #f7f7f3;
  --navy: #1d3b5e;
  --navy-hover: #16304d;
  --navy-soft: #eef3f8;
  --ok: #3fae6a;
  --pad: clamp(20px, 5vw, 96px);
  --maxw: 1320px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--navy); margin: 0;
}
.eyebrow.muted { color: var(--ink3); }

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; font-weight: 700; }

.lead { font-size: clamp(16px, 1.7vw, 18px); line-height: 1.6; color: var(--ink2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 600; line-height: 1; letter-spacing: 0.01em;
  padding: 14px 22px; border-radius: 2px; text-decoration: none;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn:hover { border-color: var(--ink3); transform: translateY(-1px); }
.btn .ar { transition: transform .15s; }
.btn:hover .ar { transform: translateX(3px); }
.btn--primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-hover); border-color: var(--navy-hover); }
.ar { width: 14px; height: 14px; flex: 0 0 auto; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px; gap: 24px;
}
.brand-logo { height: 28px; width: auto; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  font-size: 15px; font-weight: 500; color: var(--ink2); text-decoration: none;
  transition: color .15s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { font-weight: 600; }
.header-phone {
  font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.dot { width: 7px; height: 7px; border-radius: 4px; background: var(--ok); display: inline-block; }
.nav-toggle { display: none; }
.nav-toggle-cb { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }

/* ---------- Hero (stacked copy + full-bleed video band) ---------- */
.hero { border-bottom: 1px solid var(--line); }
.hero-intro { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 72px); align-items: start; padding-top: clamp(44px, 5.5vw, 80px); padding-bottom: clamp(32px, 4vw, 52px); }
.hero-intro h1 { max-width: 13ch; }
.hero-intro-aside { padding-bottom: 6px; }
.hero-intro .lead { max-width: 460px; }
.hero-intro-main h1 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.05; margin-top: 24px; }
.hero-intro-aside .btn-row { margin-top: 28px; }
.hero-video-band { position: relative; display: block; width: 100%; height: clamp(300px, 44vw, 580px); overflow: hidden; background: var(--bg2); border-bottom: 1px solid var(--line); text-decoration: none; }
.hero-video-band video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }

.meta-row {
  display: flex; gap: clamp(18px, 3vw, 44px); padding: 30px 0 38px; flex-wrap: wrap;
}
.meta-row .meta { flex: 1; min-width: 130px; }
.meta-k { font-size: 11px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink3); }
.meta-v { font-size: 15px; font-weight: 500; color: var(--ink); margin-top: 8px; }

.media-tag {
  position: absolute; left: 24px; bottom: 24px; z-index: 2;
  background: rgba(255,255,255,0.94); backdrop-filter: blur(4px);
  padding: 12px 16px; border-radius: 2px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
}
.media-tag span { font-size: 13px; font-weight: 600; color: var(--ink); }
.media-tag .ar { color: var(--navy); }

/* ---------- Overlay header (home only) ---------- */
/* Transparent over the hero video; turns solid white once scrolled past it. */
.site-header--overlay {
  position: fixed; top: 0; left: 0; right: 0;
  background: transparent; backdrop-filter: none; border-bottom-color: transparent;
  transition: background .28s ease, border-color .28s ease, backdrop-filter .28s ease;
}
.site-header--overlay .nav a,
.site-header--overlay .nav a:hover,
.site-header--overlay .nav a[aria-current="page"],
.site-header--overlay .header-phone { color: #fff; }
.site-header--overlay .brand-logo { filter: brightness(0) invert(1); transition: filter .28s ease; }
.site-header--overlay .nav-toggle label span { background: #fff; }

.site-header--overlay.is-solid {
  background: rgba(255,255,255,0.92); backdrop-filter: saturate(180%) blur(8px);
  border-bottom-color: var(--line);
}
.site-header--overlay.is-solid .nav a,
.site-header--overlay.is-solid .header-phone { color: var(--ink2); }
.site-header--overlay.is-solid .header-phone,
.site-header--overlay.is-solid .nav a:hover,
.site-header--overlay.is-solid .nav a[aria-current="page"] { color: var(--ink); }
.site-header--overlay.is-solid .brand-logo { filter: none; }
.site-header--overlay.is-solid .nav-toggle label span { background: var(--ink); }

/* scrim so the logo + nav stay legible over bright footage */
.hero-video-band::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 170px;
  background: linear-gradient(to bottom, rgba(10,12,16,0.5), rgba(10,12,16,0));
  z-index: 1; pointer-events: none;
}

/* when the mobile menu is open, force the overlay header solid for legibility */
.site-header--overlay:has(#navcb:checked) {
  background: rgba(255,255,255,0.97); backdrop-filter: saturate(180%) blur(8px); border-bottom-color: var(--line);
}
.site-header--overlay:has(#navcb:checked) .nav a { color: var(--ink2); }
.site-header--overlay:has(#navcb:checked) .header-phone { color: var(--ink); }
.site-header--overlay:has(#navcb:checked) .brand-logo { filter: none; }
.site-header--overlay:has(#navcb:checked) .nav-toggle label span { background: var(--ink); }

/* ---------- Stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.stat { padding: clamp(28px, 3vw, 40px) clamp(20px, 2.5vw, 40px) clamp(32px, 3vw, 44px); }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-k { font-size: clamp(32px, 3.4vw, 44px); font-weight: 700; letter-spacing: -0.02em; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-v { font-size: 14px; color: var(--ink2); margin-top: 12px; font-weight: 500; }

/* ---------- Section scaffolding ---------- */
.section { padding-top: clamp(56px, 6vw, 80px); padding-bottom: clamp(56px, 6vw, 86px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 3vw, 36px); margin-top: 14px; }
.section-head p { font-size: 15px; color: var(--ink2); max-width: 340px; margin: 0; }

/* ---------- Primary brand cards ---------- */
.brand-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.brand-card {
  display: block; text-decoration: none; border: 1px solid var(--line);
  border-radius: 3px; overflow: hidden; background: #fff;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.brand-card:hover { border-color: var(--line-strong); box-shadow: 0 12px 32px rgba(20,23,28,0.07); transform: translateY(-2px); }
.brand-card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg2); }
.brand-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.brand-card:hover .thumb img { transform: scale(1.03); }
.brand-card .body { padding: 28px 30px 30px; }
.brand-card h3 { font-size: clamp(21px, 2.2vw, 25px); margin-top: 12px; }
.brand-card .body p { font-size: 15.5px; line-height: 1.6; color: var(--ink2); margin: 12px 0 0; }
.card-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 15px; font-weight: 600; color: var(--navy); }
.brand-card:hover .card-cta .ar { transform: translateX(3px); }
.card-cta .ar { transition: transform .15s; }

/* ---------- Specialty grid ---------- */
.specialty-head { border-top: 1px solid var(--line); padding-top: 40px; margin-bottom: 32px; }
.specialty { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-strong); }
.spec {
  display: block; text-decoration: none; padding: 30px 30px 34px;
  transition: background .15s;
}
.spec + .spec { border-left: 1px solid var(--line); }
.spec:hover { background: var(--bg2); }
.spec-top { display: flex; justify-content: space-between; align-items: center; }
.spec-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink3); }
.spec-top .ar { color: var(--ink3); transition: transform .15s, color .15s; }
.spec:hover .spec-top .ar { color: var(--navy); transform: translateX(3px); }
.spec h3 { font-size: 20px; margin-top: 18px; }
.spec p { font-size: 14.5px; line-height: 1.6; color: var(--ink2); margin: 10px 0 0; }
.spec-domain { font-size: 13px; color: var(--ink3); margin-top: 18px; font-weight: 500; }

/* ---------- Navy statement ---------- */
.statement { background: var(--navy); color: #fff; padding-top: clamp(56px, 6vw, 76px); padding-bottom: clamp(60px, 6vw, 80px); }
.statement-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; }
.statement .eyebrow { color: rgba(255,255,255,0.6); }
.statement h2 { font-size: clamp(26px, 2.9vw, 34px); line-height: 1.15; margin-top: 18px; }
.statement p { font-size: clamp(16px, 1.7vw, 18px); line-height: 1.65; color: rgba(255,255,255,0.82); margin: 0; }
.statement p + p { margin-top: 20px; }
.statement .btn { margin-top: 28px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 30px; border-top: 1px solid var(--line-strong); }
.contact-col { padding: 32px 30px 0; }
.contact-col:first-child { padding-left: 0; }
.contact-col + .contact-col { border-left: 1px solid var(--line); }
.contact-k { font-size: 11px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink3); }
.contact-v { font-size: 16px; line-height: 1.65; color: var(--ink2); margin-top: 14px; }
.contact-v a { color: var(--navy); text-decoration: none; font-weight: 600; }
.contact-v a:hover { text-decoration: underline; }
.contact-v address { font-style: normal; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 34px; padding-bottom: 38px; flex-wrap: wrap; }
.foot-left { display: flex; align-items: center; gap: 22px; }
.foot-left img { height: 28px; width: 28px; }
.foot-copy { font-size: 13px; color: var(--ink3); }
.foot-nav { display: flex; gap: 28px; flex-wrap: wrap; }
.foot-nav a { font-size: 13px; color: var(--ink2); text-decoration: none; font-weight: 500; }
.foot-nav a:hover { color: var(--ink); }
/* Footer NAP (carries the Organization + PostalAddress microdata on every page) */
.foot-nap { flex-basis: 100%; order: 3; font-size: 12.5px; color: var(--ink3); padding-top: 18px; border-top: 1px solid var(--line); line-height: 1.6; text-align: center; }
.foot-nap a { color: var(--ink2); text-decoration: none; }
.foot-nap a:hover { color: var(--ink); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { border-bottom: 1px solid var(--line); padding-top: clamp(48px, 5vw, 76px); padding-bottom: clamp(40px, 4.5vw, 60px); }
.page-hero h1 { font-size: clamp(36px, 4.4vw, 54px); line-height: 1.05; margin-top: 22px; max-width: 14ch; }
.page-hero p { margin-top: 22px; max-width: 560px; }

/* ---------- Brand detail (brands page) ---------- */
.detail { border-bottom: 1px solid var(--line); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; }
.detail:nth-child(even) .detail-media { order: 2; border-left: 1px solid var(--line); border-right: none; }
.detail-media { position: relative; min-height: 420px; overflow: hidden; background: var(--bg2); border-right: 1px solid var(--line); }
.detail-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-body { padding: clamp(44px, 5vw, 72px) var(--pad); }
.detail-body h2 { font-size: clamp(26px, 3vw, 36px); margin-top: 14px; }
.detail-body .lead { margin-top: 18px; max-width: 480px; }
.offer-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 0; max-width: 480px; }
.offer-list li { display: flex; gap: 14px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15.5px; color: var(--ink); }
.offer-list li::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--navy); flex: 0 0 auto; transform: translateY(2px); }
.detail-body .btn-row { margin-top: 32px; }

/* ---------- Contact page extras ---------- */
.contact-intro-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: start; }
.route-list { display: grid; gap: 16px; margin-top: 30px; }
.route {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border: 1px solid var(--line); border-radius: 3px; padding: 22px 24px;
  text-decoration: none; background: #fff; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.route:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(20,23,28,0.06); }
.route h3 { font-size: 18px; }
.route p { font-size: 14px; color: var(--ink2); margin: 6px 0 0; }
.route .ar { width: 18px; height: 18px; color: var(--navy); flex: 0 0 auto; transition: transform .15s; }
.route:hover .ar { transform: translateX(4px); }
.info-card { border: 1px solid var(--line); border-radius: 3px; background: var(--bg2); padding: 34px; }
.info-card .contact-k { margin-top: 24px; }
.info-card .contact-k:first-child { margin-top: 0; }
.info-card .contact-v { margin-top: 10px; }

/* ---------- Long-form prose (detail + about page bodies) ---------- */
.content-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: start; }
.prose .section-title { font-size: clamp(19px, 2vw, 23px); font-weight: 700; letter-spacing: -0.01em; margin-top: 36px; }
.prose .section-title:first-child { margin-top: 0; }
.prose p { font-size: 16px; line-height: 1.65; color: var(--ink2); margin: 14px 0 0; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul { list-style: none; margin: 18px 0 0; padding: 0; max-width: 520px; }
.prose li { display: flex; gap: 14px; align-items: baseline; padding: 13px 0; border-top: 1px solid var(--line); font-size: 15.5px; color: var(--ink); }
.prose li::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--navy); flex: 0 0 auto; transform: translateY(2px); }
.prose .detail-cta { margin-top: 34px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero-intro { grid-template-columns: 1fr; align-items: start; gap: 22px; }
  .statement-grid { grid-template-columns: 1fr; gap: 28px; }
  .brand-cards { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-media { min-height: 300px; border-right: none; border-bottom: 1px solid var(--line); }
  .detail:nth-child(even) .detail-media { order: 0; border-left: none; }
  .contact-intro-grid { grid-template-columns: 1fr; gap: 36px; }
  .content-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 760px) {
  /* Collapsible nav via checkbox hack — no JS. Opens as a full-width
     dropdown panel anchored below the 74px bar, so it never gets clipped
     by the fixed-height header or rendered unreadable over the hero video. */
  .nav-toggle { display: inline-flex; order: 3; }
  .header-phone { order: 2; margin-left: auto; }
  .nav-toggle label {
    display: inline-flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px;
  }
  .nav-toggle label span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }
  .nav {
    position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(20,23,28,0.10);
    max-height: 0; overflow: hidden; transition: max-height .28s ease;
  }
  .nav a { padding: 15px var(--pad); width: 100%; border-top: 1px solid var(--line); font-size: 16px; color: var(--ink2); }
  .nav a:first-of-type { border-top: none; }
  .nav-toggle-cb:checked ~ .nav { max-height: 360px; }
  .nav-toggle-cb:checked ~ .nav-toggle label span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-cb:checked ~ .nav-toggle label span:nth-child(2) { opacity: 0; }
  .nav-toggle-cb:checked ~ .nav-toggle label span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .specialty { grid-template-columns: 1fr; }
  .spec + .spec { border-left: none; border-top: 1px solid var(--line); }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-col { padding: 28px 0 0; }
  .contact-col + .contact-col { border-left: none; border-top: 1px solid var(--line); }
  .contact-col:first-child { padding-top: 32px; }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: none; border-top: 1px solid var(--line); }
}
