/* ==========================================================================
   PayrollRX — payrollrx.creativecorerail.com
   Palette sampled from the original logo:
   green #249F5C · black #0A0A0A · white · paper #F7F7F4
   Contrast notes (verified):
     #249F5C on white 3.39:1  -> large text / UI only
     #0A0A0A on #249F5C 5.83:1 -> button text OK
     #187848 on white 5.50:1  -> small green text OK
     #515151 on white 7.4:1   -> muted body OK
     #A6A6A6 on #0A0A0A 8.1:1 -> muted on dark OK
   ========================================================================== */

/* ---- Fonts (self-hosted) ---- */
@font-face {
  font-family: 'Archivo Black';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/archivo-black-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-var.woff2') format('woff2');
}

/* ---- Tokens ---- */
:root {
  --green: #249F5C;
  --green-dark: #187848;
  --green-tint: #EAF5EE;
  --ink: #0A0A0A;
  --ink-muted: #515151;
  --paper: #FFFFFF;
  --paper-warm: #F7F7F4;
  --hairline: #E4E4DE;
  --border-ui: #8C8C88;
  --dark: #0A0A0A;
  --dark-muted: #A6A6A6;
  --display: 'Archivo Black', 'Arial Black', sans-serif;
  --body: 'Inter', 'Segoe UI', Arial, sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
  --max: 1140px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(10, 10, 10, 0.08);
}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.6em; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; }
h3, h4 { font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--green-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
ul { padding-left: 1.2em; }
strong { font-weight: 700; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Accessibility: skip link + focus ---- */
.skip-nav {
  position: absolute; top: -60px; left: 16px; z-index: 999;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; transition: top 150ms ease; text-decoration: none;
}
.skip-nav:focus { top: 12px; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--green-dark);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.85);
}

/* ---- Layout ---- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-warm { background: var(--paper-warm); }
.section-dark { background: var(--dark); color: var(--paper); }
.section-green { background: var(--green); color: var(--ink); }
@media (min-width: 800px) {
  .section { padding: 104px 0; }
}

/* Section heading device: green rule echoes the logo bar */
.rule {
  display: block; width: 72px; height: 5px;
  background: var(--green); margin: 18px 0 22px; border: 0;
}
.section-dark .rule, .section-green .rule { background: var(--paper); }
.section h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); max-width: 22ch; }
.lede { color: var(--ink-muted); max-width: 62ch; font-size: 1.1rem; }
.section-dark .lede { color: var(--dark-muted); }

/* ---- Buttons ---- */
.btn {
  display: inline-block; font-family: var(--body); font-weight: 700;
  font-size: 1rem; line-height: 1; text-decoration: none; cursor: pointer;
  padding: 16px 26px; border-radius: 7px; border: 2px solid transparent;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-primary { background: var(--green); color: var(--ink); border-color: var(--green); }
.btn-primary:hover { background: #1E8B50; border-color: #1E8B50; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.section-dark .btn-ghost { color: var(--paper); border-color: var(--paper); }
.section-dark .btn-ghost:hover { background: var(--paper); color: var(--ink); }
.section-green .btn-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.section-green .btn-dark:hover { background: #262626; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 26px; }
.proof-line { font-size: 0.9rem; color: var(--ink-muted); margin-top: 12px; }
.section-green .proof-line { color: var(--ink); }
.section-dark .proof-line { color: var(--dark-muted); }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); border-bottom: 1px solid var(--hairline);
}
.header-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: 66px; padding: 8px 0;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 38px; width: auto; }
@media (min-width: 640px) {
  .brand img { height: 60px; }
}
.site-nav { display: none; }
.header-actions { display: none; }
.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 2px solid var(--ink); border-radius: 7px;
  font: inherit; font-weight: 600; padding: 8px 14px; cursor: pointer; color: var(--ink);
}
.nav-toggle-bars { display: inline-block; width: 16px; }
.nav-toggle-bars span {
  display: block; height: 2px; background: var(--ink); margin: 3px 0;
}

@media (min-width: 980px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; align-items: center; gap: 26px; }
  .site-nav a {
    color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  }
  .site-nav a:hover { color: var(--green-dark); }
  .site-nav a[aria-current="page"] {
    color: var(--green-dark);
    border-bottom: 2px solid var(--green);
    padding-bottom: 2px;
  }
  .header-actions { display: flex; align-items: center; gap: 18px; }
  .header-phone {
    color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem;
    white-space: nowrap;
  }
  .header-phone:hover { color: var(--green-dark); }
  .header-login { font-size: 0.85rem; color: var(--ink-muted); text-decoration: none; white-space: nowrap; }
  .header-login:hover { color: var(--ink); text-decoration: underline; }
  .btn-header { padding: 12px 18px; font-size: 0.92rem; }
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--hairline);
  background: var(--paper);
  padding: 12px 20px 26px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block; padding: 13px 4px; color: var(--ink); text-decoration: none;
  font-weight: 600; border-bottom: 1px solid var(--hairline);
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav .btn { margin-top: 16px; text-align: center; display: block; }
.mobile-nav .mobile-login { color: var(--ink-muted); font-weight: 400; font-size: 0.95rem; }

/* ---- Hero ---- */
.hero { padding: 60px 0 72px; }
.hero-grid { display: grid; gap: 44px; align-items: center; }
.eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--green-dark); margin: 0 0 16px;
}
.hero h1 {
  font-size: clamp(2.35rem, 5.2vw, 3.9rem);
  margin: 0 0 20px; max-width: 19ch;
}
.hero h1 .accent { color: var(--green); }
.hero .lede { font-size: 1.15rem; margin-bottom: 0; }
.hero-quote {
  margin: 30px 0 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--green);
  max-width: 46ch;
}
.hero-quote p { font-family: var(--serif); font-style: italic; font-size: 1.05rem; margin: 0 0 6px; }
.hero-quote cite { font-style: normal; font-size: 0.88rem; color: var(--ink-muted); }
.hero-call { margin-top: 22px; font-size: 0.95rem; color: var(--ink-muted); }
.hero-call a { font-weight: 700; color: var(--ink); text-decoration: none; }
.hero-call a:hover { color: var(--green-dark); }
@media (min-width: 900px) {
  .hero { padding: 84px 0 96px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 64px; }
}

/* ---- The prescription pad (quote form) ---- */
.pad {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 430px;
}
.pad-head {
  background: var(--green);
  color: var(--ink);
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 14px 22px;
}
.pad-rx { font-family: var(--serif); font-weight: 700; font-size: 1.9rem; line-height: 1; }
.pad-head-note { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; }
.pad-body { padding: 24px 22px 20px; }
.pad-title { font-weight: 700; font-size: 1.05rem; margin: 0 0 4px; }
.pad-sub { font-size: 0.9rem; color: var(--ink-muted); margin: 0 0 18px; }
.pad label {
  display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink-muted); margin: 16px 0 2px;
}
.pad input {
  width: 100%; border: 0; border-bottom: 1px solid var(--border-ui);
  font: inherit; color: var(--ink); padding: 7px 2px; background: transparent;
  border-radius: 0;
}
.pad input:focus { border-bottom-color: var(--green-dark); }
.pad .btn { width: 100%; margin-top: 24px; text-align: center; }
.pad-fine {
  font-size: 0.78rem; color: var(--ink-muted); margin: 12px 0 0; line-height: 1.5;
}
.pad-foot {
  border-top: 1px dashed var(--hairline);
  padding: 10px 22px 14px;
  font-family: var(--serif); font-style: italic; font-size: 0.85rem; color: var(--ink-muted);
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
/* Honeypot: a field only a bot fills in. Off-screen rather than display:none,
   because some bots skip hidden inputs. aria-hidden + tabindex keep it away
   from screen readers and the tab order. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.opt { font-weight: 400; color: var(--ink-muted); }

.form-status { margin-top: 14px; font-weight: 600; font-size: 0.95rem; }
.form-status.ok { color: var(--green-dark); }

/* ---- Services index (We've got it ALL) ---- */
.services-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; }
.services-head .side-link { font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.svc-grid {
  margin-top: 40px;
  display: grid; gap: 0;
  border-top: 1px solid var(--hairline);
}
.svc {
  display: block; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--hairline);
  padding: 20px 6px;
  transition: background-color 140ms ease;
}
.svc:hover { background: var(--paper); color: var(--ink); }
.svc h3 { font-size: 1.02rem; margin: 0 0 3px; display: flex; align-items: baseline; gap: 10px; }
.svc h3::after { content: "→"; color: var(--green-dark); font-weight: 400; font-size: 0.9em; opacity: 0; transition: opacity 140ms ease; }
.svc:hover h3::after { opacity: 1; }
.svc p { font-size: 0.9rem; color: var(--ink-muted); margin: 0; }
@media (min-width: 700px) {
  .svc-grid { grid-template-columns: 1fr 1fr; column-gap: 44px; }
}
@media (min-width: 1000px) {
  .svc-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.svc-cta { margin-top: 34px; font-size: 0.98rem; color: var(--ink-muted); }
.svc-cta a { font-weight: 700; }

/* ---- Comparison table ---- */
.compare-wrap { margin-top: 40px; overflow-x: auto; }
.compare {
  width: 100%; border-collapse: collapse; min-width: 560px;
  background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius);
}
.compare th, .compare td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--hairline); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare thead th { font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }
.compare thead th:nth-child(2) { color: var(--ink-muted); }
.compare thead th:nth-child(3) { color: var(--green-dark); }
.compare tbody th { font-weight: 600; width: 30%; }
.compare td.them { color: var(--ink-muted); }
.compare td.us { font-weight: 600; }
.compare td.us::before { content: "✓ "; color: var(--green-dark); }

/* ---- Testimonial ---- */
.testimonial blockquote { margin: 0; max-width: 60ch; }
.testimonial blockquote p {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem); line-height: 1.55;
}
.testimonial blockquote p::before { content: "\201C"; color: var(--green); }
.testimonial blockquote p:last-of-type::after { content: "\201D"; color: var(--green); }
.testimonial footer { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.testimonial cite { font-style: normal; font-weight: 700; }
.testimonial .t-role { color: var(--dark-muted); font-size: 0.95rem; }
/* ---- Client quotes (multi-card, light section) ---- */
.quote-grid { margin-top: 44px; display: grid; gap: 28px; }
.quote-card {
  background: var(--paper); border: 1px solid var(--hairline);
  border-top: 4px solid var(--green); border-radius: var(--radius);
  padding: 30px 28px 26px; display: flex; flex-direction: column;
}
.quote-card blockquote { margin: 0; }
.quote-card blockquote p {
  font-family: var(--serif); font-size: 1.02rem; line-height: 1.62;
  color: var(--ink); margin: 0 0 14px;
}
.quote-card blockquote p:last-of-type { margin-bottom: 0; }
.quote-card blockquote p:first-of-type::before { content: "\201C"; color: var(--green); }
.quote-card blockquote p:last-of-type::after { content: "\201D"; color: var(--green); }
.quote-card footer { margin-top: auto; padding-top: 24px; }
.quote-card cite { font-style: normal; font-weight: 700; display: block; }
.quote-card .t-role {
  display: block; margin-top: 4px; color: var(--ink-muted); font-size: 0.92rem;
}
/* .badge is authored for dark sections (paper text); restate it for white cards */
.quote-card .badge { margin-top: 14px; color: var(--green-dark); border-color: var(--green); }
@media (min-width: 900px) {
  .quote-grid { grid-template-columns: repeat(3, 1fr); }
}

.badge {
  display: inline-block; border: 1px solid var(--green); color: var(--paper);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em;
  padding: 5px 12px; border-radius: 999px;
}

/* ---- Steps ---- */
.steps { margin-top: 40px; display: grid; gap: 30px; }
.step { border-top: 4px solid var(--green); padding-top: 18px; }
.step .step-n {
  font-family: var(--display); font-size: 1rem; color: var(--green-dark);
  display: block; margin-bottom: 8px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { color: var(--ink-muted); font-size: 0.98rem; margin: 0; }
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 44px; }
}

/* ---- FAQ ---- */
.faq { margin-top: 34px; border-top: 1px solid var(--hairline); max-width: 780px; }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between;
  align-items: center; gap: 18px; padding: 20px 4px; font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--display); color: var(--green-dark);
  font-size: 1.2rem; flex-shrink: 0; transition: transform 160ms ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding: 0 4px 22px; color: var(--ink-muted); max-width: 62ch; }
.faq .faq-a p { margin: 0 0 0.8em; }
.faq .faq-a p:last-child { margin-bottom: 0; }

/* ---- Final CTA band ---- */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 24ch; margin-left: auto; margin-right: auto; }
.cta-band .rule { margin-left: auto; margin-right: auto; }
.cta-band .cta-row { justify-content: center; }
.cta-band .band-phone { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.cta-band .band-phone:hover { text-decoration: underline; }

/* ---- Page title block (subpages) ---- */
.page-title { padding: 56px 0 8px; }
.page-title h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 18ch; }
.page-title .lede { font-size: 1.12rem; }

/* ---- Services page ---- */
.svc-group { margin-top: 30px; }
.svc-group h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.svc-list { border-top: 1px solid var(--hairline); margin-top: 26px; }
.svc-item {
  border-bottom: 1px solid var(--hairline);
  padding: 30px 0;
  display: grid; gap: 8px;
  scroll-margin-top: 90px;
}
.svc-item h3 { font-size: 1.2rem; margin: 0; }
.svc-item p { color: var(--ink-muted); margin: 0; max-width: 68ch; }
@media (min-width: 860px) {
  .svc-item { grid-template-columns: 300px 1fr; gap: 40px; }
}

/* ---- Clients page ---- */
.size-band { border-top: 1px solid var(--hairline); padding: 36px 0; display: grid; gap: 10px; }
.size-band:last-of-type { border-bottom: 1px solid var(--hairline); }
.size-band .size-label { font-family: var(--display); font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
.size-band p { color: var(--ink-muted); margin: 0; max-width: 60ch; }
.size-band ul { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.size-band li {
  border: 1px solid var(--hairline); background: var(--paper);
  border-radius: 999px; padding: 6px 14px; font-size: 0.88rem; font-weight: 600;
}
@media (min-width: 860px) {
  .size-band { grid-template-columns: 260px 1fr; gap: 40px; }
}
.submit-ways { margin-top: 40px; display: grid; gap: 14px; }
.submit-ways .way {
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--paper); padding: 18px 20px;
}
.submit-ways .way h3 { font-size: 1rem; margin: 0 0 4px; }
.submit-ways .way p { font-size: 0.92rem; color: var(--ink-muted); margin: 0; }
@media (min-width: 800px) { .submit-ways { grid-template-columns: repeat(4, 1fr); } }

/* ---- About page ---- */
.philosophy-lines { margin: 30px 0; }
.philosophy-lines p {
  font-family: var(--display); font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  margin: 0 0 10px; line-height: 1.2;
}
.philosophy-lines p span { color: var(--green); }
.about-sign { margin: 20px auto 0; max-width: min(360px, 100%); }
.prose { max-width: 66ch; }
.prose p { margin-bottom: 1.1em; }

/* ---- Team section (About) ---- */
.avatar {
  background: var(--green-tint);
  color: var(--green-dark);
  font-family: var(--display);
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-feature {
  margin-top: 40px;
  display: grid; gap: 28px;
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--paper); padding: 28px;
}
.team-feature .avatar { width: 150px; font-size: 3rem; }
@media (min-width: 820px) {
  .team-feature { grid-template-columns: 220px 1fr; gap: 44px; padding: 36px; }
  .team-feature .avatar { width: 100%; }
}
.t-name { font-size: 1.25rem; margin: 0 0 2px; }
.t-role {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--green-dark); margin: 0 0 14px;
}
.t-bio p { color: var(--ink-muted); font-size: 0.98rem; margin: 0 0 0.8em; max-width: 62ch; }
.t-bio p:last-child { margin-bottom: 0; }
.t-human { font-family: var(--serif); font-style: italic; }
.team-duo { margin-top: 28px; display: grid; gap: 28px; }
@media (min-width: 820px) { .team-duo { grid-template-columns: 1fr 1fr; } }
.team-card {
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--paper); padding: 26px;
}
.team-card .avatar { width: 84px; font-size: 1.7rem; margin-bottom: 18px; }
.team-grid { margin-top: 28px; display: grid; gap: 28px; }
@media (min-width: 700px) { .team-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1020px) { .team-grid { grid-template-columns: 1fr 1fr 1fr; } }
.team-grid .team-card .avatar { width: 64px; font-size: 1.3rem; margin-bottom: 14px; }
.team-grid .t-name { font-size: 1.08rem; }
.team-grid .t-bio p { font-size: 0.92rem; }

/* ---- Contact page ---- */
.contact-grid { display: grid; gap: 48px; margin-top: 14px; }
@media (min-width: 940px) { .contact-grid { grid-template-columns: 1.1fr 0.9fr; gap: 72px; } }
.contact-form label {
  display: block; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ink-muted); margin: 20px 0 4px;
}
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; font: inherit; color: var(--ink);
  border: 1px solid var(--border-ui); border-radius: 7px;
  padding: 12px 14px; background: var(--paper);
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form .btn { margin-top: 26px; }
.contact-form .pad-fine { max-width: 46ch; }
.contact-aside .aside-block { border-top: 4px solid var(--green); padding-top: 16px; margin-bottom: 34px; }
.contact-aside h2 { font-size: 0.85rem; font-family: var(--body); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; }
.contact-aside .big-phone {
  font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--ink); text-decoration: none; display: inline-block;
}
.contact-aside .big-phone:hover { color: var(--green-dark); }
.contact-aside p { margin: 0 0 4px; }
.contact-aside .note { color: var(--ink-muted); font-size: 0.95rem; }

/* ---- Legal pages ---- */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.35rem; margin-top: 2em; }
.legal .updated { color: var(--ink-muted); font-size: 0.95rem; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--paper);
  padding: 56px 0 40px;
  font-size: 0.95rem;
}
.footer-grid { display: grid; gap: 40px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-brand img { width: 260px; margin-bottom: 18px; }
.footer-brand p { color: var(--ink-muted); margin: 0 0 6px; }
.footer-brand a { color: var(--ink-muted); }
.site-footer h2 {
  font-family: var(--body); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted);
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer ul a { color: var(--ink); text-decoration: none; }
.site-footer ul a:hover { color: var(--green-dark); text-decoration: underline; }
.footer-legal {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: baseline;
  color: var(--ink-muted); font-size: 0.85rem;
}
.footer-legal a { color: var(--ink-muted); }

/* ---- Reveal (gated) ---- */
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity 480ms ease, transform 480ms ease; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .svc, .faq summary::after { transition: none; }
}
@media print {
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* Made by CoreRail credit ---------------------------------------------- */
.corerail-credit {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}
.corerail-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  text-decoration: none;
  color: inherit;
}
.corerail-badge:hover .corerail-badge__label,
.corerail-badge:focus-visible .corerail-badge__label {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.corerail-badge__label {
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.corerail-badge__art {
  height: 1.3em;
  width: auto;
  flex-shrink: 0;
  display: block;
}

.corerail-credit [fill="#6B7F5E"] { fill: var(--corerail-sage, #6B7F5E); }
/* ---------------------------------------------------------------------- */

/* ---- Training videos ---- */
/* The poster is a button, not a live player. See the facade note in main.js. */
.vid-poster {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper-warm);
  line-height: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.vid-poster img { display: block; width: 100%; height: auto; }
.vid-play {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -27px 0 0 -27px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(10, 10, 10, 0.35);
  transition: transform 0.18s ease;
}
/* Black triangle on brand green: the same contrast pairing the buttons use,
   because #249F5C cannot carry white. */
.vid-play::before {
  content: "";
  display: block;
  margin-left: 4px;
  border-left: 16px solid var(--ink);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}
.vid-poster:hover .vid-play,
.vid-poster:focus-visible .vid-play { transform: scale(1.09); }
.vid-time {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 7px;
  border-radius: 3px;
  background: rgba(10, 10, 10, 0.88);
  color: #FFFFFF;
  font-size: 0.78rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.vid-meta { display: grid; gap: 8px; align-content: start; }
.vid-frame {
  position: relative;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink);
}
.vid-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (min-width: 860px) {
  /* A player inside the 300px poster column would be unwatchable, so the row
     drops to one column once it is playing and the video takes the full width. */
  .vid-item.is-playing { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .vid-play { transition: none; }
  .vid-poster:hover .vid-play,
  .vid-poster:focus-visible .vid-play { transform: none; }
}
