/**
 * Credentials page — credibility hero + marquee banner
 * Built on top of r26-design-system.css (Prompt 12 palette)
 */

/* ── Hero height balance ──────────────────────────────────────────────────── */
.credentials-page .r26-zone-header {
  min-height: clamp(340px, 42vw, 420px);
}

/* ── Hero CTA row ─────────────────────────────────────────────────────────── */
.cred-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin-top: clamp(1.5rem, 3vw, 2rem);
}

.cred-hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-sizing: border-box;
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-size: var(--r26-type-btn-size, 0.9375rem);
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  /* Outlined secondary button to balance the solid primary CTA */
  padding: 13px 27px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--r26-radius-btn, 4px);
  background: transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cred-hero-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.7);
}

/* ── Credibility banner ──────────────────────────────────────────────────── */
.cred-banner {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  overflow: hidden;
  width: 100%;
}

.cred-banner__track {
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  padding-block: clamp(0.75rem, 1.5vw, 1rem);
  animation: cred-marquee 40s linear infinite;
  will-change: transform;
}

.cred-banner__track > span {
  flex-shrink: 0;
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 0 0.5rem;
}

.cred-banner__dot {
  flex-shrink: 0;
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
  padding: 0 0.25rem;
  user-select: none;
}

/* Pause on hover */
.cred-banner:hover .cred-banner__track {
  animation-play-state: paused;
}

/* ── Marquee keyframes ────────────────────────────────────────────────────── */
@keyframes cred-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    /* Move exactly -50% to loop the duplicated content seamlessly */
    transform: translateX(-50%);
  }
}

/* ── Body content column ──────────────────────────────────────────────────
   Match the hero's centered column (r26-zone-header__inner) so every body
   section shares one left edge with the headline above. Without this the
   sections stretch full-bleed and lose their left margin. */
.cred-validation,
.cred-team {
  max-width: var(--r26-content-max);
  margin-inline: auto;
  padding-inline: var(--r26-content-pad);
}

/* ── Independent Validation section ───────────────────────────────────────── */
.cred-validation {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.cred-validation__title {
  font-family: var(--font-display, Merriweather, Georgia, serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
  margin: 0 0 0.75rem;
}

.cred-validation__lead {
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-size: 1rem;
  line-height: 1.65;
  color: #475569;
  max-width: 42rem;
  margin: 0 0 clamp(2rem, 4vw, 2.75rem);
}

/* ── Labels (reuses cr-eyebrow pattern) ──────────────────────────────────── */
.cred-validation__label {
  display: block;
  font-family: var(--font-body, Inter, system-ui, sans-serif);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 1.25rem;
}

/* ── Quote text ───────────────────────────────────────────────────────────── */
.cred-validation__text {
  font-family: var(--font-heading, Merriweather, Georgia, serif);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  font-weight: 400;
  font-style: normal;
  line-height: 1.55;
  color: #0f172a;
  margin: 0 0 1.5rem;
}

.cred-validation__text--featured {
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
}

/* ── Attribution metadata ─────────────────────────────────────────────────── */
.cred-validation__meta {
  border-top: 1px solid #e2e8f0;
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cred-validation__name {
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-weight: 600;
  font-size: 0.9375rem;
  color: #0f172a;
  margin: 0;
}

.cred-validation__role {
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #64748b;
  margin: 0;
}

.cred-validation__note {
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #475569;
  margin: 0.35rem 0 0;
}

.cred-validation__link {
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--r26-link-accent, #991b1b);
  text-decoration: none;
  margin-top: 0.15rem;
}

.cred-validation__link:hover {
  color: var(--r26-link-accent-hover, #7f1d1d);
  text-decoration: underline;
}

/* ── Featured card ────────────────────────────────────────────────────────── */
.cred-validation__featured {
  background: var(--r26-white, #ffffff);
  border: 1px solid var(--r26-border-subtle, #e2e8f0);
  border-top: 3px solid var(--r26-brand, #991b1b);
  border-radius: var(--r26-radius-card, 6px);
  padding: clamp(2.25rem, 4vw, 3rem);
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

/* Featured endorsement carries the brand accent on its label too. */
.cred-validation__featured .cred-validation__label {
  color: var(--r26-brand, #991b1b);
}

/* ── Endorsement grid ─────────────────────────────────────────────────────── */
.cred-validation__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

.cred-validation__card {
  background: var(--r26-white, #ffffff);
  border: 1px solid var(--r26-border-subtle, #e2e8f0);
  border-radius: var(--r26-radius-card, 6px);
  padding: clamp(1.75rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
}

.cred-validation__card:hover {
  border-color: #cbd5e1;
}

/* ── Disclaimer ───────────────────────────────────────────────────────────── */
.cred-validation__disclaimer {
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-size: 0.8125rem;
  color: #94a3b8;
  text-align: center;
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

/* ── Expertise Behind Rule26 ──────────────────────────────────────────────── */
.cred-team {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.cred-team__title {
  font-family: var(--font-display, Merriweather, Georgia, serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
  margin: 0 0 0.75rem;
}

.cred-team__lead {
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-size: 1rem;
  line-height: 1.65;
  color: #475569;
  max-width: 42rem;
  margin: 0 0 clamp(2rem, 4vw, 2.75rem);
}

.cred-team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

.cred-team__card {
  background: var(--r26-white, #ffffff);
  border: 1px solid var(--r26-border-subtle, #e2e8f0);
  border-radius: var(--r26-radius-card, 6px);
  padding: clamp(1.75rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
}

.cred-team__card:hover {
  border-color: #cbd5e1;
}

.cred-team__photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.cred-team__label {
  display: block;
  font-family: var(--font-body, Inter, system-ui, sans-serif);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.cred-team__name {
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-weight: 600;
  font-size: 1.125rem;
  color: #0f172a;
  margin: 0 0 0.25rem;
}

.cred-team__role {
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0 0 1rem;
  line-height: 1.4;
}

.cred-team__bio {
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #334155;
  margin: 0 0 1.25rem;
}

.cred-team__focus {
  margin-bottom: 1rem;
}

.cred-team__focus-title {
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 0.5rem;
}

.cred-team__focus-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cred-team__focus-list li {
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-size: 0.8125rem;
  color: #475569;
}

.cred-team__link {
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--r26-link-accent, #991b1b);
  text-decoration: none;
  margin-top: auto;
}

.cred-team__link:hover {
  color: var(--r26-link-accent-hover, #7f1d1d);
  text-decoration: underline;
}

/* ── YFRAI community section — align to the shared content column ──────────
   .cr-yfrai's `margin: … 0` shorthand cancels .cr-wrap's `margin: 0 auto`,
   which left-aligns the block. Restore centering and match the body column
   width/gutter so it lines up with the sections above. */
.credentials-page .cr-yfrai.cr-wrap {
  max-width: var(--r26-content-max);
  margin-inline: auto;
  padding-inline: var(--r26-content-pad);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .cred-validation__grid {
    grid-template-columns: 1fr;
  }
  .cred-team__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .cred-banner__track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 0;
  }

  .cred-banner__track > span {
    padding: 0.125rem 0.5rem;
  }

  .cred-banner__dot {
    padding: 0.125rem 0.25rem;
  }
}
