/* ============================================================
   PEO PUBLIC SITE — v1.1 DESIGN SYSTEM
   Static, typographic + curated brochure imagery.
   Entity color rules (Michael's override, 2026-06-13):
     body (default)  — global chrome: neutral ink/white,
                       PEO red+blue reserved for wordmark stripe & home accents
     body.theme-pg   — PEO Group: BLUE — navy primary, sky/engineering-blue accent
     body.theme-id   — Ideal Laundry: TEAL/GREEN — teal primary, aqua/health-green accent
     body.theme-pt   — PEO Tech: RED — deep industrial red primary, warm safety-red accent
   Type: Playfair Display (display) · Inter (body) · Prompt (future Thai)
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --red: #BA1F24;            /* PEO Red */
  --blue: #070FBE;           /* PEO Blue */
  --navy: #0A1F5C;           /* deep navy ground derived from PEO Blue */
  --ink: #1a1a1a;
  --paper: #ffffff;
  --tint: #f4f4f2;
  --line: #e2e1dd;
  --muted: #5a5a56;

  /* role tokens — overridden per theme */
  --primary: var(--red);     /* identity color, used sparingly */
  --structural: var(--navy); /* dark grounds, headings */
  --accent: var(--blue);     /* links, secondary accents */
  --emphasis: var(--red);    /* rules, markers */

  --display: 'Playfair Display', Georgia, serif;
  --body: 'Inter', 'Prompt', -apple-system, sans-serif;
  --thai: 'Prompt', 'Inter', sans-serif;
}

/* entity identity tokens — used by cards/tiles on any page */
:root {
  --pg: #0A2A5E;             /* PEO Group navy */
  --pg-accent: #2D7DD2;      /* engineering / sky blue */
  --id: #409098;             /* Ideal teal */
  --id-accent: #44A08D;      /* clean aqua / healthcare green */
  --pt: #A4161A;             /* PEO Tech deep industrial red */
  --pt-accent: #E5383B;      /* warm / safety red */
}

/* PEO Group — BLUE. Engineering, system design, lifecycle. */
.theme-pg {
  --primary: var(--pg);
  --structural: var(--pg);
  --accent: var(--pg-accent);
  --emphasis: var(--pg-accent);
  --tint: #f2f6fb;
  --line: #dbe4f0;
}

/* Ideal Laundry — TEAL/GREEN. Clinically calm; aqua/health-green accent. */
.theme-id {
  --primary: var(--id);
  --structural: #1d3a3e;
  --accent: var(--id-accent);
  --emphasis: var(--id);
  --tint: #f1f6f6;
  --line: #d9e6e7;
}

/* PEO Tech — RED. Mobility, safety, reliability. */
.theme-pt {
  --primary: var(--pt);
  --structural: #6E1014;
  --accent: var(--pt);
  --emphasis: var(--pt-accent);
  --tint: #faf3f3;
  --line: #eedbdb;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ---------- signature stripe device ---------- */
.stripe { position: relative; height: 8px; background: var(--primary); }
.stripe::after {
  content: ''; position: absolute; left: 0; right: 0; top: 3px; height: 1.6px;
  background: #fff;
}

/* ---------- nav ---------- */
.site-nav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-nav .nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px 24px;
  padding: 18px 0;
}
.nav-mark {
  font-family: var(--display); font-weight: 800; font-size: 1.45rem;
  color: var(--ink); letter-spacing: 0.01em; position: relative;
  text-decoration: none;
}
.nav-mark:hover { text-decoration: none; }
.nav-mark .mark-word { position: relative; display: inline-block; }
.nav-mark .mark-stripe {
  position: absolute; left: -2px; right: -2px; top: 52%; height: 2px;
  background: var(--primary); opacity: 0.85; pointer-events: none;
}
.nav-mark .mark-sub {
  display: block; font-family: var(--body); font-weight: 600; font-size: 0.58rem;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted);
  margin-top: 2px;
}
.nav-links { display: flex; flex-wrap: wrap; gap: 4px 26px; list-style: none; }
.nav-links a {
  font-size: 0.86rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--ink); text-decoration: none;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.nav-links a:hover { border-bottom-color: var(--primary); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--primary); color: var(--structural); }

/* ---------- typographic hero ---------- */
.hero {
  background: var(--structural);
  color: #fff;
  padding: 88px 0 92px;
}
.hero .eyebrow {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.28em;
  text-transform: uppercase; color: rgba(255,255,255,0.78);
}
.hero .eyebrow::before {
  content: ''; display: inline-block; width: 44px; height: 3px;
  background: var(--emphasis); vertical-align: middle; margin-right: 16px;
}
.hero h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.12;
  margin: 26px 0 24px; max-width: 19em;
}
.hero .lede {
  font-size: 1.12rem; line-height: 1.75; max-width: 44em;
  color: rgba(255,255,255,0.92);
}
.hero .tagline {
  margin-top: 22px; font-style: italic; font-family: var(--display);
  font-size: 1.15rem; color: rgba(255,255,255,0.88);
}
.hero .hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-block; padding: 13px 28px;
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.05em;
  border: 2px solid transparent; text-decoration: none; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--emphasis); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-solid { background: var(--structural); color: #fff; }
.btn-solid:hover { filter: brightness(1.15); }

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section.tinted { background: var(--tint); }
.section-label {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.section h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.2;
  color: var(--structural); margin-bottom: 22px; max-width: 22em;
}
.section h3 {
  font-family: var(--display); font-weight: 700; font-size: 1.25rem;
  color: var(--structural); margin: 30px 0 10px;
}
.section p { max-width: 46em; margin-bottom: 16px; }
.section ul, .section ol { max-width: 44em; margin: 0 0 16px 1.2em; }
.section li { margin-bottom: 8px; }
.rule-accent {
  width: 56px; height: 4px; background: var(--emphasis);
  border: 0; margin: 0 0 26px;
}

/* ---------- card grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-top: 4px solid var(--primary);
  padding: 28px 26px;
}
.card h3 { margin-top: 0; }
.card .card-kicker {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.card p { font-size: 0.96rem; margin-bottom: 14px; }
.card .card-link { font-weight: 600; font-size: 0.9rem; }
.card.card-pending { border-top-color: var(--line); background: var(--tint); }
.card.card-pending h3 { color: var(--muted); }
.badge-soon {
  display: inline-block; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line);
  padding: 3px 10px; margin-top: 4px; background: var(--paper);
}

/* entity color coding — home three-company grid + expertise hub groups */
.card.entity-pg { border-top-color: var(--pg); }
.card.entity-id { border-top-color: var(--id); }
.card.entity-pt { border-top-color: var(--pt); }
.card.entity-pg .card-link { color: var(--pg-accent); }
.card.entity-id .card-link { color: var(--id-accent); }
.card.entity-pt .card-link { color: var(--pt); }
.card.entity-pg .card-kicker { color: var(--pg); }
.card.entity-id .card-kicker { color: var(--id); }
.card.entity-pt .card-kicker { color: var(--pt); }

/* ---------- flow strip (diagram-style process band) ---------- */
.flow-strip {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 0;
  counter-reset: step; margin: 34px 0 10px;
}
.flow-step {
  flex: 1 1 0; min-width: 168px; position: relative;
  background: var(--paper); border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  padding: 22px 20px 20px; margin: 0 14px 14px 0;
}
.flow-step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--display); font-weight: 800;
  font-size: 1.5rem; color: var(--primary); margin-bottom: 8px;
}
.flow-step::after {
  content: '\2192'; position: absolute; right: -14px; top: 50%;
  transform: translate(50%, -50%);
  color: var(--muted); font-size: 1.1rem; background: transparent;
}
.flow-step:last-child::after { content: none; }
.flow-step h4 { font-size: 0.98rem; font-weight: 700; color: var(--structural); margin-bottom: 6px; line-height: 1.35; }
.flow-step p { font-size: 0.86rem; color: var(--muted); line-height: 1.55; margin: 0; }

/* compact word-chain flow (Collect → Segregate → ...) */
.flow-chain {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 0;
  margin: 26px 0 18px; padding: 0; list-style: none;
}
.flow-chain li {
  font-family: var(--display); font-weight: 700; font-size: 1.18rem;
  color: var(--structural); margin: 0;
  padding: 10px 18px; background: var(--tint); border: 1px solid var(--line);
}
.flow-chain li + li::before {
  content: '\2192'; font-family: var(--body); font-weight: 400;
  color: var(--emphasis); margin-right: 18px; position: relative; left: -18px;
}
.flow-chain li + li { padding-left: 0; }
.flow-chain li + li { background: var(--tint); }
.flow-chain li span { padding-left: 18px; }
.flow-chain li:first-child span { padding-left: 0; }

/* ---------- quiet supporting row ---------- */
.quiet-row {
  display: flex; flex-wrap: wrap; gap: 10px 14px; list-style: none;
  margin: 26px 0 0; padding: 0;
}
.quiet-row li {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--muted); border: 1px solid var(--line);
  padding: 7px 16px; background: var(--paper); margin: 0;
}

/* ---------- sector band ---------- */
.sector-band { text-align: center; }
.sector-list {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 12px;
  list-style: none; margin: 0 0 26px; padding: 0;
}
.sector-list li {
  font-family: var(--display); font-weight: 700; font-size: 1.12rem;
  color: var(--structural); margin: 0;
}
.sector-list li + li::before { content: '\00B7'; color: var(--emphasis); margin-right: 12px; }
.sector-band .sector-note { max-width: 40em; margin: 0 auto; color: var(--muted); }

/* ---------- checklist ---------- */
.checklist { list-style: none; margin: 26px 0; max-width: 46em; counter-reset: item; }
.checklist li {
  position: relative; padding: 16px 18px 16px 64px; margin-bottom: 10px;
  background: var(--tint); border: 1px solid var(--line);
}
.checklist li::before {
  counter-increment: item; content: counter(item, decimal-leading-zero);
  position: absolute; left: 18px; top: 16px;
  font-family: var(--display); font-weight: 800; font-size: 1.1rem;
  color: var(--primary);
}
.checklist li strong { color: var(--structural); }

/* ---------- breadcrumbs ---------- */
.breadcrumbs {
  font-size: 0.82rem; color: var(--muted); padding: 16px 0 0;
}
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: '/'; margin-right: 6px; color: var(--line); }
.breadcrumbs a { color: var(--muted); }

/* ---------- article (expertise body) ---------- */
.article-meta {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 16px;
}
.related-block { border: 1px solid var(--line); border-left: 4px solid var(--primary); padding: 26px 28px; background: var(--tint); }
.related-block h3 { margin-top: 0; }
.related-block ul { list-style: none; margin-left: 0; }
.related-block li { margin-bottom: 10px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--structural); color: #fff; padding: 64px 0; }
.cta-band h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 14px; }
.cta-band p { max-width: 44em; color: rgba(255,255,255,0.9); margin-bottom: 26px; }

/* ---------- contact ---------- */
.contact-block { border: 1px solid var(--line); border-top: 4px solid var(--primary); padding: 28px 26px; background: var(--paper); }
.contact-block.entity-pg { border-top-color: var(--pg); }
.contact-block.entity-id { border-top-color: var(--id); }
.contact-block.entity-pt { border-top-color: var(--pt); }
.contact-block h3 { margin-top: 0; }
.contact-block .contact-line { font-size: 0.98rem; margin-bottom: 6px; }
.contact-block .contact-line a { font-weight: 600; }

.form-grid { display: grid; gap: 18px; max-width: 640px; }
.form-grid label { font-size: 0.85rem; font-weight: 600; color: var(--structural); display: block; margin-bottom: 6px; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; padding: 12px 14px; font-family: var(--body); font-size: 0.95rem;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  outline: 2px solid var(--primary); outline-offset: -1px;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink); color: rgba(255,255,255,0.82);
  padding: 56px 0 36px; font-size: 0.9rem;
}
.site-footer .footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 36px; }
@media (max-width: 880px) { .site-footer .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: #fff; margin-bottom: 12px;
}
.site-footer a { color: rgba(255,255,255,0.82); }
.site-footer a:hover { color: #fff; }
.site-footer .footer-line { margin-bottom: 4px; }
.site-footer .footer-base {
  border-top: 1px solid rgba(255,255,255,0.18); padding-top: 22px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  font-size: 0.8rem; color: rgba(255,255,255,0.6);
}
.site-footer .footer-base nav { display: flex; flex-wrap: wrap; gap: 18px; }

/* ---------- imagery: split hero ---------- */
.hero-split .hero-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px; align-items: center;
}
.hero-media { margin: 0; }
.hero-media img {
  display: block; width: 100%; height: auto;
  border: 1px solid rgba(255,255,255,0.22);
}
@media (max-width: 880px) {
  .hero-split .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-media { max-width: 520px; }
}

/* ---------- imagery: section media ---------- */
.media-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center;
}
.media-split .media-copy p { max-width: none; }
.media-fig { margin: 0; }
.media-fig img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line);
}
.media-fig.crop img { aspect-ratio: 4 / 3; object-fit: cover; }
.media-fig figcaption {
  font-size: 0.78rem; letter-spacing: 0.06em; color: var(--muted);
  margin-top: 10px;
}
@media (max-width: 880px) {
  .media-split { grid-template-columns: 1fr; gap: 30px; }
}

/* expertise article header image */
.article-fig { margin: 0 0 34px; }
.article-fig img {
  display: block; width: 100%; height: auto; max-height: 420px;
  object-fit: cover; border: 1px solid var(--line);
}

/* ---------- tile grid (what we help operators control) ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
@media (max-width: 880px) { .tile-grid { grid-template-columns: 1fr; } }
.tile {
  background: var(--paper); border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  padding: 20px 20px 18px;
}
.tile h4 { font-size: 0.98rem; font-weight: 700; color: var(--structural); margin-bottom: 6px; }
.tile p { font-size: 0.88rem; color: var(--muted); line-height: 1.55; margin: 0; max-width: none; }
.tile.tile-pg { border-left-color: var(--pg); }
.tile.tile-id { border-left-color: var(--id); }
.tile.tile-pt { border-left-color: var(--pt); }

/* ---------- trigger list (when to call) ---------- */
.trigger-list { list-style: none; margin: 28px 0 0; max-width: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 880px) { .trigger-list { grid-template-columns: 1fr; } }
.trigger-list li {
  margin: 0; padding: 16px 18px;
  background: var(--paper); border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  font-size: 0.95rem;
}
.trigger-list li strong { color: var(--structural); display: block; margin-bottom: 2px; }

/* ---------- pull quote (system before machine) ---------- */
.pullquote {
  font-family: var(--display); font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  line-height: 1.5; color: var(--structural);
  border-left: 4px solid var(--emphasis);
  padding: 6px 0 6px 26px; margin: 26px 0; max-width: 32em;
}

/* ---------- entity logo mark (hero) ---------- */
.entity-logo-mark { margin: 0 0 24px; }
.entity-logo-mark img {
  filter: brightness(0) invert(1);
  height: 64px; width: auto; max-width: 220px;
  display: block; opacity: 0.9;
}

/* ---------- nav logo (image variant) ---------- */
.nav-logo-img { height: 48px; width: auto; display: block; }

/* ---------- entity card logo ---------- */
.card-logo { margin: 0 0 16px; }
.card-logo-img { height: 40px; width: auto; display: block; }

/* ---------- service lane comparison ---------- */
.lane-table { margin-top: 28px; border: 1px solid var(--line); }
.lane-table .lane-row { display: grid; grid-template-columns: 150px 1fr 1fr 1fr; border-bottom: 1px solid var(--line); }
.lane-table .lane-row:last-child { border-bottom: 0; }
.lane-table .lane-row > span { padding: 13px 16px; font-size: 0.88rem; line-height: 1.55; border-right: 1px solid var(--line); }
.lane-table .lane-row > span:last-child { border-right: 0; }
.lane-table .lane-header { background: var(--tint); }
.lane-table .lane-header > span { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; }
.lane-table .lane-header .lane-label { color: var(--muted); }
.lane-table .lane-header .lane-pg { color: var(--pg); }
.lane-table .lane-header .lane-id { color: var(--id); }
.lane-table .lane-header .lane-pt { color: var(--pt); }
.lane-table .lane-row .lane-label { color: var(--muted); font-weight: 600; font-size: 0.82rem; background: var(--tint); }
@media (max-width: 800px) {
  .lane-table .lane-header { display: none; }
  .lane-table .lane-row { grid-template-columns: 1fr; }
  .lane-table .lane-row > span { border-right: 0; border-bottom: 1px solid var(--line); }
  .lane-table .lane-row > span:last-child { border-bottom: 0; }
  .lane-table .lane-row .lane-label { font-weight: 700; color: var(--structural); background: var(--tint); }
}

/* ---------- download cards (downloads.html) ---------- */
.download-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.dl-entity {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  width: fit-content;
}
.dl-entity.entity-pg { background: #e8effa; color: var(--pg); }
.dl-entity.entity-id { background: #e0f0f1; color: var(--id); }
.dl-entity.entity-pt { background: #fde8e8; color: var(--pt); }
.dl-title { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 0; }
.dl-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.55; flex: 1; margin: 0; }
.dl-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}

/* ---------- entity tiles (platform.html) ---------- */
.entity-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem;
  border-top: 3px solid var(--line);
}
.entity-tile.entity-pg { border-top-color: var(--pg, #1a56d6); }
.entity-tile.entity-id { border-top-color: var(--id, #1a7c3a); }
.entity-tile.entity-pt { border-top-color: var(--pt, #b45309); }
.entity-tile h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--ink); }
.entity-tile p { font-size: 0.88rem; color: var(--muted); line-height: 1.55; margin-bottom: 0.5rem; }
.entity-tile a { font-size: 0.88rem; color: var(--structural); font-weight: 600; text-decoration: none; }
.entity-tile a:hover { text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .hero { padding: 60px 0 64px; }
  .hero-split { padding: 48px 0 56px; }
  .section { padding: 52px 0; }
  .flow-step { flex-basis: 100%; margin-right: 0; }
  .flow-step::after { content: '\2193'; right: auto; left: 50%; top: auto; bottom: -14px; transform: translate(-50%, 50%); }
  .flow-step:last-child::after { content: none; }
}
