/**
 * Homepage / composer surface (tone) modes — allowlisted contrast bands.
 * Works with width containment (home-section-containment.css).
 */

.home-pres {
  --rj-surface-bg: transparent;
  --rj-surface-fg: inherit;
  --rj-surface-heading: inherit;
  --rj-surface-link: var(--rj-accent, #2a5ea8);
  --rj-surface-link-hover: #1e4a8a;
  --rj-surface-muted-fg: rgba(26, 29, 36, 0.68);
  --rj-surface-border: rgba(0, 0, 0, 0.08);
  --rj-surface-eyebrow: rgba(26, 29, 36, 0.72);
}

/* --- Mode tokens --- */

.rj-surface--light,
.home-pres__section.rj-surface--light {
  --rj-surface-bg: #ffffff;
  --rj-surface-fg: #1a1d24;
  --rj-surface-heading: #0f1218;
  --rj-surface-link: var(--rj-accent, #2a5ea8);
  --rj-surface-link-hover: #1e4a8a;
  --rj-surface-muted-fg: rgba(26, 29, 36, 0.68);
  --rj-surface-border: rgba(0, 0, 0, 0.1);
  --rj-surface-eyebrow: rgba(26, 29, 36, 0.72);
}

.rj-surface--dark,
.home-pres__section.rj-surface--dark {
  --rj-surface-bg: var(--home-pres-dark, #14181f);
  --rj-surface-fg: var(--home-pres-dark-text, #f4f5f7);
  --rj-surface-heading: #ffffff;
  --rj-surface-link: #b8d4ff;
  --rj-surface-link-hover: #e8f1ff;
  --rj-surface-muted-fg: rgba(244, 245, 247, 0.78);
  --rj-surface-border: rgba(255, 255, 255, 0.14);
  --rj-surface-eyebrow: rgba(244, 245, 247, 0.72);
}

.rj-surface--muted,
.home-pres__section.rj-surface--muted {
  --rj-surface-bg: var(--home-pres-band-bg, #f6f7f9);
  --rj-surface-fg: #1a1d24;
  --rj-surface-heading: #0f1218;
  --rj-surface-link: var(--rj-accent, #2a5ea8);
  --rj-surface-link-hover: #1e4a8a;
  --rj-surface-muted-fg: rgba(26, 29, 36, 0.65);
  --rj-surface-border: rgba(0, 0, 0, 0.08);
  --rj-surface-eyebrow: rgba(26, 29, 36, 0.7);
}

.rj-surface--accent,
.home-pres__section.rj-surface--accent {
  --rj-surface-bg: var(--rj-accent, #2a5ea8);
  --rj-surface-fg: #ffffff;
  --rj-surface-heading: #ffffff;
  --rj-surface-link: #ffffff;
  --rj-surface-link-hover: #e8f1ff;
  --rj-surface-muted-fg: rgba(255, 255, 255, 0.88);
  --rj-surface-border: rgba(255, 255, 255, 0.22);
  --rj-surface-eyebrow: rgba(255, 255, 255, 0.82);
}

.rj-surface--warm_sand,
.home-pres__section.rj-surface--warm_sand {
  --rj-surface-bg: #f3ebe3;
  --rj-surface-fg: #1a1d24;
  --rj-surface-heading: #0f1218;
  --rj-surface-link: var(--rj-accent, #2a5ea8);
  --rj-surface-link-hover: #1e4a8a;
  --rj-surface-muted-fg: rgba(26, 29, 36, 0.68);
  --rj-surface-border: rgba(80, 56, 40, 0.12);
  --rj-surface-eyebrow: rgba(80, 56, 40, 0.72);
}

.rj-surface--cool_slate,
.home-pres__section.rj-surface--cool_slate {
  --rj-surface-bg: #e8eef4;
  --rj-surface-fg: #1a1d24;
  --rj-surface-heading: #0f1218;
  --rj-surface-link: var(--rj-accent, #2a5ea8);
  --rj-surface-link-hover: #1e4a8a;
  --rj-surface-muted-fg: rgba(26, 29, 36, 0.65);
  --rj-surface-border: rgba(40, 56, 80, 0.12);
  --rj-surface-eyebrow: rgba(40, 56, 80, 0.72);
}

.rj-surface--soft_ivory,
.home-pres__section.rj-surface--soft_ivory {
  --rj-surface-bg: #faf8f4;
  --rj-surface-fg: #1a1d24;
  --rj-surface-heading: #0f1218;
  --rj-surface-link: var(--rj-accent, #2a5ea8);
  --rj-surface-link-hover: #1e4a8a;
  --rj-surface-muted-fg: rgba(26, 29, 36, 0.66);
  --rj-surface-border: rgba(0, 0, 0, 0.07);
  --rj-surface-eyebrow: rgba(26, 29, 36, 0.7);
}

.rj-surface--ink_band,
.home-pres__section.rj-surface--ink_band {
  --rj-surface-bg: #1c1f26;
  --rj-surface-fg: #f4f5f7;
  --rj-surface-heading: #ffffff;
  --rj-surface-link: #b8d4ff;
  --rj-surface-link-hover: #e8f1ff;
  --rj-surface-muted-fg: rgba(244, 245, 247, 0.78);
  --rj-surface-border: rgba(255, 255, 255, 0.12);
  --rj-surface-eyebrow: rgba(244, 245, 247, 0.72);
}

/* --- Apply to presentation sections --- */

.home-pres__section.rj-surface--light,
.home-pres__section.rj-surface--dark,
.home-pres__section.rj-surface--muted,
.home-pres__section.rj-surface--accent,
.home-pres__section.rj-surface--warm_sand,
.home-pres__section.rj-surface--cool_slate,
.home-pres__section.rj-surface--soft_ivory,
.home-pres__section.rj-surface--ink_band {
  background: var(--rj-surface-bg);
  color: var(--rj-surface-fg);
  border-top-color: var(--rj-surface-border);
}

.home-pres__section.rj-surface--dark .home-pres__eyebrow,
.home-pres__section.rj-surface--dark .home-pres__section-title,
.home-pres__section.rj-surface--dark .home-pres__split-title,
.home-pres__section.rj-surface--dark .home-pres__split-excerpt,
.home-pres__section.rj-surface--dark .home-pres__link-cta,
.home-pres__section.rj-surface--dark .home-pres__latest-title,
.home-pres__section.rj-surface--dark .home-pres__latest-date {
  color: inherit;
}

.home-pres__section.rj-surface--dark .home-pres__section-title,
.home-pres__section.rj-surface--dark .home-pres__split-title {
  color: var(--rj-surface-heading);
}

.home-pres__section.rj-surface--dark .home-pres__eyebrow {
  color: var(--rj-surface-eyebrow);
}

.home-pres__section.rj-surface--dark .home-pres__link-cta,
.home-pres__section.rj-surface--dark .home-pres__split-link,
.home-pres__section.rj-surface--dark .home-pres__latest-link {
  color: var(--rj-surface-fg);
}

.home-pres__section.rj-surface--dark .home-pres__link-cta {
  color: var(--rj-surface-link);
}

.home-pres__section.rj-surface--muted.home-pres__split,
.home-pres__section.rj-surface--light.home-pres__split {
  background: var(--rj-surface-bg);
}

.home-pres__section.rj-surface--accent .home-pres__link-cta {
  color: var(--rj-surface-link);
  text-decoration-color: rgba(255, 255, 255, 0.55);
}

.home-pres__section.rj-surface--dark .home-pres__stat {
  background: rgba(255, 255, 255, 0.06);
}

.home-pres__section.rj-surface--dark .home-pres__logos-partners-link {
  border-color: rgba(255, 255, 255, 0.2);
}

.home-pres__section.rj-surface--dark .home-pres__media-text-cta {
  border-color: rgba(255, 255, 255, 0.35);
}

.home-pres__section.rj-surface--dark .home-pres__editorial-rows,
.home-pres__section.rj-surface--dark .home-pres__editorial-row {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Align legacy dark hero with surface tokens */
.home-pres__dark-hero.rj-surface--dark,
.home-pres__section.home-pres__dark-hero {
  background: var(--home-pres-dark, #14181f);
  color: var(--home-pres-dark-text, #f4f5f7);
}

/* --- Reusable shells (block-level surface) --- */

.rj-reusable-shell.rj-surface--light,
.rj-reusable-shell.rj-surface--dark,
.rj-reusable-shell.rj-surface--muted,
.rj-reusable-shell.rj-surface--accent,
.rj-reusable-shell.rj-surface--warm_sand,
.rj-reusable-shell.rj-surface--cool_slate,
.rj-reusable-shell.rj-surface--soft_ivory,
.rj-reusable-shell.rj-surface--ink_band {
  background: var(--rj-surface-bg);
  color: var(--rj-surface-fg);
}

.rj-reusable-shell.rj-surface--light,
.rj-reusable-shell.rj-surface--dark,
.rj-reusable-shell.rj-surface--muted,
.rj-reusable-shell.rj-surface--accent,
.rj-reusable-shell.rj-surface--warm_sand,
.rj-reusable-shell.rj-surface--cool_slate,
.rj-reusable-shell.rj-surface--soft_ivory,
.rj-reusable-shell.rj-surface--ink_band {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.rj-reusable-shell.rj-surface--full_bleed.rj-surface--dark,
.rj-reusable-shell.rj-surface--full_bleed.rj-surface--light,
.rj-reusable-shell.rj-surface--full_bleed.rj-surface--muted,
.rj-reusable-shell.rj-surface--full_bleed.rj-surface--accent {
  padding-left: var(--home-pres-pad-x, clamp(1.25rem, 4vw, 2.5rem));
  padding-right: var(--home-pres-pad-x, clamp(1.25rem, 4vw, 2.5rem));
}

/* Typography inside reusable content */
.rj-reusable-shell .rj-article-content {
  color: inherit;
}

.rj-reusable-shell.rj-surface--dark .rj-article-content a,
.rj-reusable-shell.rj-surface--accent .rj-article-content a,
.rj-reusable-shell.rj-surface--light .rj-article-content a,
.rj-reusable-shell.rj-surface--muted .rj-article-content a {
  color: var(--rj-surface-link);
}

.rj-reusable-shell .rj-article-content a:hover,
.rj-reusable-shell .rj-article-content a:focus {
  color: var(--rj-surface-link-hover);
}

.rj-reusable-shell .rj-article-content h1,
.rj-reusable-shell .rj-article-content h2,
.rj-reusable-shell .rj-article-content h3,
.rj-reusable-shell .rj-article-content h4,
.rj-reusable-shell .rj-article-content .rj-presentation__title,
.rj-reusable-shell .rj-article-content .rj-presentation__title--display {
  color: var(--rj-surface-heading);
}

.rj-reusable-shell .rj-article-content p,
.rj-reusable-shell .rj-article-content li,
.rj-reusable-shell .rj-article-content .rj-presentation__intro,
.rj-reusable-shell .rj-article-content .rj-presentation__lead {
  color: var(--rj-surface-fg);
}

.rj-reusable-shell .rj-article-content blockquote {
  border-left-color: var(--rj-surface-border);
  color: var(--rj-surface-muted-fg);
}

.rj-reusable-shell .rj-article-content hr {
  border-color: var(--rj-surface-border);
  background: var(--rj-surface-border);
}

.rj-reusable-shell .rj-article-content .home-pres__latest-item,
.rj-reusable-shell .rj-article-content [data-rj-layout-type="columns"] {
  border-color: var(--rj-surface-border);
}

/* Composer embed section inherits; block shell may override */
.home-pres__composer-embed.rj-surface--inherit {
  background: transparent;
}

.home-pres__composer-embed .rj-composer-block__head .rj-composer-block__title {
  color: var(--rj-surface-heading, inherit);
}

/* Theme pack tuning */
body.theme-pack--luxury-dark .rj-surface--accent {
  --rj-surface-bg: var(--rj-gold, #c9a962);
  --rj-surface-fg: #14181f;
  --rj-surface-heading: #0f1218;
  --rj-surface-link: #14181f;
  --rj-surface-link-hover: #000000;
}

body.theme-pack--studio-dark .home-pres__section.rj-surface--muted {
  --rj-surface-bg: rgba(255, 255, 255, 0.04);
  --rj-surface-fg: #f4f5f7;
  --rj-surface-heading: #ffffff;
  --rj-surface-muted-fg: rgba(244, 245, 247, 0.75);
  --rj-surface-border: rgba(255, 255, 255, 0.1);
}
