/* =========================================================
   Rally — Brand Stylesheet
   Colors:  Black #1c1f2a · Gray #b9babc · Charcoal #545454
   ========================================================= */

:root {
  --black: #1c1f2a;
  --charcoal: #545454;
  --gray: #b9babc;
  --gray-light: #e9eaec;
  --gray-bg: #f5f6f7;
  --white: #ffffff;
  --ink: #1c1f2a;
  --muted: #545454;
  --line: #e2e3e6;
  --accent: #1c1f2a;
  /* Highlight accents — used sparingly */
  --blue: #083060;
  --blue-hover: #0a4a8f;
  --red: #b41e44;

  --maxw: 1140px;
  --maxw-wide: 1480px;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(28,31,42,.06), 0 8px 24px rgba(28,31,42,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.01em; color: var(--black); margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
/* Semantic h2 sized like a smaller subhead (keeps heading order intact) */
.h2-compact { font-size: 1.35rem; font-weight: 700; }
p { margin: 0 0 1.1em; }
a { color: var(--black); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .16em; font-size: .78rem;
  font-weight: 700; color: var(--blue); margin: 0 0 .8em;
  display: inline-flex; align-items: center; gap: 9px;
}
/* Small hexagon marker — recurring brand motif on every eyebrow */
.eyebrow::before {
  content: ""; flex: 0 0 auto; width: 11px; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='25,4 75,4 98,50 75,96 25,96 2,50' fill='none' stroke='%23545454' stroke-width='8'/%3E%3C/svg%3E") center/contain no-repeat;
}
.section-dark .eyebrow::before, .hero .eyebrow::before, .cta-band .eyebrow::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='25,4 75,4 98,50 75,96 25,96 2,50' fill='none' stroke='%23b9babc' stroke-width='8'/%3E%3C/svg%3E") center/contain no-repeat;
}
/* Inline content links get a subtle blue highlight (nav/footer/buttons stay neutral) */
main p a:not(.btn) { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
main p a:not(.btn):hover { color: var(--blue-hover); }
.lead { font-size: 1.2rem; color: var(--charcoal); }
.center { text-align: center; }
.muted { color: var(--muted); }
.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;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--black); color: #fff;
  padding: 10px 16px; z-index: 1000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Keyboard focus visibility (a11y) ---------- */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}
/* On dark heroes/sections, use a light ring so it stays visible */
.hero a:focus-visible, .hero button:focus-visible,
.section-dark a:focus-visible, .rallyx-theme .hero a:focus-visible,
.cb a:focus-visible, .cb button:focus-visible {
  outline-color: #fff;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--black); }
.brand:hover { text-decoration: none; }
.brand svg, .rally-mark { display: block; height: 26px; width: auto; color: inherit; }
.brand-logo { display: block; height: 32px; width: auto; }
.footer-grid .brand-logo { height: 26px; }
/* Logo is dark navy on transparent — invert to white on dark backgrounds */
.site-footer .brand-logo { filter: brightness(0) invert(1); }
.brand-word {
  font-weight: 800; font-size: 1.32rem; letter-spacing: .22em; color: inherit;
  line-height: 1; text-indent: .22em; /* balance trailing letter-spacing */
}
.site-footer .brand { color: #fff; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block; padding: 8px 11px; font-size: .95rem; font-weight: 600;
  color: var(--charcoal); border-radius: 8px; white-space: nowrap;
}
.nav-links a:hover { color: var(--black); background: var(--gray-bg); text-decoration: none; }
.nav-links a.active { color: var(--black); box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }
.nav-cta {
  background: var(--black) !important; color: #fff !important;
  padding: 9px 18px !important;
}
.nav-cta:hover { background: #2a2e3d !important; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
  color: var(--black);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column;
    align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; border-radius: 6px; }
  .nav-cta { text-align: center; margin-top: 6px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-weight: 650; font-size: 1rem; cursor: pointer;
  padding: 14px 26px; border-radius: 8px; border: 1px solid transparent;
  transition: transform .05s ease, background .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--black); color: #fff; }
.btn-primary:hover { background: #2a2e3d; color: #fff; }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-ghost { background: var(--white); color: var(--blue); border-color: var(--line); border-bottom-color: var(--red); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-hover); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-sm { padding: 56px 0; }
.section-alt { background: var(--gray-bg); }
.section-dark { background: var(--black); color: var(--gray-light); }
/* Faint hexagon-cluster accent for dark bands */
.hex-band { position: relative; overflow: hidden; }
.hex-band::before {
  content: ""; position: absolute; top: -70px; right: -70px; width: 340px; height: 340px; z-index: 0; pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='25,4 75,4 98,50 75,96 25,96 2,50' fill='none' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='2'/%3E%3C/svg%3E") 0 0/180px 180px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='25,4 75,4 98,50 75,96 25,96 2,50' fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='2'/%3E%3C/svg%3E") 150px 96px/180px 180px no-repeat;
}
.hex-band > .container { position: relative; z-index: 1; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .eyebrow { color: var(--gray); }
.section-dark a { color: #fff; }
.section-head { max-width: 720px; margin: 0 0 48px; }
.section-head.center { margin-left: auto; margin-right: auto; }
/* Accent rule under section titles (uses both highlight colors) */
.section-head h2::after {
  content: ""; display: block; width: 60px; height: 4px; margin-top: 18px;
  border-radius: 3px; background: linear-gradient(90deg, var(--blue), var(--red));
}
.section-head.center h2::after { margin-left: auto; margin-right: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(185,186,188,.16), transparent 60%),
    linear-gradient(160deg, #1c1f2a 0%, #23273460 40%, #1c1f2a 100%),
    var(--black);
}
.hero { min-height: 80vh; display: flex; align-items: center; }
.hero::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; z-index: 5; background: linear-gradient(90deg, var(--blue), var(--red)); }
.hero .container { position: relative; z-index: 3; padding-top: 100px; padding-bottom: 100px; width: 100%; }
/* Header (nav) and hero content run wider than body sections */
.site-header .container, .hero .container { max-width: var(--maxw-wide); }

/* Hero illustration + legibility overlay */
.hero-art { position: absolute; inset: 0; z-index: 1; }
.hero-art .hero-svg { width: 100%; height: 100%; display: block; }
/* Drop a file at assets/hero.jpg and it covers the illustration automatically */
.hero-photo { position: absolute; inset: 0; z-index: 1; background-image: url('hero.webp'); background-size: cover; background-position: center; }
/* Background video hero */
.hero-video { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: rgba(15,17,24,.48);
}
/* Even, non-directional scrim + text shadow keeps the imagery fully visible
   while keeping hero text legible (replaces the old left-to-right gradient). */
.hero h1, .hero .lead, .hero .eyebrow, .hero .hero-services,
.hero .scripture p, .hero .scripture cite {
  text-shadow: 0 1px 3px rgba(0,0,0,.75), 0 2px 20px rgba(0,0,0,.6);
}
@media (max-width: 760px) {
  .hero-overlay { background: rgba(15,17,24,.58); }
  .hero .container { padding-top: 88px; padding-bottom: 88px; }
}

/* Standalone scripture band */
.scripture-band { background: var(--gray-bg); padding: 40px 0; }
.scripture-band .verse { max-width: 64ch; margin: 0 auto; text-align: center; }
.scripture-band .verse-mark { width: 48px; height: 3px; border-radius: 3px; margin: 0 auto 16px; background: linear-gradient(90deg, var(--blue), var(--red)); }
.scripture-band .verse p { font-style: italic; font-size: 1.05rem; line-height: 1.55; color: var(--charcoal); margin: 0 0 .6em; }
.scripture-band .verse cite { font-style: normal; color: var(--charcoal); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { color: #fff; max-width: 16ch; }
.hero .eyebrow { color: rgba(255,255,255,.92); }
.hero .lead { color: #fff; max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-pattern {
  position: absolute; inset: 0; z-index: 1; opacity: .07;
  background-image: linear-gradient(var(--gray) 1px, transparent 1px),
    linear-gradient(90deg, var(--gray) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 70% 30%, #000, transparent 70%);
}

/* Scripture block */
.scripture {
  border-left: 3px solid var(--gray); padding: 4px 0 4px 22px; margin: 26px 0 0;
  max-width: 60ch;
}
.scripture p { font-style: italic; color: var(--gray-light); font-size: 1.05rem; margin: 0 0 .4em; }
.scripture cite { font-style: normal; color: var(--gray); font-size: .9rem; letter-spacing: .03em; }

/* ---------- Grid / Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); height: 100%;
}
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
/* Card used as a link */
a.card { display: block; color: inherit; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
a.card:hover { border-color: var(--blue); box-shadow: 0 10px 26px rgba(28,31,42,.12); transform: translateY(-2px); }
a.card h3, a.card p { color: inherit; text-decoration: none; }

/* Vertical link cards */
.vcard {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.vcard:hover {
  text-decoration: none; transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(28,31,42,.12); border-color: var(--charcoal);
}
/* Hexagon icon frame — echoes the values honeycomb */
.hexframe {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 66px; height: 66px; margin-bottom: 18px;
}
.hexframe::before {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='25,4 75,4 98,50 75,96 25,96 2,50' fill='none' stroke='%23b9babc' stroke-width='4'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform .15s ease;
}
.vcard:hover .hexframe::before { transform: scale(1.06); }
.vcard .vicon {
  width: 30px; height: 30px; color: var(--blue); position: relative;
  transition: color .15s ease;
}
.hexframe .vicon { margin: 0; }
.vcard h3 { color: var(--black); }
.vcard p { color: var(--charcoal); flex: 1; }
.vcard .vmore { font-weight: 700; color: var(--blue); margin-top: 14px; font-size: .95rem; }
.vcard:hover .vmore { text-decoration: underline; }
/* Per-vertical icon accent colors (specificity must beat .vcard .vicon) */
.vcard .vicon.vicon-construction { color: #083060; }
.vcard .vicon.vicon-fleet        { color: #b41e44; }
.vcard .vicon.vicon-healthcare   { color: #0097b2; }
.vcard .vicon.vicon-impact       { color: #2f8f4e; }
.vcard .vicon.vicon-defense      { color: #43597a; }
.vcard .vicon.vicon-platform     { color: #ffb71b; }
/* RallyX card — dark treatment to set the platform apart from the five verticals */
.vcard.vcard-dark { background: var(--black); border-color: var(--black); }
.vcard.vcard-dark h3 { color: #fff; }
.vcard.vcard-dark p { color: var(--gray-light); }
.vcard.vcard-dark .vmore { color: #ffb71b; }
.vcard.vcard-dark:hover { border-color: #ffb71b; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.vcard.vcard-dark .hexframe::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='25,4 75,4 98,50 75,96 25,96 2,50' fill='none' stroke='%23ffb71b' stroke-width='4'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Fleet "What Partners Get" — photo panel with dark scrim */
.fleet-shop { position: relative; overflow: hidden; background: var(--black); }
.fleet-shop::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: url('fleet-shop.jpg') center/cover no-repeat;
  opacity: 0.38;
}
.fleet-shop::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(28,31,42,.55), rgba(28,31,42,.78));
}
.fleet-shop > .container { position: relative; z-index: 1; }
.fleet-shop .checklist svg { color: #6ea8d8; }
.sherpa-band { position: relative; overflow: hidden; background: var(--black); }
.sherpa-band::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: url('sherpa-bg.jpg') center/cover no-repeat;
  opacity: 0.5;
}
.sherpa-band::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(90deg, rgba(20,22,30,.94) 0%, rgba(20,22,30,.82) 48%, rgba(20,22,30,.5) 100%);
}
.sherpa-band > .container { position: relative; z-index: 1; }
.sherpa-band .lead { color: var(--gray-light); }
.sherpa-band .prose p { color: rgba(233,234,236,.92); }
.sherpa-band .prose strong { color: #fff; }
.csg-band { position: relative; overflow: hidden; background: var(--black); }
.csg-band::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: url('defense-csg-bg.jpg') center/cover no-repeat;
  opacity: 0.55;
}
.csg-band::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(90deg, rgba(18,20,28,.86) 0%, rgba(18,20,28,.72) 50%, rgba(18,20,28,.46) 100%);
}
.csg-band > .container { position: relative; z-index: 1; }
.csg-band .prose p { color: rgba(233,234,236,.92); }
.csg-logo-link { display: inline-block; line-height: 0; margin: 0 0 18px; }
.csg-logo { display: block; height: 50px; width: auto; max-width: 100%; }

/* Verticals section background image (faded, behind content) */
.verticals-bg { position: relative; overflow: hidden; }
.verticals-bg::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: url('verticals.webp') center/cover no-repeat;
  opacity: 0.1;
}
.verticals-bg > .container { position: relative; z-index: 1; }

/* How We Work icons */
.hww-icon { width: 16px; height: 16px; color: #ffb71b; display: inline-block; vertical-align: -2px; margin-right: 8px; flex: 0 0 auto; }

/* Values graphic */
.values-layout { display: grid; grid-template-columns: 0.72fr 1.28fr; gap: 40px; align-items: center; }
.values-layout .section-head { max-width: 30ch; }
.values-graphic { display: block; margin: 0; width: 100%; max-width: 760px; height: auto; margin-left: auto; }
@media (max-width: 860px) {
  .values-layout { grid-template-columns: 1fr; gap: 8px; }
  .values-graphic { margin: 0 auto; }
}

/* Values list */
.values { display: grid; gap: 2px; }
.value-item {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue);
  padding: 22px 24px;
}
.value-item:nth-child(even) { border-left-color: var(--red); }
.value-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.value-item:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.value-item h3 { display: flex; align-items: baseline; gap: 12px; margin-bottom: .25em; }
.value-item .vk { color: var(--black); text-transform: uppercase; letter-spacing: .04em; }
.value-item p { margin: 0; color: var(--charcoal); }

/* Feature list with checks */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--blue); margin-top: 3px; }

/* Full-width hairline divider (between content and logo strip) */
.band-divider { width: 420px; max-width: 100%; height: 3px; border: 0; border-radius: 2px; margin: 32px 0 0; background: linear-gradient(90deg, var(--gray) 0%, var(--red) 100%); }

/* Horizontal auto-scrolling company logo strip */
.logo-marquee {
  position: relative; overflow: hidden; margin-top: 10px; padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.logo-track { display: flex; align-items: center; gap: 64px; width: max-content; animation: logo-scroll 45s linear infinite; }
.logo-marquee:hover .logo-track { animation-play-state: paused; }
.logo-item { flex: 0 0 auto; display: inline-flex; align-items: center; }
.logo-item img { height: 82px; width: auto; max-width: 275px; object-fit: contain; transition: transform .15s ease, filter .15s ease; }
.logo-item:hover img { transform: scale(1.05); }
@keyframes logo-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .logo-track { animation: none; }
  .logo-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}

/* Company link rows */
.companies { display: grid; gap: 14px; margin-top: 8px; }
.company {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue);
  border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow);
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.company:hover { text-decoration: none; border-color: var(--blue); transform: translateX(2px); box-shadow: 0 8px 24px rgba(8,48,96,.12); }
.company .cname { font-weight: 700; color: var(--black); }
.company .cdesc { color: var(--charcoal); font-size: .95rem; }
.company .arrow { color: var(--blue); flex: 0 0 auto; transition: transform .12s ease; }
.company:hover .arrow { transform: translateX(3px); }

.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #fff; background: var(--blue);
  border-radius: 999px; padding: 3px 10px; margin-left: 8px; vertical-align: middle;
}

/* Breadcrumb */
.breadcrumb { font-size: .9rem; color: var(--charcoal); padding: 18px 0 0; }
.breadcrumb a { color: var(--charcoal); }
.breadcrumb span { color: var(--gray); margin: 0 6px; }

/* Hero services list (pipe-separated) */
.hero-services { margin-top: 18px; color: var(--gray-light); font-weight: 600; font-size: 1.02rem; letter-spacing: .02em; line-height: 1.7; max-width: 46ch; }

/* Healthcare theme — teal accent in the lines (gray → Rally Health blue) */
.hero-rule.hero-rule--health { background: linear-gradient(90deg, var(--gray) 0%, #0097b2 100%); }
.health-theme .hero::before { background: linear-gradient(90deg, var(--gray) 0%, #0097b2 100%); }
.health-theme .section-head h2::after,
.health-theme .cta-band::before { background: linear-gradient(90deg, var(--gray) 0%, #0097b2 100%); }
.hero-rule.hero-rule--impact { background: linear-gradient(90deg, var(--gray) 0%, #2f8f4e 100%); }
.impact-theme .hero::before { background: linear-gradient(90deg, var(--gray) 0%, #2f8f4e 100%); }
.impact-theme .section-head h2::after,
.impact-theme .cta-band::before { background: linear-gradient(90deg, var(--gray) 0%, #2f8f4e 100%); }
.hero-rule.hero-rule--defense { background: linear-gradient(90deg, var(--gray) 0%, #43597a 100%); }
.defense-theme .hero::before { background: linear-gradient(90deg, var(--gray) 0%, #43597a 100%); }
.defense-theme .section-head h2::after,
.defense-theme .cta-band::before { background: linear-gradient(90deg, var(--gray) 0%, #43597a 100%); }
.hero-rule.hero-rule--rallyx { background: linear-gradient(90deg, var(--gray) 0%, #ffb71b 100%); }
.rallyx-theme .hero::before { background: linear-gradient(90deg, var(--gray) 0%, #ffb71b 100%); }
.rallyx-theme .section-head h2::after,
.rallyx-theme .cta-band::before { background: linear-gradient(90deg, var(--gray) 0%, #ffb71b 100%); }
.hww-band {
  background-image:
    linear-gradient(rgba(16,18,26,.82), rgba(16,18,26,.86)),
    url('rallyx-hww-bg.jpg');
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.culture-line { margin: -30px 0 32px; font-weight: 600; font-size: 1.12rem; color: var(--black); letter-spacing: .01em; }
/* Team bios — collapsed by default, expand on hover / tap / focus */
.team-grid { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
@media (min-width: 760px) { .team-grid { grid-template-columns: 1fr 1fr; } }
.bio-card { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); cursor: pointer; transition: box-shadow .2s ease, border-color .2s ease; outline: none; }
.bio-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--gray) 0%, #ffb71b 100%); }
.bio-card:hover, .bio-card:focus-within { border-color: rgba(169,118,10,.45); box-shadow: 0 10px 26px rgba(28,31,42,.10); }
.bio-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bio-card h3 { margin: 0 0 3px; }
.bio-role { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: #a9760a; margin: 0; }
.bio-chevron { width: 20px; height: 20px; color: #a9760a; flex: 0 0 auto; margin-top: 3px; transition: transform .3s ease; }
.bio-card:hover .bio-chevron, .bio-card:focus-within .bio-chevron { transform: rotate(180deg); }
.bio-body { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .45s ease, opacity .3s ease, margin-top .3s ease; }
.bio-card:hover .bio-body, .bio-card:focus-within .bio-body { max-height: 800px; opacity: 1; margin-top: 14px; }
.bio-card p { color: #2b2f3a; font-size: .96rem; line-height: 1.6; margin: 0; }
/* Conditional trade picker on the contact form */
.field-label { display: block; font-weight: 600; color: var(--black); margin-bottom: 10px; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.checkbox { display: flex; align-items: center; gap: 9px; font-weight: 400; color: var(--charcoal); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; accent-color: var(--blue); }
/* Keep trade checkboxes inline when nested in a .field (overrides .field label/.field input) */
.field .checkbox { display: flex; align-items: center; gap: 9px; margin-bottom: 0; font-weight: 400; }
.field .checkbox input { width: 16px; height: 16px; padding: 0; margin: 0; border-radius: 4px; flex: 0 0 auto; }
[hidden] { display: none !important; }
.benefits-list { list-style: none; padding: 0; margin: 8px 0 10px; display: grid; grid-template-columns: 1fr; gap: 11px 30px; max-width: 70ch; }
@media (min-width: 620px) { .benefits-list { grid-template-columns: 1fr 1fr; } }
.benefits-list li { position: relative; padding-left: 28px; color: #2b2f3a; }
.benefits-list li::before {
  content: ""; position: absolute; left: 0; top: 0.32em; width: 15px; height: 15px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffb71b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.sherpa-logo-link { display: inline-block; margin: 0 0 14px; line-height: 0; }
.sherpa-logo-link img { width: auto; height: 40px; max-width: 100%; display: block; }

/* Thin divider rule (e.g., between hero logo and heading) */
.hero-brandblock { display: block; width: fit-content; }
.fleet-lockup { display: block; }
.fleet-sub { display: block; text-align: right; color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .3em; font-size: .82rem; line-height: 1; margin-top: 8px; padding-right: .06em; }
.hero-brandblock .company-logo { margin: 0; }
.hero-rule { display: block; width: 100%; height: 3px; border: 0; border-radius: 2px; margin: 18px 0; background: linear-gradient(90deg, var(--gray) 0%, var(--red) 100%); }

/* Vertical company logo in hero */
.company-logo { display: block; height: auto; width: auto; max-width: 420px; max-height: 88px; margin: 0 0 22px; }
@media (max-width: 620px) { .company-logo { max-width: 280px; } }

/* Prose */
.prose { max-width: 70ch; }
.prose p { color: #2b2f3a; }
.prose h2 { margin-top: 1.4em; }

/* Pills row */
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 0; }
.pill {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  font-size: .92rem; font-weight: 600; color: var(--charcoal); background: #fff;
}

/* CTA band */
.cta-band { position: relative; overflow: hidden; background: var(--black); color: #fff; border-radius: 16px; padding: 56px 40px; text-align: center; }
.cta-band::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--blue), var(--red)); }
.cta-band::after {
  content: ""; position: absolute; right: -46px; bottom: -64px; width: 280px; height: 280px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='25,4 75,4 98,50 75,96 25,96 2,50' fill='none' stroke='%23ffffff' stroke-opacity='0.12' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--gray-light); max-width: 56ch; margin: 0 auto 24px; }

/* ---------- Contact form ---------- */
.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 650; font-size: .95rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8,48,96,.14);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--muted); }
.form-success {
  display: none; background: #eef7ee; border: 1px solid #cfe6cf; color: #235c2b;
  padding: 14px 16px; border-radius: 8px; margin-bottom: 18px;
}
.form-success.show { display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: var(--gray-light); padding: 56px 0 32px; }
.site-footer a { color: var(--gray-light); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h3 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid .brand svg { height: 28px; }
.footer-tag { color: var(--gray); max-width: 34ch; margin-top: 16px; font-size: .95rem; }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .85rem; color: var(--gray);
}

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
/* Keep on one line only when there's room; wrap on smaller screens */
@media (min-width: 960px) { .nowrap-lg { white-space: nowrap; } }
/* Line break that only applies on larger screens */
.br-lg { display: none; }
@media (min-width: 960px) { .br-lg { display: inline; } }
/* Hero headline that should hold two lines on desktop */
@media (min-width: 960px) { .hero h1.hero-h1-2line { max-width: none; } }
@media (min-width: 960px) { .hero .lead.lead-2line { max-width: none; } }

/* Grayscale company logo wall (home page) */
.logo-wall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px 32px; align-items: center; justify-items: center; max-width: 1040px; margin: 0 auto; }
@media (min-width: 560px) { .logo-wall { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 880px) { .logo-wall { grid-template-columns: repeat(5, 1fr); } }
.logo-wall-item { display: flex; align-items: center; justify-content: center; width: 100%; height: 66px; text-decoration: none; }
.logo-wall-item img { max-width: 100%; max-height: 50px; width: auto; height: auto; object-fit: contain; opacity: .6; transition: opacity .25s ease; }
.logo-wall-item img:hover { opacity: 1; }
.logo-wall-item img[alt="The Florida Centers of Sleep Medicine"] { max-height: 64px; }

/* Linked company logo grid (e.g. healthcare Our Companies) */
.logo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 980px; margin: 0 auto; }
@media (min-width: 820px) { .logo-grid { grid-template-columns: repeat(4, 1fr); } }
.logo-grid a {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #fff 0%, #f7f9fa 100%);
  border: 1px solid rgba(28,31,42,.07);
  border-radius: 18px;
  padding: 30px 24px 34px; min-height: 168px;
  box-shadow: 0 1px 2px rgba(28,31,42,.05);
  transition: box-shadow .28s ease, transform .28s ease, border-color .28s ease;
}
/* Gray -> teal gradient base bar (brand signature divider) */
.logo-grid a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--gray) 0%, #0097b2 100%);
  opacity: .85;
  transition: height .3s ease, opacity .3s ease;
}
.logo-grid a:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(28,31,42,.13);
  border-color: rgba(0,151,178,.28);
}
.logo-grid a:hover::after { height: 5px; opacity: 1; }
.logo-grid img {
  position: relative; z-index: 1;
  max-width: 100%; max-height: 80px; width: auto; height: auto; object-fit: contain;
  filter: saturate(.8); opacity: .92;
  transition: filter .28s ease, opacity .28s ease, transform .28s ease;
}
.logo-grid a:hover img { filter: saturate(1); opacity: 1; transform: scale(1.04); }

.stack > * + * { margin-top: 18px; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- FAQ (accessible native accordion) ---------- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 20px 44px 20px 0; font-weight: 700; font-size: 1.08rem; color: var(--black);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; font-weight: 400; line-height: 1; color: var(--blue); transition: transform .2s ease;
}
.faq-item[open] summary::after { content: "\2013"; }
.faq-item .faq-a { padding: 0 44px 22px 0; color: var(--charcoal); line-height: 1.6; max-width: 72ch; }
.faq-item .faq-a a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
