/* Ridgeline Guard Services. The platform's stylesheets load first; these rules win. */
:root {
  --ink: #0f1d2e;
  --night: #0a1522;
  --paper: #edeff0;
  --sheet: #ffffff;
  --accent: #ff7a1a;
  --accent-2: #a84300;
  --steel: #4d5b69;
  --line: #c6ccd2;
  --on-dark: #e9edf1;
  --on-dark-muted: #aab6c2;
  --radius: 4px;
  --font-heading: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Public Sans", system-ui, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { 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-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 .4em;
  letter-spacing: 0;
}
h1 { font-size: clamp(3rem, 7.2vw, 6.5rem); text-transform: uppercase; line-height: .95; }
h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); text-transform: uppercase; line-height: 1; }
h3 { font-size: 1.6rem; line-height: 1.1; }
@media (max-width: 480px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.3rem; }
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sec { padding: clamp(56px, 8vw, 112px) 0; }
.kicker {
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 16px;
  display: flex; align-items: center; gap: 10px;
}
.kicker::before { content: ""; width: 24px; height: 3px; background: var(--accent); flex: none; }
.dark .kicker, .band .kicker { color: var(--accent); }
.lede { font-size: 1.1875rem; max-width: 62ch; color: var(--steel); }
.dark .lede, .band .lede { color: var(--on-dark-muted); }
.muted { color: var(--steel); }
.small { font-size: .875rem; }

/* skip link */
.skip { position: absolute; left: 16px; top: -60px; background: var(--accent); color: var(--ink); padding: 10px 16px; z-index: 50; font-weight: 700; }
.skip:focus { top: 12px; }

/* buttons */
.btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 24px;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  border-radius: var(--radius); text-decoration: none; border: 2px solid transparent;
  background: var(--accent); color: var(--ink);
  transition: transform .18s ease, background-color .18s ease;
  cursor: pointer;
}
.btn:hover { background: #ff9445; }
.btn:active { transform: translateY(1px); }
.btn--line { background: transparent; border-color: currentColor; color: var(--ink); }
.btn--line:hover { background: rgba(15, 29, 46, .06); }
.dark .btn--line, .band .btn--line { color: var(--on-dark); }
.dark .btn--line:hover, .band .btn--line:hover { background: rgba(255,255,255,.08); }
@media (max-width: 560px) {
  .btns { flex-wrap: nowrap; }
  .btns .btn { flex: 1 1 0; min-width: 0; padding: 12px 10px; }
}
.textlink { font-weight: 700; color: var(--accent-2); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.dark .textlink, .band .textlink { color: var(--accent); }

/* header */
.top { background: var(--ink); color: var(--on-dark); position: relative; z-index: 20; }
.top .kit-nav {
  max-width: var(--wrap); margin: 0 auto; padding: 12px var(--gutter);
  background: transparent; color: var(--on-dark); border: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-dark); min-height: 48px; }
.brand img { width: 40px; height: 40px; }
.brand span { font-family: var(--font-heading); font-weight: 700; font-size: 1.45rem; line-height: 1; text-transform: uppercase; }
.brand small { display: block; font-family: var(--font-body); font-size: .75rem; font-weight: 600; text-transform: none; color: var(--on-dark-muted); margin-top: 3px; letter-spacing: 0; }
.top .kit-nav__toggle {
  background: transparent; color: var(--on-dark); border: 2px solid var(--on-dark-muted);
  border-radius: var(--radius); min-height: 44px; padding: 8px 16px; font: 700 1rem var(--font-body);
}
.top .kit-nav__menu { display: flex; align-items: center; gap: 4px; }
.top .kit-nav__menu a {
  color: var(--on-dark); text-decoration: none; font-weight: 600; font-size: .9375rem;
  padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--radius);
}
.top .kit-nav__menu a:hover { background: rgba(255,255,255,.08); }
.top .kit-nav__menu a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); }
.top .kit-nav__menu a.nav-cta { background: var(--accent); color: var(--ink); margin-left: 8px; padding: 10px 16px; }
.top .kit-nav__menu a.nav-cta:hover { background: #ff9445; }
@media (max-width: 767px) {
  .top .kit-nav__menu { flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 8px 0 12px; }
  .top .kit-nav__menu a.nav-cta { margin: 8px 0 0; justify-content: center; }
}

/* home hero */
.rg-hero { padding: clamp(48px, 7vw, 96px) 0 0; }
.rg-hero h1 { margin-bottom: 24px; }
.rg-hero h1 em { font-style: normal; color: var(--accent-2); }
.hero-photo { margin-top: clamp(40px, 6vw, 72px); position: relative; }
.hero-photo img { width: 100%; height: clamp(260px, 42vw, 560px); object-fit: cover; object-position: center 80%; }
.hero-photo::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; background: repeating-linear-gradient(-45deg, var(--accent) 0 16px, var(--ink) 16px 32px); }

/* credential strip */
.creds { background: var(--ink); color: var(--on-dark); }
.creds ul { list-style: none; margin: 0 auto; padding: 24px var(--gutter); max-width: var(--wrap); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.creds li { display: flex; gap: 14px; align-items: flex-start; }
.creds svg { flex: none; width: 32px; height: 32px; color: var(--accent); }
.creds strong { display: block; font-family: var(--font-heading); font-size: 1.35rem; text-transform: uppercase; line-height: 1.1; }
.creds span { color: var(--on-dark-muted); font-size: .9375rem; }
@media (max-width: 760px) { .creds ul { grid-template-columns: minmax(0, 1fr); gap: 18px; } }

/* service cards (home) */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
@media (max-width: 960px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .svc-grid { grid-template-columns: minmax(0, 1fr); } }
.svc { background: var(--sheet); border-top: 4px solid var(--ink); position: relative; display: flex; flex-direction: column; min-width: 0; transition: border-color .2s ease; }
.svc:hover { border-top-color: var(--accent); }
.svc img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.svc div { padding: 20px 22px 24px; }
.svc h3 { margin-bottom: 8px; }
.svc h3 a { text-decoration: none; }
.svc h3 a::after { content: ""; position: absolute; inset: 0; }
.svc p { color: var(--steel); margin: 0; font-size: 1rem; }
.svc .tag { font-size: .8125rem; font-weight: 700; color: var(--accent-2); margin-bottom: 6px; }

/* patrol log (signature) */
.log-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .log-split { grid-template-columns: minmax(0, 1fr); } }
.sheet {
  background: var(--sheet); border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(15,29,46,.45);
  padding: clamp(18px, 3vw, 32px); position: relative; min-width: 0;
}
.sheet-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 4px; }
.sheet-head strong { font-family: var(--font-heading); font-size: 1.5rem; text-transform: uppercase; line-height: 1.1; }
.sheet-head dl { margin: 0; display: grid; grid-template-columns: auto auto; gap: 2px 12px; font-size: .875rem; }
.sheet-head dt { color: var(--steel); }
.sheet-head dd { margin: 0; font-weight: 600; }
.scroll-x { overflow-x: auto; position: relative; }
.log { width: 100%; border-collapse: collapse; font-size: .9375rem; min-width: 480px; }
.log th { text-align: left; font-size: .8125rem; color: var(--steel); font-weight: 700; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.log td { padding: 11px 8px; border-bottom: 1px dashed var(--line); vertical-align: top; }
.log td:first-child { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.log .ok { display: inline-block; font-size: .8125rem; font-weight: 700; padding: 2px 8px; border: 1.5px solid var(--ink); border-radius: 3px; white-space: nowrap; }
.log .flag { border-color: var(--accent-2); color: var(--accent-2); }
.stamp {
  position: absolute; right: 18px; bottom: -18px; transform: rotate(-6deg);
  border: 3px solid var(--accent-2); color: var(--accent-2); background: var(--sheet);
  font-family: var(--font-heading); font-weight: 700; text-transform: uppercase; font-size: 1.05rem; line-height: 1.05;
  padding: 8px 12px; text-align: center;
}
.sample-note { font-size: .875rem; color: var(--steel); margin-top: 32px; }

/* who we work for */
.who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); margin-top: 40px; }
.who > div { padding: 28px 28px 8px 0; min-width: 0; }
.who > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.who ul { padding-left: 1.1em; margin: 0; color: var(--steel); }
.who li { margin-bottom: 6px; }
.who li::marker { color: var(--accent-2); }
@media (max-width: 820px) {
  .who { grid-template-columns: minmax(0, 1fr); }
  .who > div, .who > div + div { padding: 24px 0 8px; border-left: 0; border-top: 1px solid var(--line); }
  .who > div:first-child { border-top: 0; }
}

/* dark band */
.band, .dark { background: var(--ink); color: var(--on-dark); }
.towns { list-style: none; padding: 0; margin: 32px 0; display: flex; flex-wrap: wrap; gap: 8px 0; }
.towns li { font-family: var(--font-heading); font-weight: 700; text-transform: uppercase; font-size: clamp(2rem, 5vw, 4rem); line-height: 1; }
.towns li:not(:last-child)::after { content: "/"; color: var(--accent); margin: 0 .3em; font-weight: 500; }

/* closing CTA */
.cta-end { background: var(--accent); color: var(--ink); }
.cta-end .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.cta-end p { max-width: 56ch; margin: 0; }
.cta-end .btn { background: var(--ink); color: #fff; }
.cta-end .btn:hover { background: #1d3049; }
@media (max-width: 760px) { .cta-end .wrap { grid-template-columns: minmax(0, 1fr); } .cta-end .btn { width: 100%; } }

/* inner page hero: headline full width, photo offset under it */
.phero { padding: clamp(48px, 7vw, 88px) 0 0; }
.phero .lede { margin-bottom: 0; }
.phero-photo { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 9fr); }
.phero-photo::before { content: ""; background: var(--ink); }
.phero-photo img { width: 100%; height: clamp(220px, 34vw, 460px); object-fit: cover; }
.phero-photo--right { grid-template-columns: minmax(0, 9fr) minmax(0, 1fr); }
.phero-photo--right::before { order: 2; background: var(--accent); }
@media (max-width: 600px) { .phero-photo, .phero-photo--right { grid-template-columns: minmax(0, 1fr); } .phero-photo::before { display: none; } }

/* services page: rows */
.rows { margin-top: 24px; }
.row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--line); align-items: start; scroll-margin-top: 24px; }
.row:nth-child(even) .row-photo { order: 2; }
.row-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.row .tag { font-weight: 700; font-size: .875rem; color: var(--accent-2); margin-bottom: 8px; }
.row h2 { font-size: clamp(2rem, 3.4vw, 2.75rem); }
.inc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 20px; }
.inc h3 { font-family: var(--font-body); font-size: .875rem; font-weight: 700; text-transform: none; color: var(--steel); margin-bottom: 8px; }
.inc ul { margin: 0; padding-left: 1.1em; }
.inc li { margin-bottom: 6px; }
.inc li::marker { color: var(--accent-2); }
@media (max-width: 820px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .row:nth-child(even) .row-photo { order: 0; }
  .inc { grid-template-columns: minmax(0, 1fr); }
}

/* plain table */
.tbl { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--sheet); }
.tbl th, .tbl td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl thead th { background: var(--ink); color: var(--on-dark); font-size: .875rem; }
.tbl tbody th { font-weight: 700; }

/* how we work: timeline */
.rg-steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); counter-reset: s; position: relative; }
.rg-steps::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 2px; background: var(--ink); }
.rg-steps li { counter-increment: s; padding-right: 20px; position: relative; min-width: 0; }
.rg-steps li::before {
  content: counter(s); display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink); font-family: var(--font-heading); font-weight: 700; font-size: 1.4rem; margin-bottom: 18px; position: relative;
}
.rg-steps li:last-child::before { background: var(--accent); }
.rg-steps h3 { font-size: 1.4rem; }
.rg-steps p { color: var(--steel); font-size: 1rem; }
@media (max-width: 900px) {
  .rg-steps { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .rg-steps::before { left: 22px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .rg-steps li { padding: 0 0 16px 66px; }
  .rg-steps li::before { position: absolute; left: 0; top: 0; }
}

/* how we work: on shift list with photo */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.split img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } .split img { aspect-ratio: 3 / 2; } }
.facts { list-style: none; padding: 0; margin: 24px 0 0; }
.facts li { padding: 16px 0; border-top: 1px solid var(--line); }
.dark .facts li { border-color: rgba(255,255,255,.18); }
.facts strong { display: block; font-size: 1.0625rem; }
.facts span { color: var(--steel); }
.dark .facts span { color: var(--on-dark-muted); }

/* licence panel */
.proof { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.proof > div { border: 2px solid var(--accent); padding: 24px; position: relative; min-width: 0; }
.proof h3 { text-transform: uppercase; font-size: 1.75rem; color: #fff; }
.proof p { color: var(--on-dark-muted); margin: 0; }
@media (max-width: 700px) { .proof { grid-template-columns: minmax(0, 1fr); } }

/* areas map */
.map-wrap { background: var(--sheet); border: 1px solid var(--line); padding: clamp(12px, 2vw, 24px); }
.map-wrap svg { width: 100%; height: auto; display: block; }
.map-wrap figcaption { font-size: .875rem; color: var(--steel); margin-top: 10px; }
.area-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 40px; border-top: 2px solid var(--ink); }
.area-grid > div { padding: 28px 28px 28px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.area-grid > div:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line); }
.area-grid h3 { font-size: 2rem; text-transform: uppercase; display: flex; align-items: center; gap: 12px; }
.area-grid h3::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--ink); flex: none; }
.area-grid p { color: var(--steel); margin: 0; }
@media (max-width: 700px) {
  .area-grid { grid-template-columns: minmax(0, 1fr); }
  .area-grid > div, .area-grid > div:nth-child(even) { padding: 24px 0; border-left: 0; }
}

/* faq */
.faq-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .faq-layout { grid-template-columns: minmax(0, 1fr); } }
.faq-group + .faq-group { margin-top: 48px; }
.faq-group h2 { font-size: 2rem; }
.kit-accordion details { border-top: 1px solid var(--line); }
.kit-accordion details:last-child { border-bottom: 1px solid var(--line); }
.kit-accordion summary { font-weight: 700; font-size: 1.0625rem; padding: 18px 0; cursor: pointer; min-height: 44px; }
.kit-accordion details > div { padding: 0 0 18px; color: var(--steel); }
.side-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
@media (max-width: 860px) { .side-photo img { aspect-ratio: 16 / 9; } }

/* quote form */
.quote-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .quote-layout { grid-template-columns: minmax(0, 1fr); } }
.form-card { background: var(--sheet); border-top: 6px solid var(--accent); padding: clamp(20px, 4vw, 40px); min-width: 0; }
.form-card fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.form-card legend { font-family: var(--font-heading); font-weight: 700; font-size: 1.5rem; text-transform: uppercase; padding: 0; margin-bottom: 12px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .fields { grid-template-columns: minmax(0, 1fr); } }
.fld label { display: block; font-weight: 700; font-size: .9375rem; margin-bottom: 6px; }
.fld .opt { font-weight: 400; color: var(--steel); }
.fld input, .fld select, .fld textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid #8793a0; border-radius: var(--radius);
}
.fld textarea { min-height: 128px; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--ink); }
.form-card .btn { width: 100%; font-size: 1.0625rem; }
[data-sd-status] { margin: 12px 0 0; font-weight: 600; }
.next { counter-reset: n; list-style: none; padding: 0; margin: 16px 0 32px; }
.next li { counter-increment: n; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.18); }
.next li::before { content: counter(n, decimal-leading-zero); font-family: var(--font-heading); font-weight: 700; font-size: 1.4rem; color: var(--accent); line-height: 1.2; }
.aside-dark { background: var(--ink); color: var(--on-dark); padding: clamp(24px, 4vw, 40px); }
.aside-dark h2 { font-size: 2rem; }
.aside-dark img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-top: 8px; }

/* footer */
.foot { background: var(--night); color: var(--on-dark-muted); padding: 56px 0 32px; font-size: .9375rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: 32px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } }
.foot h2 { font-family: var(--font-body); font-size: .875rem; font-weight: 700; text-transform: none; color: var(--on-dark); margin-bottom: 12px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li a { display: inline-flex; min-height: 40px; align-items: center; color: var(--on-dark-muted); text-decoration: none; }
.foot li a:hover { color: #fff; text-decoration: underline; }
.foot .brand { margin-bottom: 12px; }
.foot-base { border-top: 1px solid rgba(255,255,255,.14); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.foot-base a { color: var(--on-dark-muted); display: inline-flex; min-height: 44px; align-items: center; }
.foot-base nav { display: flex; gap: 20px; }

/* one entrance: the hero headline rises in (content already visible without it) */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
}

/* phone: menu folds behind the toggle; patrol log rows stack */
@media (max-width: 767px) {
  .top .kit-nav__menu:not([data-open]) { display: none; }
}
@media (max-width: 600px) {
  .log { min-width: 0; }
  .log thead { display: none; }
  .log tr { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 8px; border-bottom: 1px dashed var(--line); padding: 10px 0; }
  .log td { border: 0; padding: 0; }
  .log td:last-child { grid-column: 2; padding-top: 6px; }
  .stamp { bottom: -22px; right: 12px; }
}
