
@font-face {
  font-family: 'Redacted';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/assets/fonts/Redacted/Redacted-Regular.woff2') format('woff2');
}

/**
 * Shared skeleton tokens for the market content blocks.
 *
 * Every block concatenates this with its own `style.css` into
 * `makeElement({ style })` — via `./skeleton.ts`, which also prepends the
 * Redacted @font-face — so a block carries everything `[skeleton]` needs and
 * nothing has to be linked globally for the mode to work.
 *
 * The values are the wireframe's grey ramp expressed against `--text` /
 * `--background` rather than the flat hexes it was drawn with, so a skeleton
 * follows the site into dark mode instead of staying a light-mode artifact.
 */
:root {
  /* Redacted has no italic or bold cut — the fallback keeps metrics sane if the
     woff2 is missing, in which case a skeleton degrades to plain grey text. */
  --market-skeleton-font: 'Redacted', var(--font-primary, sans-serif);

  --market-skeleton-heading: color-mix(in srgb, var(--background), var(--text) 70%);
  --market-skeleton-copy: color-mix(in srgb, var(--background), var(--text) 30%);
  --market-skeleton-kicker: color-mix(in srgb, var(--background), var(--text) 24%);
  --market-skeleton-media: color-mix(in srgb, var(--background), var(--text) 38%);
  --market-skeleton-rule: color-mix(in srgb, var(--background), var(--text) 12%);
  --market-skeleton-surface: color-mix(in srgb, var(--background), var(--text) 2%);
}

market-split-hero {
  --split-hero-muted: color-mix(in srgb, var(--background), var(--text) 62%);
  --media-radius: 10px;
  position: relative;
  width: 100%;
  padding: 30px;
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  min-height: 550px;
  max-height: calc(100vh - var(--topbar-height));
  height: calc(100vh - var(--topbar-height));
  align-items: center;
}

market-split-hero[flipped] {
  direction: rtl;
}

@media (max-width: 1200px) {
  market-split-hero {
    display: flex;
    flex-direction: column;
    height: auto;
    padding: 15px;
  }
}

market-split-hero [media] {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.5rem, 1.5vw, 1.25rem);
  width: 100%;
  height: 100%;
}

market-split-hero [media]:empty {
  display: none;
}

market-split-hero [media] figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--media-radius);
  background: color-mix(in srgb, var(--background), var(--text) 8%);
}

@media (max-width: 1200px) {
  market-split-hero [media] figure {
    min-height: 420px;
    max-height: 420px;
  }
}

@media (max-width: 768px) {
  market-split-hero [media] figure {
    min-height: 320px;
    max-height: 320px;
  }
}

market-split-hero [media] figure :is(img, video) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

market-split-hero [media] figure:only-child {
  grid-column: span 2;
}

/* ---------------- CONTENT ---------------- */
market-split-hero [content] {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  max-width: 60rem;
  width: 100%;
  margin: 0 auto;
  padding: 15px;
}

@media (max-width: 768px) {
  market-split-hero [content] {
    padding: 30px 15px;
  }
}

market-split-hero [kicker] {
  margin: 0;
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--split-hero-muted);
}

market-split-hero [kicker]:empty {
  display: none;
}

market-split-hero [headline] {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--text);
}

market-split-hero [headline]:empty {
  display: none;
}

market-split-hero [copy] {
  margin: 0;
  max-width: 44rem;
  font-size: 16px;
  line-height: 1.35;
  color: color-mix(in srgb, var(--background), var(--text) 82%);
}

market-split-hero [copy]:empty {
  display: none;
}

market-split-hero [rating] {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

market-split-hero [rating]:empty {
  display: none;
}

/* Drawn squares rather than ★ and ☆: every glyph goes to a grey bar under the
   skeleton's font, and a rating that reads as five identical bars has stopped
   being a rating. The row carries the score on `aria-label`. */
market-split-hero [stars] {
  display: flex;
  gap: 5px;
}

market-split-hero [star] {
  display: block;
  width: 14px;
  height: 14px;
  background: color-mix(in srgb, var(--background), var(--text) 20%);
}

market-split-hero [star][filled] {
  background: var(--text);
}

market-split-hero [count] {
  font-size: 0.875rem;
  color: var(--split-hero-muted);
}

/* ---------------- CTA ---------------- */
market-split-hero [cta] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
  padding: 1rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--text);
  color: var(--background);
  transition: all ease 300ms;
  cursor: pointer;
}

market-split-hero [cta]:hover {
  background: color-mix(in srgb, var(--text), var(--background) 18%);
}

market-split-hero [cta]:empty {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  market-split-hero [cta] {
    transition: none;
  }
}

/* ---------------- SKELETON ---------------- */

market-split-hero[skeleton],
market-split-hero[skeleton] * {
  font-family: var(--market-skeleton-font);
  font-weight: 400;
  letter-spacing: normal;
}

market-split-hero[skeleton] {
  background: var(--market-skeleton-surface);
  pointer-events: none;
  user-select: none;
}

market-split-hero[skeleton] :is([kicker], [headline], [copy], [cta], [count]):empty {
  display: revert;
}

market-split-hero[skeleton] [cta]:empty {
  display: inline-flex;
}

market-split-hero[skeleton] [media] figure {
  background: var(--market-skeleton-media);
}

market-split-hero[skeleton] [star] {
  background: var(--market-skeleton-rule);
}

market-split-hero[skeleton] [star][filled] {
  background: var(--market-skeleton-heading);
}

market-split-hero[skeleton] [kicker] {
  color: var(--market-skeleton-kicker);
}

market-split-hero[skeleton] [kicker]:empty::before {
  content: 'New in';
}

market-split-hero[skeleton] [headline] {
  color: var(--market-skeleton-heading);
}

market-split-hero[skeleton] [headline]:empty::before {
  content: 'The season, in one collection';
}

market-split-hero[skeleton] [copy] {
  color: var(--market-skeleton-copy);
}

market-split-hero[skeleton] [copy]:empty::before {
  content: 'Two lines that set the offer up without overselling it, then hand off to the button.';
}

market-split-hero[skeleton] [count] {
  color: var(--market-skeleton-copy);
}

market-split-hero[skeleton] [count]:empty::before {
  content: '1,200 reviews';
}

market-split-hero[skeleton] [cta] {
  background: var(--market-skeleton-heading);
  color: var(--background);
}

market-split-hero[skeleton] [cta]:empty::before {
  content: 'Shop the range';
}
