/* Ridge Equipment Company — site styles
   One stylesheet, no framework, no external fonts (CSP: font-src 'self').
   Brand palette from the logo: maroon + RF-waveform green. */

:root {
  --maroon:   #730101;
  --maroon-d: #560000;
  --green:    #2f9e2e;
  --ink:      #1f2430;
  --body:     #2a3140;
  --muted:    #5b6472;
  --rule:     #e6e8ec;
  --bg:       #ffffff;
  --bg-alt:   #f7f8fa;
  --bg-dark:  #181b22;
  --max:      1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--maroon); }
a:hover { color: var(--maroon-d); }

h1, h2, h3 { color: var(--ink); line-height: 1.18; margin: 0 0 .4em; }
h1 { font-size: clamp(32px, 4.4vw, 50px); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: 21px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; max-width: 760px; margin: 0 auto 44px; }
.section__head p { color: var(--muted); font-size: 18px; margin: 0; }

/* Accessibility: skip link */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--maroon); color: #fff; padding: 10px 16px;
}
.skip:focus { left: 12px; top: 12px; color: #fff; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(180%) blur(6px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 96px;
}
.brand img { height: 66px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 600;
  font-size: 15px; padding: 10px 14px; border-radius: 6px;
  letter-spacing: .01em;
}
.nav a:hover { background: var(--bg-alt); color: var(--maroon); }
.nav a.is-active { color: var(--maroon); }
.nav a.is-active::after {
  content: ""; display: block; height: 2px; background: var(--green);
  margin-top: 4px; border-radius: 2px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 10px; line-height: 0;
}
.nav-toggle span {
  display: block; width: 26px; height: 2px; background: var(--ink);
  margin: 5px 0; transition: transform .2s, opacity .2s;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 13px 26px; border-radius: 7px; font-size: 15px;
  border: 2px solid transparent; transition: background .15s, color .15s;
}
.btn--primary { background: var(--maroon); color: #fff; }
.btn--primary:hover { background: var(--maroon-d); color: #fff; }
.btn--ghost { border-color: #fff; color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--ink); }
.btn--outline { border-color: var(--maroon); color: var(--maroon); }
.btn--outline:hover { background: var(--maroon); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; text-align: center;
  background: linear-gradient(rgba(20,22,28,.58), rgba(20,22,28,.62)),
              url("/assets/img/hero.jpg") center/cover no-repeat;
}
.hero .wrap { padding-top: 150px; padding-bottom: 150px; }
.hero h1 {
  color: #fff; max-width: 960px; margin: 0 auto .5em;
  font-size: clamp(38px, 5.4vw, 62px);
  text-shadow: 0 2px 16px rgba(0,0,0,.45);
}
.hero p {
  color: #f0f1f4; font-size: clamp(18px, 2.1vw, 23px);
  max-width: 760px; margin: 0 auto 34px;
  text-shadow: 0 1px 10px rgba(0,0,0,.4);
}
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__rule {
  width: 64px; height: 4px; background: var(--green);
  border-radius: 3px; margin: 0 auto 28px;
}

/* ---------- Generic page banner (inner pages) ---------- */
.page-banner {
  background: var(--bg-dark); color: #fff; text-align: center;
  padding: 64px 0;
  border-bottom: 4px solid var(--green);
}
.page-banner h1 { color: #fff; margin: 0; }
.page-banner p { color: #c9cdd4; margin: .5em 0 0; font-size: 18px; }

/* ---------- Mission split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.eyebrow {
  color: var(--green); font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; font-size: 13px; margin: 0 0 8px;
}

/* ---------- Feature cards (services) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  background: #fff; border: 1px solid var(--rule); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
}
.card img { aspect-ratio: 16/10; object-fit: cover; }
.card__body { padding: 22px 24px 26px; }
.card__body h3 { margin-bottom: 8px; }
.card__body p { margin: 0; color: var(--muted); }

/* ---------- Capabilities project list ---------- */
.projects { columns: 2; column-gap: 48px; max-width: 860px; margin: 0 auto; }
.projects li {
  break-inside: avoid; margin-bottom: 14px; padding-left: 26px;
  position: relative; list-style: none; color: var(--body);
}
.projects { padding: 0; }
.projects li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 9px; height: 9px; background: var(--green); border-radius: 50%;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.gallery img {
  border-radius: 8px; aspect-ratio: 1/1; object-fit: cover;
  width: 100%;
}

/* ---------- Partners ---------- */
.partners {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: 44px;
}
.partners img {
  max-height: 52px; width: auto; filter: grayscale(1); opacity: .7;
  transition: filter .2s, opacity .2s;
}
.partners img:hover { filter: none; opacity: 1; }

/* ---------- Plain prose blocks ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose p { color: var(--body); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-card {
  border: 1px solid var(--rule); border-radius: 12px; padding: 30px 32px;
  background: #fff;
}
.contact-card h3 { color: var(--maroon); }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin-bottom: 18px; }
.contact-list .label {
  display: block; font-size: 13px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 2px;
}
.contact-list a { font-size: 19px; font-weight: 600; text-decoration: none; }
.map-embed iframe, .map-embed img {
  width: 100%; border: 0; border-radius: 12px; min-height: 320px;
}

/* ---------- Careers job card ---------- */
.job {
  border: 1px solid var(--rule); border-left: 4px solid var(--maroon);
  border-radius: 10px; padding: 30px 34px; max-width: 860px; margin: 0 auto;
  background: #fff;
}
.job h3 { color: var(--maroon); }
.job .meta {
  display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0 0 20px;
  padding: 16px 0; border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 15px;
}
.job .meta strong { color: var(--ink); }
.benefits { list-style: none; padding: 0; display: grid;
  grid-template-columns: repeat(2, 1fr); gap: 12px 28px; max-width: 720px;
  margin: 0 auto; }
.benefits li { padding-left: 28px; position: relative; }
.benefits li::before {
  content: "✓"; position: absolute; left: 0; color: var(--green);
  font-weight: 700;
}

/* ---------- Legal / document pages ---------- */
.legal { max-width: 800px; margin: 0 auto; }
.legal .meta {
  color: var(--muted); font-size: 14px; margin: 0 0 28px;
  padding-bottom: 18px; border-bottom: 1px solid var(--rule);
}
.legal h2 { font-size: 22px; color: var(--maroon); margin-top: 36px; }
.legal h3 { font-size: 17px; margin-top: 22px; }
.legal p, .legal li { color: var(--body); }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal .prog {
  border: 1px solid var(--rule); border-radius: 10px;
  padding: 4px 20px 16px; margin: 16px 0;
}
.legal .callout {
  background: #faf6f6; border: 1px solid #ecdede; border-radius: 10px;
  padding: 14px 18px; margin: 20px 0;
}
.legal .doc-footer {
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--rule);
  color: var(--muted); font-size: 14px;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-dark); color: #aeb4bd; padding: 56px 0 28px; }
.site-footer a { color: #d6dae0; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding-bottom: 36px; border-bottom: 1px solid #2c313b;
}
.site-footer img.flogo { height: 40px; margin-bottom: 16px; }
.site-footer h4 {
  color: #fff; font-size: 14px; text-transform: uppercase;
  letter-spacing: .06em; margin: 0 0 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding-top: 22px; font-size: 14px;
}

/* ---------- Small utilities (so HTML stays inline-style-free for CSP) ---------- */
.cta-row { margin-top: 28px; }
.cta-row--lg { margin-top: 44px; }
.cta-foot { text-align: center; margin-top: 48px; }

/* 404 / simple centered page */
.error-page { text-align: center; }
.error-page .lead { color: var(--muted); max-width: 520px; margin: 0 auto 28px; }
.footer-bottom--bare { border-top: 0; padding-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav {
    position: absolute; top: 96px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--rule);
    padding: 8px 12px 16px; display: none;
    box-shadow: 0 14px 22px rgba(0,0,0,.08);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 12px; border-radius: 6px; }
  .nav a.is-active::after { display: none; }
  .nav-toggle { display: block; }

  .split, .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .projects { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .benefits { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}
