/*
Theme Name: BQS
Theme URI: https://bayqualitysolutions.com
Author: Bay Quality Solutions Inc.
Description: Custom theme for Bay Quality Solutions. Direction A (Instrument), Cobalt Steel palette, dark and light themes.
Version: 1.0.0
Requires PHP: 8.0
Text Domain: bqs
*/

/* ---------- Fonts (self-hosted, OFL) ---------- */
@font-face {
  font-family: "Geist";
  src: url("assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens: Cobalt Steel (dark default) ---------- */
:root {
  --bg: #0A0F1A;
  --surface: #111827;
  --surface2: #1A2335;
  --line: #243049;
  --ink: #E6ECF5;
  --muted: #93A0B5;
  --accent: #2F6BFF;
  --accent-hover: #4A7EFF;
  --accent-ink: #FFFFFF;
  --accent-text: #7FA4FF;
  --warn: #F5A524;
  --warn-tint: #2A2112;
  --open: #3A4763;
  --lane-ink: #E6ECF5;
  --cta-btn: #FFFFFF;
  --cta-btn-ink: #0D1422;
  --header-bg: rgba(10, 15, 26, 0.86);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 14px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --surface2: #E5EAF2;
  --line: #D3DAE6;
  --ink: #0D1422;
  --muted: #4F5B70;
  --accent: #2F6BFF;
  --accent-hover: #1F57E8;
  --accent-ink: #FFFFFF;
  --accent-text: #1F4FD8;
  --warn: #B45309;
  --warn-tint: #FDF3E7;
  --open: #B6C0D0;
  --lane-ink: #0D1422;
  --cta-btn: #0D1422;
  --cta-btn-ink: #FFFFFF;
  --header-bg: rgba(243, 245, 249, 0.88);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
:where(h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl) { margin: 0; }
:where(ul, ol) { padding: 0; list-style: none; }
img, svg { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-text); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.screen-reader-text, .sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: var(--r-md); font-weight: 600; }
.skip-link:focus { top: 12px; color: var(--accent-ink); }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.h2 { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.06; }
.lead { color: var(--muted); font-size: clamp(16px, 1.5vw, 18px); max-width: 36em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-md);
  font-weight: 600; font-size: 16px; line-height: 1; white-space: nowrap;
  border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--muted); color: var(--ink); }
.btn--lg { min-height: 54px; padding: 0 26px; }
.text-link { color: var(--accent-text); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand svg { height: 26px; width: auto; display: block; }
.brand svg path { fill: var(--ink); }
.brand__rule { width: 1px; height: 22px; background: var(--line); }
.brand__name { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0.01em; white-space: nowrap; }

.nav { display: none; }
.nav a { color: var(--muted); font-size: 15px; font-weight: 500; padding: 8px 0; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  border-radius: var(--r-md); border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--ink);
}
.icon-btn:hover { border-color: var(--muted); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.header-cta { display: none; }
.menu-toggle .icon-close { display: none; }
.menu-open .menu-toggle .icon-open { display: none; }
.menu-open .menu-toggle .icon-close { display: block; }

.mobile-panel {
  display: none; border-top: 1px solid var(--line); background: var(--bg);
  max-height: calc(100vh - 68px); overflow-y: auto;
}
.menu-open .mobile-panel { display: block; }
.mobile-panel nav { display: flex; flex-direction: column; padding: 8px 0 4px; }
.mobile-panel nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 600; color: var(--ink); }
.mobile-panel .btn { width: 100%; margin: 20px 0 24px; }

@media (min-width: 640px) {
  .header-cta { display: inline-flex; min-height: 44px; padding: 0 18px; font-size: 15px; }
}
@media (max-width: 420px) {
  .brand__rule, .brand__name { display: none; }
}
@media (min-width: 1100px) {
  .nav { display: flex; gap: 26px; margin-left: 12px; }
  .menu-toggle, .mobile-panel { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); }
.hero__grid { display: grid; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5.4vw, 66px); line-height: 1.02; letter-spacing: -0.035em; max-width: 13em; }
.hero .lead { margin-top: 22px; font-size: clamp(17px, 1.6vw, 20px); max-width: 34em; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
@media (max-width: 479px) {
  .hero__ctas .btn { width: 100%; }
}
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; }
}

/* PPAP readiness meter */
.meter {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(20px, 2.6vw, 32px); min-width: 0;
}
.meter__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.meter__score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 18px; }
.meter__num { font-size: clamp(56px, 7vw, 88px); font-weight: 700; line-height: 0.95; letter-spacing: -0.04em; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.meter__of { font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); }
.meter__bar { display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); gap: 4px; margin-top: 22px; }
.meter__bar span { height: 40px; border-radius: 3px; background: var(--accent); }
.meter__bar .is-fix { background: var(--warn); }
.meter__bar .is-open { background: var(--open); }
.meter__ticks { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--accent); display: inline-block; }
.legend i.is-fix { background: var(--warn); }
.legend i.is-open { background: var(--open); }
.findings { border-top: 1px solid var(--line); margin-top: 22px; }
.findings li { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.findings li:last-child { border-bottom: 0; padding-bottom: 0; }
.findings .mono { font-size: 13px; color: var(--muted); white-space: nowrap; }
.findings .sev { font-family: var(--mono); font-size: 12px; color: var(--warn); }
@media (max-width: 479px) {
  .meter__bar { gap: 3px; }
  .meter__bar span { height: 32px; }
  .findings li { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .findings li .mono { grid-column: 1 / -1; }
}

/* ---------- Credentials strip ---------- */
.creds { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.creds__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.cred { padding: 24px 0; }
.cred:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.cred strong { display: block; font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.cred span { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }
@media (min-width: 1024px) {
  .creds__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cred { padding: 30px 0; }
  .cred:nth-child(-n+2) { border-bottom: 0; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section--surface { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: grid; gap: 18px 56px; align-items: end; }
.section-head .h2 { max-width: 16em; }
@media (min-width: 1024px) {
  .section-head--split { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); }
}

/* ---------- Services ---------- */
.services { display: grid; gap: 24px; margin-top: 48px; }
.feature {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 40px); color: var(--ink);
}
.feature:hover { color: var(--ink); background: var(--surface2); }
.feature__title { font-size: clamp(26px, 3vw, 38px); font-weight: 700; line-height: 1.08; letter-spacing: -0.025em; }
.feature p { color: var(--muted); font-size: 17px; }
.feature ul { border-top: 1px solid var(--line); margin-top: 4px; font-size: 15px; }
.feature li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.feature li::before { content: ""; width: 6px; height: 6px; margin-top: 9px; flex: 0 0 auto; border-radius: 1px; background: var(--accent); }
.feature .text-link { margin-top: auto; padding-top: 8px; }
.svc-list { border-top: 1px solid var(--line); display: grid; }
.svc { display: flex; gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.svc:hover { color: var(--ink); }
.svc:hover .svc__name { color: var(--accent-text); }
.svc__body { flex: 1; min-width: 0; }
.svc__name { display: block; font-size: 19px; font-weight: 600; transition: color .15s ease; }
.svc__desc { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }
.svc__arrow { color: var(--muted); flex: 0 0 auto; }
@media (min-width: 700px) and (max-width: 1023px) {
  .svc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; border-top: 0; }
  .svc { align-items: flex-start; border-top: 1px solid var(--line); border-bottom: 0; }
  .svc-list .svc:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (min-width: 1024px) {
  .services { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: stretch; }
}

/* ---------- PPAP matrix ---------- */
.matrix-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-top: 44px; padding-bottom: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.matrix {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink); border-left: 1px solid var(--line); background: var(--bg);
}
.cell {
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  min-height: 96px; padding: 14px 14px 16px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cell__top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; }
.cell__top span:first-child { color: var(--muted); }
.cell__status { color: var(--accent-text); font-weight: 500; }
.cell.is-fix { background: var(--warn-tint); }
.cell.is-fix .cell__status { color: var(--warn); }
.cell.is-open .cell__status { color: var(--muted); }
.cell__name { font-weight: 600; font-size: 15px; line-height: 1.3; }
@media (min-width: 600px) { .matrix { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cell { padding: 16px; } }
@media (min-width: 960px) { .matrix { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.ppap-foot { display: grid; gap: 40px 56px; margin-top: 48px; }
.tiers { display: grid; gap: 16px; }
.tier { border: 1px solid var(--line); border-radius: 12px; padding: 22px; background: var(--bg); }
.tier--accent { border-color: var(--accent); }
.tier__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; }
.tier__name { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.tier__price { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.tier p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; align-content: start; }
.step { padding: 12px 8px 20px 0; border-top: 2px solid var(--line); }
.step.is-done { border-top-color: var(--accent); }
.step__n { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.step.is-done .step__n { color: var(--accent-text); }
.step__t { font-weight: 600; margin-top: 2px; }
.step__d { color: var(--muted); font-size: 14px; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 640px) and (max-width: 1023px) { .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ppap-foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); } }

/* ---------- Global / time lanes ---------- */
.lanes {
  margin-top: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 32px);
}
.lane { display: grid; gap: 8px; margin-bottom: 16px; }
.lane__label { font-size: 15px; font-weight: 600; }
.lane__label small { display: block; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.lane__track { position: relative; height: 28px; background: var(--surface2); border-radius: var(--r-sm); overflow: hidden; }
.lane__track b { position: absolute; top: 0; bottom: 0; border-radius: var(--r-sm); background: var(--accent); }
.lane--home .lane__track b { background: var(--lane-ink); opacity: .85; }
.lane-ticks { display: grid; gap: 8px; }
.lane-ticks__row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.lanes__note { margin-top: 16px; font-size: 13px; color: var(--muted); }
.reach { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin-top: 32px; border-top: 1px solid var(--line); }
.reach li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.reach li strong { display: block; font-weight: 600; }
.reach li span { color: var(--muted); font-size: 14px; }
@media (min-width: 640px) {
  .lane, .lane-ticks { grid-template-columns: 210px minmax(0, 1fr); align-items: center; gap: 16px; }
  .lane-ticks__row { grid-column: 2; }
}
@media (min-width: 1100px) { .reach { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- About ---------- */
.about { display: grid; gap: 48px; }
.about p { margin-top: 20px; color: var(--muted); font-size: 17px; max-width: 34em; }
.about .text-link { margin-top: 24px; }
.locs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; border-top: 1px solid var(--line); margin-top: 12px; }
.locs a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.locs a.is-hq { color: var(--accent-text); font-weight: 600; }
@media (min-width: 1024px) { .about { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }

/* ---------- CTA band ---------- */
.cta-band { background: var(--accent); color: var(--accent-ink); }
.cta-band__inner { display: grid; gap: 24px 48px; align-items: center; padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); }
.cta-band h2 { color: var(--accent-ink); font-size: clamp(30px, 4.4vw, 56px); line-height: 1.04; max-width: 16em; }
.cta-band p { margin-top: 12px; font-size: 17px; opacity: .92; }
.cta-band .btn { background: var(--cta-btn); color: var(--cta-btn-ink); min-height: 56px; padding: 0 28px; font-size: 17px; }
.cta-band .btn:hover { opacity: .92; color: var(--cta-btn-ink); }
.cta-band__actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.cta-band__actions a.tel { font-family: var(--mono); font-size: 15px; color: var(--accent-ink); }
@media (max-width: 479px) { .cta-band .btn { width: 100%; } .cta-band__actions { align-items: stretch; } }
@media (min-width: 900px) { .cta-band__inner { grid-template-columns: minmax(0, 1fr) auto; } }

/* ---------- Footer ---------- */
.site-footer { padding: 48px 0 40px; font-size: 14px; color: var(--muted); }
.footer-grid { display: grid; gap: 32px; }
.footer-grid h3 { font-size: 13px; font-family: var(--mono); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer-brand svg { height: 24px; width: auto; }
.footer-brand svg path { fill: var(--ink); }
.footer-brand p { margin-top: 14px; max-width: 30em; }
.footer-links { display: grid; gap: 8px; }
.footer-links a:hover { color: var(--ink); }
.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); } }

/* ---------- Generic pages ---------- */
.page-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(24px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.04; max-width: 16em; }
.prose { padding: clamp(40px, 6vw, 80px) 0 var(--section); max-width: 760px; font-size: 17px; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.15; margin-top: 1.8em; }
.prose h3 { font-size: 20px; margin-top: 1.5em; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--muted); }
.prose ul { list-style: disc; padding-left: 1.2em; }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .cta-band, .theme-toggle { display: none; }
}

/* ---------- Inner pages ---------- */
.page-hero { padding: clamp(40px, 6vw, 88px) 0 clamp(40px, 5vw, 72px); border-bottom: 1px solid var(--line); }
.page-hero .lead { margin-top: 20px; font-size: clamp(17px, 1.6vw, 20px); max-width: 38em; }
.page-hero .hero__ctas { margin-top: 28px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.crumbs a:hover { color: var(--ink); }
.section--tight { padding: clamp(56px, 7vw, 96px) 0; }
.section--tight .section-head + * { margin-top: 36px; }
.section--tight .section-head + .matrix-head { margin-top: 36px; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; color: var(--ink); }
.section--surface .card { background: var(--bg); }
.card--accent { border-color: var(--accent); }
.card h3 { font-size: 19px; letter-spacing: -0.015em; line-height: 1.25; }
.card p { color: var(--muted); font-size: 15px; }
a.card:hover { color: var(--ink); border-color: var(--muted); }
a.card .text-link { margin-top: auto; padding-top: 8px; }

.rows { border-top: 1px solid var(--line); }
.row-item { display: grid; gap: 4px 40px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.row-item h3 { font-size: 19px; letter-spacing: -0.015em; }
.row-item p { color: var(--muted); }
@media (min-width: 800px) { .row-item { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); align-items: baseline; } }

.checks { display: grid; gap: 0 32px; border-top: 1px solid var(--line); }
.checks li { position: relative; padding: 14px 0 14px 30px; border-bottom: 1px solid var(--line); }
.checks li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 12px; height: 7px; border-left: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text); transform: rotate(-45deg); }
@media (min-width: 760px) { .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.steps--page { margin-top: 0; }

.split { display: grid; gap: 32px 56px; }
.split__text p { color: var(--muted); font-size: 17px; max-width: 40em; }
.split__text p + p { margin-top: 16px; }
.split__text strong { color: var(--ink); }
.split__text a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.split__side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; align-self: start; }
.section--surface .split__side { background: var(--bg); }
.split__side ul { margin-top: 12px; }
.split__side li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.split__side li:last-child { border-bottom: 0; }
@media (min-width: 1024px) { .split:has(.split__side) { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }

.faq { border-top: 1px solid var(--line); max-width: 900px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-weight: 600; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-family: var(--mono); font-size: 22px; color: var(--accent-text); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 20px; color: var(--muted); max-width: 46em; }

a.tier { display: flex; flex-direction: column; gap: 0; color: var(--ink); transition: border-color .15s ease; }
a.tier:hover { color: var(--ink); border-color: var(--accent); }
a.tier .text-link { margin-top: 14px; }
.tiers--page { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }

.services--hub { margin-top: 0; }

.loc-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.loc-card { display: block; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); }
.loc-card:hover { color: var(--ink); border-color: var(--muted); }
.loc-card.is-hq { border-color: var(--accent); }
.loc-card h3 { font-size: 19px; letter-spacing: -0.015em; }
.loc-card p { color: var(--muted); font-size: 15px; margin-top: 6px; }

.plants { display: grid; gap: 0 32px; border-top: 1px solid var(--line); }
.plants li { padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.plants li span { font-family: var(--mono); font-size: 13px; color: var(--muted); }
@media (min-width: 760px) { .plants { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fine { margin-top: 16px; font-size: 13px; color: var(--muted); }
.fine a { color: var(--accent-text); text-decoration: underline; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; font-weight: 500; }
.chip-link:hover { border-color: var(--accent); color: var(--ink); }

.timeline { border-top: 1px solid var(--line); }
.timeline li { display: grid; gap: 4px 32px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.timeline__when { font-family: var(--mono); font-size: 13px; color: var(--accent-text); padding-top: 3px; }
.timeline__what strong { display: block; font-size: 18px; }
.timeline__what span { color: var(--muted); font-size: 15px; }
@media (min-width: 700px) { .timeline li { grid-template-columns: 160px minmax(0, 1fr); } }

/* Contact */
.contact { display: grid; gap: 40px 56px; }
@media (min-width: 1024px) { .contact { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.form { display: grid; gap: 18px; }
.form__row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form label { display: grid; gap: 8px; font-size: 14px; font-weight: 600; }
.form input, .form select, .form textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 400 16px/1.4 var(--font);
}
.form textarea { resize: vertical; }
.form input::placeholder, .form textarea::placeholder { color: var(--muted); opacity: .8; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.form .btn { justify-self: start; }
@media (max-width: 479px) { .form .btn { width: 100%; } }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact__side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; align-self: start; }
.contact__side p { margin: 6px 0 20px; }
.contact__side p:last-child { margin-bottom: 0; }
.contact__side a { color: var(--accent-text); word-break: break-all; }
.notice { padding: 16px 18px; border-radius: var(--r-md); margin-bottom: 20px; border: 1px solid var(--line); }
.notice--ok { border-color: var(--accent); background: var(--surface); }
.notice--err { border-color: var(--warn); background: var(--warn-tint); }
.tier-opts { margin-top: 16px; border-top: 1px solid var(--line); }
.tier-opt { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.tier-opt:last-child { border-bottom: 0; padding-bottom: 0; }
.tier-opt:hover { color: var(--ink); }
.tier-opt:hover .tier-opt__name, .tier-opt:hover .tier-opt__cta { color: var(--accent-text); }
.tier-opt__body { flex: 1 1 260px; min-width: 0; }
.tier-opt__name { display: block; font-weight: 600; font-size: 16px; }
.tier-opt__desc { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.tier-opt__cta { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.tiers { align-items: start; }
@media (max-width: 479px) { .reach { grid-template-columns: 1fr; } }

.hero__deploy { display: flex; align-items: center; gap: 12px; margin-top: 26px; font-size: 16px; font-weight: 500; color: var(--ink); max-width: 36em; }
.hero__dot { position: relative; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.hero__dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: bqs-ping 2.4s ease-out infinite; }
@keyframes bqs-ping { 0% { transform: scale(.5); opacity: .7; } 80%, 100% { transform: scale(1.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero__dot::after { animation: none; opacity: .35; transform: none; } }
@media (max-width: 479px) { .hero__deploy { align-items: flex-start; font-size: 15px; } .hero__dot { margin-top: 6px; } }

/* Photos */
.page-hero__grid { display: grid; gap: 36px 56px; align-items: center; }
@media (min-width: 1024px) { .page-hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.photo { margin: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.section--surface .photo { background: var(--bg); }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.photo figcaption { padding: 10px 14px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--muted); }
.gallery { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gallery .photo:first-child { grid-column: 1 / -1; } }
@media (min-width: 900px) {
  .gallery--n5 { grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); }
  .gallery--n5 .photo:first-child { grid-column: 1; grid-row: 1 / span 2; contain: size; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
  .gallery--n5 .photo:first-child img { min-height: 0; aspect-ratio: auto; height: 100%; }
  .gallery--n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gallery--n3 .photo:first-child { grid-column: auto; }
}

/* Current page in the menu */
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.mobile-panel nav a[aria-current="page"] { color: var(--accent-text); }

/* Touch targets and small labels (mobile/tablet audit) */
.meter__ticks, .lane__label small, .lane-ticks__row { font-size: 12px; }
.brand { min-height: 44px; }
@media (max-width: 1023px) {
  .footer-links { gap: 0; }
  .footer-links a, .footer-links span { display: flex; align-items: center; min-height: 44px; }
  .footer-base { align-items: center; }
  .footer-base a { display: inline-flex; align-items: center; min-height: 44px; }
  a.text-link { min-height: 44px; }
}
