/* ============================================================
   BH Technology Solutions — shared stylesheet
   Light theme · brand green #2e7d03 · Type: Source Sans 3
   (Adobe's open-source family, self-hosted WOFF2 variable —
   renders identically in every modern browser, no external
   requests, fluid sizes + 44px tap targets for mobile.)
   ============================================================ */

@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-3-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f7f5;
  --bg-raised: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #eef3e8;
  --border: #d9ded2;
  --border-soft: #e4e8df;
  --text: #141810;
  --text-muted: #4d5747;
  /* F6: darkened from #7a8474 (3.63–3.90:1, failed AA) — #5f6b5c
     computes 5.61:1 on #ffffff and 5.22:1 on #f6f7f5. */
  --text-faint: #5f6b5c;
  --accent: #2e7d03;          /* brand green — fills, rules, buttons */
  --accent-hover: #256503;
  --accent-bright: #2e7d03;   /* brightened green — text accents on dark */
  --accent-dim: rgba(46, 125, 3, 0.09);
  --radius: 14px;
  --max-width: 1120px;
  --font-stack: "Source Sans 3", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-stack);
  font-size: clamp(16.5px, 15.8px + 0.35vw, 18px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 0.55em;
  font-weight: 700;
}

h2 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); }
h3 { font-size: 1.22rem; letter-spacing: -0.01em; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

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

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

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex: none;
}

.wordmark small {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 9px 15px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.97rem;
  font-weight: 550;
}
.nav-links a:hover { color: var(--text); text-decoration: none; background: var(--bg-card); }
.nav-links a.active { color: var(--accent-bright); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 13px;
  min-width: 44px;
  min-height: 44px;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 110px 0 100px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #edf1e7 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border-soft);
}

.hero .container { position: relative; z-index: 1; }

/* Dynamic story background: parts flowing from the warehouse floor
   into digital commerce (green data streams). Poster still is the
   fallback for reduced-motion / small screens. */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg,
      rgba(246, 247, 245, 0.96) 0%,
      rgba(246, 247, 245, 0.88) 40%,
      rgba(246, 247, 245, 0.38) 72%,
      rgba(246, 247, 245, 0.18) 100%),
    linear-gradient(180deg,
      rgba(246, 247, 245, 0.30) 0%,
      rgba(246, 247, 245, 0) 38%,
      rgba(246, 247, 245, 0) 78%,
      rgba(246, 247, 245, 0.55) 100%);
}

@media (max-width: 640px) {
  .hero-bg { display: none; }
  .hero {
    background:
      linear-gradient(180deg, rgba(237, 241, 231, 0.93), rgba(246, 247, 245, 0.96)),
      url("assets/hero-poster.webp") center / cover no-repeat;
  }
  .hero-overlay { display: none; }
  .nav-links a { display: block; padding: 12px 14px; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg { display: none; }
  .hero {
    background:
      linear-gradient(90deg, rgba(246, 247, 245, 0.95), rgba(246, 247, 245, 0.55)),
      url("assets/hero-poster.webp") center / cover no-repeat;
  }
  .hero-overlay { display: none; }
}

.hero h1 {
  font-size: clamp(2.35rem, 5.4vw, 3.7rem);
  max-width: 17ch;
  margin-bottom: 0.5em;
}

.hero h1 .accent { color: var(--accent-bright); }

.hero .subhead {
  font-size: clamp(1.08rem, 2vw, 1.27rem);
  color: var(--text-muted);
  max-width: 62ch;
  margin-bottom: 2.1em;
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  /* F6: darker than --accent-bright — #256503 on the pill's tinted
     background computes 5.90:1 (was 4.29:1 with #2e7d03). */
  color: #256503;
  border: 1px solid var(--border);
  background: var(--accent-dim);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 26px;
}

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-block;
  min-height: 44px;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 650;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--accent-bright); color: var(--accent-bright); }

/* ---------- Sections ---------- */
.section { padding: 86px 0; }
.section + .section { border-top: 1px solid var(--border-soft); }
.section-alt { background: var(--bg-raised); }

.kicker {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 14px;
}

.section-lead {
  color: var(--text-muted);
  max-width: 68ch;
  font-size: 1.06rem;
}

.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head .section-lead { margin-bottom: 0; }

/* ---------- Cards & grids ---------- */
.grid {
  display: grid;
  gap: 20px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.card h3 { margin-bottom: 0.45em; }
.card h3 .lead-in { color: var(--text); }
.card p { color: var(--text-muted); font-size: 0.99rem; }

.card .card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  color: var(--accent-bright);
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* ---------- Prose blocks (About / Vision / Principles) ---------- */
.prose { max-width: 76ch; }
.prose p { color: var(--text-muted); font-size: 1.05rem; }
.prose p strong, .prose .lead-in { color: var(--text); }

/* F9: in-text links are underlined, not color-only (nav/buttons excluded). */
main p a:not(.btn) { text-decoration: underline; }

.callout {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 30px 32px;
  margin-top: 26px;
}
.callout p { color: var(--text-muted); }
.callout .lead-in { color: var(--text); font-weight: 700; }

/* ---------- Product proof (Home spotlight) ---------- */
.proof { margin-top: 58px; }
.proof-head { max-width: 760px; margin-bottom: 36px; }
.proof-head h3 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
.proof-head .section-lead { margin-bottom: 0; }

.proof-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.proof-step {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
}
.proof-step img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}
.proof-step figcaption { padding: 18px 6px 4px; }
.proof-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.proof-step-head .card-num { margin-bottom: 0; width: 30px; height: 30px; }
.proof-step h4 {
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  margin: 0;
}
.proof-step figcaption p { color: var(--text-muted); font-size: 0.99rem; }
.proof-cta { margin-top: 30px; color: var(--text-muted); }

/* Proof thumbnails open the lightbox (full-size originals). */
.proof-zoom {
  display: block;
  position: relative;
  border-radius: 8px;
  cursor: zoom-in;
}
.proof-zoom:focus-visible { outline-offset: 4px; }
.proof-zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(20, 24, 16, 0.82);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.proof-zoom:hover .proof-zoom-hint,
.proof-zoom:focus-visible .proof-zoom-hint { opacity: 1; }
@media (hover: none) {
  .proof-zoom-hint { opacity: 0.92; }
}

/* ---------- Lightbox (proof screenshots) ---------- */
body.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox[hidden] { display: none; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 22, 14, 0.88);
}
.lightbox-panel {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(1240px, 96vw);
}
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  background: #101208;
}
.lightbox-bar {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 14px;
  color: #fff;
  font-size: 0.98rem;
  text-align: center;
}
.lightbox-title { font-weight: 650; }
.lightbox-count { color: rgba(255, 255, 255, 0.72); font-size: 0.9rem; }
.lightbox-btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, color 0.15s ease;
}
.lightbox-btn:hover { background: var(--accent); color: #fff; }
.lightbox-close { top: -14px; right: -14px; font-size: 1.7rem; }
.lightbox-prev { left: -14px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: -14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 760px) {
  .lightbox { padding: 12px; }
  .lightbox-img { max-height: 76vh; }
  .lightbox-close { top: 8px; right: 8px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ---------- Stats band ---------- */
.stats-band {
  background:
    radial-gradient(640px 300px at 50% -120px, rgba(46, 125, 3, 0.08), transparent 65%),
    var(--bg-raised);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 70px 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
  text-align: center;
  margin-top: 40px;
}

.stat .stat-num {
  display: block;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-bright);
  line-height: 1.1;
  margin-bottom: 8px;
}
.stat .stat-label { color: var(--text-muted); font-size: 0.94rem; line-height: 1.45; display: block; }

/* ---------- Closing band ---------- */
.closing { text-align: left; }
.closing .grid { margin-bottom: 42px; }
.closing .cta-row { text-align: center; }
.closing .cta-row p { color: var(--text-muted); margin-bottom: 20px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 84px 0 64px;
  background:
    radial-gradient(680px 320px at 85% -80px, rgba(46, 125, 3, 0.08), transparent 65%),
    linear-gradient(180deg, #edf1e7 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border-soft);
}
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3rem); max-width: 24ch; }
.page-hero .subhead { color: var(--text-muted); font-size: 1.13rem; max-width: 62ch; margin: 0; }

/* ---------- Contacts ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.contact-mail {
  margin-top: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}
.contact-mail p { color: var(--text-muted); margin-bottom: 22px; }
.contact-mail .btn { font-size: 1.06rem; padding: 16px 34px; }
.card .contact-value { font-size: 1.08rem; font-weight: 650; color: var(--text); }
.card .contact-value a { color: var(--text); }
.card .contact-value a:hover { color: var(--accent-bright); }

/* ---------- Coming soon (Blogging) ---------- */
.coming-soon {
  text-align: center;
  padding: 40px 0 10px;
}
.coming-soon .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  color: var(--accent-bright);
  font-size: 1.7rem;
  margin-bottom: 26px;
}
.coming-soon p { color: var(--text-muted); max-width: 52ch; margin-left: auto; margin-right: auto; }

/* ---------- FAQ (Home) ---------- */
.faq-list { max-width: 820px; }
.faq-item { border-bottom: 1px solid var(--border-soft); }
.faq-item:first-child { border-top: 1px solid var(--border-soft); }
.faq-item summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 1.08rem;
  color: var(--text);
  padding: 20px 8px;
  list-style-position: outside;
}
.faq-item summary:hover { color: var(--accent-hover); }
.faq-item p { color: var(--text-muted); padding: 0 8px 22px; margin: 0; max-width: 70ch; }

/* ---------- Contact form (F7) ---------- */
.form-card {
  margin-top: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: left;
}
.form-card > p { color: var(--text-muted); }
.contact-form { display: grid; gap: 18px; margin-top: 26px; }
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label { display: block; font-weight: 650; font-size: 0.95rem; color: var(--text); }
.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 12px 14px;
  min-height: 44px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent-bright);
  outline-offset: 1px;
  border-color: var(--accent-bright);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
/* Honeypot: off-screen, unreachable by keyboard, ignored by humans. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status {
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.98rem;
  margin: 0;
}
.form-status-success { background: var(--accent-dim); border: 1px solid var(--border); color: #256503; }
.form-status-error { background: #fbeae8; border: 1px solid #e5b4ae; color: #7c2317; }
@media (max-width: 760px) {
  .contact-form .form-row { grid-template-columns: 1fr; }
  .form-card { padding: 30px 22px; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-raised);
  padding: 44px 0 38px;
  margin-top: 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
}
.footer-brand { max-width: 560px; }
.footer-brand .wordmark { margin-bottom: 12px; }
.site-footer p { color: var(--text-faint); font-size: 0.92rem; margin: 0 0 6px; }
.site-footer .footer-nav { list-style: none; display: flex; gap: 20px; margin: 4px 0 0; padding: 0; }
.site-footer .footer-nav a { color: var(--text-muted); font-size: 0.94rem; }
.site-footer .footer-nav a:hover { color: var(--accent-bright); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 62px 0; }
  .hero { padding: 74px 0 68px; }
  .grid-2, .grid-3, .contact-grid, .proof-steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }

  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; }
  .site-header .container { position: relative; }

  .contact-mail { padding: 30px 22px; }
  .footer-inner { flex-direction: column; }
  /* F9: footer nav links get a full 44px touch height on mobile. */
  .site-footer .footer-nav a { display: inline-block; padding: 12px 4px; }
}

@media (max-width: 430px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .btn { padding: 13px 22px; }
}
