/* ═══════════════════════════════════════════════════════════
   ORGANISM: Section
   Generic page section with consistent vertical rhythm,
   max-width constraint, and layout variants.
   ═══════════════════════════════════════════════════════════ */

.section {
  padding: var(--space-24) var(--space-8);
}

.section--compact {
  padding: var(--space-16) var(--space-8);
}

.section--light {
  background: var(--color-surface-2);
}

.section--ruled {
  border-top: 1px solid var(--color-rule);
}

.section--flush-top {
  padding-top: 0;
}

.section--tight-bottom {
  padding-bottom: var(--space-16);
}

.section--blue {
  background: var(--color-deep-navy);
  color: var(--color-white);
}

[data-theme="light"] .section--blue {
  background: var(--color-blue);
}

[data-theme="light"] .section--light {
  background: var(--color-surface-2);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .section--light {
    background: var(--color-surface-2);
  }
}

.section__inner {
  max-width: var(--max-width-page);
  margin: 0 auto;
}

.section__inner--narrow {
  max-width: var(--max-width-content);
}


/* ── Section header (eyebrow + headline + body) ─────────── */

.section__header {
  margin-bottom: var(--space-12);
}

.section__header--center {
  text-align: center;
}

.section__overline {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-sky);
  margin-bottom: var(--space-3);
}

.section--blue .section__overline {
  color: rgba(255, 255, 255, 0.6);
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--weight-bold);
  color: var(--color-text-1);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-4);
}

.section__title--constrained {
  max-width: 480px;
}

.section--blue .section__title {
  color: var(--color-white);
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-2);
  line-height: var(--leading-relaxed);
  max-width: 720px;
}

.section__header--center .section__subtitle {
  margin: 0 auto;
}

.section--blue .section__subtitle {
  color: rgba(255, 255, 255, 0.75);
}


/* ── Split layout (left headline / right body) ──────────── */

.section__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-20);
  align-items: start;
}

.section__split--portal {
  grid-template-columns: 2fr 3fr;
  row-gap: 0;
}

.section__split--portal .portal-mockup {
  margin-bottom: -44px;
}

.section__split--portal .portal-stats {
  margin-top: -24px;
}

.section__split--portal .portal-stats .stat {
  padding-top: 0;
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-16) var(--space-4);
  }

  .section--compact {
    padding: var(--space-10) var(--space-4);
  }

  .section__split,
  .section__split--portal {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .section__split--portal .portal-mockup {
    margin-bottom: 0;
  }

  .section__split--portal .portal-stats {
    margin-top: 0;
  }

  .section__split--portal .portal-stats .stat {
    padding-top: var(--space-6);
  }
}


/* ─── Testimonial ─────────────────────────────────────────── */

.testimonial {
  position: relative;
  text-align: center;
  padding: var(--space-12) var(--space-8);
}

.testimonial__quote {
  position: relative;
  display: inline-block;
  max-width: 700px;
  margin: 0 auto var(--space-8);
}

.testimonial__quote::before {
  content: "\201C";
  position: absolute;
  top: -0.5rem;
  left: -1.5rem;
  font-family: var(--font-heading);
  font-size: 6rem;
  font-weight: var(--weight-black);
  line-height: 1;
  color: rgba(14, 165, 233, 0.12);
  pointer-events: none;
  user-select: none;
}

.testimonial__text {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: var(--weight-semibold);
  font-style: italic;
  line-height: var(--leading-relaxed);
  color: var(--color-text-1);
  margin: 0;
}

.testimonial__rule {
  width: 40px;
  height: 2px;
  background: var(--color-sky);
  margin: 0 auto var(--space-5);
  border: none;
}

.testimonial__attribution {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  line-height: var(--leading-relaxed);
}

.testimonial__name {
  display: block;
  font-weight: var(--weight-semibold);
  color: var(--color-text-1);
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
}

.testimonial__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  margin-top: var(--space-6);
}

.testimonial__logo {
  height: 28px;
  width: auto;
  object-fit: contain;
  opacity: 1;
}

/* Brand logo above the quote — large, single position, theme-swapped.
   Both <img> elements live in the same wrapper; only one is rendered at a time
   (display: none on the inactive variant collapses it to zero space), so they
   share the exact same position rather than sitting side by side. */
.testimonial__brand {
  text-align: center;
  margin-bottom: var(--space-6);
}

.testimonial__brand-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.testimonial__brand-logo--light { display: none; }
.testimonial__brand-logo--dark { display: inline-block; }

[data-theme="light"] .testimonial__brand-logo--light { display: inline-block; }
[data-theme="light"] .testimonial__brand-logo--dark { display: none; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .testimonial__brand-logo--light { display: inline-block; }
  :root:not([data-theme="dark"]) .testimonial__brand-logo--dark { display: none; }
}

.testimonial__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--space-3);
  display: block;
}
