/*
 * SW Projects — public front-end ("Legacy Builders" campaign identity).
 *
 * A gold/black/cream sub-brand layered on top of SpiritWord's own site,
 * the same way sw-shop's --sws- tokens coexist with sw-sitefront's
 * navy/orange :root — scoped entirely to this stylesheet, only enqueued on
 * /projects/* routes, never collides with either.
 *
 * Fonts: Inter + Dancing Script are already loaded site-wide by
 * sw-sitefront.php (Google Fonts), so this file does not load any new font
 * — Inter Black/ExtraBold + tracking approximates the PDF's gold serif
 * display face, Dancing Script (the site's existing script accent) carries
 * the "Builders" / "Cost" / "Reached" treatments, recolored gold.
 */

:root {
  --lb-gold: #b8873a;
  --lb-gold-light: #d9b06a;
  --lb-black: #14120f;
  --lb-cream: #faf6ee;
  --lb-cream-line: rgba(20, 18, 15, .10);
  --lb-ink: #1f1b14;
  --lb-muted: #6b6255;
  --lb-green: #1f8b3f;
  --lb-white: #fff;
  --lb-radius: 14px;
  --lb-shadow: 0 10px 30px rgba(20, 18, 15, .10);
  --lb-ease: cubic-bezier(.22, .61, .36, 1);
  --lb-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', sans-serif;
  --lb-script: 'Dancing Script', cursive;
}

.lb, .lb * { box-sizing: border-box; }
.lb { margin: 0; background: var(--lb-cream); color: var(--lb-ink); font-family: var(--lb-sans); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.lb img { max-width: 100%; display: block; }
.lb a { color: inherit; text-decoration: none; }

/* ---------- Nav ---------- */
.lb-nav { background: var(--lb-black); border-bottom: 3px solid var(--lb-gold); position: sticky; top: 0; z-index: 20; }
.lb-nav__inner { max-width: 1100px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lb-nav__brand { color: var(--lb-white); font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.lb-nav__link { color: var(--lb-gold-light); font-weight: 600; font-size: 14px; }
.lb-nav__link:hover { color: var(--lb-gold); }

/* ---------- Sections ---------- */
.lb-section { padding: 56px 24px; }
.lb-section--cream { background: var(--lb-cream); }
.lb-section--band { background: var(--lb-black); color: var(--lb-white); padding: 40px 24px 8px; text-align: center; }
.lb-section--dark { background: var(--lb-black); color: var(--lb-white); }
.lb-section > * { max-width: 900px; margin-left: auto; margin-right: auto; }
.lb-section--band > * { max-width: 900px; }

.lb-eyebrow { font-family: var(--lb-script); font-size: 22px; color: var(--lb-gold); margin: 0 0 4px; }
.lb-eyebrow--dark { color: var(--lb-gold-light); }
.lb-h1 { font-size: clamp(40px, 7vw, 76px); font-weight: 800; letter-spacing: -.01em; margin: 0 0 6px; line-height: 1; color: var(--lb-gold); text-transform: uppercase; }
.lb-h1--single { text-transform: none; font-size: clamp(30px, 5vw, 48px); color: var(--lb-white); }
.lb-h1 .lb-script { font-family: var(--lb-script); font-weight: 600; text-transform: none; font-size: .68em; color: var(--lb-gold-light); margin-left: 6px; }
.lb-h1-sub { font-size: 18px; font-weight: 700; margin: 0 0 18px; }
.lb-h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; margin: 0 0 6px; letter-spacing: -.01em; }
.lb-h2--light { color: var(--lb-white); }
.lb-h3 { font-size: 20px; font-weight: 800; margin: 28px 0 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lb-bar { width: 64px; height: 4px; background: var(--lb-gold); border-radius: 2px; margin: 0 0 22px; }
.lb-body { color: var(--lb-ink); max-width: 720px; }
.lb-section--dark .lb-body, .lb-section--dark p { color: rgba(255, 255, 255, .88); }
.lb-gold-text { color: var(--lb-gold-light); font-weight: 700; }

/* ---------- Hero ---------- */
.lb-hero { position: relative; background: var(--lb-black); color: var(--lb-white); overflow: hidden; }
.lb-hero__media { max-height: 460px; overflow: hidden; }
.lb-hero__media img { width: 100%; height: 460px; object-fit: cover; filter: grayscale(1) contrast(1.05); opacity: .9; }
.lb-hero__content { max-width: 900px; margin: 0 auto; padding: 40px 24px 48px; text-align: center; }
.lb-hero__intro { max-width: 720px; margin: 0 auto 22px; color: rgba(255, 255, 255, .85); }
.lb-hero .lb-eyebrow { color: var(--lb-gold-light); }
.lb-hero--single .lb-hero__media img { height: 340px; filter: none; opacity: 1; }
.lb-back { color: var(--lb-gold-light); font-weight: 600; font-size: 13px; }
.lb-check { font-size: .7em; }

/* ---------- Buttons / CTAs ---------- */
.lb-btn { display: inline-flex; align-items: center; gap: 8px; padding: 15px 30px; border-radius: 999px; font-weight: 700; font-size: 15px; transition: transform .15s var(--lb-ease), box-shadow .15s var(--lb-ease); }
.lb-btn--gold { background: linear-gradient(135deg, var(--lb-gold-light), var(--lb-gold)); color: var(--lb-black); box-shadow: var(--lb-shadow); }
.lb-btn--gold:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(184, 135, 58, .35); }
.lb-cta-block { margin-top: 6px; }
.lb-link { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--lb-gold); font-size: 14px; }

/* ---------- Stats ---------- */
.lb-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; flex: 1; }
.lb-stat { background: var(--lb-white); border: 1px solid var(--lb-cream-line); border-radius: var(--lb-radius); padding: 18px; }
.lb-stat__number { font-size: 26px; font-weight: 800; color: var(--lb-gold); line-height: 1.1; margin-bottom: 4px; }
.lb-stat__label { font-size: 13px; color: var(--lb-muted); line-height: 1.45; }

/* ---------- History / Now blocks ---------- */
.lb-history__wide { border-radius: var(--lb-radius); margin-bottom: 22px; width: 100%; object-fit: cover; box-shadow: var(--lb-shadow); }
.lb-history__row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-top: 10px; }
.lb-history__couple { width: 220px; border-radius: var(--lb-radius); flex-shrink: 0; box-shadow: var(--lb-shadow); }

/* ---------- Encounters ---------- */
.lb-encounter-intro { font-weight: 700; margin-top: 32px; }
.lb-encounters { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; margin-top: 16px; }
.lb-encounter { background: var(--lb-white); border-radius: var(--lb-radius); overflow: hidden; box-shadow: var(--lb-shadow); }
.lb-encounter h3 { margin: 18px 20px 6px; font-size: 17px; }
.lb-encounter p { margin: 0 20px 16px; font-size: 14px; color: var(--lb-muted); }
.lb-encounter img { width: 100%; }

/* ---------- Money callouts ---------- */
.lb-money-callout { font-family: var(--lb-script); font-size: 15px; color: var(--lb-ink); margin-top: 14px; }
.lb-money-callout em { font-style: normal; font-family: var(--lb-sans); font-weight: 800; font-size: 1.6em; color: var(--lb-gold); margin-left: 6px; display: inline-block; }
.lb-section--dark .lb-money-callout, .lb-section--dark .lb-money-callout em { color: var(--lb-white); }

/* ---------- Badges ---------- */
.lb-badge-complete { display: inline-flex; align-items: center; gap: 6px; background: var(--lb-green); color: var(--lb-white); font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.lb-badge-complete--inline { font-size: 12px; }
.lb-project-card__media { position: relative; }
.lb-project-card__media .lb-badge-complete { position: absolute; top: 10px; right: 10px; }

/* ---------- Progress bars ---------- */
.lb-progress { background: rgba(20, 18, 15, .08); border-radius: 999px; height: 10px; overflow: hidden; margin-top: 10px; }
.lb-progress--lg { height: 16px; }
.lb-progress__bar { background: linear-gradient(90deg, var(--lb-gold), var(--lb-gold-light)); height: 100%; border-radius: 999px; }
.lb-section--dark .lb-progress { background: rgba(255, 255, 255, .12); }

/* ---------- Phase timeline ---------- */
.lb-phase-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.lb-phase-card { background: var(--lb-white); border-radius: var(--lb-radius); overflow: hidden; box-shadow: var(--lb-shadow); border: 1px solid var(--lb-cream-line); }
.lb-phase-card.is-complete { border-color: var(--lb-green); }
.lb-phase-card__media img { width: 100%; height: 180px; object-fit: cover; }
.lb-phase-card__body { padding: 18px 20px 22px; }
.lb-phase-card__body h3 { margin: 0 0 6px; font-size: 18px; }
.lb-phase-card__body p { margin: 0 0 4px; font-size: 14px; color: var(--lb-muted); }
.lb-project-card__figures { font-size: 13px; color: var(--lb-muted); margin-top: 6px; }

/* ---------- Give instructions block ---------- */
.lb-give-block { max-width: 640px; margin: 0 auto; text-align: center; padding: 8px 0 56px; }
.lb-give-block__title { font-size: 22px; font-weight: 800; margin: 0 0 18px; color: var(--lb-gold-light); }
.lb-give-block__body { display: flex; align-items: center; gap: 18px; text-align: left; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--lb-radius); padding: 22px 24px; margin-bottom: 20px; }
.lb-give-block__icon { font-size: 40px; flex-shrink: 0; }
.lb-give-steps { margin: 0; padding-left: 18px; font-size: 15px; }
.lb-give-steps li { margin-bottom: 8px; }
.lb-give-steps li:last-child { margin-bottom: 0; }

/* ---------- Project grid / cards ---------- */
.lb-project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.lb-project-card { background: var(--lb-white); border-radius: var(--lb-radius); overflow: hidden; box-shadow: var(--lb-shadow); display: block; transition: transform .15s var(--lb-ease); }
.lb-project-card:hover { transform: translateY(-3px); }
.lb-project-card__media img { width: 100%; height: 160px; object-fit: cover; }
.lb-project-card__body { padding: 16px 18px 20px; }
.lb-project-card__body h3 { margin: 0 0 6px; font-size: 16px; }
.lb-project-card__body p { margin: 0; font-size: 13px; color: var(--lb-muted); }

/* ---------- Gallery (single project page) ---------- */
.lb-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.lb-gallery img { border-radius: var(--lb-radius); width: 100%; height: 220px; object-fit: cover; }

/* ---------- Partner form ---------- */
.lb-partner { max-width: 640px; margin: 0 auto; text-align: center; }
.lb-form { text-align: left; margin-top: 22px; background: var(--lb-white); border-radius: var(--lb-radius); padding: 22px; box-shadow: var(--lb-shadow); }
.lb-form__row { display: flex; gap: 14px; flex-wrap: wrap; }
.lb-form label { display: block; font-size: 12px; font-weight: 600; color: var(--lb-ink); margin: 0 0 14px; flex: 1; min-width: 200px; }
.lb-form input, .lb-form select { width: 100%; margin-top: 5px; padding: 11px 14px; border: 1.5px solid var(--lb-cream-line); border-radius: 10px; font-size: 14px; font-family: inherit; color: var(--lb-ink); }
.lb-form input:focus, .lb-form select:focus { outline: none; border-color: var(--lb-gold); }
.lb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lb-form__msg { font-size: 13px; border-radius: 10px; padding: 0; margin-top: 10px; display: none; }
.lb-form__msg.show { display: block; padding: 10px 14px; }
.lb-form__msg.ok { background: rgba(31, 139, 63, .12); color: var(--lb-green); }
.lb-form__msg.err { background: rgba(220, 53, 69, .1); color: #b3262f; }

/* ---------- Footer ---------- */
.lb-footer { background: var(--lb-black); color: rgba(255, 255, 255, .7); padding: 26px 24px; text-align: center; font-size: 13px; }
.lb-footer a { color: var(--lb-gold-light); }
.lb-footer__inner > p { margin: 4px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .lb-section { padding: 40px 18px; }
  .lb-hero__content { padding: 32px 18px 40px; }
  .lb-stats { grid-template-columns: 1fr; }
  .lb-history__row { flex-direction: column; }
  .lb-history__couple { width: 100%; max-width: 260px; }
  .lb-give-block__body { flex-direction: column; text-align: center; }
  .lb-form__row { flex-direction: column; gap: 0; }
  /* "LEGACY Builders" was clipping at the viewport edge instead of
     wrapping — force the script word onto its own line below ~480px
     rather than relying on font-size clamp math to always leave room. */
  .lb-h1 .lb-script { display: block; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .lb-project-card, .lb-btn { transition: none; }
}
