/* Hero v1 - Unified system
   Scope: only hero sections carrying `.fs-hero-shell` / `.fs-hero-card`.
   SEO safety: style-only layer (no text/href/content manipulation). */

:root {
  --fs-hero-max-width: 1120px;
  --fs-hero-radius: 18px;
  --fs-hero-gap: 14px;
  --fs-hero-bg-a: #1e40af;
  --fs-hero-bg-b: #2563eb;
  --fs-hero-chip-bg: rgba(255, 255, 255, 0.14);
  --fs-hero-chip-border: rgba(255, 255, 255, 0.24);
  --fs-hero-card-bg: rgba(255, 255, 255, 0.1);
  --fs-hero-card-border: rgba(255, 255, 255, 0.24);
}

/* Root shell for content heroes. */
:is(
  .tp-hero,
  .fs-ba-hero,
  .fs-pillar-hero,
  .blog-hero,
  .direct-hero,
  .about-hero,
  .hero,
  .home-hero
).fs-hero-shell {
  background:
    radial-gradient(1200px 360px at 50% -10%, rgba(255, 255, 255, 0.33), transparent 60%),
    linear-gradient(110deg, var(--fs-hero-bg-a), var(--fs-hero-bg-b));
  color: #ffffff;
  padding: 56px 0 34px;
  overflow: hidden;
  text-align: center;
}

/* App/account flows keep their native layout; they only share inner spacing tokens if needed. */
:is(.acc-hero, .login-hero).fs-hero-shell {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Stable centered card behavior for Hero v1 container. */
.fs-hero-card,
.fs-hero-shell > .fs-hero-card,
.fs-hero-shell > .fs-pillar-container.fs-hero-card,
.fs-hero-shell > .fs-ba-container.fs-hero-card,
.fs-hero-shell > .res-container.fs-hero-card {
  width: min(var(--fs-hero-max-width), calc(100% - 40px));
  max-width: var(--fs-hero-max-width);
  margin: 0 auto;
  padding: 22px;
  border-radius: var(--fs-hero-radius);
  border: 1px solid var(--fs-hero-card-border);
  background: var(--fs-hero-card-bg);
  backdrop-filter: blur(8px);
  text-align: center;
  box-sizing: border-box;
}

.fs-hero-card > *:first-child {
  margin-top: 0;
}

.fs-hero-card > *:last-child {
  margin-bottom: 0;
}

.fs-hero-card h1,
.fs-hero-card .section-title,
.fs-hero-card .about-title,
.fs-hero-card .acc-title,
.fs-hero-card .hero-top h1 {
  margin: 12px 0 10px;
  font-size: clamp(1.65rem, 3.2vw, 2.25rem);
  line-height: 1.14;
  color: #ffffff;
}

/* Main subtitle / lead paragraph styles (content heroes only). */
:is(
  .tp-hero,
  .fs-ba-hero,
  .fs-pillar-hero,
  .blog-hero,
  .direct-hero,
  .about-hero,
  .hero,
  .home-hero
).fs-hero-shell .fs-hero-card :is(
  .tp-subtitle,
  .section-subtitle,
  .top-lead,
  .top10-lead,
  .pred-lead,
  .faq-lead,
  .fs-pillar-lead,
  .direct-lead,
  .about-lead,
  .hero-subtitle,
  .res-lead,
  .hero-lead,
  .acc-subtitle,
  .blog-subtitle,
  .page-context,
  p
) {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.94);
  line-height: 1.56;
}

/* Optional badge harmonization: style applies only if badge exists. */
.fs-hero-card :is(.tp-badge, .fs-hero-badge, .about-badge, .hero-badge) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9999px;
  border: 1px solid var(--fs-hero-chip-border);
  background: var(--fs-hero-chip-bg);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  max-width: 100%;
}

/* Keep badge spacing stable in variants with/without badge. */
.fs-hero-card :is(.tp-badge, .fs-hero-badge, .about-badge, .hero-badge) {
  margin-bottom: 10px;
}

/* Unified hero action wrappers. */
.fs-hero-card :is(
  .tp-hero-actions,
  .blog-hero-cta,
  .pred-hero-actions,
  .top10-hero-actions,
  .res-hero-actions,
  .tf-hero-actions,
  .hero-ctas,
  .fs-ba-hero-actions
) {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: var(--fs-hero-gap);
}

/* Hero buttons: same radius/colors/spacing across variants. */
.fs-hero-card :is(
  .tp-hero-actions .cta-button,
  .blog-hero-cta .cta-button,
  .pred-hero-actions .pred-link,
  .top10-hero-actions .top10-link,
  .res-hero-actions .res-link,
  .tf-hero-actions .tf-hero-link,
  .hero-ctas .btn,
  .fs-ba-hero-actions .fs-ba-backlink,
  .tp-hero-links .cta-button
) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: clamp(0.92rem, 0.89rem + 0.2vw, 1rem);
  font-weight: 700;
  text-decoration: none;
  box-sizing: border-box;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.08s ease;
}

.fs-hero-card :is(
  .tp-hero-actions .cta-button,
  .blog-hero-cta .cta-button,
  .pred-hero-actions .pred-link,
  .top10-hero-actions .top10-link,
  .res-hero-actions .res-link,
  .tf-hero-actions .tf-hero-link,
  .hero-ctas .btn,
  .fs-ba-hero-actions .fs-ba-backlink,
  .tp-hero-links .cta-button
):hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

/* Preserve dedicated auth layouts while sharing only class contract. */
.acc-hero .fs-hero-card,
.login-hero .fs-hero-card {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  text-align: inherit;
}

/* Quick navigation/chips under actions by default. */
.fs-hero-card :is(
  .quick-nav,
  .fs-pillar-quicknav,
  .faq-hero-links,
  .top-chips,
  .about-hero-links
) {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: var(--fs-hero-gap);
}

.fs-hero-card :is(
  .quick-nav,
  .fs-pillar-quicknav,
  .faq-hero-links,
  .top-chips,
  .about-hero-links
) a,
.fs-hero-card :is(.quick-chip, .faq-hero-link, .top-chip, .about-hero-link) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 9999px;
  font-size: clamp(0.78rem, 0.74rem + 0.26vw, 0.92rem);
  font-weight: 800;
  text-decoration: none;
  color: #ffffff;
  background: var(--fs-hero-chip-bg);
  border: 1px solid var(--fs-hero-chip-border);
}

.fs-hero-card :is(
  .quick-nav,
  .fs-pillar-quicknav,
  .faq-hero-links,
  .top-chips,
  .about-hero-links
) a:hover,
.fs-hero-card :is(.quick-chip, .faq-hero-link, .top-chip, .about-hero-link):hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Blog article hero metadata alignment. */
.fs-hero-card .fs-ba-meta {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 768px) {
  :is(
    .tp-hero,
    .fs-ba-hero,
    .fs-pillar-hero,
    .blog-hero,
    .direct-hero,
    .about-hero,
    .hero,
    .home-hero
  ).fs-hero-shell {
    padding: 44px 0 24px;
  }

  .fs-hero-card,
  .fs-hero-shell > .fs-hero-card,
  .fs-hero-shell > .fs-pillar-container.fs-hero-card,
  .fs-hero-shell > .fs-ba-container.fs-hero-card,
  .fs-hero-shell > .res-container.fs-hero-card {
    width: min(var(--fs-hero-max-width), calc(100% - 24px));
    padding: 18px;
  }

  .fs-hero-card :is(
    .tp-hero-actions,
    .blog-hero-cta,
    .pred-hero-actions,
    .top10-hero-actions,
    .res-hero-actions,
    .tf-hero-actions,
    .hero-ctas,
    .fs-ba-hero-actions
  ) {
    flex-direction: column;
    align-items: stretch;
  }

  .fs-hero-card :is(
    .tp-hero-actions .cta-button,
    .blog-hero-cta .cta-button,
    .pred-hero-actions .pred-link,
    .top10-hero-actions .top10-link,
    .res-hero-actions .res-link,
    .tf-hero-actions .tf-hero-link,
    .hero-ctas .btn,
    .fs-ba-hero-actions .fs-ba-backlink,
    .tp-hero-links .cta-button
  ) {
    width: 100%;
    min-width: 0;
  }
}
