/* ============================================================
   Design tokens (from the Classical design system, tuned with
   this site's cream/sand/taupe/ink palette and Figtree/Poppins
   type). Retune colors and spacing here.
   ============================================================ */
:root {
  --font-heading: "Figtree", system-ui, sans-serif;
  --font-heading-weight: 600;
  --font-body: "Poppins", system-ui, sans-serif;

  --color-bg: #f7f5f3;
  --color-surface: #ead9cd;
  --color-text: #1a1a1a;
  --color-accent: #c9736e;
  --color-accent-2: #d9b79d;
  --color-divider: rgba(26, 26, 26, 0.16);

  --color-accent-100: #fbeeec;
  --color-accent-200: #f3d7d5;
  --color-accent-300: #e4b0ac;
  --color-accent-400: #d69893;
  --color-accent-500: #c9736e;
  --color-accent-600: #b6605b;
  --color-accent-700: #9b4e4a;
  --color-accent-800: #7c3e3b;
  --color-accent-900: #5a2d2b;

  --color-neutral-100: #faf8f6;
  --color-neutral-200: #efeae5;
  --color-neutral-300: #ded5cd;
  --color-neutral-400: #cbbfb4;
  --color-neutral-500: #d9b79d;
  --color-neutral-600: #8f867e;
  --color-neutral-700: #6b645e;
  --color-neutral-800: #43403d;
  --color-neutral-900: #1a1a1a;

  --space-1: 4.6px;
  --space-2: 9.2px;
  --space-3: 13.8px;
  --space-4: 18.4px;
  --space-6: 27.6px;
  --space-8: 36.8px;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 7px;

  --shadow-sm: 0 1px 2px rgba(45, 43, 43, 0.14);
  --shadow-md: 0 3px 10px rgba(45, 43, 43, 0.16);
  --shadow-lg: 0 12px 32px rgba(45, 43, 43, 0.22);

  --bb-cream: #f7f5f3;
  --bb-sand: #ead9cd;
  --bb-taupe: #d9b79d;
  --bb-ink: #1a1a1a;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }

p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-600); }
img { display: block; max-width: 100%; }
figure { margin: 0; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — buttons (Classical .btn family) — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
  transition: background .2s ease, color .2s ease, transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s ease;
}
.btn span[aria-hidden="true"] { display: inline-block; transition: transform .3s cubic-bezier(.2,.7,.3,1); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20, 18, 17, 0.2); }
  .btn-secondary:hover { background: rgba(26, 26, 26, 0.05); }
  .btn:hover span[aria-hidden="true"] { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .btn:active { transform: none; }
  .btn:hover span[aria-hidden="true"] { transform: none; }
}
.btn-secondary { border-color: var(--color-divider); }
.btn-block { width: 100%; margin-top: var(--space-2); }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 1px solid var(--color-divider);
}
.table td { padding: var(--space-2); border-bottom: 1px solid var(--color-divider); }
.table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }

/* ============================================================
   Page layout & behavior
   ============================================================ */
.bb-just { text-align: justify; text-wrap: pretty; hyphens: auto; }
@media (max-width: 760px) { .bb-hide-sm { display: none !important; } }

.bb-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
@media (max-width: 780px) { .bb-hero { grid-template-columns: minmax(0, 1fr); } }

.bb-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
@media (max-width: 860px) { .bb-2col { grid-template-columns: minmax(0, 1fr); } }

.bb-tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 1180px) { .bb-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .bb-tiers { grid-template-columns: minmax(0, 1fr); } }

@keyframes bbSlide {
  0% { opacity: 0; transform: scale(1); }
  1.7% { opacity: 1; }
  12.9% { opacity: 1; }
  15.9% { opacity: 0; transform: scale(1.07); }
  100% { opacity: 0; transform: scale(1); }
}
@keyframes bbRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.bb-rise { opacity: 0; will-change: opacity, transform; }
.bb-rise.bb-in { opacity: 1; animation: bbRise .72s cubic-bezier(.22,.61,.36,1) backwards; }
@media (prefers-reduced-motion: reduce) { .bb-rise { opacity: 1 !important; } .bb-rise.bb-in { animation: none; } }

.bb-svc { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.bb-loc { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
@media (max-width: 860px) { .bb-svc { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .bb-loc { grid-template-columns: minmax(0, 1fr); } }

.bb-review-card { flex: 0 0 clamp(270px, 82vw, 360px); scroll-snap-align: start; }
.bb-reviews-track { scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.bb-reviews-track::-webkit-scrollbar { display: none; }
.bb-reviews-fade { position: absolute; top: 0; bottom: 0; width: clamp(24px, 6vw, 90px); pointer-events: none; z-index: 2; }
.bb-reviews-fade-l { left: 0; background: linear-gradient(to right, var(--bb-sand), transparent); }
.bb-reviews-fade-r { right: 0; background: linear-gradient(to left, var(--bb-sand), transparent); }
@media (max-width: 700px) { .bb-reviews-fade { display: none; } }

.bb-locgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 700px) { .bb-locgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.bb-setup-item { border-radius: 10px; transition: background .35s ease; }
.bb-setup-item.is-active { background: rgba(247, 245, 243, 0.08); }
.bb-setup-item.is-active > span:first-child { color: var(--bb-cream); }

#hero-word {
  border-right: 2px solid var(--color-accent-300);
  padding-right: 3px;
  white-space: nowrap;
  animation: bbCaret 1s steps(1) infinite;
}
@keyframes bbCaret { 0%, 49% { border-color: var(--color-accent-300); } 50%, 100% { border-color: transparent; } }
@media (prefers-reduced-motion: reduce) { #hero-word { animation: none; border-right: 0; padding-right: 0; } }

.bb-navlinks { display: flex; align-items: center; gap: 2px; }
@media (max-width: 900px) { .bb-navlinks { display: none; } }

.bb-mobile-toggle { display: none; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; border-radius: 50%; border: 0; background: transparent; color: inherit; cursor: pointer; }
@media (max-width: 900px) { .bb-mobile-toggle { display: inline-flex; } }
.bb-mobile-toggle .bb-icon-close { display: none; }
.bb-mobile-toggle.is-open .bb-icon-menu { display: none; }
.bb-mobile-toggle.is-open .bb-icon-close { display: block; }

.bb-mobile-panel { width: 100%; flex: none; display: flex; justify-content: center; overflow: hidden; transition: opacity .18s ease; opacity: 0; max-height: 0; pointer-events: none; }
.bb-mobile-panel.is-open { opacity: 1; max-height: 420px; pointer-events: auto; }
@media (min-width: 901px) { .bb-mobile-panel { display: none !important; } }
.bb-mobile-panel a {
  display: block; color: inherit; text-decoration: none; font-size: 14px; padding: 11px 14px;
  border-radius: 10px; transition: background .2s ease;
}

.bb-mega { display: grid; grid-template-columns: 260px 1px minmax(0, 1fr); gap: clamp(20px, 2.6vw, 36px); align-items: start; }
@media (max-width: 820px) { .bb-mega { grid-template-columns: minmax(0, 1fr); } .bb-mega > .bb-mega-rule { display: none; } }

/* — Blog & article pages — */
.bb-post-card {
  background: var(--bb-cream); border: 1px solid var(--color-divider); border-radius: 20px;
  padding: clamp(22px, 2.4vw, 30px); box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  gap: var(--space-3); text-decoration: none; color: inherit;
  transition: transform .32s cubic-bezier(.22,.61,.36,1), box-shadow .32s ease, border-color .32s ease;
}
.bb-tag { display: inline-flex; align-items: center; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-accent-700); }
.bb-article { max-width: 68ch; margin: 0 auto; }
.bb-article h2 { font-family: var(--font-heading); font-weight: 600; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; letter-spacing: -0.01em; margin: clamp(32px, 4vw, 48px) 0 var(--space-3); color: var(--bb-ink); }
.bb-article h3 { font-family: var(--font-heading); font-weight: 600; font-size: clamp(18px, 2vw, 21px); line-height: 1.25; margin: clamp(24px, 3vw, 32px) 0 var(--space-2); color: var(--bb-ink); }
.bb-article p { font-size: 16.5px; line-height: 1.75; color: var(--color-neutral-900); margin: 0 0 var(--space-4); }
.bb-article ul, .bb-article ol { margin: 0 0 var(--space-4); padding-left: 1.25em; font-size: 16.5px; line-height: 1.7; color: var(--color-neutral-900); }
.bb-article li { margin-bottom: var(--space-2); }
.bb-article li:last-child { margin-bottom: 0; }
.bb-article a { text-decoration: underline; }
.bb-article a.bb-post-card { text-decoration: none; }
.bb-article blockquote {
  margin: clamp(28px, 3.4vw, 40px) 0; padding: var(--space-4) var(--space-6);
  border-left: 3px solid var(--color-accent-500); background: var(--bb-sand); border-radius: 0 14px 14px 0;
  font-family: var(--font-heading); font-weight: 500; font-size: clamp(18px, 2vw, 22px); line-height: 1.4; color: var(--bb-ink);
}

/* Mega-menu / locations dropdown panels: collapsed by default, expanded via .is-open (js/main.js) */
.bb-megawrap {
  width: 100%; flex: none; display: flex; justify-content: center; overflow: hidden;
  transition: opacity .18s ease; opacity: 0; max-height: 0; pointer-events: none;
}
.bb-megawrap.is-open { opacity: 1; pointer-events: auto; }
#mega-services-panel.is-open { max-height: 640px; }
#mega-locations-panel.is-open { max-height: 70vh; }

/* — hero logo bar: lift + glow the hovered brand, dim the rest — */
.bb-logo { cursor: default; }
.bb-logo img {
  opacity: 0.85;
  filter: brightness(0) invert(1);
  transition: opacity .3s ease, transform .3s cubic-bezier(.2,.7,.3,1), filter .3s ease;
  will-change: transform;
}
@media (hover: hover) {
  .bb-logobar:hover .bb-logo img { opacity: 0.4; }
  .bb-logobar .bb-logo:hover img {
    opacity: 1;
    transform: translateY(-3px) scale(1.14);
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(228, 176, 172, 0.6));
  }
}
@media (prefers-reduced-motion: reduce) {
  .bb-logo img { transition: opacity .3s ease; }
  .bb-logobar .bb-logo:hover img { transform: none; }
}

/* — header + footer brand logo: bell tips and warms to the accent, wordmark nudges — */
header > a:first-child svg,
footer a:has(> svg) svg {
  transform-origin: 50% 20%;
  transition: transform .45s cubic-bezier(.2,.7,.3,1), color .3s ease;
}
header > a:first-child > span:last-child,
footer a:has(> svg) > span {
  display: inline-block;
  transition: transform .3s cubic-bezier(.2,.7,.3,1), opacity .3s ease;
}
@media (hover: hover) {
  header > a:first-child:hover svg,
  footer a:has(> svg):hover svg {
    transform: rotate(-14deg) scale(1.15);
    color: var(--color-accent-300) !important;
  }
  header > a:first-child:hover > span:last-child,
  footer a:has(> svg):hover > span {
    transform: translateX(3px);
  }
}
@media (prefers-reduced-motion: reduce) {
  header > a:first-child:hover svg,
  footer a:has(> svg):hover svg { transform: none; }
  header > a:first-child:hover > span:last-child,
  footer a:has(> svg):hover > span { transform: none; }
}

/* — footer links: accent underline grows in + small nudge; Book a Call button lifts — */
footer a[data-hover="color: var(--bb-cream)"],
footer a[href^="tel:"] {
  align-self: flex-start;
  padding-bottom: 2px;
  background-image: linear-gradient(var(--color-accent-300), var(--color-accent-300));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: color .2s ease, background-size .35s cubic-bezier(.2,.7,.3,1), transform .3s cubic-bezier(.2,.7,.3,1) !important;
}
footer a.btn {
  transition: background .2s ease, color .2s ease, transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s ease !important;
}
@media (hover: hover) {
  footer a[data-hover="color: var(--bb-cream)"]:hover,
  footer a[href^="tel:"]:hover {
    background-size: 100% 1px;
    transform: translateX(3px);
  }
  footer a.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(228, 176, 172, 0.35);
  }
}
@media (prefers-reduced-motion: reduce) {
  footer a[data-hover="color: var(--bb-cream)"]:hover,
  footer a[href^="tel:"]:hover,
  footer a.btn:hover { transform: none; }
}

/* — header nav: smooth pill fade + accent underline grows from center; Book a Call lifts — */
.bb-navlinks > a,
.bb-navlinks > button {
  position: relative;
  transition: background .25s ease, color .25s ease;
}
.bb-navlinks > a::after,
.bb-navlinks > button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 0;
  height: 1px;
  background: var(--color-accent-300);
  transform: translateX(-50%);
  transition: width .3s cubic-bezier(.2,.7,.3,1);
}
.bb-navlinks > a:focus-visible::after,
.bb-navlinks > button:focus-visible::after { width: calc(100% - 22px); }
header > a[href*="hubspot"] {
  transition: background .25s ease, transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s ease;
}
@media (hover: hover) {
  .bb-navlinks > a:hover::after,
  .bb-navlinks > button:hover::after { width: calc(100% - 22px); }
  header > a[href*="hubspot"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(228, 176, 172, 0.35);
  }
}
@media (prefers-reduced-motion: reduce) {
  header > a[href*="hubspot"]:hover { transform: none; }
}

/* — image frames: frame lifts slightly, photo slowly zooms inside the rounded crop — */
section div:has(> img:not([src*="logo-"])) {
  transition: transform .45s cubic-bezier(.22,.61,.36,1), box-shadow .45s ease;
}
section div:has(> img:not([src*="logo-"])) > img {
  transition: transform .9s cubic-bezier(.2,.7,.3,1);
  will-change: transform;
}
@media (hover: hover) {
  section div:has(> img:not([src*="logo-"])):hover {
    transform: scale(1.015);
    box-shadow: var(--shadow-lg);
  }
  section div:has(> img:not([src*="logo-"])):hover > img { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  section div:has(> img:not([src*="logo-"])):hover,
  section div:has(> img:not([src*="logo-"])):hover > img { transform: none; }
}
