
@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 landing page 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. */
  --landing-skeleton-font: 'Redacted', var(--font-primary, sans-serif);

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

/**
 * The design's opening screen: kicker, mark, headline, one line of copy, two
 * buttons — centred, and sized to stand alone in the viewport rather than to
 * fill a band of the page.
 *
 * The height is `100dvh` less the header, which is what makes the mark the thing
 * you see and the first section a deliberate scroll away. It is capped rather
 * than fixed on short viewports, so a laptop in landscape does not push the
 * buttons off the bottom.
 */
landing-hero-centered {
  --hero-centered-muted: color-mix(in srgb, var(--background), var(--text) 65%);
  --hero-centered-wipe: 340ms cubic-bezier(0.45, 0, 0.2, 1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 520px;
  height: calc(100dvh - var(--top-padding, 0px) - 71px);
  padding: 0 24px 40px;
  box-sizing: border-box;
}

landing-hero-centered [content] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
  width: 100%;
  height: 100%;
  max-width: var(--max-page-width, 1400px);
}

landing-hero-centered [kicker] {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text2);
}

/**
 * The mark's box, and the only elastic thing in the column: it takes the height
 * left over once the type has had what it needs, up to a ceiling, so the hero
 * composes the same way at 700px and 1100px. `aspect-ratio` keeps the flame's
 * grid square at whatever height that leaves.
 */
landing-hero-centered [media] {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(42vh, 336px);
  max-width: 50vw;
  aspect-ratio: 5 / 6;
  display: flex;
  align-items: center;
  justify-content: center;
}

landing-hero-centered [media] > * {
  width: 100%;
  height: 100%;
}

/* An unslotted hero still has the `<slot>` itself in the box — hydration only
   replaces it when there is something to put there — so `:empty` never matches
   and the collapse has to ask whether anything but the slot is in it. */
landing-hero-centered [media]:not(:has(> :not(slot))) {
  display: none;
}

landing-hero-centered [headline] {
  margin: -6px 0 0;
  max-width: 24ch;
  font-size: clamp(1.6875rem, 3.6vw, 3.25rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.042em;
  text-wrap: balance;
  color: var(--text);
}

landing-hero-centered [copy] {
  margin: 12px 0 0;
  max-width: 56ch;
  font-size: 0.96875rem;
  line-height: 1.5;
  text-wrap: pretty;
  color: var(--hero-centered-muted);
}

landing-hero-centered [actions] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

/**
 * The wipe.
 *
 * The design fills a button by sliding a panel across it — in from the left on
 * hover, out to the right on leave — which it drove from React state through
 * four phases. The same figure is one rule here: a pseudo-element scaled from zero
 * with its origin on the right, then on hover scaled to one with its origin on
 * the left. Reversing the origin is what sends it out the far side instead of
 * back the way it came, and it costs no script.
 *
 * `z-index: -1` rather than a wrapping span: a negative-z child paints after the
 * button's own background and before its text, which is exactly the sandwich the
 * effect needs. `isolation` keeps that -1 from escaping into the page.
 *
 * `::after` rather than `::before` because `::before` is spoken for: it is how
 * every block in this kit draws its `[skeleton]` filler.
 */
landing-hero-centered :is([cta], [cta-alt]) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 23px;
  border: 1px solid var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms linear, border-color 180ms linear;
}

landing-hero-centered :is([cta], [cta-alt])::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform var(--hero-centered-wipe);
}

landing-hero-centered :is([cta], [cta-alt]):hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

landing-hero-centered [cta] {
  background: var(--text);
  color: var(--background);
}

landing-hero-centered [cta]::after {
  background: var(--background);
}

landing-hero-centered [cta]:hover {
  color: var(--text);
}

landing-hero-centered [cta-alt] {
  border-color: var(--light2);
  color: var(--text);
}

landing-hero-centered [cta-alt]::after {
  background: var(--text);
}

landing-hero-centered [cta-alt]:hover {
  border-color: var(--text);
  color: var(--background);
}

landing-hero-centered :is([kicker], [headline], [copy], [cta], [cta-alt]):empty {
  display: none;
}

landing-hero-centered [actions]:empty {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  landing-hero-centered :is([cta], [cta-alt])::after {
    transition: none;
  }
}

@media (max-width: 640px) {
  landing-hero-centered {
    height: auto;
    min-height: 0;
    padding: clamp(32px, 8vh, 64px) 20px clamp(40px, 9vh, 72px);
  }

  landing-hero-centered [media] {
    max-width: 62vw;
    max-height: 34vh;
  }

  landing-hero-centered [actions] {
    width: 100%;
  }

  landing-hero-centered :is([cta], [cta-alt]) {
    flex: 1 1 auto;
  }
}

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

/* The `*` is not decoration: `app.css` sets `font-family` on
   `*:not(svg path)`, so inheriting from the host would never reach the copy. */
landing-hero-centered[skeleton],
landing-hero-centered[skeleton] * {
  font-family: var(--landing-skeleton-font);
  font-weight: 400;
  letter-spacing: normal;
}

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

/* Re-show what the `:empty` collapse above hid: with no props the whole point
   of the skeleton is the bars, and `::before` is what draws them. */
landing-hero-centered[skeleton] :is([kicker], [headline], [copy], [cta], [cta-alt]):empty {
  display: revert;
}

landing-hero-centered[skeleton] [actions]:empty {
  display: flex;
}

landing-hero-centered[skeleton] [kicker] {
  color: var(--landing-skeleton-kicker);
}

landing-hero-centered[skeleton] [kicker]:empty::before {
  content: 'New release';
}

landing-hero-centered[skeleton] [headline] {
  color: var(--landing-skeleton-heading);
}

/* The filler is sized to wrap the way the kit's wireframe does — two lines of
   headline over two lines of copy — rather than to read as a sentence. */
landing-hero-centered[skeleton] [headline]:empty::before {
  content: 'A headline that runs to two lines';
}

landing-hero-centered[skeleton] [copy] {
  color: var(--landing-skeleton-copy);
}

landing-hero-centered[skeleton] [copy]:empty::before {
  content: 'A supporting sentence that runs to about two lines of body copy at this width, then stops well short of the right edge.';
}

/* A wireframe has no hover state to wipe into, and a panel sliding across a
   greyed-out button would be the one moving thing on a still picture. */
landing-hero-centered[skeleton] :is([cta], [cta-alt])::after {
  display: none;
}

landing-hero-centered[skeleton] [cta] {
  color: var(--background);
}

landing-hero-centered[skeleton] [cta]:empty::before {
  content: 'Primary';
}

landing-hero-centered[skeleton] [cta-alt] {
  color: var(--landing-skeleton-copy);
  border-color: var(--landing-skeleton-copy);
}

landing-hero-centered[skeleton] [cta-alt]:empty::before {
  content: 'Secondary';
}
