/**
 * @file section-intro.css
 * SDC Section Intro component styles.
 *
 * Two layout variants:
 *
 *  split    — Figma nodes 1:11116 (desktop) / 1:10824 (mobile)
 *             Two equal columns on desktop (80px gap).
 *             Left: tagline + H2 52px serif heading.
 *             Right: description body text + buttons.
 *             Stacks to one column on mobile (20px gap).
 *
 *  centered — Figma nodes 1:10565 (desktop) / 1:10241 (mobile)
 *             Single centred column, NO description field.
 *             Tagline + H5 28px serif text + centred buttons.
 *             Desktop gap 32px, mobile gap 24px.
 */

/* ============================================================
   Base wrapper
   ============================================================ */

.section-intro {
  width: 100%;
}

/* ============================================================
   SPLIT LAYOUT
   Figma mobile: flex-col gap 20px
   Figma desktop (≥ 768px): flex-row gap 80px, equal columns
   ============================================================ */

.section-intro--split {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 5); /* 20px mobile */
}

@media (min-width: 48rem) {
  .section-intro--split {
    flex-direction: row;
    gap: calc(var(--spacing) * 20); /* 80px desktop */
    align-items: flex-start;
  }
}

/* Equal-width columns */
.section-intro__col {
  min-width: 0;
  overflow: hidden;
}

@media (min-width: 48rem) {
  .section-intro__col {
    flex: 1 0 0;
  }
}

/* Left column: tagline stacked above heading */
.section-intro__col--primary {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 3); /* 12px mobile */
}

@media (min-width: 48rem) {
  .section-intro__col--primary {
    gap: calc(var(--spacing) * 4); /* 16px desktop */
  }
}

/* Right column: description stacked above buttons */
.section-intro__col--secondary {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 6); /* 24px */
}

@media (min-width: 48rem) {
  .section-intro__col--secondary {
    gap: calc(var(--spacing) * 8); /* 32px */
  }
}

/* ============================================================
   CENTERED LAYOUT
   Figma: single column, items-center, text-center
   Mobile gap 24px, desktop gap 32px
   ============================================================ */

.section-intro--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem; /* Gap between content block and CTAs */
}

/* Inner content block (tagline, heading, description) */
.section-intro__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 768px;
  text-align: center;
}

/* Gap between tagline and either title or description */
.section-intro__content > .section-intro__tagline-wrap + * {
  margin-top: 1rem !important;
}

/* Gap between title and description when both are present */
.section-intro__content
  > .section-intro__heading
  + .section-intro__description {
  margin-top: 1.5rem;
}

/* ============================================================
   Tagline wrapper
   ============================================================ */

.section-intro__tagline-wrap {
  display: flex;
  align-items: center;
  width: 100%;
}

.section-intro--centered .section-intro__tagline-wrap {
  justify-content: center;
}

/* ============================================================
   Tagline text
   Figma: DM Sans SemiBold, 16px, #020704, lh 1.5
   ============================================================ */

.section-intro__tagline {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-base); /* 16px */
  line-height: 1.5;
  color: #020704;
  margin: 0;
}

.section-intro--centered .section-intro__tagline {
  text-align: center;
}

.section-intro__heading {
  font-family: var(--font-serif);
  font-weight: var(--font-weight-normal);
  font-style: normal;
  color: #020704;
  margin: 0;
  width: 100%;
}

.section-intro__heading--h1 {
  font-size: clamp(var(--text-4xl), 6vw, var(--h1-size));
  line-height: 1.1;
  letter-spacing: -0.02em;
}

@media (min-width: 48rem) {
  .section-intro__heading--h1 {
    font-size: var(--h1-size); /* 72px */
    letter-spacing: -1.44px;
  }
}

.section-intro__heading--h2 {
  font-size: clamp(var(--text-3xl), 4vw, 3.25rem); /* ~52px at full width */
  line-height: 1.2;
  letter-spacing: -0.01em;
}

@media (min-width: 48rem) {
  .section-intro__heading--h2 {
    font-size: 3.25rem; /* 52px as per Figma */
    letter-spacing: -0.52px;
  }
}

.section-intro__heading--h3 {
  font-size: var(--text-2xl);
  line-height: 1.3;
}

@media (min-width: 48rem) {
  .section-intro__heading--h3 {
    font-size: var(--h3-size);
  }
}

.section-intro__heading--h4 {
  font-size: var(--text-xl);
  line-height: 1.3;
}

@media (min-width: 48rem) {
  .section-intro__heading--h4 {
    font-size: var(--h4-size);
  }
}

/* ============================================================
   Heading — H5 style (centered layout)
   Figma: IBM Plex Serif Regular, 28px, letter-spacing -0.28px, lh 1.4
   Theme token: --text-2xl = 1.5rem (24px), --text-3xl = 2rem (32px)
   Use 1.75rem (28px) directly.
   ============================================================ */

.section-intro__heading--h5 {
  font-size: var(--text-2xl); /* 24px mobile */
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-align: center;
}

@media (min-width: 48rem) {
  .section-intro__heading--h5 {
    font-size: 1.75rem; /* 28px desktop as per Figma */
    letter-spacing: -0.28px;
    max-width: 768px;
  }
}

/* ============================================================
   Description (split layout only)
   Figma mobile: DM Sans Regular, 16px, lh 1.5, #020704
   Figma desktop: 18px
   ============================================================ */

.section-intro__description {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-normal);
  font-size: var(--text-base); /* 16px mobile */
  line-height: 1.5;
  color: #020704;
  margin: 0;
  width: 100%;
}

.section-intro--centered .section-intro__description {
  text-align: center;
}

@media (min-width: 48rem) {
  .section-intro__description {
    font-size: var(--text-lg); /* 18px desktop */
  }
}

/* ============================================================
   Actions row
   Figma: gap 24px, items-center, flex-wrap for mobile safety
   ============================================================ */

.section-intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing) * 6); /* 24px */
  align-items: center !important;
}

.section-intro--centered .section-intro__actions {
  justify-content: center;
}

/* ============================================================
   Text Color Variant (Light)
   ============================================================ */

.section-intro--text-light .section-intro__tagline,
.section-intro--text-light .section-intro__heading,
.section-intro--text-light .section-intro__description {
  color: #ffffff;
}

/* Scope light variant to CTAs as well */
.section-intro--text-light .section-intro__actions .button--secondary-dark {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}

.section-intro--text-light
  .section-intro__actions
  .button--secondary-dark:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.section-intro--text-light .section-intro__actions .button--link {
  color: #ffffff;
}

.section-intro--text-light .section-intro__actions .button--link:hover {
  opacity: 0.75;
}

.section-intro--text-light .section-intro__actions .button__icon svg {
  stroke: #ffffff;
}
