/**
 * CF Quote Rotator — six-mode framework per CF_MODULE_GUIDE §8.
 *
 * Modes:
 *   .cf-quote-rotator--light-sky    Briefing-grade default
 *   .cf-quote-rotator--light-slate  Analytical / operational
 *   .cf-quote-rotator--light-paper  Editorial / long-form (white bg)
 *   .cf-quote-rotator--light-mint   Positive outcome / growth
 *   .cf-quote-rotator--dark-navy    Brand authority anchor
 *   .cf-quote-rotator--dark-ops     GSOC / command center
 *
 * Override variables (semantic roles):
 *   --cfqr-section-bg  section background
 *   --cfqr-text        quote text + primary attribution
 *   --cfqr-mark        decorative quote-mark glyphs
 *   --cfqr-text-sub    secondary attribution (role / org)
 *
 * Mode rule blocks below set the four color variables to brand tokens
 * from cf_core/brand. The base block sets light_sky defaults so the
 * section renders correctly even if no mode class is applied.
 */

.cf-quote-rotator {
  /* Base defaults = light_sky. Mode classes below override. */
  --cfqr-section-bg: var(--cf-sky-light);
  --cfqr-text: var(--cf-navy);
  --cfqr-mark: var(--cf-sky-mid);
  --cfqr-text-sub: var(--cf-blue-gray);

  background-color: var(--cfqr-section-bg);
  padding: 96px 24px;
  font-family: var(--cf-font-stack);
}

/* ── Light: Sky (briefing-grade default) ────────────────────────────── */
.cf-quote-rotator--light-sky {
  --cfqr-section-bg: var(--cf-sky-light);
  --cfqr-text: var(--cf-navy);
  --cfqr-mark: var(--cf-sky-mid);
  --cfqr-text-sub: var(--cf-blue-gray);
}

/* ── Light: Slate (analytical / operational) ────────────────────────── */
.cf-quote-rotator--light-slate {
  --cfqr-section-bg: var(--cf-blue-gray-lightest);
  --cfqr-text: var(--cf-navy);
  --cfqr-mark: var(--cf-navy);
  --cfqr-text-sub: var(--cf-blue-gray);
}

/* ── Light: Paper (editorial / long-form) ───────────────────────────── */
.cf-quote-rotator--light-paper {
  --cfqr-section-bg: var(--cf-white);
  --cfqr-text: var(--cf-navy);
  --cfqr-mark: var(--cf-navy);
  --cfqr-text-sub: var(--cf-blue-gray);
}

/* ── Light: Mint (positive outcome / growth) ────────────────────────── */
.cf-quote-rotator--light-mint {
  --cfqr-section-bg: var(--cf-apple-pale);
  --cfqr-text: var(--cf-navy);
  --cfqr-mark: var(--cf-leaf);
  --cfqr-text-sub: var(--cf-blue-gray);
}

/* ── Dark: Navy (brand authority) ───────────────────────────────────── */
.cf-quote-rotator--dark-navy {
  --cfqr-section-bg: var(--cf-navy);
  --cfqr-text: var(--cf-navy-lightest);
  --cfqr-mark: var(--cf-sky);
  --cfqr-text-sub: color-mix(in srgb, var(--cf-navy-lightest) 75%, transparent);
}

/* ── Dark: Ops (GSOC / command center) ──────────────────────────────── */
.cf-quote-rotator--dark-ops {
  --cfqr-section-bg: var(--cf-slate-section);
  --cfqr-text: var(--cf-blue-gray-tint);
  --cfqr-mark: var(--cf-golden-orange);
  --cfqr-text-sub: var(--cf-blue-gray-soft);
}

/**
 * Full-bleed: break out of any constrained ancestor so the colored
 * background spans the full viewport width. Inner content remains
 * constrained by .cf-quote-rotator-inner.
 *
 * Note: 100vw includes the vertical scrollbar width on some platforms.
 * If the page shows a horizontal scrollbar after enabling this, add
 * `html { overflow-x: hidden; }` in your theme.
 */
.cf-quote-rotator--fullbleed {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.cf-quote-rotator-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  padding: 0 32px;
}

.cf-quote-rotator blockquote {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.3;
  color: var(--cfqr-text);
  font-style: italic;
  margin: 0 0 40px 0;
  padding: 0;
}

.cf-quote-rotator blockquote::before,
.cf-quote-rotator blockquote::after {
  content: '"';
  color: var(--cfqr-mark);
}

.cf-quote-rotator-attr {
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--cfqr-text);
  font-weight: 600;
  text-transform: uppercase;
}

.cf-quote-rotator-attr span {
  color: var(--cfqr-text-sub);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* ── Phone treatment ────────────────────────────────────────────────────
   This block is a *secondary, supporting* element. On phones the default
   centered-serif-italic treatment reads as an anchor section and eats
   ~190px of padding before any content. Below 640px we restyle it as a
   left-aligned pullquote: tighter padding, smaller quote, single-line
   attribution caption, sky-mid left rule instead of decorative marks.
   The 640px bound is phone-specific (CF's main 1024px breakpoint also
   covers tablets, where the centered treatment still works).            */
@media (max-width: 640px) {
  .cf-quote-rotator {
    padding: 48px 20px;
  }
  .cf-quote-rotator-inner {
    text-align: left;
    padding: 0;
    border-left: 3px solid var(--cfqr-mark);
    padding-left: 20px;
  }
  .cf-quote-rotator blockquote {
    font-size: 20px;
    line-height: 1.45;
    margin: 0 0 16px 0;
  }
  .cf-quote-rotator blockquote::before,
  .cf-quote-rotator blockquote::after {
    content: none;
  }
  .cf-quote-rotator-attr {
    font-size: 12px;
    letter-spacing: 0.06em;
  }
}
