/* BeingOptimist homepage: premium, lightweight, and CWV-conscious. */

.home,
.tax-bo_tool_category {
  --bo-home-blue: #0878f9;
  --bo-home-blue-dark: #075ab8;
  --bo-home-navy: #10213a;
  --bo-home-text: #29384d;
  --bo-home-muted: #667085;
  --bo-home-line: #e1e7ef;
  --bo-home-soft: #f4f8fd;
  --bo-home-surface: #ffffff;
  --bo-home-radius-lg: 24px;
  --bo-home-radius-md: 14px;
  --bo-home-shadow: 0 12px 36px rgba(16, 33, 58, 0.08);
}

.home .site-content,
.tax-bo_tool_category .site-content {
  background: #f8fafc;
}

.home .ast-container,
.home .site-content .ast-container,
.tax-bo_tool_category .ast-container,
.tax-bo_tool_category .site-content .ast-container {
  display: block !important;
  width: 100%;
  max-width: 100% !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.bo-main-container,
.bo-main-container * {
  box-sizing: border-box;
}

.bo-main-container {
  width: 100%;
  overflow-x: clip;
}

.bo-homepage {
  width: min(1200px, calc(100% - 40px));
  margin-inline: auto;
  padding: 28px 0 72px;
  color: var(--bo-home-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bo-homepage :is(a, button):focus-visible {
  outline: 3px solid rgba(8, 120, 249, 0.32);
  outline-offset: 3px;
}

.bo-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #d6e5f8;
  border-radius: var(--bo-home-radius-lg);
  padding: clamp(56px, 8vw, 92px) clamp(24px, 7vw, 88px);
  background:
    radial-gradient(circle at 10% 15%, rgba(8, 120, 249, 0.13), transparent 30%),
    radial-gradient(circle at 88% 85%, rgba(83, 183, 140, 0.13), transparent 28%),
    linear-gradient(145deg, #ffffff 0%, #f4f9ff 58%, #f6fbf8 100%);
  text-align: center;
}

@media (min-width: 922px) {
  .home .bo-hero {
    padding-top: clamp(135px, 8vw, 155px);
  }
}

.bo-hero::after {
  position: absolute;
  z-index: -1;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: calc(var(--bo-home-radius-lg) - 7px);
  content: "";
  pointer-events: none;
}

.bo-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--bo-home-blue-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

.bo-hero h1 {
  max-width: 800px;
  margin: 0 auto;
  color: var(--bo-home-navy);
  font-size: clamp(2.3rem, 5.5vw, 4.2rem);
  font-weight: 820;
  letter-spacing: -0.045em;
  line-height: 1.03;
  text-wrap: balance;
}

.bo-hero > p {
  max-width: 690px;
  margin: 22px auto 0;
  color: #526176;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.75;
  text-wrap: pretty;
}

.bo-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.bo-homepage .btn-primary,
.bo-homepage .btn-secondary {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 23px;
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.bo-homepage .btn-primary {
  border-color: var(--bo-home-blue);
  background: var(--bo-home-blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(8, 120, 249, 0.22);
}

.bo-homepage .btn-primary:hover {
  border-color: var(--bo-home-blue-dark);
  background: var(--bo-home-blue-dark);
  color: #fff;
  transform: translateY(-1px);
}

.bo-homepage .btn-secondary {
  border-color: #cfd9e6;
  background: rgba(255, 255, 255, 0.78);
  color: var(--bo-home-navy);
}

.bo-homepage .btn-secondary:hover {
  border-color: var(--bo-home-blue);
  color: var(--bo-home-blue-dark);
  transform: translateY(-1px);
}

.bo-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.bo-trust span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid #dce7f4;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #526176;
  font-size: 0.72rem;
  font-weight: 650;
}

.bo-trust span::before {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #20a86b;
  content: "";
}

.bo-pathfinder {
  position: relative;
}

.bo-pathfinder::before {
  position: absolute;
  z-index: -1;
  inset: 22px -18px auto;
  height: 220px;
  border-radius: 40px;
  background: linear-gradient(90deg, rgba(8, 120, 249, 0.08), rgba(32, 168, 107, 0.08));
  content: "";
  pointer-events: none;
}

.bo-path-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.bo-path-card {
  position: relative;
  display: flex;
  min-height: 245px;
  overflow: hidden;
  flex-direction: column;
  gap: 13px;
  border: 1px solid #dce7f4;
  border-radius: 22px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(8, 120, 249, 0.12), transparent 42%),
    #fff;
  color: var(--bo-home-text);
  box-shadow: 0 10px 30px rgba(16, 33, 58, 0.06);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.bo-path-card::after {
  position: absolute;
  inset: auto 24px 0;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: var(--bo-home-blue);
  content: "";
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 180ms ease;
}

.bo-path-card:hover,
.bo-path-card:focus-visible {
  border-color: #b8d6fb;
  box-shadow: 0 18px 44px rgba(16, 33, 58, 0.1);
  transform: translateY(-4px);
}

.bo-path-card:hover::after,
.bo-path-card:focus-visible::after {
  transform: scaleX(1);
}

.bo-path-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: #e9f3ff;
  color: var(--bo-home-blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.bo-path-card strong {
  color: var(--bo-home-navy);
  font-size: 1.12rem;
  line-height: 1.25;
}

.bo-path-card small {
  color: var(--bo-home-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.bo-path-card > span:last-child {
  margin-top: auto;
  color: var(--bo-home-blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.bo-section {
  margin-top: clamp(56px, 8vw, 88px);
}

.bo-latest {
  border: 1px solid #dce7f4;
  border-radius: var(--bo-home-radius-lg);
  padding: clamp(24px, 4vw, 42px);
  background: #f1f7ff;
}

.bo-section-heading {
  margin-bottom: 24px;
}

.bo-section-heading--split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.bo-section-heading h2,
.bo-cta h2 {
  margin: 0;
  color: var(--bo-home-navy);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.032em;
  line-height: 1.15;
  text-wrap: balance;
}

.bo-subtext {
  max-width: 660px;
  margin: 8px 0 0;
  color: var(--bo-home-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.bo-view-all {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  color: var(--bo-home-blue-dark);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
}

.bo-view-all:hover {
  color: var(--bo-home-blue);
}

.bo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.bo-homepage .bo-grid > a {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--bo-home-line);
  border-radius: var(--bo-home-radius-md);
  padding: 21px;
  background: var(--bo-home-surface);
  color: var(--bo-home-text);
  box-shadow: 0 5px 18px rgba(16, 33, 58, 0.05);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.bo-homepage .bo-grid > a:hover {
  border-color: #b9d4f6;
  color: var(--bo-home-text);
  box-shadow: var(--bo-home-shadow);
  transform: translateY(-3px);
}

.bo-card-thumbnail {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: -21px -21px 6px;
  background: #eaf1f8;
}

.bo-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.bo-feed-card:hover .bo-card-image {
  transform: scale(1.025);
}

.bo-card-meta {
  display: flex;
  min-height: 24px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--bo-home-muted);
  font-size: 0.68rem;
}

.bo-card-meta time {
  margin-left: auto;
  white-space: nowrap;
}

.bo-homepage .badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: #e9f3ff;
  color: var(--bo-home-blue-dark);
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1;
  text-transform: uppercase;
}

.bo-homepage .badge.new {
  background: #e9f8f1;
  color: #087247;
}

.bo-homepage .badge.top {
  background: #fff2df;
  color: #9a5100;
}

.bo-card-title {
  display: block;
  color: var(--bo-home-navy);
  font-size: 1.04rem;
  font-weight: 760;
  letter-spacing: -0.012em;
  line-height: 1.38;
  text-wrap: pretty;
}

.bo-homepage .bo-grid > a small {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--bo-home-muted);
  font-size: 0.79rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.bo-card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 5px;
  color: var(--bo-home-blue-dark);
  font-size: 0.74rem;
  font-weight: 760;
}

.bo-feed-card--tool:not(:has(.bo-card-thumbnail))::before {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--bo-home-blue);
  content: "";
}

.bo-feed-card--review:not(:has(.bo-card-thumbnail))::before {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #f19c38;
  content: "";
}

.bo-feed-card--guide:not(:has(.bo-card-thumbnail))::before {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #20a86b;
  content: "";
}

.bo-hub-grid {
  gap: 16px;
}

.bo-homepage .bo-hub-card {
  min-height: 210px;
  justify-content: flex-start;
  border-color: #dbe6f3;
  padding: 25px;
  background:
    linear-gradient(145deg, rgba(8, 120, 249, 0.045), transparent 52%),
    #fff;
}

.bo-hub-card .bo-card-title {
  margin-top: 7px;
  font-size: 1.22rem;
}

.bo-category-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.bo-homepage .bo-category-card {
  min-height: 225px;
  padding: 20px;
  box-shadow: none;
}

.bo-category-mark {
  display: block;
  width: 38px;
  height: 6px;
  margin-bottom: 5px;
  border-radius: 999px;
  background: var(--bo-home-blue);
}

.bo-category-card--username-generators .bo-category-mark {
  background: #8a63d2;
}

.bo-category-card--social-media-tools .bo-category-mark {
  background: #df5f8d;
}

.bo-category-card--safety-privacy-tools .bo-category-mark {
  background: #20a86b;
}

.bo-category-card--website-marketing-tools .bo-category-mark {
  background: #f19c38;
}

.bo-category-count {
  display: inline-flex;
  width: max-content;
  margin-top: auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--bo-home-soft);
  color: var(--bo-home-muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.bo-cta {
  margin-top: clamp(60px, 8vw, 90px);
  border-radius: var(--bo-home-radius-lg);
  padding: clamp(38px, 6vw, 68px) clamp(24px, 7vw, 80px);
  background:
    radial-gradient(circle at 90% 15%, rgba(8, 120, 249, 0.38), transparent 30%),
    var(--bo-home-navy);
  color: #fff;
  text-align: center;
}

.bo-cta .bo-eyebrow {
  color: #82bcff;
}

.bo-cta h2 {
  max-width: 700px;
  margin-inline: auto;
  color: #fff;
}

.bo-cta p {
  max-width: 570px;
  margin: 13px auto 24px;
  color: #c8d3e2;
  font-size: 0.92rem;
  line-height: 1.65;
}

.bo-back-to-top {
  position: fixed;
  z-index: 90;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(18px, 3vw, 30px);
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(8, 120, 249, 0.22);
  border-radius: 999px;
  background: var(--bo-home-blue);
  color: #fff;
  box-shadow: 0 14px 30px rgba(8, 120, 249, 0.24);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.bo-back-to-top:hover,
.bo-back-to-top:focus-visible {
  background: var(--bo-home-blue-dark);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(8, 120, 249, 0.3);
}

.bo-category-archive-header {
  margin-bottom: 30px;
  border: 1px solid #dce7f4;
  border-radius: var(--bo-home-radius-lg);
  padding: clamp(32px, 5vw, 55px);
  background: linear-gradient(145deg, #fff, #f1f7ff);
}

.bo-category-archive-header h1 {
  max-width: 760px;
  margin: 0;
  color: var(--bo-home-navy);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 820;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.bo-category-archive-header p {
  max-width: 650px;
  margin: 14px 0 18px;
  color: var(--bo-home-muted);
  line-height: 1.7;
}

.bo-tool-archive-grid {
  margin-top: 0;
}

.bo-tool-archive .navigation.pagination {
  margin-top: 32px;
}

.bo-tool-archive .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.bo-tool-archive .page-numbers {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bo-home-line);
  border-radius: 9px;
  padding: 7px 11px;
  background: #fff;
  color: var(--bo-home-blue-dark);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.bo-tool-archive .page-numbers.current {
  border-color: var(--bo-home-blue);
  background: var(--bo-home-blue);
  color: #fff;
}

.bo-empty-state {
  border: 1px dashed #cfd9e6;
  border-radius: var(--bo-home-radius-md);
  padding: 30px;
  background: #fff;
  color: var(--bo-home-muted);
  text-align: center;
}

@media (max-width: 900px) {
  .bo-path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bo-section-heading--split {
    align-items: flex-start;
  }

  .bo-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home .bo-hero {
    padding-top: 120px;
  }
}

@media (max-width: 640px) {
  .bo-homepage {
    width: min(100% - 24px, 620px);
    padding-top: 14px;
    padding-bottom: 48px;
  }

  .home .bo-hero {
    padding: 118px 20px 48px;
  }

  .bo-hero::after {
    inset: 10px;
  }

  .bo-hero h1 {
    font-size: clamp(2.05rem, 11vw, 2.75rem);
  }

  .bo-hero > p {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .bo-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .bo-homepage .btn-primary,
  .bo-homepage .btn-secondary {
    width: 100%;
  }

  .bo-trust {
    gap: 7px;
  }

  .bo-trust span {
    font-size: 0.66rem;
  }

  .bo-path-grid {
    grid-template-columns: 1fr;
  }

  .bo-path-card {
    min-height: 0;
  }

  .bo-section {
    margin-top: 54px;
  }

  .bo-latest {
    margin-right: -4px;
    margin-left: -4px;
    padding: 22px 16px;
  }

  .bo-section-heading--split {
    display: block;
  }

  .bo-view-all {
    margin-top: 13px;
  }

  .bo-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .bo-category-grid {
    grid-template-columns: 1fr;
  }

  .bo-homepage .bo-grid > a {
    padding: 18px;
  }

  .bo-card-thumbnail {
    margin: -18px -18px 5px;
  }

  .bo-card-meta time {
    width: 100%;
    margin-left: 0;
  }

  .bo-homepage .bo-hub-card {
    min-height: 0;
    padding: 21px;
  }

  .bo-homepage .bo-category-card {
    min-height: 0;
  }

  .bo-cta {
    padding: 40px 20px;
  }

  .bo-back-to-top {
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bo-homepage *,
  .bo-homepage *::before,
  .bo-homepage *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
