/* =========================================================================
   Ledger Bookkeeping — theme.css
   A thin design-token layer on top of Bootstrap 5.
   Change the whole look here: edit the :root variables for colour + type,
   and everything below inherits. Structure lives in the HTML (Bootstrap grid).
   ========================================================================= */

:root {
  /* ---- Palette: brand green on warm off-white ---- */
  --lb-bg: #FAF9F5;
  /* page background */
  --lb-surface: #FFFFFF;
  /* cards, forms, header on scroll */
  --lb-ink: #232B22;
  /* main text */
  --lb-muted: #5C665A;
  /* secondary text */
  --lb-primary: #84BD3F;
  /* brand green */
  --lb-primary-dark: #699A2F;
  /* hover / darker green */
  --lb-accent: #4F7A24;
  /* eyebrows, small highlights */
  --lb-accent-soft: #EAF3DB;
  /* pale green tint */
  --lb-line: #E2E0D5;
  /* hairline borders */
  --lb-danger: #C6503D;
  /* leak / warning red */

  /* ---- Type ---- */
  --lb-font-heading: 'Poppins', system-ui, sans-serif;
  --lb-font-body: 'Open Sans', system-ui, sans-serif;

  /* ---- Layout ---- */
  --lb-container: 1160px;
  --lb-radius: 14px;

  /* Remap Bootstrap's own tokens so components (buttons, links, focus
     rings) use the brand automatically. */
  --bs-primary: var(--lb-primary);
  --bs-primary-rgb: 132, 189, 63;
  --bs-body-font-family: var(--lb-font-body);
  --bs-body-color: var(--lb-ink);
  --bs-body-bg: var(--lb-bg);
  --bs-border-color: var(--lb-line);
  --bs-link-color: var(--lb-primary-dark);
  --bs-link-hover-color: var(--lb-accent);
}

* {
  scroll-behavior: smooth;
}

body {
  font-family: var(--lb-font-body);
  color: var(--lb-ink);
  background: var(--lb-bg);
  line-height: 1.65;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
.lb-display {
  font-family: var(--lb-font-heading);
  color: var(--lb-ink);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h1,
.lb-display {
  font-weight: 700;
}

h2,
h3,
h4 {
  font-weight: 600;
}

.lb-container {
  max-width: var(--lb-container);
}

/* ---- Eyebrow label ---- */
.lb-eyebrow {
  display: inline-block;
  font-family: var(--lb-font-body);
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--lb-primary-dark);
  margin-bottom: .75rem;
}

.lb-eyebrow--pill {
  background: rgba(132, 189, 63, .14);
  border: 1px solid rgba(132, 189, 63, .34);
  border-radius: 999px;
  padding: .4rem .9rem;
}

.lb-subhead {
  font-family: var(--lb-font-heading);
  font-weight: 500;
  font-size: 1.12rem;
  color: var(--lb-primary-dark);
}

.text-muted-2 {
  color: var(--lb-muted) !important;
}

/* ---- Buttons: brand the Bootstrap classes ---- */
.btn {
  font-weight: 600;
  border-radius: 8px;
  padding: .7rem 1.4rem;
}

.btn-primary {
  --bs-btn-bg: var(--lb-primary);
  --bs-btn-border-color: var(--lb-primary);
  --bs-btn-hover-bg: var(--lb-primary-dark);
  --bs-btn-hover-border-color: var(--lb-primary-dark);
  --bs-btn-active-bg: var(--lb-primary-dark);
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  box-shadow: 0 8px 18px rgba(132, 189, 63, .28);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-ghost {
  background: #fff;
  color: var(--lb-primary-dark);
  border: 1px solid var(--lb-line);
}

.btn-ghost:hover {
  border-color: var(--lb-primary);
  color: var(--lb-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(35, 43, 34, .10);
}

.btn .lb-ic {
  transition: transform .2s ease;
}

.btn:hover .lb-ic {
  transform: translateX(3px);
}

/* Inline SVG icon sizing */
.lb-ic {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  vertical-align: -.15em;
}

/* =========================================================================
   Header
   ========================================================================= */
.lb-header {
  background: rgba(250, 249, 245, .9);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--lb-line);
  transition: box-shadow .2s ease, background .2s ease;
  width: 100%;
}

.lb-header.is-scrolled {
  box-shadow: 0 6px 18px rgba(35, 43, 34, .08);
  background: rgba(250, 249, 245, .98);
}

/* Header and footer stretch edge-to-edge; only their inner content gets a
   comfortable, responsive side gutter instead of the site's normal 1160px
   content cap (--lb-container is intentionally left untouched everywhere
   else, since ~90 other content sections rely on that boxed width). */
.lb-header .navbar > .container.lb-container,
.lb-footer > .container.lb-container {
  max-width: none;
  width: 100%;
  padding-left: clamp(1rem, 4vw, 3.5rem);
  padding-right: clamp(1rem, 4vw, 3.5rem);
}

.lb-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
}

.lb-brand__mark {
  font-family: var(--lb-font-heading);
  font-size: 1.7rem;
  line-height: 1;
  color: var(--lb-primary);
}

.lb-brand__name {
  font-family: var(--lb-font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--lb-ink);
}

.navbar-nav .nav-link {
  white-space: nowrap;
  color: var(--lb-ink);
  font-weight: 500;
  position: relative;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 2px;
  height: 2px;
  background: var(--lb-accent);
  transition: right .2s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  right: 0;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--lb-primary-dark);
}

.lb-header__phone {
  color: var(--lb-ink);
  font-size: .9rem;
  text-decoration: none;
}

.lb-header__phone:hover {
  color: var(--lb-primary-dark);
}

/* =========================================================================
   Section scaffolding
   ========================================================================= */
.lb-section {
  padding: 5.5rem 0;
}

.lb-section--muted {
  background: var(--lb-surface);
  border-top: 1px solid var(--lb-line);
  border-bottom: 1px solid var(--lb-line);
}

.lb-section__title {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
}

/* Page hero (interior pages) */
.lb-page-hero {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--lb-line);
  background: linear-gradient(180deg, var(--lb-accent-soft) 0%, var(--lb-bg) 100%);
}

.lb-page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
}

.lb-page-hero__lede {
  color: var(--lb-muted);
  font-size: 1.12rem;
  max-width: 620px;
}

/* =========================================================================
   Home hero
   ========================================================================= */
.lb-hero {
  position: relative;
  padding: 5.5rem 0 5rem;
  background: #f6f8f1;
  overflow: hidden;
  isolation: isolate;
}

.lb-hero__band {
  position: absolute;
  z-index: -2;
  top: 0;
  right: 0;
  bottom: 0;
  width: 46%;
  background: linear-gradient(150deg, var(--lb-primary) 0%, var(--lb-primary-dark) 100%);
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
  opacity: .12;
}

.lb-hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .5;
  background-image:
    linear-gradient(rgba(132, 189, 63, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(132, 189, 63, .10) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 78% 40%, #000 20%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 80% at 78% 40%, #000 20%, transparent 72%);
}

.lb-hero__headline {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 700;
}

.lb-hero__hl {
  color: var(--lb-primary);
  position: relative;
  white-space: nowrap;
}

.lb-hero__hl::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: .06em;
  height: .16em;
  background: rgba(132, 189, 63, .4);
  border-radius: 2px;
  z-index: -1;
}

.lb-hero__lede {
  color: var(--lb-muted);
  font-size: 1.1rem;
  max-width: 540px;
}

.lb-hero__lede strong {
  color: var(--lb-primary-dark);
}

.lb-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #fff;
  border: 1px solid var(--lb-line);
  border-radius: 999px;
  padding: .45rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(35, 43, 34, .05);
}

.lb-pill .lb-ic {
  color: var(--lb-primary);
}

/* Hero media + floating cards */
.lb-hero__media {
  position: relative;
  max-width: 460px;
  margin-inline: auto;
}

.lb-hero__frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 6px solid #fff;
  box-shadow: 0 40px 80px rgba(35, 43, 34, .22);
}

.lb-hero__frame img,
.lb-hero__frame .lb-hero__video {
  width: 100%;
  display: block;
  aspect-ratio: 4/4.2;
  object-fit: cover;
}

.lb-float {
  position: absolute;
  background: #fff;
  border: 1px solid var(--lb-line);
  border-radius: 16px;
  box-shadow: 0 22px 46px rgba(35, 43, 34, .20);
  padding: 1rem 1.1rem;
}

.lb-float--status {
  right: -18px;
  top: 20%;
  width: 210px;
}

.lb-float--metric {
  left: -22px;
  bottom: 24px;
  width: 205px;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.lb-float__label {
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--lb-muted);
  font-weight: 700;
  margin-bottom: .5rem;
}

.lb-float__row {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--lb-muted);
  padding: .4rem 0;
  border-bottom: 1px solid var(--lb-line);
}

.lb-float__row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.lb-float__val {
  font-weight: 700;
  color: var(--lb-ink);
}

.lb-float__val--accent {
  color: var(--lb-primary);
}

.lb-float__ic {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lb-accent-soft);
  color: var(--lb-primary-dark);
}

.lb-float__big {
  font-family: var(--lb-font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--lb-primary-dark);
  line-height: 1;
}

.lb-float__note {
  font-size: .68rem;
  color: var(--lb-muted);
  margin: .25rem 0 0;
}

@media (max-width: 991px) {
  .lb-float--status {
    right: 0;
  }

  .lb-float--metric {
    left: 0;
  }
}

@media (max-width: 420px) {
  .lb-float {
    transform: scale(.85);
  }

  .lb-float--status {
    right: -10px;
  }

  .lb-float--metric {
    left: -10px;
  }
}

/* =========================================================================
   Cards
   ========================================================================= */
.lb-card {
  background: #fff;
  border: 1px solid var(--lb-line);
  border-radius: var(--lb-radius);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.lb-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 34px rgba(35, 43, 34, .10);
  border-color: var(--lb-primary);
}

.lb-card__ic {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lb-accent-soft);
  color: var(--lb-primary-dark);
}

.lb-card__ic .lb-ic {
  width: 1.4em;
  height: 1.4em;
}

/* Risk chip */
.lb-chip {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: #fff;
  border: 1px solid var(--lb-line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  font-size: .95rem;
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.lb-chip:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 26px rgba(35, 43, 34, .10);
  border-color: #E2B4A6;
}

.lb-chip .lb-ic {
  color: var(--lb-danger);
  width: 1.25em;
  height: 1.25em;
}

/* Leak card (problems) */
.lb-leak {
  position: absolute;
  right: -14px;
  bottom: -20px;
  width: 190px;
  background: #fff;
  border: 1px solid var(--lb-line);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 22px 46px rgba(35, 43, 34, .22);
}

.lb-leak__ic {
  color: var(--lb-danger);
}

.lb-leak__val {
  font-family: var(--lb-font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--lb-danger);
  line-height: 1.1;
  margin: .3rem 0 0;
}

.lb-photo {
  width: 100%;
  border-radius: 20px;
  border: 6px solid #fff;
  box-shadow: 0 34px 64px rgba(35, 43, 34, .18);
  object-fit: cover;
}

/* Ledger-style service row */
.lb-row {
  display: grid;
  grid-template-columns: 260px 1fr auto;
  gap: 1.25rem;
  align-items: baseline;
  padding: 1.4rem 0;
  border-bottom: 1px dashed var(--lb-line);
}

.lb-row__name {
  font-family: var(--lb-font-heading);
  font-weight: 600;
  font-size: 1.05rem;
}

.lb-row__desc {
  color: var(--lb-muted);
  font-size: .95rem;
  margin: 0;
}

.lb-row__arrow {
  color: var(--lb-accent);
}

@media (max-width: 720px) {
  .lb-row {
    grid-template-columns: 1fr;
    gap: .35rem;
  }

  .lb-row__arrow {
    display: none;
  }
}

/* Highlight band */
.lb-band {
  background: linear-gradient(150deg, var(--lb-primary) 0%, var(--lb-primary-dark) 100%);
  color: #fff;
  border-radius: 20px;
}

.lb-band h2,
.lb-band h3 {
  color: #fff;
}

.lb-band p {
  color: rgba(255, 255, 255, .92);
}

.lb-band .btn-primary {
  --bs-btn-bg: #fff;
  --bs-btn-color: var(--lb-primary-dark);
  --bs-btn-hover-bg: var(--lb-bg);
  --bs-btn-hover-color: var(--lb-primary-dark);
  --bs-btn-border-color: #fff;
  --bs-btn-hover-border-color: var(--lb-bg);
  box-shadow: none;
}

/* Numbered process step */
.lb-step__num {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--lb-font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--lb-accent-soft);
  color: var(--lb-primary-dark);
  border: 2px solid var(--lb-primary);
}

.lb-step {
  position: relative;
}

.lb-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 26px;
  top: 60px;
  bottom: -1.5rem;
  width: 2px;
  background: var(--lb-line);
}

.lb-tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--lb-accent-soft);
  color: var(--lb-primary-dark);
  border-radius: 999px;
  padding: .3rem .8rem;
  font-size: .78rem;
  font-weight: 600;
}

/* Testimonials */
.lb-review {
  background: #fff;
  border: 1px solid var(--lb-line);
  border-radius: var(--lb-radius);
  padding: 2rem;
  height: 100%;
}

.lb-review__quote {
  color: var(--lb-primary);
}

.lb-review__text {
  font-size: 1.02rem;
  color: var(--lb-ink);
}

.lb-review__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.lb-review__name {
  font-family: var(--lb-font-heading);
  font-weight: 700;
  display: block;
}

.lb-review__role {
  color: var(--lb-muted);
  font-size: .85rem;
}

/* Accordion brand */
.accordion {
  --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(132, 189, 63, .25);
  --bs-accordion-active-bg: var(--lb-accent-soft);
  --bs-accordion-active-color: var(--lb-primary-dark);
  --bs-accordion-border-color: var(--lb-line);
}

.accordion-button {
  font-family: var(--lb-font-heading);
  font-weight: 600;
}

/* Forms */
.lb-form {
  background: #fff;
  border: 1px solid var(--lb-line);
  border-radius: var(--lb-radius);
  padding: 2rem;
}

.form-control,
.form-select {
  border-color: var(--lb-line);
  padding: .7rem .85rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--lb-primary);
  box-shadow: 0 0 0 .2rem rgba(132, 189, 63, .2);
}

.lb-form__status {
  min-height: 1.2em;
  font-size: .9rem;
}

.lb-form__status.ok {
  color: var(--lb-primary-dark);
}

.lb-form__status.err {
  color: var(--lb-danger);
}

/* =========================================================================
   Footer
   ========================================================================= */
.lb-footer {
  background: #F1F4EC;
  border-top: 1px solid #E1E8D9;
  color: var(--lb-muted);
  width: 100%;
}

.lb-footer__mark {
  font-family: var(--lb-font-heading);
  font-size: 1.6rem;
  color: var(--lb-primary-dark);
}

.lb-footer__name {
  font-family: var(--lb-font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--lb-ink);
}

.lb-footer__heading {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .75rem;
  color: var(--lb-primary-dark);
  font-weight: 700;
}

.lb-footer a {
  color: var(--lb-ink);
  text-decoration: none;
}

.lb-footer a:hover {
  color: var(--lb-primary-dark);
}

.lb-footer__bottom {
  border-top: 1px solid #E1E8D9;
  color: #8A9385;
  font-size: .82rem;
}

/* =========================================================================
   Scroll reveal
   ========================================================================= */
.lb-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}

.lb-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .lb-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none;
  }

  * {
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------------
 * Blog post content (single.php)
 * ------------------------------------------------------------------------- */
.lb-post-content h2 {
  margin-top: 2rem;
  margin-bottom: .75rem;
  font-size: 1.5rem;
  color: var(--lb-ink);
}

.lb-post-content h3 {
  margin-top: 1.75rem;
  margin-bottom: .6rem;
  font-size: 1.2rem;
  color: var(--lb-ink);
}

.lb-post-content p {
  margin-bottom: 1.1rem;
  line-height: 1.75;
}

.lb-post-content ul,
.lb-post-content ol {
  margin-bottom: 1.1rem;
  padding-left: 1.4rem;
}

.lb-post-content li {
  margin-bottom: .4rem;
  line-height: 1.7;
}

.lb-post-content img,
.lb-post-content figure {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin: 1.5rem 0;
}

.lb-post-content blockquote {
  border-left: 4px solid var(--lb-green, #84BD3F);
  margin: 1.5rem 0;
  padding: .25rem 1.25rem;
  font-style: italic;
  color: var(--lb-ink);
}

.lb-post-content a {
  color: var(--lb-green, #84BD3F);
  text-decoration: underline;
}

.lb-page-links {
  margin-top: 1.5rem;
  font-weight: 600;
}

.lb-page-links a {
  margin-left: .5rem;
}