/* This site's own styles.
   The platform's site stylesheet (/api/site/ridgeline-guard-services/base/v1.css) loads first on every page and
   is kept up to date by the platform; rules here load after it and win. */

:root {
  --paper: #F2EADB;
  --paper-2: #E9DEC9;
  --ink: #1E1B18;
  --ink-soft: #4A433C;
  --accent: #6E1F27;      /* oxblood */
  --accent-deep: #521419;
  --accent-2: #9C7A3C;    /* brass, decoration */
  --brass-text: #74581F;  /* brass for text on paper (AA) */
  --brass-light: #D4B373; /* brass on oxblood or ink */
  --rule: #CDBFA6;
  --radius: 2px;
  --font-heading: "Libre Caslon Display", Georgia, "Times New Roman", serif;
  --font-body: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; line-height: 1.1; margin: 0 0 16px; color: var(--ink); }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1.15; }
p { margin: 0 0 16px; }
.measure { max-width: 62ch; }
.lead { font-size: 1.1875rem; color: var(--ink-soft); max-width: 58ch; }
.small { font-size: 0.875rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.rg-section { padding: 112px 0; }
.rg-section--tint { background: var(--paper-2); }
.rg-section--ink { background: var(--ink); color: var(--paper); }
.rg-section--ink h2, .rg-section--ink h3 { color: var(--paper); }
.rg-section--blood { background: var(--accent); color: var(--paper); }
.rg-section--blood h2, .rg-section--blood h3 { color: var(--paper); }

/* small caps kicker, once per section */
.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-text);
  margin: 0 0 16px;
}
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.rg-section--ink .kicker, .rg-section--blood .kicker { color: var(--brass-light); }

/* buttons */
.rg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; border-radius: var(--radius);
  background: var(--accent); color: var(--paper); border: 1px solid var(--accent);
  box-shadow: inset 0 0 0 3px var(--accent), inset 0 0 0 4px rgba(212,179,115,.65);
  transition: background-color .2s ease, transform .2s ease;
  cursor: pointer;
}
.rg-btn:hover { background: var(--accent-deep); color: var(--paper); box-shadow: inset 0 0 0 3px var(--accent-deep), inset 0 0 0 4px rgba(212,179,115,.8); }
.rg-btn:active { transform: translateY(1px); }
.rg-btn--line { background: transparent; color: var(--ink); border-color: var(--ink); box-shadow: none; }
.rg-btn--line:hover { background: var(--ink); color: var(--paper); box-shadow: none; }
.rg-btn--brass { background: var(--brass-light); color: var(--ink); border-color: var(--brass-light); box-shadow: none; }
.rg-btn--brass:hover { background: #E2C68E; color: var(--ink); box-shadow: none; }
.rg-btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
@media (max-width: 560px) {
  .rg-btn-row { flex-wrap: nowrap; }
  .rg-btn-row .rg-btn { flex: 1 1 0; min-width: 0; padding: 12px 14px; }
}
.textlink { font-weight: 600; color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-2); padding-bottom: 2px; }
.textlink:hover { border-bottom-color: var(--accent); }

/* header */
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 50; }
.skip:focus { top: 12px; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; }
.brand__name { font-family: var(--font-heading); font-size: 1.375rem; line-height: 1.05; }
.brand__name small { display: block; font-family: var(--font-body); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass-text); font-weight: 600; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.9375rem; padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent-2); }
.nav .rg-btn { margin-left: 12px; color: var(--paper); padding: 10px 20px; }
.nav-toggle { display: none; }
@media (max-width: 899px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px;
    background: transparent; border: 1px solid var(--ink); border-radius: var(--radius);
    font: 600 0.9375rem var(--font-body); color: var(--ink); cursor: pointer;
  }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; padding: 8px 24px 24px; }
  .nav[data-open] { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .nav a[aria-current="page"] { box-shadow: none; }
  .nav .rg-btn { margin: 16px 0 0; border-bottom: 1px solid var(--accent); }
}

/* the engraved escarpment line */
.ridge { display: block; width: 100%; height: auto; color: var(--accent-2); }
.ridge--ink { color: var(--ink-soft); }

/* home hero */
.rg-hero { padding: 72px 0 0; overflow: hidden; }
.rg-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 64px; align-items: end; }
.rg-hero h1 em { font-style: italic; color: var(--accent); }
.rg-hero__copy { padding-bottom: 72px; }
.rg-hero__frame { position: relative; border: 1px solid var(--ink); padding: 10px; background: var(--paper); margin-bottom: -1px; }
.rg-hero__frame::before { content: ""; position: absolute; inset: 4px; border: 1px solid var(--accent-2); pointer-events: none; }
.rg-hero__frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: saturate(.85); }
.rg-hero__caption { display: flex; justify-content: space-between; gap: 16px; font-size: 0.8125rem; color: var(--ink-soft); padding: 10px 2px 0; }
.rg-hero__ridge { margin-top: -2px; }
.creds { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 24px 0 0; padding: 0; list-style: none; font-size: 0.9375rem; color: var(--ink-soft); }
.creds li { display: inline-flex; align-items: center; gap: 8px; }
.creds svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
@media (max-width: 860px) {
  .rg-hero { padding-top: 48px; }
  .rg-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .rg-hero__copy { padding-bottom: 0; }
  .rg-hero__frame img { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: no-preference) {
  .rg-hero__copy > * { animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
  .rg-hero__copy > *:nth-child(2) { animation-delay: .06s; }
  .rg-hero__copy > *:nth-child(3) { animation-delay: .12s; }
  .rg-hero__copy > *:nth-child(4) { animation-delay: .18s; }
  .rg-hero__copy > *:nth-child(5) { animation-delay: .24s; }
  @keyframes rise { from { transform: translateY(12px); opacity: .01; } to { transform: none; opacity: 1; } }
}

/* audiences: three ruled columns */
.ruled3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); margin-top: 48px; }
.ruled3 > div { padding: 32px 32px 8px 0; }
.ruled3 > div + div { border-left: 1px solid var(--rule); padding-left: 32px; }
.ruled3 h3 { margin-bottom: 12px; }
.ruled3 p { color: var(--ink-soft); }
@media (max-width: 860px) {
  .ruled3 { grid-template-columns: minmax(0, 1fr); }
  .ruled3 > div { padding: 24px 0 8px; }
  .ruled3 > div + div { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; }
}

/* service register: index list */
.register { list-style: none; margin: 48px 0 0; padding: 0; border-top: 1px solid rgba(242,234,219,.25); }
.register li { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; padding: 28px 0; border-bottom: 1px solid rgba(242,234,219,.25); align-items: baseline; }
.register .num { font-family: var(--font-heading); font-size: 1.25rem; color: var(--brass-light); }
.register h3 { margin: 0; font-size: 1.625rem; }
.register p { margin: 0; color: rgba(242,234,219,.82); }
@media (max-width: 760px) {
  .register li { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 16px; }
  .register p { grid-column: 2; }
}

/* certificate panel */
.certificate { position: relative; border: 2px solid var(--ink); padding: 64px 56px; background: var(--paper); text-align: center; }
.certificate::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--accent-2); pointer-events: none; }
.certificate__seal { width: 72px; height: 72px; margin: 0 auto 16px; }
.certificate h2 { max-width: none; }
.cert-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 40px; text-align: left; }
.cert-grid h3 { font-size: 1.375rem; padding-top: 16px; border-top: 1px solid var(--rule); }
.cert-grid p { color: var(--ink-soft); margin: 0; }
@media (max-width: 760px) {
  .certificate { padding: 48px 24px; }
  .cert-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* area strip */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.split--wide-left { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
@media (max-width: 860px) { .split, .split--wide-left { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
.towns { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.towns li { font-family: var(--font-heading); font-size: 1.5rem; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.mapcard { border: 1px solid var(--ink); padding: 10px; background: var(--paper); }
.mapcard svg { display: block; width: 100%; height: auto; }
.mapcard p { font-size: 0.8125rem; color: var(--ink-soft); margin: 8px 2px 0; }

/* closing band */
.band { padding: 96px 0; }
.band__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.band h2 { margin: 0 0 8px; }
.band p { margin: 0; color: rgba(242,234,219,.85); max-width: 52ch; }

/* page head for inner pages */
.pagehead { padding: 80px 0 0; }
.pagehead .lead { margin-bottom: 48px; }
@media (max-width: 760px) { .pagehead { padding-top: 48px; } }

/* services page */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 48px; }
.post { display: flex; flex-direction: column; }
.post figure { margin: 0 0 20px; border: 1px solid var(--ink); padding: 6px; background: var(--paper); }
.post img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.post ul, .ticks { list-style: none; padding: 0; margin: 8px 0 0; }
.post li, .ticks li { position: relative; padding: 6px 0 6px 26px; border-top: 1px solid var(--rule); font-size: 0.9875rem; }
.post li::before, .ticks li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
@media (max-width: 900px) { .post-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; } }

.photo-frame { border: 1px solid var(--ink); padding: 10px; position: relative; background: var(--paper); }
.photo-frame::before { content: ""; position: absolute; inset: 4px; border: 1px solid var(--accent-2); pointer-events: none; }
.photo-frame img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.rg-section--ink .photo-frame { background: var(--ink); border-color: var(--brass-light); }

.event-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--ink); background: var(--paper); }
.event-panel img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.event-panel__body { padding: 48px; }
@media (max-width: 860px) { .event-panel { grid-template-columns: minmax(0, 1fr); } .event-panel__body { padding: 32px 24px; } .event-panel img { min-height: 0; aspect-ratio: 3 / 2; } }

.alarm-log { margin-top: 32px; border: 1px solid rgba(242,234,219,.35); }
.alarm-log div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; padding: 18px 24px; border-bottom: 1px solid rgba(242,234,219,.2); }
.alarm-log div:last-child { border-bottom: 0; }
.alarm-log dt { font-weight: 600; color: var(--brass-light); font-size: 0.9375rem; }
.alarm-log dd { margin: 0; color: rgba(242,234,219,.88); }
@media (max-width: 600px) { .alarm-log div { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 16px; } }

/* how we work: timeline */
.timeline { list-style: none; margin: 48px 0 0; padding: 0; counter-reset: step; position: relative; }
.timeline li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 24px; padding-bottom: 48px; }
.timeline li::before {
  counter-increment: step; content: counter(step, upper-roman);
  font-family: var(--font-heading); font-size: 1.5rem; color: var(--accent);
  width: 64px; height: 64px; border: 1px solid var(--ink); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--paper);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--accent-2); position: relative; z-index: 1;
}
.timeline li::after { content: ""; position: absolute; left: 32px; top: 64px; bottom: 0; width: 1px; background: var(--rule); }
.timeline li:last-child::after { display: none; }
.timeline li:last-child { padding-bottom: 0; }
.timeline h3 { margin: 14px 0 8px; }
.timeline p { color: var(--ink-soft); max-width: 60ch; margin: 0; }
@media (max-width: 600px) { .timeline li { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; } }

.shift-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin-top: 32px; }
@media (max-width: 760px) { .shift-cols { grid-template-columns: minmax(0, 1fr); } }
.rg-section--ink .ticks li { border-top-color: rgba(242,234,219,.2); }
.rg-section--ink .ticks li::before { border-color: var(--brass-light); }

.dispatch { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center; }
.dispatch__clock { width: 160px; height: 160px; color: var(--brass-light); }
@media (max-width: 700px) { .dispatch { grid-template-columns: minmax(0, 1fr); gap: 24px; } .dispatch__clock { width: 112px; height: 112px; } }

/* FAQ */
.rg-faq { margin-top: 32px; border-top: 2px solid var(--ink); }
.rg-faq details { border-bottom: 1px solid var(--rule); }
.rg-faq summary { list-style: none; cursor: pointer; padding: 22px 48px 22px 0; position: relative; font-family: var(--font-heading); font-size: 1.375rem; line-height: 1.25; }
.rg-faq summary::-webkit-details-marker { display: none; }
.rg-faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font-family: var(--font-body); font-size: 1.5rem; color: var(--accent); transition: transform .2s ease; }
.rg-faq details[open] summary::after { transform: rotate(45deg); }
.rg-faq details > div { padding: 0 0 24px; color: var(--ink-soft); max-width: 66ch; }

/* areas page */
.area-table { width: 100%; border-collapse: collapse; margin-top: 40px; }
.area-table th, .area-table td { text-align: left; vertical-align: top; padding: 24px 24px 24px 0; border-bottom: 1px solid var(--rule); }
.area-table thead th { font-size: 0.8125rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-text); border-bottom: 2px solid var(--ink); padding-top: 0; padding-bottom: 12px; }
.area-table tbody th { font-family: var(--font-heading); font-weight: 400; font-size: 1.75rem; width: 26%; }
.area-table td { color: var(--ink-soft); }
@media (max-width: 700px) {
  .area-table thead { display: none; }
  .area-table, .area-table tbody, .area-table tr, .area-table th, .area-table td { display: block; width: 100%; }
  .area-table tr { padding: 20px 0; border-bottom: 1px solid var(--rule); }
  .area-table th, .area-table td { border: 0; padding: 4px 0; }
}
.notice { border-left: 3px solid var(--accent); padding: 16px 24px; background: var(--paper-2); }

/* quote form */
.quote-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 64px; align-items: start; }
@media (max-width: 900px) { .quote-layout { grid-template-columns: minmax(0, 1fr); gap: 48px; } }
.form-sheet { position: relative; border: 2px solid var(--ink); background: #FBF7EF; padding: 48px; }
.form-sheet::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--accent-2); pointer-events: none; }
@media (max-width: 600px) { .form-sheet { padding: 32px 20px; } }
.form-sheet fieldset { border: 0; padding: 0; margin: 0 0 32px; min-width: 0; }
.form-sheet legend { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 16px; padding: 0; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
@media (max-width: 600px) { .row2 { grid-template-columns: minmax(0, 1fr); } }
.rg-field { margin-bottom: 20px; position: relative; z-index: 1; }
.rg-field label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 6px; }
.rg-field .opt { font-weight: 400; color: var(--ink-soft); }
.rg-field input, .rg-field select, .rg-field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: 1rem/1.4 var(--font-body); color: var(--ink);
  background: #fff; border: 1px solid #8C7F6B; border-radius: var(--radius);
}
.rg-field textarea { min-height: 140px; resize: vertical; }
.rg-field input:focus, .rg-field select:focus, .rg-field textarea:focus { outline: 3px solid var(--accent-2); outline-offset: 1px; border-color: var(--ink); }
.hint { font-size: 0.875rem; color: var(--ink-soft); margin: 6px 0 0; }
[data-sd-status] { margin: 16px 0 0; font-weight: 600; color: var(--accent); }
.form-sheet .rg-btn { position: relative; z-index: 1; }
.aside-box { border-top: 2px solid var(--ink); padding-top: 24px; margin-bottom: 40px; }
.aside-box h2 { font-size: 1.75rem; }

/* footer */
.site-footer { background: var(--ink); color: rgba(242,234,219,.85); padding: 72px 0 32px; font-size: 0.9375rem; }
.site-footer .ridge { color: var(--accent-2); opacity: .7; margin: -24px 0 40px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 48px; }
.site-footer .brand, .site-footer .brand__name { color: var(--paper); }
.site-footer .brand__name small { color: var(--brass-light); }
.site-footer h2 { font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-light); margin: 0 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-flex; min-height: 36px; align-items: center; }
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover { color: var(--brass-light); text-decoration: underline; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; border-top: 1px solid rgba(242,234,219,.18); margin-top: 48px; padding-top: 24px; font-size: 0.875rem; }
.footer-legal nav { display: flex; gap: 24px; }
.footer-legal a { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } .site-footer { padding-top: 56px; } }

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .rg-section { padding: 64px 0; }
  .band { padding: 64px 0; }
  .wrap { padding: 0 16px; }
}
.post figure.engr { padding: 20px 16px 12px; background: #FBF7EF; }
.post figure.engr svg { display: block; width: 100%; height: auto; }
.nav a.rg-btn[aria-current="page"] { color: var(--paper); box-shadow: inset 0 0 0 3px var(--accent), inset 0 0 0 4px rgba(212,179,115,.65); }
