/* =========================================================
   Michael Bach — Component library v0.1
   Order: Button · Nav · Hero · PathwayCard · TalkCard ·
   Testimonial · LogoWall · ReelCard · FormField ·
   Newsletter · Footer · PullQuote · StatStrip · Tag ·
   SectionHeading · ContrastSwatch · BrandTile
   ========================================================= */


/* --------- Button ---------------------------------------- */

.btn {
  --btn-bg: var(--color-coral);
  --btn-fg: var(--color-white);
  --btn-border: transparent;

  /* WCAG note: White-on-Coral measures 4.43 — fails AA for normal text but
     passes AA for large text (≥18.66px bold OR ≥24px). All primary buttons
     are sized to clear that threshold: 17px / weight 800. */
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: var(--tracking-tight);
  line-height: 1;
  padding: 0.95rem 1.4rem;
  min-height: 48px;
  border-radius: var(--radius-full);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 2px solid var(--btn-border);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease-out),
    background-color var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out);
  white-space: nowrap;
}

.btn .btn__arrow {
  display: inline-block;
  transition: transform var(--duration-base) var(--ease-out);
}
.btn:hover .btn__arrow { transform: translateX(3px); }

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.5; pointer-events: none; cursor: not-allowed;
}

/* Primary — Coral on dark/light */
.btn--primary { --btn-bg: var(--color-coral); --btn-fg: var(--color-white); }
.btn--primary:hover { --btn-bg: #d40539; }

/* Secondary — outline */
.btn--secondary {
  --btn-bg: transparent;
  --btn-fg: var(--color-arsenic);
  --btn-border: var(--color-arsenic);
}
.surface-arsenic .btn--secondary,
.surface-lavender .btn--secondary {
  --btn-fg: var(--color-white);
  --btn-border: var(--color-white);
}
.btn--secondary:hover {
  --btn-bg: var(--color-arsenic);
  --btn-fg: var(--color-white);
}
.surface-arsenic .btn--secondary:hover {
  --btn-bg: var(--color-white);
  --btn-fg: var(--color-arsenic);
}

/* Ghost — text + arrow */
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--color-arsenic);
  --btn-border: transparent;
  padding-inline: 0.5rem;
}
.surface-arsenic .btn--ghost,
.surface-lavender .btn--ghost,
.surface-coral .btn--ghost { --btn-fg: var(--color-white); }
.btn--ghost:hover { text-decoration: underline; text-underline-offset: 6px; }

/* Tertiary — text only, underline always.
   On light surfaces: Arsenic ink. On dark surfaces: White (with Pastel Orange underline accent).
   Coral text is NEVER used on Arsenic per WCAG (2.32 contrast). */
.btn--tertiary {
  --btn-bg: transparent;
  --btn-fg: var(--color-arsenic);
  --btn-border: transparent;
  padding: 0.25rem 0;
  min-height: 44px;
  font-weight: var(--weight-bold);
  border-radius: 0;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--color-coral);
}
.btn--tertiary:hover { text-decoration-color: var(--color-arsenic); }
.surface-arsenic .btn--tertiary,
.surface-lavender .btn--tertiary {
  --btn-fg: var(--color-white);
  text-decoration-color: var(--color-orange);
}
.surface-arsenic .btn--tertiary:hover,
.surface-lavender .btn--tertiary:hover { text-decoration-color: var(--color-white); }

.btn--sm {
  /* Small variant is reserved for SECONDARY/GHOST on light backgrounds only,
     where contrast is unaffected. Never use .btn--sm with .btn--primary. */
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  padding: 0.65rem 1rem;
  min-height: 44px;
}


/* --------- Nav ------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-arsenic);
  color: var(--color-white);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: var(--space-4);
}
.nav__logo { display: flex; align-items: center; color: var(--color-white); height: 38px; }
.nav__logo svg { height: 100%; width: auto; }
.nav__logo img { height: 100%; width: auto; display: block; }

.nav__items {
  display: flex;
  list-style: none;
  gap: clamp(var(--space-3), 1.6vw, var(--space-5));
  margin: 0; padding: 0;
  align-items: center;
}
.nav__items a {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  padding: 0.5rem 0.25rem;
  letter-spacing: var(--tracking-tight);
  position: relative;
  color: var(--color-white);
  transition: color var(--duration-base) var(--ease-out);
}
/* Nav lives on Arsenic. Hover and active states use Pastel Orange
   (contrast 5.46 — passes AA body) and the underline accent uses Coral
   as a DECORATIVE shape only — never as text on Arsenic. */
.nav__items a:hover { color: var(--color-orange); }
.nav__items a[aria-current="page"] { color: var(--color-orange); }
.nav__items a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--color-coral); /* decorative accent line, not text */
}

.nav__cta { margin-left: var(--space-3); }

.nav__hamburger {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
}
.nav__hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--color-white);
  position: relative;
}
.nav__hamburger span::before,
.nav__hamburger span::after {
  content: ""; position: absolute; left: 0;
  width: 22px; height: 2px; background: var(--color-white);
}
.nav__hamburger span::before { top: -7px; }
.nav__hamburger span::after  { top: 7px; }

@media (max-width: 880px) {
  .nav__items, .nav__cta { display: none; }
  .nav__hamburger { display: inline-flex; }
}


/* --------- Hero ------------------------------------------ */

.hero {
  position: relative;
  padding-block: clamp(4rem, 9vw, 8rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(var(--space-6), 6vw, var(--space-10));
  align-items: center;
}
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
}
.hero__headline {
  font-size: var(--text-hero);
  font-weight: var(--weight-black);
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin: 0 0 var(--space-5);
  max-width: 16ch;
}
.hero__headline em {
  /* On Arsenic hero, emphasis uses Pastel Orange (AA-pass 5.46).
     On light hero variants (.surface-light .hero), Coral is allowed
     at this display size since the headline is >>48px. */
  font-style: normal;
  color: var(--color-orange);
}
.surface-light .hero__headline em,
.surface-tulip .hero__headline em,
.surface-timberwolf .hero__headline em {
  color: var(--color-coral);
}
.hero__sub {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  max-width: 52ch;
  margin: 0 0 var(--space-6);
  opacity: 0.92;
}
.hero__ctas { display: flex; gap: var(--space-3); flex-wrap: wrap; }

.hero__portrait {
  aspect-ratio: 4 / 5;
  background: var(--color-timberwolf-t1);
  color: var(--color-arsenic);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.surface-arsenic .hero__portrait {
  background: rgba(255,255,255,0.06);
  color: var(--color-timberwolf);
  border: 1px dashed rgba(255,255,255,0.18);
}


/* --------- StatStrip ------------------------------------- */

.stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  align-items: center;
}
.stat-strip li {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.stat-strip li + li::before {
  content: "·";
  color: var(--color-coral);
  margin-right: var(--space-3);
  font-size: 1.2em;
}


/* --------- PathwayCard ----------------------------------- */

.pathway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}
.pathway-card {
  --card-bg: var(--color-lavender);
  --card-fg: var(--color-white);
  background: var(--card-bg);
  color: var(--card-fg);
  padding: var(--space-7) var(--space-6) var(--space-6);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-decoration: none;
  position: relative;
  min-height: 280px;
  transition: transform var(--duration-base) var(--ease-out);
}
.pathway-card:hover { transform: translateY(-4px); }
.pathway-card__num {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  opacity: 0.8;
}
.pathway-card__title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-display);
  line-height: 1.05;
  margin: 0;
}
.pathway-card__copy {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  margin: 0;
  opacity: 0.95;
}
.pathway-card__cta {
  margin-top: auto;
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-tight);
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}
.pathway-card__cta::after { content: "→"; transition: transform var(--duration-base) var(--ease-out); }
.pathway-card:hover .pathway-card__cta::after { transform: translateX(4px); }

.pathway-card--lavender { --card-bg: var(--color-lavender); --card-fg: var(--color-white); }
.pathway-card--coral    { --card-bg: var(--color-coral);    --card-fg: var(--color-white); }
.pathway-card--tulip    { --card-bg: var(--color-tulip);    --card-fg: var(--color-arsenic); }
.pathway-card--orange   { --card-bg: var(--color-orange);   --card-fg: var(--color-arsenic); }

/* WCAG v0.4.0/v0.4.1: Coral surface only meets AA at Large+Bold thresholds.
   White on Coral = 4.43:1 (passes AA-Large at >=18.66px bold).
   Arsenic on Coral = 3.20:1 (fails AA-Normal AND difficult to read per client review).
   Decision: keep white text on Coral surfaces. To avoid visually inflating the
   Coral eyebrow vs. the other three cards, we now scale ALL pathway eyebrows
   up to 1rem/16px at weight 800 (passes AA-Large bold threshold of 14px+bold on
   the coloured backgrounds, and visually consistent across all four cards). */
.pathway-card__num {
  font-size: 1rem;            /* 16px, AA-Large compliant on all four cards */
  font-weight: var(--weight-black);
}
.pathway-card--coral .pathway-card__num {
  color: var(--color-white);
  opacity: 1;
}


/* --------- TalkCard -------------------------------------- */

.talk-grid {
  /* v0.3.1: Explicit 2x2 on desktop, 1-col on mobile. auto-fit was collapsing
     to 3+1 at 1440px which broke the visual balance of the four featured talks. */
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
@media (max-width: 720px) {
  .talk-grid { grid-template-columns: 1fr; }
}
.talk-card {
  background: var(--color-white);
  color: var(--color-arsenic);
  border: 1px solid var(--color-timberwolf);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex; flex-direction: column;
  gap: var(--space-3);
  transition: border-color var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
}
.talk-card:hover { border-color: var(--color-coral); transform: translateY(-2px); }
.surface-arsenic .talk-card {
  background: rgba(255,255,255,0.04);
  color: var(--color-white);
  border-color: rgba(255,255,255,0.14);
}

.talk-card__audience {
  /* Eyebrow lives on White or Timberwolf card backgrounds, where Coral
     contrast is borderline (3.18 / 4.43). We use Arsenic ink for the
     eyebrow and reserve Coral for the underline accent and CTA arrow. */
  font-size: var(--text-xs);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-arsenic);
}
.talk-card__audience::after {
  content: "";
  display: inline-block;
  width: 1.2em;
  height: 2px;
  background: var(--color-coral);
  margin-left: 0.5em;
  vertical-align: 0.25em;
}
.surface-arsenic .talk-card__audience { color: var(--color-orange); }
.surface-arsenic .talk-card__audience::after { background: var(--color-white); }
.talk-card__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight);
  line-height: 1.15;
  margin: 0;
}
.talk-card__subtitle {
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  line-height: 1.4;
  letter-spacing: 0;
  margin: 0;
  color: var(--color-arsenic);
  opacity: 0.75;
}
.surface-arsenic .talk-card__subtitle { color: var(--color-timberwolf); opacity: 1; }
.talk-card__hook {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  margin: 0;
}
.talk-card__chips {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin: 0; padding: 0; list-style: none;
}
.talk-card__cta { margin-top: var(--space-3); align-self: flex-start; }


/* --------- Testimonial ----------------------------------- */

.testimonial {
  padding: var(--space-6) var(--space-6) var(--space-6) var(--space-7);
  border-left: 4px solid var(--color-coral);
  max-width: 760px;
}
.testimonial__quote {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: var(--weight-bold);
  line-height: 1.25;
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-5);
}
.testimonial__quote::before {
  content: "“";
  color: var(--color-coral);
  font-weight: var(--weight-black);
  margin-right: 0.1em;
}
.testimonial__quote::after { content: "”"; color: var(--color-coral); }
.testimonial__author {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}
.testimonial__meta {
  font-size: var(--text-sm);
  opacity: 0.75;
  margin: 0;
}


/* --------- LogoWall --------------------------------------
   Approach: every cell is the same size. Each logo gets a
   PER-LOGO height that compensates for its native aspect ratio
   so the optical weight stays uniform regardless of shape.
   Wide logos (e.g. AbbVie) get a taller cap so the wordmark
   reads at the same scale as squarish marks (Best Buy, SHRM).
   No size changes on hover — mono/color are sized identically. */

.logo-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  background: transparent;
  border: none;
}
@media (max-width: 980px) { .logo-wall { grid-template-columns: repeat(3, 1fr); gap: var(--space-4); } }
@media (max-width: 720px) { .logo-wall { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); } }

.logo-wall__cell {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 5 / 3;
  position: relative;
  padding: var(--space-4);
}

/* All logos are absolutely centered; identical mono+color sizing */
.logo-wall__cell img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: opacity var(--duration-slow) var(--ease-out);
}

/* Per-shape sizing rules — the SAME values apply to mono and color
   so hovering NEVER changes scale. Heights tuned for visual parity. */

/* Wide horizontal wordmarks — need larger height to read at parity */
.logo-wall__cell--wide img      { max-height: 72px; max-width: 86%; }
/* Medium horizontal logos */
.logo-wall__cell--medium img    { max-height: 56px; max-width: 78%; }
/* Compact / square logos — capped tighter so they don't dominate */
.logo-wall__cell--compact img   { max-height: 64px; max-width: 50%; }
/* Tall / square-ish stacked logos — height cap, width room */
.logo-wall__cell--square img    { max-height: 78px; max-width: 60%; }

@media (max-width: 720px) {
  .logo-wall__cell--wide img    { max-height: 60px; }
  .logo-wall__cell--medium img  { max-height: 48px; }
  .logo-wall__cell--compact img { max-height: 54px; }
  .logo-wall__cell--square img  { max-height: 64px; }
}

/* Default opacity — mono visible, color hidden underneath */
.logo-wall__cell img.logo-wall__color { opacity: 0; }
.logo-wall__cell:hover .logo-wall__mono,
.logo-wall__cell:focus-within .logo-wall__mono { opacity: 0; }
.logo-wall__cell:hover .logo-wall__color,
.logo-wall__cell:focus-within .logo-wall__color { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .logo-wall__cell img { transition: none; }
}


/* --------- ReelCard -------------------------------------- */

.reel-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-2);
}
.reel-card iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.reel-card__poster {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center;
  background-color: var(--color-arsenic);
  cursor: pointer;
  border: 0; width: 100%; padding: 0;
}
.reel-card__poster::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}
.reel-card__play {
  position: relative;
  z-index: 1;
  width: 88px; height: 88px;
  border-radius: var(--radius-full);
  background: var(--color-coral);
  color: var(--color-white);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--duration-base) var(--ease-spring);
}
.reel-card__poster:hover .reel-card__play { transform: scale(1.08); }
.reel-card__play svg { width: 28px; height: 28px; margin-left: 4px; }

.reel-caption {
  font-size: var(--text-sm);
  margin-top: var(--space-3);
  opacity: 0.75;
}


/* --------- FormField ------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.field__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
}
.field__required {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-coral);
  margin-left: 0.4rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
}
.field__input,
.field__textarea {
  font: inherit;
  font-size: var(--text-base);
  padding: 0.85rem 1rem;
  background: var(--color-white);
  color: var(--color-arsenic);
  border: 2px solid var(--color-arsenic);
  border-radius: var(--radius-sm);
  width: 100%;
  min-height: 48px;
  transition: border-color var(--duration-fast) var(--ease-out);
}
.field__textarea { min-height: 120px; resize: vertical; }
.field__input:focus, .field__textarea:focus {
  outline: var(--focus-ring-width) solid var(--color-coral);
  outline-offset: 2px;
}
.field__hint {
  font-size: var(--text-xs);
  opacity: 0.7;
  margin: 0;
}
.field--error .field__input,
.field--error .field__textarea {
  border-color: var(--color-coral);
  background: var(--color-tulip-t4);
}
.field__error {
  font-size: var(--text-xs);
  color: var(--color-coral);
  font-weight: var(--weight-bold);
  margin: 0;
}
.field__error::before { content: "⚠ "; margin-right: 0.3em; }


/* --------- Newsletter ------------------------------------ */

.newsletter {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: flex-end;
  max-width: 560px;
}
.newsletter .field { flex: 1 1 240px; margin-bottom: 0; }
.newsletter .btn { height: 48px; }
.newsletter__pitch {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  margin: 0 0 var(--space-5);
  max-width: 56ch;
}


/* --------- Footer ---------------------------------------- */

.footer {
  background: var(--color-arsenic);
  color: var(--color-white);
  padding-block: var(--space-9) var(--space-7);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-7);
}
@media (max-width: 880px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; }
}
.footer__col h4 {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  /* v0.2: Coral on Arsenic fails AA. Use Pastel Orange (5.46:1 AA pass) for footer eyebrows. */
  color: var(--color-pastel-orange);
  font-weight: var(--weight-bold);
  margin: 0 0 var(--space-4);
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.footer__col a { color: var(--color-white); text-decoration: none; border-bottom: 2px solid transparent; transition: border-color var(--duration-base) var(--ease-out); padding-bottom: 2px; }
.footer__col a:hover { color: var(--color-pastel-orange); border-bottom-color: var(--color-coral); }

.footer__bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between;
  font-size: var(--text-xs);
  opacity: 0.75;
}
.footer__social {
  display: flex; gap: var(--space-3); list-style: none; padding: 0; margin: 0;
}


/* --------- PullQuote ------------------------------------- */

.pull-quote {
  background: var(--color-lavender);
  color: var(--color-white);
  padding: clamp(var(--space-7), 6vw, var(--space-10));
  border-radius: var(--radius-lg);
}
.pull-quote__text {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-display);
  line-height: 1.05;
  margin: 0 0 var(--space-5);
  max-width: 20ch;
}
.pull-quote__text em { font-style: normal; color: var(--color-orange); }
.pull-quote__attrib {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  opacity: 0.85;
}


/* --------- Tag / Chip ------------------------------------ */

.chip {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--color-timberwolf-t2);
  color: var(--color-arsenic);
  border: 1px solid var(--color-timberwolf);
  line-height: 1;
}
.chip--coral    { background: var(--color-coral);    color: var(--color-white);   border-color: transparent; }
.chip--lavender { background: var(--color-lavender); color: var(--color-white);   border-color: transparent; }
.chip--orange   { background: var(--color-orange);   color: var(--color-arsenic); border-color: transparent; }
.chip--ghost    { background: transparent; }
.surface-arsenic .chip--ghost,
.surface-lavender .chip--ghost { color: var(--color-white); border-color: rgba(255,255,255,0.35); }


/* --------- SectionHeading -------------------------------- */

.section-heading { margin-bottom: var(--space-7); }
.section-heading__h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-display);
  line-height: 1.05;
  margin: 0 0 var(--space-3);
  max-width: 24ch;
}
.section-heading__lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  margin: 0;
  max-width: 60ch;
  opacity: 0.9;
}


/* --------- Brand Tile (for color section) ---------------- */

.brand-tile {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-timberwolf);
  background: var(--color-white);
}
.brand-tile__primary {
  padding: var(--space-7) var(--space-5);
  min-height: 140px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.brand-tile__name {
  font-weight: var(--weight-black);
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
}
.brand-tile__hex {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.brand-tile__tints {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.brand-tile__tint {
  height: 44px;
  position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  padding-bottom: 4px;
  color: var(--color-arsenic);
}


/* --------- Contrast matrix swatch ------------------------ */

.contrast-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-white);
  border: 1px solid var(--color-timberwolf);
  border-radius: var(--radius-sm);
}
.contrast-row + .contrast-row { margin-top: var(--space-2); }

.contrast-sample {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight);
  font-size: var(--text-lg);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}
.contrast-sample__small {
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  letter-spacing: 0;
  opacity: 0.95;
}
.contrast-meta {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: var(--text-xs);
}
.contrast-badge {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.contrast-badge--aaa { background: var(--color-arsenic); color: var(--color-white); }
.contrast-badge--aa  { background: var(--color-orange);  color: var(--color-arsenic); }
.contrast-badge--fail{ background: var(--color-coral);   color: var(--color-white); }


/* --------- Do / Don't tiles ------------------------------ */

.dont-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
}
.dont-tile {
  border: 1px solid var(--color-timberwolf);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-white);
}
.dont-tile__sample {
  padding: var(--space-6);
  font-size: var(--text-xl);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight);
  position: relative;
  text-align: center;
}
.dont-tile__sample::after {
  content: "✕";
  position: absolute;
  top: 8px; right: 12px;
  color: var(--color-coral);
  font-size: var(--text-3xl);
  font-weight: var(--weight-black);
  line-height: 1;
}
.dont-tile__why {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  border-top: 1px solid var(--color-timberwolf);
  color: var(--color-arsenic);
}


/* --------- Styleguide layout primitives ------------------ */

.sg-banner {
  background: var(--color-arsenic);
  color: var(--color-white);
  padding-block: var(--space-7);
}
.sg-banner__meta {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  font-weight: var(--weight-bold);
  margin: 0 0 var(--space-3);
  /* v0.2: Coral on Arsenic fails WCAG (2.32). Use Pastel Orange (5.46 AA pass). */
  color: var(--color-pastel-orange);
}
.sg-banner__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-display);
  line-height: 1.05;
  margin: 0;
}

.sg-section-toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.sg-section-toc a {
  color: var(--color-white);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  transition: border-color var(--duration-base) var(--ease-out);
}
.sg-section-toc a:hover { border-color: var(--color-coral); color: var(--color-pastel-orange); }

.sg-section {
  padding-block: var(--space-10);
  border-bottom: 1px solid var(--color-timberwolf);
}
.sg-section h2.sg-h {
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-display);
  margin: 0 0 var(--space-2);
}
.sg-section .sg-overline {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  /* v0.2: Coral on white at xs sits at ~4.4:1, just under AA. Use Arsenic text with Coral underline accent. */
  color: var(--color-arsenic);
  font-weight: var(--weight-bold);
  display: inline-block;
  margin-bottom: var(--space-3);
  padding-bottom: 4px;
  border-bottom: 2px solid var(--color-coral);
}
.sg-section p.sg-lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  max-width: 64ch;
  margin: 0 0 var(--space-7);
  color: var(--color-arsenic-t1);
}

.sg-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-5); }
.sg-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); }

.sg-swatch-stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); }

.sg-demo {
  padding: var(--space-7) var(--space-6);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}
.sg-demo__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  margin-bottom: var(--space-4);
  opacity: 0.75;
}

.sg-type-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-5);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-timberwolf-t1);
  align-items: baseline;
}
.sg-type-row__label {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  color: var(--color-arsenic-t1);
}
.sg-type-row__sample p { margin: 0; }

.motion-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--color-timberwolf-t2);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
}
.motion-indicator__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-coral);
}

.a11y-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
  list-style: none;
  padding: 0; margin: 0;
}
.a11y-rules li {
  background: var(--color-white);
  border: 1px solid var(--color-timberwolf);
  border-left: 4px solid var(--color-coral);
  padding: var(--space-5);
  border-radius: var(--radius-sm);
}
.a11y-rules h4 {
  font-size: var(--text-base);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-2);
}
.a11y-rules p { margin: 0; font-size: var(--text-sm); line-height: var(--leading-relaxed); }
