/* ============================================================
   TBB Pages: shared page UI, scoped under .tbb-page
   Reset, layout, type, buttons, cards, tags, stats, CTA, reveal.
   The hero layout lives in art.css (only pages with hero art use it).

   Look: white page, near-black type, neutral greys, ONE highlight
   phrase per paragraph (.tbb-hl). Orange only on link hover and the
   hero badge glint. Cards: warm hairline, faint fill, 4px blur, no
   shadow, 14px radius. Solid button: top-right + bottom-left corners;
   outline button mirrored.

   Specificity: the reset is (0,1,2) so it beats theme element rules
   such as ".elementor-kit-5 h2" (0,1,1); every component rule is
   ".tbb-page .x" (0,2,0) so it beats the reset.
   ============================================================ */

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

.tbb-page {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  margin-top: 0;
  background: var(--tbb-bg);
  color: var(--tbb-fg);
  font-family: var(--tbb-font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light;
}

/* ── Theme-proof reset ───────────────────────────────────────── */
.tbb-page :is(h1, h2, h3, h4, p, ul, ol, li, dl, dt, dd):is(h1, h2, h3, h4, p, ul, ol, li, dl, dt, dd) {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
}
.tbb-page :is(ul, ol):is(ul, ol) { list-style: none; }
.tbb-page :is(a, button):is(a, button) { text-decoration: none; box-shadow: none; }
.tbb-page :is(a, button):is(a, button):focus-visible { outline: 2px solid var(--tbb-fg); outline-offset: 2px; }
.tbb-page img { display: block; max-width: 100%; height: auto; }

.tbb-page .tbb-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
}
.tbb-page .tbb-icon svg { display: block; width: 100%; height: 100%; }

/* ── Layout ───────────────────────────────────────────────────── */
.tbb-page .tbb-wrap { width: 100%; max-width: var(--tbb-wrap); margin-inline: auto; padding-inline: 24px; }
.tbb-page .tbb-sec { padding-top: 64px; }
.tbb-page .tbb-sec--last { padding-bottom: 96px; }
.tbb-page .tbb-grid { display: grid; gap: 16px; }
.tbb-page .tbb-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tbb-page .tbb-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tbb-page .tbb-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tbb-page .tbb-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }

/* ── Type ─────────────────────────────────────────────────────── */
.tbb-page .tbb-hl {
  font-family: var(--tbb-font-display);
  font-weight: 500;
  letter-spacing: -.025em;
  text-transform: capitalize;
  color: var(--tbb-hl);
}
.tbb-page .tbb-h2 {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--tbb-fg);
  text-wrap: balance;
}
.tbb-page .tbb-lead { margin-top: 8px; max-width: 672px; font-size: 16px; line-height: 1.65; color: var(--tbb-muted); }
.tbb-page .tbb-text { margin-top: 14px; font-size: 15px; color: var(--tbb-muted); }
.tbb-page .tbb-head { margin-bottom: 32px; }
.tbb-page .tbb-head--center { text-align: center; }
.tbb-page .tbb-head--center .tbb-lead { margin-inline: auto; }

/* ── Buttons and links ────────────────────────────────────────── */
.tbb-page .tbb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 24px; }
.tbb-page .tbb-actions :is(.tbb-link, .tbb-viewall) { margin-top: 0; }
.tbb-page .tbb-btn-solid,
.tbb-page .tbb-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding-inline: 16px;
  font-family: var(--tbb-font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.tbb-page .tbb-btn-solid { border-radius: 0 var(--tbb-radius) 0 var(--tbb-radius); background: var(--tbb-solid-bg); color: var(--tbb-solid-fg); }
.tbb-page .tbb-btn-solid:hover { background: var(--tbb-solid-hover); color: var(--tbb-solid-fg); }
.tbb-page .tbb-btn-solid .tbb-icon { margin-left: -4px; font-size: 16px; }
.tbb-page .tbb-btn-outline { border: 1px solid var(--tbb-border); border-radius: var(--tbb-radius) 0 var(--tbb-radius) 0; background: transparent; color: var(--tbb-fg); }
.tbb-page .tbb-btn-outline:hover { background: var(--tbb-ghost-hover); color: var(--tbb-fg); }

.tbb-page .tbb-btn-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  height: 32px;
  padding-inline: 12px;
  border-radius: calc(var(--tbb-radius) - 2px);
  background: var(--tbb-primary);
  color: var(--tbb-primary-fg);
  font-size: 14px;
  font-weight: 600;
  transition: opacity .2s;
}
.tbb-page .tbb-btn-card:hover { opacity: .9; color: var(--tbb-primary-fg); }

.tbb-page .tbb-viewall {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin-top: 24px;
  padding-inline: 24px;
  border-radius: calc(var(--tbb-radius) - 2px);
  background: var(--tbb-viewall-bg);
  color: var(--tbb-viewall-fg);
  font-family: var(--tbb-font-display);
  font-size: 14px;
  transition: color .2s;
}
.tbb-page .tbb-viewall:hover { color: var(--tbb-brand); }
.tbb-page .tbb-viewall .tbb-icon { margin-left: -4px; }

.tbb-page .tbb-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--tbb-fg);
  transition: color .2s;
}
.tbb-page .tbb-link .tbb-icon { font-size: 14px; }
.tbb-page .tbb-link:hover,
.tbb-page .tbb-card:hover .tbb-link { color: var(--tbb-brand); }

/* ── Cards, icons, tags ───────────────────────────────────────── */
.tbb-page .tbb-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--tbb-edge);
  border-radius: calc(var(--tbb-radius) + 4px);
  background: var(--tbb-fill);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  transition: border-color .3s, opacity .3s;
}
.tbb-page .tbb-card:hover { border-color: var(--tbb-edge-hover); opacity: 1; }
.tbb-page .tbb-card__title {
  margin-top: 16px;
  font-family: var(--tbb-font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
  color: var(--tbb-fg);
}
.tbb-page .tbb-card__text { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--tbb-muted); }
.tbb-page .tbb-card > .tbb-link:last-child { margin-top: auto; padding-top: 14px; }
.tbb-page .tbb-stretch,
.tbb-page .tbb-stretch:hover { color: inherit; }
.tbb-page .tbb-stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

.tbb-page .tbb-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--tbb-border);
  border-radius: var(--tbb-radius);
  background: var(--tbb-ico-bg);
  color: var(--tbb-fg);
  font-size: 20px;
}
.tbb-page .tbb-ico--wa { color: var(--tbb-ok); }

.tbb-page .tbb-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--tbb-tag);
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--tbb-muted);
  white-space: nowrap;
}

/* Diamond bullet list */
.tbb-page .tbb-points { display: grid; gap: 8px; margin-top: 20px; }
.tbb-page .tbb-points li { position: relative; padding-left: 24px; font-size: 15px; color: var(--tbb-fg); }
.tbb-page .tbb-points li::before {
  content: "";
  position: absolute;
  top: .55em;
  left: 4px;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--tbb-subtle);
  border-radius: 2px;
  transform: rotate(45deg);
}

/* Stat strip */
.tbb-page .tbb-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 40px; }
.tbb-page .tbb-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 16px; text-align: center; }
.tbb-page .tbb-stat + .tbb-stat { border-left: 1px solid var(--tbb-border); }
.tbb-page .tbb-stat__value {
  font-family: var(--tbb-font-display);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--tbb-fg);
  font-variant-numeric: tabular-nums;
}
.tbb-page .tbb-stat__label { font-size: 14px; color: var(--tbb-muted); }

/* Values (icon + title + text, no card) */
.tbb-page .tbb-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
.tbb-page .tbb-value .tbb-card__title { margin-top: 14px; }

/* ── CTA panel ────────────────────────────────────────────────── */
.tbb-page .tbb-cta { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px 32px; margin-top: 24px; padding: 28px; }
.tbb-page .tbb-cta__title { font-family: var(--tbb-font-display); font-size: 22px; font-weight: 600; line-height: 1.3; color: var(--tbb-fg); }
.tbb-page .tbb-cta__text { margin-top: 6px; }
.tbb-page .tbb-cta .tbb-actions { flex-shrink: 0; margin-top: 0; }

/* ── Reveal on scroll, once (content visible without JS) ──────── */
.tbb-page .tbb-reveal {
  transition:
    opacity .5s var(--tbb-ease) calc(var(--i, 0) * 60ms),
    transform .5s var(--tbb-ease) calc(var(--i, 0) * 60ms),
    border-color .3s;
}
.tbb-page .tbb-reveal.is-settled { --i: 0; }
.tbb-reveal-ready .tbb-reveal:not(.is-visible) { opacity: 0; transform: translateY(16px); }

.tbb-error {
  padding: 16px 20px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 14px;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (min-width: 640px) {
  .tbb-page .tbb-wrap { padding-inline: 48px; }
  .tbb-page .tbb-sec { padding-top: 80px; }
  .tbb-page .tbb-h2 { font-size: 30px; }
  .tbb-page .tbb-lead { font-size: 18px; }
  .tbb-page .tbb-card { opacity: .9; }
}
@media (max-width: 1024px) {
  .tbb-page .tbb-grid--4,
  .tbb-page .tbb-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .tbb-page .tbb-split { grid-template-columns: minmax(0, 1fr); }
  .tbb-page .tbb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .tbb-page .tbb-stat:nth-child(3) { border-left: 0; }
  .tbb-page .tbb-grid--2 { grid-template-columns: minmax(0, 1fr); }
  .tbb-page .tbb-cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 639px) {
  .tbb-page .tbb-grid--4,
  .tbb-page .tbb-grid--3,
  .tbb-page .tbb-values { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .tbb-page *,
  .tbb-page *::before,
  .tbb-page *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .tbb-reveal-ready .tbb-reveal:not(.is-visible) { opacity: 1; transform: none; }
}
