/*
Theme Name: Bridgewell Living Systems
Theme URI: https://www.bridgewelllivingsystems.com
Author: Bridgewell Living Systems Inc.
Description: Single-page company site for Bridgewell Living Systems and ElderBooth. Block theme built on the ElderBooth brand system (navy / brick coral / deep teal, Manrope + Atkinson Hyperlegible, AAA contrast).
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: Proprietary
Text Domain: bridgewell
*/

/* ---------- Tokens ---------- */
:root {
  --bw-navy: #12233A;
  --bw-coral: #923824;
  --bw-teal: #185F5B;
  --bw-bg: #FBF9F5;
  --bw-surface: #FFFFFF;
  --bw-border: #E4E1D9;
  --bw-text: #2A2A28;
  --bw-muted: #5E6470;          /* 5.9:1 on bg; used only for non-essential captions */
  --bw-coral-light: #E29A89;    /* accent on navy, 7.0:1 */
  --bw-muted-dark: #B2BCC9;     /* secondary text on navy (v1.1 correction) */
  --bw-head: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  --bw-body: 'Atkinson Hyperlegible', -apple-system, 'Segoe UI', Arial, sans-serif;
  --bw-max: 1120px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bw-bg);
  color: var(--bw-text);
  font-family: var(--bw-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--bw-head); color: var(--bw-navy); margin: 0; letter-spacing: 0; }
h1 { font-size: clamp(32px, 4.4vw, 46px); line-height: 1.18; font-weight: 800; }
h2 { font-size: clamp(27px, 3vw, 34px); line-height: 1.22; font-weight: 800; }
h3 { font-size: 21px; line-height: 1.3; font-weight: 700; }
p { margin: 0; }
a { color: var(--bw-teal); text-underline-offset: 3px; }
a:hover { color: var(--bw-navy); }
:focus-visible { outline: 3px solid var(--bw-coral); outline-offset: 3px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

.bw-skip { position: absolute; left: -9999px; top: 8px; background: var(--bw-navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.bw-skip:focus { left: 16px; color: #fff; }

/* WP blockGap is 0 in theme.json; all spacing is explicit below. */
.bw-site .bw-stats > *, .bw-site .bw-features > *, .bw-site .bw-people > *, .bw-site .bw-hero-grid > *, .bw-site .bw-barriers > *, .bw-site .bw-research-grid > *, .bw-site .bw-contact-grid > *, .bw-site .bw-partner > * { margin-top: 0 !important; }
.bw-container { max-width: var(--bw-max); margin: 0 auto !important; padding: 0 28px; box-sizing: border-box; }
.wp-site-blocks > * + * { margin-block-start: 0 !important; }
main.bw-main > * + * { margin-block-start: 0 !important; }

/* ---------- Header ---------- */
.bw-header { background: var(--bw-bg); border-bottom: 1px solid var(--bw-border); }
.bw-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.bw-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--bw-navy); }
.bw-brand svg { flex-shrink: 0; }
.bw-brand-name { font-family: var(--bw-head); font-weight: 800; font-size: 19px; line-height: 1.15; color: var(--bw-navy); }
.bw-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.bw-nav a { display: inline-block; font-family: var(--bw-head); font-weight: 700; font-size: 16px; color: var(--bw-navy); text-decoration: none; padding: 11px 12px; border-radius: 8px; min-height: 44px; box-sizing: border-box; }
.bw-nav a:hover { background: #EFECE4; color: var(--bw-navy); }
.bw-nav a.bw-nav-cta { background: var(--bw-navy); color: #fff; padding: 11px 18px; }
.bw-nav a.bw-nav-cta:hover { background: #1D3553; color: #fff; }
@media (max-width: 900px) {
  .bw-nav li:not(.bw-nav-keep) { display: none; }
}

/* ---------- Shared section bits ---------- */
.bw-section { padding: 96px 0; }
.bw-section-tight { padding: 72px 0; }
.bw-eyebrow { font-family: var(--bw-head); font-weight: 700; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bw-coral); margin-bottom: 14px !important; }
.bw-eyebrow::before { content: ""; display: block; width: 30px; height: 3px; border-radius: 2px; background: currentColor; margin-bottom: 14px; }
.bw-lede { font-size: 20px; line-height: 1.6; max-width: 46em; margin-top: 18px !important; }
.bw-body { max-width: 46em; margin-top: 16px !important; }
.bw-note { font-size: 15px; color: var(--bw-muted); margin-top: 28px !important; max-width: 52em; }
.bw-note a { color: var(--bw-muted); }

/* ---------- Buttons ---------- */
body .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px !important; }
body .wp-block-button__link {
  display: inline-block; font-family: var(--bw-head); font-weight: 700; font-size: 17px; line-height: 1.4;
  padding: 14px 24px; border-radius: 8px; text-decoration: none; min-height: 48px; box-sizing: border-box;
  background: var(--bw-coral); color: #fff; border: 2px solid var(--bw-coral);
}
body .wp-block-button__link:hover { background: #7A2D1C; border-color: #7A2D1C; color: #fff; }
body .is-style-outline .wp-block-button__link, body .bw-btn-ghost .wp-block-button__link { background: transparent; color: #fff; border-color: rgba(251,249,245,0.55); }
body .bw-btn-ghost .wp-block-button__link:hover { background: rgba(251,249,245,0.1); border-color: #FBF9F5; }

/* ---------- Hero ---------- */
.bw-hero { background: var(--bw-navy); color: #FBF9F5; padding: 92px 0 100px; }
.bw-hero h1 { color: #FBF9F5; max-width: 15em; }
.bw-hero .bw-eyebrow { color: var(--bw-coral-light); }
.bw-hero .bw-lede { color: #E8ECF1; }
.bw-hero .bw-status { margin-top: 30px !important; color: var(--bw-muted-dark); font-size: 16px; display: flex; align-items: center; gap: 10px; }
.bw-hero .bw-status::before { content: ""; width: 30px; height: 3px; border-radius: 2px; background: var(--bw-coral-light); flex-shrink: 0; }
.bw-hero-grid { display: block; }
.bw-hero-art { background: #1B3050; border-radius: 14px; padding: 34px 30px 22px; text-align: center; }
.bw-hero-art svg { width: 100%; max-width: 300px; height: auto; display: block; margin: 0 auto; }
.bw-hero-art figcaption { font-size: 14px; color: var(--bw-muted-dark); margin-top: 14px; }
@media (max-width: 900px) {
  .bw-hero { padding: 64px 0 72px; }
  .bw-hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .bw-hero-art { max-width: 380px; }
}

/* ---------- Problem ---------- */
.bw-problem { background: var(--bw-bg); }
.bw-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 44px !important; }
.bw-stat { background: var(--bw-surface); border: 1px solid var(--bw-border); border-radius: 14px; padding: 28px 26px; }
.bw-stat-figure { font-family: var(--bw-head); font-weight: 800; font-size: 40px; line-height: 1.1; color: var(--bw-coral); margin-bottom: 10px !important; }
.bw-stat p:not(.bw-stat-figure) { font-size: 17px; }
.bw-barriers { margin-top: 56px !important; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.bw-barriers ul { margin: 0; padding: 0; list-style: none; }
.bw-barriers li { padding: 14px 0 14px 34px; border-bottom: 1px solid var(--bw-border); position: relative; }
.bw-barriers li:first-child { border-top: 1px solid var(--bw-border); }
.bw-barriers li::before { content: ""; position: absolute; left: 0; top: 27px; width: 18px; height: 3px; border-radius: 2px; background: var(--bw-coral); }
@media (max-width: 900px) {
  .bw-stats { grid-template-columns: 1fr; }
  .bw-barriers { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- ElderBooth ---------- */
.bw-product { background: var(--bw-surface); border-top: 1px solid var(--bw-border); border-bottom: 1px solid var(--bw-border); }
.bw-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px !important; }
.bw-feature { background: var(--bw-bg); border: 1px solid var(--bw-border); border-radius: 14px; padding: 30px 28px; }
.bw-feature svg { display: block; margin-bottom: 18px; }
.bw-feature h3 { margin-bottom: 10px !important; }
.bw-feature p { font-size: 17px; }
.bw-partner { margin-top: 28px !important; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; background: #F1F7F6; border-left: 4px solid var(--bw-teal); border-radius: 0 14px 14px 0; padding: 26px 30px; }
.bw-partner-label { font-family: var(--bw-head); font-weight: 800; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bw-teal); white-space: nowrap; }
@media (max-width: 900px) {
  .bw-features { grid-template-columns: 1fr; }
  .bw-partner { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- Research ---------- */
.bw-research { background: var(--bw-bg); }
.bw-research-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; margin-top: 8px !important; align-items: start; }
.bw-questions { background: var(--bw-surface); border: 1px solid var(--bw-border); border-radius: 14px; padding: 32px 32px 18px; }
.bw-questions h3 { margin-bottom: 8px !important; }
.bw-questions ol { margin: 0; padding: 0; list-style: none; counter-reset: q; }
.bw-questions li { counter-increment: q; padding: 16px 0 16px 48px; position: relative; border-top: 1px solid var(--bw-border); }
.bw-questions li:first-child { border-top: 0; }
.bw-questions li::before { content: counter(q); position: absolute; left: 0; top: 15px; width: 32px; height: 32px; border-radius: 8px; background: var(--bw-teal); color: #fff; font-family: var(--bw-head); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.bw-questions .bw-note { margin-top: 6px !important; margin-bottom: 14px !important; }
@media (max-width: 900px) { .bw-research-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Team ---------- */
.bw-team { background: var(--bw-surface); border-top: 1px solid var(--bw-border); }
.bw-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 44px !important; }
.bw-person { background: var(--bw-bg); border: 1px solid var(--bw-border); border-radius: 14px; padding: 30px 28px; }
.bw-person-lead { grid-column: span 2; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 30px; align-items: start; }
.bw-avatar { width: 96px; height: 96px; border-radius: 14px; background: var(--bw-navy); color: #FBF9F5; font-family: var(--bw-head); font-weight: 800; font-size: 32px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; overflow: hidden; }
.bw-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bw-person-lead .bw-avatar { width: 132px; height: 132px; font-size: 42px; margin-bottom: 0; }
.bw-person h3 { margin-bottom: 4px !important; }
.bw-role { font-family: var(--bw-head); font-weight: 700; font-size: 16px; color: var(--bw-coral); margin-bottom: 12px !important; }
.bw-person p:not(.bw-role) { font-size: 17px; }
.bw-person p + p:not(.bw-role) { margin-top: 10px; }
@media (max-width: 900px) {
  .bw-people { grid-template-columns: 1fr; }
  .bw-person-lead { grid-column: auto; grid-template-columns: 1fr; gap: 18px; }
  .bw-person-lead .bw-avatar { width: 96px; height: 96px; font-size: 32px; }
}

/* ---------- Contact ---------- */
.bw-contact { background: var(--bw-navy); color: #FBF9F5; }
.bw-contact h2 { color: #FBF9F5; }
.bw-contact .bw-eyebrow { color: var(--bw-coral-light); }
.bw-contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.bw-contact .bw-lede { color: #E8ECF1; }
.bw-contact-card { background: #1B3050; border-radius: 14px; padding: 30px 30px; }
.bw-contact-card dt { font-family: var(--bw-head); font-weight: 700; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bw-muted-dark); }
.bw-contact-card dd { margin: 4px 0 22px; font-size: 18px; color: #FBF9F5; }
.bw-contact-card dd:last-child { margin-bottom: 0; }
.bw-contact-card a { color: var(--bw-coral-light); font-weight: 700; }
.bw-contact-card a:hover { color: #FBF9F5; }
@media (max-width: 900px) { .bw-contact-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Footer ---------- */
.bw-footer { background: #0D1A2C; color: var(--bw-muted-dark); padding: 40px 0 44px; font-size: 15px; }
.bw-footer-inner { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.bw-footer .bw-brand-name { color: #FBF9F5; font-size: 17px; }
.bw-footer p { max-width: 44em; }
.bw-footer p + p { margin-top: 6px; }
.bw-footer a { color: var(--bw-muted-dark); }
.bw-footer a:hover { color: #FBF9F5; }
