.bfx-home,
.bfx-page {
  overflow: clip;
}

.bfx-hero,
.bfx-page-hero,
.bfx-section {
  width: min(calc(100% - 2rem), var(--bfx-container));
  margin-inline: auto;
}

.bfx-hero {
  min-height: min(820px, 88vh);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  padding-block: clamp(5rem, 11vw, 9rem);
}

.bfx-hero h1,
.bfx-page-hero h1 {
  max-width: 13ch;
  margin: 0 0 var(--bfx-space-6);
  font-family: var(--bfx-font-display);
  font-size: var(--bfx-text-hero);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.bfx-hero__lead,
.bfx-page-hero > p:last-child {
  max-width: 62ch;
  color: var(--bfx-color-muted);
  font-size: var(--bfx-text-lg);
  line-height: 1.75;
}

.bfx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bfx-space-3);
  margin-block: var(--bfx-space-8) var(--bfx-space-5);
}

.bfx-button--primary {
  color: var(--bfx-color-bg);
  background: var(--bfx-color-accent);
  border-color: var(--bfx-color-accent);
}

.bfx-button--ghost {
  color: var(--bfx-color-text);
  background: transparent;
  border-color: var(--bfx-color-border-strong);
}

.bfx-risk-note {
  color: var(--bfx-color-subtle);
  font-size: var(--bfx-text-sm);
}

.bfx-terminal {
  position: relative;
  min-height: 420px;
  padding: var(--bfx-space-8);
  overflow: hidden;
  border: 1px solid var(--bfx-color-border-strong);
  border-radius: var(--bfx-radius-lg);
  background:
    linear-gradient(rgba(24, 211, 158, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 211, 158, 0.04) 1px, transparent 1px),
    var(--bfx-color-bg-soft);
  background-size: 32px 32px;
  box-shadow: var(--bfx-shadow-lg);
  font-family: var(--bfx-font-mono);
}

.bfx-terminal p {
  display: flex;
  justify-content: space-between;
  gap: var(--bfx-space-8);
  color: var(--bfx-color-text);
  font-size: var(--bfx-text-sm);
}

.bfx-terminal p span {
  color: var(--bfx-color-accent);
}

.bfx-terminal__bar {
  display: flex;
  gap: var(--bfx-space-2);
  margin-bottom: var(--bfx-space-10);
}

.bfx-terminal__bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bfx-color-border-strong);
}

.bfx-terminal__chart {
  position: absolute;
  inset: auto var(--bfx-space-8) var(--bfx-space-8);
  height: 160px;
  display: flex;
  align-items: end;
  gap: 6%;
  border-bottom: 1px solid var(--bfx-color-border);
}

.bfx-terminal__chart i {
  width: 8%;
  height: 28%;
  background: var(--bfx-color-accent);
  box-shadow: 0 0 24px rgba(24, 211, 158, 0.15);
}

.bfx-terminal__chart i:nth-child(2) { height: 42%; }
.bfx-terminal__chart i:nth-child(3) { height: 34%; }
.bfx-terminal__chart i:nth-child(4) { height: 68%; }
.bfx-terminal__chart i:nth-child(5) { height: 54%; }
.bfx-terminal__chart i:nth-child(6) { height: 79%; }
.bfx-terminal__chart i:nth-child(7) { height: 92%; background: var(--bfx-color-premium); }

.bfx-section {
  padding-block: clamp(4rem, 9vw, 8rem);
}

.bfx-section h2 {
  max-width: 18ch;
  margin-block: 0 var(--bfx-space-10);
  font-family: var(--bfx-font-display);
  font-size: var(--bfx-text-2xl);
  letter-spacing: -0.035em;
}

.bfx-section__heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: var(--bfx-space-8);
}

.bfx-section__heading > p {
  max-width: 48ch;
  color: var(--bfx-color-muted);
}

.bfx-card-grid,
.bfx-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--bfx-space-5);
}

.bfx-category-card,
.bfx-plan-card {
  position: relative;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--bfx-color-text);
  border: 1px solid var(--bfx-color-border);
  border-radius: var(--bfx-radius-lg);
  background: linear-gradient(145deg, var(--bfx-color-surface-raised), var(--bfx-color-surface));
  box-shadow: var(--bfx-shadow-sm);
}

.bfx-category-card:hover,
.bfx-plan-card:hover {
  color: var(--bfx-color-text);
  border-color: var(--bfx-color-border-strong);
  transform: translateY(-3px);
}

.bfx-category-card > span {
  display: block;
  margin-bottom: var(--bfx-space-12);
  color: var(--bfx-color-premium);
  font-family: var(--bfx-font-mono);
}

.bfx-category-card p,
.bfx-plan-card li {
  color: var(--bfx-color-muted);
}

.bfx-category-card strong {
  display: block;
  margin-top: var(--bfx-space-8);
  color: var(--bfx-color-accent);
  font-size: var(--bfx-text-sm);
}

.bfx-section--confidence {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 1.2fr);
  gap: clamp(2rem, 8vw, 8rem);
  align-items: start;
  border-block: 1px solid var(--bfx-color-border);
}

.bfx-section--confidence li,
.bfx-steps li {
  padding: var(--bfx-space-5) 0;
  color: var(--bfx-color-muted);
  border-bottom: 1px solid var(--bfx-color-border);
}

.bfx-plan-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bfx-plan-card__name {
  color: var(--bfx-color-premium);
  font-family: var(--bfx-font-mono);
  font-size: var(--bfx-text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bfx-plan-card__price {
  margin-block: var(--bfx-space-5);
  color: var(--bfx-color-text);
  font-family: var(--bfx-font-display);
  font-size: var(--bfx-text-2xl);
}

.bfx-plan-card__price small {
  color: var(--bfx-color-subtle);
  font-family: var(--bfx-font-body);
  font-size: var(--bfx-text-xs);
}

.bfx-plan-card .bfx-button {
  width: 100%;
  margin-top: var(--bfx-space-6);
  text-align: center;
}

.bfx-page-hero {
  padding-block: clamp(6rem, 14vw, 12rem) clamp(3rem, 7vw, 6rem);
}

.bfx-faq details {
  padding: var(--bfx-space-5) 0;
  border-bottom: 1px solid var(--bfx-color-border);
}

.bfx-faq summary {
  cursor: pointer;
  color: var(--bfx-color-text);
  font-family: var(--bfx-font-display);
  font-size: var(--bfx-text-lg);
}

.bfx-faq details p {
  max-width: 72ch;
  color: var(--bfx-color-muted);
}

@media (max-width: 1024px) {
  .bfx-hero,
  .bfx-section--confidence {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 767px) {
  .bfx-hero {
    min-height: auto;
    padding-top: 5rem;
  }

  .bfx-hero h1,
  .bfx-page-hero h1 {
    font-size: clamp(2.5rem, 14vw, 4rem);
  }

  .bfx-terminal {
    min-height: 360px;
    padding: var(--bfx-space-5);
  }

  .bfx-card-grid,
  .bfx-plan-grid {
    grid-template-columns: 1fr;
  }

  .bfx-section__heading {
    align-items: start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bfx-category-card:hover,
  .bfx-plan-card:hover {
    transform: none;
  }
}
