/*
 * hero-fox.css
 * The landing page hero: "Can you beat the Fox?"
 * Partial: public/templates/public/components/v2/hero_fox.html
 * Built in the saturday_landing sandbox (static/public/css/hero-fold.css):
 * change it there first, then copy it here.
 *
 * The hero is drawn to a picture, and is built the way a picture scales:
 * as one composition. .hero-fold__layout is a size container, and every
 * length inside it is in cqw (a hundredth of its width), so the whole of
 * it grows and shrinks together and keeps its proportions.
 *
 * Two compositions, each from one side of the window to the other:
 *   Up to 1023px  the phone's. A hundred cqw is the window's width (741px
 *                 in the phone drawing). Mr Fox stands beside the headline
 *                 with the racing behind it; the duel, the button and the
 *                 four ways in run down the page under them.
 *   1024px up     the banner's, 1755 by 896 in the drawing, laid out
 *                 exactly as the drawing is. Mr Fox in his gold frame on
 *                 the left, the racing on the right, the four ways in
 *                 across the foot. It is drawn at the size that keeps its
 *                 button on the first screen; in a window wider than that,
 *                 the drawing's sky carries on past its two sides
 *                 (hero-sky-west, hero-sky-east) to the window's edges.
 *
 * Pictures. Mr Fox, his frame, the skies and the racing are the drawings'
 * own, cut out of them (hero-fox-banner, hero-race-dusk, hero-stage-phone
 * .webp), so each sits at a place and size given in the drawing's own
 * measure. The sky past the banner's sides is the banner's own too,
 * carried on from its two edges. The small marks (the lockup's horse, the
 * fox's head, the cubs, the four signs) are traced from the banner and
 * used as masks (img/icons/hero-*.svg).
 *
 * Type. The banner's headline is Playfair Display, the site's display
 * face, upright and slanted here (its own italic has swash capitals),
 * and the one line still narrowed to the drawing (scaleX). The drawings'
 * narrow labels are Barlow Condensed (--hf-font-cond, self-hosted in
 * saturday-fonts.css); the rest is DM Sans, each line sized to the
 * drawing's width rather than squeezed to it.
 * ─────────────────────────────────────────────────────────
 */

/* ── TOKENS ────────────────────────────────────────────── */

.hero-fold {
  /* The drawings' own colours. Their gold is warmer than the site's. */
  --hf-gold-lit: #fbd66c;
  --hf-gold: #f2b833;
  --hf-line: #ffe9a8;
  --hf-rule: #9c804e;
  --hf-glow: #f09a1c;
  --hf-red: #e2271c;
  --hf-ink: #04080b;
  --hf-panel: #0a0a06;
  --hf-soft: #e9ecee;
  --hf-metal: linear-gradient(180deg, #f4dc81 0%, #f2c963 30%, #e7b54b 62%, #d79f37 100%);
  --hf-sign: linear-gradient(180deg, #fbce58, #f1bc48);
  /* The drawing's narrow lettering: a condensed face, not a squeezed one. */
  --hf-font-cond: 'Barlow Condensed', var(--font-body);
  /* Pick your horse's gold, lit from the top: the phone drawing's; the
     banner's is redefined below. */
  --hf-pick-fill: linear-gradient(
    180deg,
    #ffd858 0%,
    #fecf4d 18%,
    #f8c034 32%,
    #eeae20 46%,
    #de9b0c 60%,
    #d38e03 74%,
    #d38d01 86%,
    #da9300 93%,
    #f0b819 100%
  );
  /* What stands above the hero besides the nav and the tour banner: the
     day's strip (today-strip.css), 89px tall from 1024px. */
  --hf-above: 89px;
}

/* ── SHELL ─────────────────────────────────────────────── */

.hero-fold {
  position: relative;
  display: flex;
  flex-direction: column;
  /* The first screen's height less what is above the hero (the masthead,
     the tour banner when it shows, the day's strip) and the live-updates
     ticker fixed at the foot of the window. `dvh` tracks mobile browser
     chrome (iOS Safari URL bar, Android address bar) — falls back to
     `vh`. */
  --hf-room: calc(
    100vh - var(--nav-h) - var(--banner-h) - var(--hf-above) - 40px -
      env(safe-area-inset-bottom)
  );
  min-height: var(--hf-room);
}

@supports (height: 100dvh) {
  .hero-fold {
    --hf-room: calc(
      100dvh - var(--nav-h) - var(--banner-h) - var(--hf-above) - 40px -
        env(safe-area-inset-bottom)
    );
  }
}

/* The composition stands at the top of whatever the window gives the
   hero, and runs from one side of it to the other. */
.hero-fold__section {
  position: relative;
  overflow: hidden;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--hf-ink), #02090b);
}

.hf-icons {
  position: absolute;
  width: 0;
  height: 0;
}

.hero-fold__layout {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  align-self: center;
  width: 100%;
  container-type: inline-size;
}

.hero-fold__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── STAGE · the picture ───────────────────────────────── */

.hf-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* The phone's picture: Mr Fox on the left, the racing on the right, from
   under the lockup down behind the duel. A background, not an <img>: it
   is the stage's scenery, and the page head preloads it. */
.hf-stage::before {
  content: "";
  position: absolute;
  top: 11.336cqw;
  left: 0;
  width: 100cqw;
  aspect-ratio: 741 / 680;
  background: url("../img/hero-stage-phone.6051c24823d2.webp") center / 100% 100% no-repeat;
}

/* ── PITCH ─────────────────────────────────────────────── */

.hf-pitch {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

/* ── PITCH · the lockup ────────────────────────────────── */

/* The racing horse between two gold hairlines; the name between two red
   rules; and a red light under it. */
.hf-brand {
  position: relative;
  left: 0.200cqw;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.890cqw 0 0;
}

.hf-brand__crest {
  position: relative;
  left: 0.940cqw;
  display: flex;
  align-items: flex-end;
  gap: 0.950cqw;
}

.hf-brand__crest::before,
.hf-brand__crest::after {
  content: "";
  width: 16.200cqw;
  height: max(1px, 0.200cqw);
  margin-bottom: 1.080cqw;
  background: linear-gradient(90deg, transparent, #cda854 62%, #e3c46c);
}

.hf-brand__crest::after {
  transform: scaleX(-1);
}

.hf-brand__mark {
  display: block;
  width: 9.717cqw;
  aspect-ratio: 167 / 99;
  background: var(--hf-metal);
  -webkit-mask: url("../img/icons/hero-horse.9d46e54c5897.svg") center / 100% 100% no-repeat;
  mask: url("../img/icons/hero-horse.9d46e54c5897.svg") center / 100% 100% no-repeat;
}

.hf-brand__name {
  position: relative;
  margin-top: 0.760cqw;
  padding: 0 13.200cqw 0 13.600cqw;
  font-size: 4.274cqw;
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.059em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
}

/* A red rule either side, thick by the name and running out to a point. */
.hf-brand__name::before,
.hf-brand__name::after {
  content: "";
  position: absolute;
  top: calc(50% - 0.200cqw);
  left: 0;
  width: 10.400cqw;
  height: max(2px, 0.540cqw);
  background: linear-gradient(90deg, transparent, var(--hf-red) 36%);
  -webkit-clip-path: polygon(0 50%, 100% 0, 100% 100%);
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}

.hf-brand__name::before {
  left: -0.270cqw;
  width: 10.900cqw;
}

.hf-brand__name::after {
  right: -0.680cqw;
  left: auto;
  width: 10.900cqw;
  transform: scaleX(-1);
}

.hf-brand::after {
  content: "";
  width: 58cqw;
  height: max(1px, 0.270cqw);
  margin-top: 1.300cqw;
  border-radius: 1cqw;
  background:
    radial-gradient(ellipse 4% 160% at 50% 50%, #ffe2b8, transparent 100%),
    linear-gradient(
      90deg,
      transparent,
      color-mix(in srgb, var(--hf-red) 55%, transparent) 20%,
      var(--hf-red) 36%,
      #ffb16b 50%,
      var(--hf-red) 64%,
      color-mix(in srgb, var(--hf-red) 55%, transparent) 80%,
      transparent
    );
  box-shadow: 0 0 0.900cqw 0 color-mix(in srgb, var(--hf-red) 45%, transparent);
}

/* ── PITCH · headline and standfirst ───────────────────── */

/* Beside Mr Fox on a phone, in the drawing's leaning sans, each line
   sized to the drawing's width. The pitch's own: the result state's
   headline is an .hf-title too (see hero-result.css). */
.hf-pitch .hf-title {
  margin: 5.440cqw 0 0 43.220cqw;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
}

.hf-title__top,
.hf-title__big,
.hf-title__gold {
  display: block;
  width: max-content;
}

.hf-title__top {
  margin-left: 1.630cqw;
  font-size: 9.027cqw;
}

.hf-title__big {
  margin-top: -1.230cqw;
  font-size: 10.012cqw;
}

/* Inside the line: only its own size and colour. DM
   Sans has no italic, so the browser leans the upright letters, and
   their tops lean out past the word's own box on the right. The gold is
   that box's background showing through the letters (background-clip:
   text) and stops at the box's edge, so without room there the question
   mark's hook is cut off: the padding takes the box out under the lean,
   and the margin gives the line its width back. */
.hf-title__gold {
  margin: -0.126em -0.300em 0 -0.060em;
  padding-right: 0.300em;
  font-size: 1.535em;
  color: var(--hf-gold);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .hf-title__gold {
    background: linear-gradient(180deg, #f8dd80 14%, #f7cf69 40%, #f2c04a 60%, #e6ac30 82%, #dca028 96%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.hf-subtitle {
  margin: -0.670cqw 0 0 43.700cqw;
  font-family: var(--hf-font-cond);
  font-size: 3.850cqw;
  font-weight: 500;
  line-height: 1.350;
  color: #fff;
}

.hf-subtitle span {
  display: block;
  width: max-content;
  white-space: nowrap;
}

/* ── PITCH · the race ──────────────────────────────────── */

/* The featured race under the pitch: its time and course (the link to its
   card), and the time to the off. The clock shows once landing.js is
   ticking it (.hf-race--ticking), so there is never a row of dashes; days
   only while there are any; "At the post" once the advertised off has
   passed, until the result replaces the hero. */
.hf-race {
  display: flex;
  align-items: center;
  width: max-content;
  margin: 2.600cqw 0 0 43.700cqw;
  font-family: var(--hf-font-cond);
  font-size: 3.600cqw;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 1px 0.5em rgb(0 0 0 / 0.9);
}

.hf-race__card {
  display: inline-flex;
  align-items: center;
  gap: 1.300cqw;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}

.hf-race__card:hover .hf-race__course,
.hf-race__card:focus-visible .hf-race__course {
  text-decoration: underline;
  text-underline-offset: 0.180em;
}

.hf-race__dot {
  width: 1.600cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--hf-red);
  box-shadow: 0 0 1.200cqw var(--hf-red);
}

@media (prefers-reduced-motion: no-preference) {
  .hf-race__dot {
    animation: hf-race-pulse 1.6s ease-in-out infinite;
  }
}

@keyframes hf-race-pulse {
  50% {
    opacity: 0.35;
  }
}

.hf-race__time {
  color: var(--hf-gold);
}

.hf-race__name,
.hf-race__clock,
.hf-race__days,
.hf-race__post,
.hf-race--off .hf-race__to-off {
  display: none;
}

.hf-race--ticking .hf-race__clock {
  display: inline;
  margin-left: 1.600cqw;
  padding-left: 1.600cqw;
  border-left: 1px solid rgb(255 255 255 / 0.3);
  font-weight: 500;
  color: var(--hf-soft);
}

.hf-race__digits {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.hf-race--days .hf-race__days,
.hf-race--off .hf-race__post {
  display: inline;
}

/* A day or more out, the seconds are noise (and the phone's line has no
   room for them). */
.hf-race--days .hf-race__secs {
  display: none;
}

.hf-race__days {
  text-transform: none;
}

.hf-race__post {
  font-weight: 700;
  color: var(--hf-gold);
}

/* ── PITCH · the Fox against the Cubs ──────────────────── */

.hf-duel {
  display: grid;
  grid-template-columns: 38.730cqw 12.550cqw 40.650cqw;
  align-items: center;
  margin: 17.278cqw 0 0 4.100cqw;
  padding-bottom: 1.600cqw;
}

/* A card's ground leans the way the capitals do; what is on it stays
   upright, each piece at the drawing's own place (--hf-ico-x, --hf-id-x). */
.hf-duel__card {
  position: relative;
  isolation: isolate;
  display: block;
  /* Tall enough for a horse name on two lines, so the name never rises
     under the Read why pill. */
  height: 18cqw;
  text-decoration: none;
  color: #fff;
}

.hf-duel__card--fox {
  --hf-ico-x: 5.900cqw;
  --hf-ico-w: 8.600cqw;
  --hf-id-x: 25.800cqw;
  --hf-pick-w: 21.500cqw;
}

.hf-duel__card--cubs {
  --hf-ico-x: 3.860cqw;
  --hf-ico-w: 9.720cqw;
  --hf-id-x: 26.200cqw;
  --hf-pick-w: 24cqw;
}

/* The ground: a lit gold rule round a dark panel that takes the rule's
   light at its top and foot. */
.hf-duel__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: max(1.5px, 0.500cqw) solid var(--hf-line);
  border-radius: 2.700cqw;
  background: linear-gradient(180deg, #3d260a 0%, #0c0b07 30%, var(--hf-panel) 68%, #2a1c09 100%);
  box-shadow:
    0 0 0.600cqw 0 color-mix(in srgb, var(--hf-gold) 90%, transparent),
    0 0 2.600cqw 0.300cqw color-mix(in srgb, var(--hf-glow) 70%, transparent),
    inset 0 0 0.500cqw 0 color-mix(in srgb, var(--hf-gold) 70%, transparent),
    inset 0 0 2.200cqw -0.300cqw color-mix(in srgb, var(--hf-glow) 45%, transparent);
  transform: skewX(-12.500deg);
  transition: box-shadow 0.25s;
}

.hf-duel__card:hover::before,
.hf-duel__card:focus-visible::before {
  box-shadow:
    0 0 0.700cqw 0 color-mix(in srgb, var(--hf-gold) 95%, transparent),
    0 0 3.600cqw 0.500cqw color-mix(in srgb, var(--hf-glow) 75%, transparent),
    inset 0 0 0.600cqw 0 color-mix(in srgb, var(--hf-gold) 80%, transparent),
    inset 0 0 2.800cqw -0.200cqw color-mix(in srgb, var(--hf-glow) 60%, transparent);
}

.hf-duel__card:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.hf-duel__ico {
  position: absolute;
  top: 50%;
  left: var(--hf-ico-x);
  width: var(--hf-ico-w);
  transform: translateY(-52%);
}

.hf-duel__ico--fox {
  aspect-ratio: 139 / 145;
  background: url("../img/icons/hero-fox.cb9261242433.svg") center / 100% 100% no-repeat;
}

.hf-duel__ico--cubs {
  aspect-ratio: 161 / 117;
  background: linear-gradient(180deg, #f8c64a, #eba91f);
  -webkit-mask: url("../img/icons/hero-cubs.0031ba29681d.svg") center / 100% 100% no-repeat;
  mask: url("../img/icons/hero-cubs.0031ba29681d.svg") center / 100% 100% no-repeat;
}

/* Name over role, one centred on the other, the pair centred on a line
   the drawing gives. */
.hf-duel__id {
  position: absolute;
  /* A touch below centre, so the name clears the Read why pill. */
  top: calc(50% + 0.800cqw);
  left: var(--hf-id-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.400cqw;
  transform: translate(-50%, -50%);
}

.hf-duel__name {
  width: max-content;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.hf-duel__name {
  font-family: var(--hf-font-cond);
  font-size: 5.100cqw;
  font-style: italic;
  font-weight: 900;
}


/* Each piece of the duel keeps its own column, so the pill below can
   share the Fox card's cell without pushing the others along. */
.hf-duel > .hf-duel__card--fox { grid-area: 1 / 1; }
.hf-duel > .hf-duel__vs { grid-area: 1 / 2; }
.hf-duel > .hf-duel__card--cubs { grid-area: 1 / 3; }

/* "Read why": the Fox's reasoning (the featured tip), a tab sitting on
   the top edge of the Fox's card towards its right. It shares the card's
   grid cell rather than sitting inside it, as the card is a link too. */
.hf-why {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 1.300cqw;
  min-height: 24px;
  margin-right: 3.200cqw;
  padding: 0 2.600cqw 0 3cqw;
  border: max(1px, 0.300cqw) solid var(--hf-gold);
  border-radius: 999px;
  background: linear-gradient(180deg, #2a1c09 0%, var(--hf-ink) 100%);
  box-shadow:
    0 0 1.400cqw 0 color-mix(in srgb, var(--hf-glow) 55%, transparent),
    0 0.600cqw 1.600cqw rgb(0 0 0 / 0.55);
  font-family: var(--hf-font-cond);
  font-size: max(11px, 3.200cqw);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--hf-gold-lit);
  transform: translateY(-55%);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.hf-why__arrow {
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hf-why:hover,
.hf-why:focus-visible {
  background: var(--hf-gold);
  color: var(--hf-ink);
  box-shadow: 0 0 2cqw 0 color-mix(in srgb, var(--hf-glow) 80%, transparent);
}

.hf-why:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.hf-duel__vs {
  justify-self: center;
  display: grid;
  place-items: center;
  width: 8.435cqw;
  height: 8.435cqw;
  margin-top: 0.370cqw;
  border: max(2px, 0.560cqw) solid var(--hf-red);
  border-radius: 50%;
  background: #130507;
  box-shadow:
    0 0 1.800cqw color-mix(in srgb, var(--hf-red) 70%, transparent),
    inset 0 0 0.900cqw color-mix(in srgb, var(--hf-red) 45%, transparent);
}

.hf-duel__vs-text {
  position: relative;
  left: -0.400cqw;
  font-family: var(--hf-font-cond);
  font-size: 5.010cqw;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}

/* Each side's horse, under its card (inside the link, so it is read with
   it): the Fox's with its price, the Cubs' with their vote, or what is
   still to come. */
/* The side's horse, in the card under its name, where the role was. A
   long name (up to 18 letters) breaks onto a second line, never wider
   than the space between the icon and the card's edge. */
.hf-duel__pick {
  display: -webkit-box;
  width: var(--hf-pick-w);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-family: var(--hf-font-cond);
  font-size: max(9px, 3.300cqw);
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--hf-gold);
}

.hf-duel__price {
  margin-left: 0.250em;
  font-weight: 500;
  white-space: nowrap;
  color: #fff;
}

.hf-duel__pick--open {
  font-weight: 500;
  color: var(--hf-soft);
}

/* ── PITCH · call to action ────────────────────────────── */

.hf-ctas {
  display: flex;
  justify-content: center;
  margin-top: 3.580cqw;
}

/* Over base.css's .btn: the drawing's gold pill, lit along its foot. */
.hf-ctas .hf-ctas__pick {
  position: relative;
  justify-content: flex-start;
  gap: 2.480cqw;
  width: 77.463cqw;
  height: 12.146cqw;
  padding: 0 0 0 10.155cqw;
  overflow: hidden;
  border: 0;
  border-radius: 99cqw;
  background: var(--hf-pick-fill);
  box-shadow:
    inset 0 0.270cqw 0.200cqw color-mix(in srgb, #fff 45%, transparent),
    0 0.900cqw 2.800cqw -0.600cqw color-mix(in srgb, var(--hf-glow) 85%, transparent),
    0 1.400cqw 3cqw color-mix(in srgb, #000 55%, transparent);
  color: var(--c-midnight);
}

/* After the off: "View the racecard" is longer than "Pick your horse",
   so its words sit in the middle rather than at the drawn inset. */
.hf-ctas .hf-ctas__pick.hf-ctas__pick--closed {
  justify-content: center;
  padding: 0;
}

.hf-ctas .hf-ctas__pick:hover,
.hf-ctas .hf-ctas__pick:focus-visible {
  background: var(--hf-pick-fill);
  filter: brightness(1.070);
  transform: none;
}

.hf-ctas__pick:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

/* The light along the pill's foot. */
.hf-ctas__pick::after {
  content: "";
  position: absolute;
  right: 22%;
  bottom: 0;
  left: 22%;
  height: 0.700cqw;
  background: radial-gradient(
    ellipse 50% 100% at 50% 100%,
    #fff3c4 0%,
    color-mix(in srgb, #ffd86a 70%, transparent) 40%,
    transparent 100%
  );
  pointer-events: none;
}

.hf-ctas__label {
  font-size: 5.417cqw;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.hf-ctas__arrow {
  flex: 0 0 auto;
  width: 5.340cqw;
  height: 5.340cqw;
  fill: none;
  stroke: currentColor;
  stroke-width: 4.200;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}

.hf-ctas__pick:hover .hf-ctas__arrow {
  transform: translateX(0.900cqw);
}

/* ── FOUR WAYS IN ──────────────────────────────────────── */

/* Rows on a phone, each with its chevron. */
.hf-explore {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 1.500cqw;
  margin: 3.640cqw 3.374cqw 4.200cqw 3.779cqw;
}

.hf-explore__link {
  position: relative;
  display: flex;
  align-items: center;
  height: 13.090cqw;
  padding: 0 2.900cqw 0 4.850cqw;
  border: 1px solid color-mix(in srgb, #fff 34%, transparent);
  border-radius: 1.900cqw;
  background: #0c1214;
  text-decoration: none;
  color: #fff;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.hf-explore__link:hover,
.hf-explore__link:focus-visible {
  border-color: var(--hf-line);
  background: color-mix(in srgb, var(--hf-gold) 9%, #0c1214);
}

.hf-explore__link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* The first row takes the button's light along its top. */
.hf-explore__link:first-child::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 16%;
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--hf-line) 50%, transparent);
  box-shadow: 0 0 1.400cqw 0.100cqw color-mix(in srgb, var(--hf-glow) 70%, transparent);
  pointer-events: none;
}

/* A sign: one of the traced marks, in gold, centred in a box as wide as
   the widest of them. */
.hf-explore__ico {
  flex: 0 0 auto;
  width: 8.640cqw;
  aspect-ratio: 129 / 124;
  background: var(--hf-sign);
  -webkit-mask: var(--hf-sign-mark) center / var(--hf-sign-w, 100%) auto no-repeat;
  mask: var(--hf-sign-mark) center / var(--hf-sign-w, 100%) auto no-repeat;
}

/* The Wire is not in the drawings (added at the client's request): its
   sign is drawn to the traced ones' weight, and it leads the list. */
.hf-explore__link--news {
  --hf-sign-mark: url("../img/icons/hero-news.359bcaadc2f6.svg");
  --hf-sign-w: 92%;
}

.hf-explore__link--racing {
  --hf-sign-mark: url("../img/icons/hero-calendar.4de4f2c9dc10.svg");
  --hf-sign-w: 86%;
}

.hf-explore__link--ai {
  --hf-sign-mark: url("../img/icons/hero-brain.2d228e5c1098.svg");
}

.hf-explore__link--cubs {
  --hf-sign-mark: url("../img/icons/hero-trophy.f0025745404d.svg");
}

/* The Paddock takes the Cubs' place once it's open: two speech bubbles,
   drawn to the traced signs' weight like the Wire's. */
.hf-explore__link--paddock {
  --hf-sign-mark: url("../img/icons/hero-chat.f5588e867711.svg");
  --hf-sign-w: 92%;
}

.hf-explore__link--record {
  --hf-sign-mark: url("../img/icons/hero-shield.8d7c1b1e6f2e.svg");
  --hf-sign-w: 90%;
}

.hf-explore__go {
  flex: 0 0 auto;
  width: 4.900cqw;
  height: 4.900cqw;
  fill: none;
  stroke: var(--hf-gold);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hf-explore__text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1cqw;
  min-width: 0;
  margin-left: 6.200cqw;
}

.hf-explore__name,
.hf-explore__note {
  width: max-content;
  font-family: var(--hf-font-cond);
  line-height: 1;
  white-space: nowrap;
}

.hf-explore__name {
  font-size: 4.730cqw;
  font-weight: 700;
}

.hf-explore__note {
  font-size: max(10px, 3.620cqw);
  color: var(--hf-soft);
}

/* ── THE BANNER — 1024px+ ──────────────────────────────── */

@media (min-width: 1024px) {
  /* The banner is drawn as wide as the window, unless that would put its
     button under the first screen's foot: then it is drawn as wide as
     keeps the button in (never under 960px; a window with room for the
     whole banner past 1920px shows the whole of it). Drawn narrower than
     the window it keeps the drawing's own layout, and the drawing's sky
     carries on either side of it to the window's edges. */
  .hero-fold {
    --hf-soft: #d9dbdc;
    --hf-fit-all: calc(var(--hf-room) * 1755 / 896);
    --hf-fit-cta: calc(var(--hf-room) * 1755 / 726);
    --hf-pick-fill: linear-gradient(
      180deg,
      #f6d46a 0%,
      #fdd55c 7%,
      #facc4e 22%,
      #f6c038 36%,
      #e8ac23 50%,
      #d79814 64%,
      #ca8a09 78%,
      #c88809 86%,
      #d2910a 94%,
      #ca9b2f 100%
    );
    min-height: 0;
  }

  .hero-fold__section {
    background: linear-gradient(180deg, #020e14 0%, #0b0f11 50%, #000408 100%);
  }

  .hero-fold__layout {
    width: clamp(
      min(100%, 960px),
      min(var(--hf-fit-cta), max(1920px, var(--hf-fit-all))),
      100%
    );
    aspect-ratio: 1755 / 896;
  }

  /* The drawing's sky, carried on past its two sides: left of Mr Fox the
     evening sky and the field under it, right of the racing the sky, the
     stand's far wing, the crowd and the turf. Each runs 640 of the
     drawing's pixels out (and 12 in, under the picture's edge, which is
     the same pixels) and fades into the ground at its far end; the
     section cuts whatever the window has no room for. One layer, under
     both pictures. */
  .hero-fold__bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: -36.467cqw;
    width: 172.934cqw;
    aspect-ratio: 3035 / 896;
    background:
      image-set(url("../img/hero-sky-west-1x.3a65404864b4.webp") 1x, url("../img/hero-sky-west.5b307f20087a.webp") 2x) left top / 21.483% 100% no-repeat,
      image-set(url("../img/hero-sky-east-1x.931f4d09cb4c.webp") 1x, url("../img/hero-sky-east.f87dc088b49c.webp") 2x) right top / 21.483% 100% no-repeat;
  }

  /* The racing, where the drawing has it. */
  .hero-fold__bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 71.909cqw;
    width: 28.091cqw;
    aspect-ratio: 493 / 896;
    background: image-set(url("../img/hero-race-dusk-1x.f979e9c84481.webp") 1x, url("../img/hero-race-dusk.3bda61e20a5b.webp") 2x) center / 100% 100% no-repeat;
  }

  /* ── Stage: the evening sky, the gold frame and Mr Fox before it. ── */

  .hf-stage::before {
    top: 0;
    left: 0;
    width: 38.746cqw;
    aspect-ratio: 680 / 896;
    background-image: image-set(url("../img/hero-fox-banner-1x.ea4fe3d344e6.webp") 1x, url("../img/hero-fox-banner.81561a51dbf7.webp") 2x);
  }

  /* ── Pitch ── */

  .hf-pitch {
    align-items: center;
    width: 45.870cqw;
    margin-left: 33.470cqw;
  }

  /* The drawing does not stand its parts on one centre line: each is set
     off from the pitch's centre by what the drawing shows (--hf-off). */
  .hf-brand,
  .hf-title__top,
  .hf-title__big,
  .hf-subtitle,
  .hf-race,
  .hf-duel,
  .hf-ctas {
    position: relative;
    left: var(--hf-off, 0);
  }

  .hf-brand {
    --hf-off: -2.330cqw;
    margin-top: 1.567cqw;
  }

  .hf-brand__crest {
    left: 0.370cqw;
    gap: 0.370cqw;
  }

  .hf-brand__crest::before,
  .hf-brand__crest::after {
    width: 8.260cqw;
    height: max(1px, 0.085cqw);
    margin-bottom: 0.370cqw;
  }

  .hf-brand__mark {
    width: 4.758cqw;
  }

  .hf-brand__name {
    margin-top: 0.290cqw;
    padding: 0 6.040cqw;
    font-size: 2.057cqw;
    letter-spacing: 0.075em;
  }

  .hf-brand__name::before,
  .hf-brand__name::after {
    top: calc(50% - 0.460cqw);
    width: 4.730cqw;
    height: max(2px, 0.230cqw);
  }

  .hf-brand__name::before {
    left: 0.310cqw;
  }

  .hf-brand__name::after {
    right: -0.085cqw;
  }

  .hf-brand::after {
    width: 21.300cqw;
    height: max(2px, 0.170cqw);
    margin-top: 0.800cqw;
    box-shadow: 0 0 0.600cqw 0.020cqw color-mix(in srgb, var(--hf-red) 60%, transparent);
  }

  /* The banner's headline: Playfair, upright, slanted, and narrowed to
     the drawing's (its face is a narrower one). */
  .hf-pitch .hf-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1.700cqw 0 0;
    font-family: var(--font-display);
    font-style: normal;
    font-weight: 900;
    line-height: 1;
  }

  .hf-title__top,
  .hf-title__big {
    margin: 0;
    transform-origin: 50% 50%;
  }

  @supports (-webkit-background-clip: text) or (background-clip: text) {
    .hf-title__top,
    .hf-title__big {
      background: linear-gradient(180deg, #fff 58%, #e9e6e0 92%);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }

    .hf-title__gold {
      background: linear-gradient(180deg, #f8d56e 22%, #fbd570 40%, #f0c250 58%, #e7b74a 72%, #daa639 88%);
      -webkit-background-clip: text;
      background-clip: text;
    }
  }

  .hf-title__top {
    --hf-off: -1.620cqw;
    font-size: 5.200cqw;
    letter-spacing: 0.026em;
    transform: skewX(-11deg);
  }

  .hf-title__big {
    --hf-off: 0.060cqw;
    margin-top: -0.900cqw;
    font-size: 7.300cqw;
    letter-spacing: -0.030em;
    word-spacing: 0.060em;
    transform: skewX(-11deg) scaleX(0.800);
  }

  /* Upright here (the line is slanted as a whole), so it needs none of
     the phone's room for the lean. */
  .hf-title__gold {
    display: inline;
    margin: 0;
    padding: 0;
    font-size: 1em;
  }

  .hf-subtitle {
    --hf-off: -0.650cqw;
    margin: 0.756cqw 0 0;
    font-family: var(--font-body);
    font-size: 1.429cqw;
    line-height: 1.3;
    white-space: nowrap;
  }

  .hf-subtitle span {
    display: inline;
  }

  .hf-race {
    --hf-off: -0.650cqw;
    margin: 0.600cqw 0 0;
    font-size: 1.300cqw;
  }

  .hf-race__card {
    gap: 0.550cqw;
  }

  .hf-race__dot {
    width: 0.600cqw;
    box-shadow: 0 0 0.500cqw var(--hf-red);
  }

  .hf-race__name {
    display: inline;
    max-width: 18cqw;
    overflow: hidden;
    margin-left: 0.200cqw;
    font-weight: 500;
    text-overflow: ellipsis;
    text-transform: none;
    color: var(--hf-soft);
  }

  .hf-race--ticking .hf-race__clock {
    margin-left: 0.700cqw;
    padding-left: 0.700cqw;
  }

  .hf-duel {
    --hf-off: 0.946cqw;
    grid-template-columns: 19.088cqw 5.128cqw 20.684cqw;
    margin: 1.500cqw 0 0; /* room for the Read why pill under the race line */
    padding-bottom: 0.600cqw;
  }

  .hf-duel__card {
    height: 7.500cqw;
  }

  .hf-duel__card--fox {
    --hf-ico-x: 2.877cqw;
    --hf-ico-w: 3.960cqw;
    --hf-id-x: 12.336cqw;
    --hf-pick-w: 11.400cqw;
  }

  .hf-duel__card--cubs {
    --hf-ico-x: 2.051cqw;
    --hf-ico-w: 4.587cqw;
    --hf-id-x: 12.678cqw;
    --hf-pick-w: 12.200cqw;
  }

  .hf-duel__card::before {
    border-width: max(1.5px, 0.142cqw);
    border-radius: 1.030cqw;
    box-shadow:
      0 0 0.200cqw 0 color-mix(in srgb, var(--hf-gold) 85%, transparent),
      0 0 0.950cqw 0.060cqw color-mix(in srgb, var(--hf-glow) 60%, transparent),
      inset 0 0 0.200cqw 0 color-mix(in srgb, var(--hf-gold) 70%, transparent),
      inset 0 0 0.900cqw -0.150cqw color-mix(in srgb, var(--hf-glow) 45%, transparent);
  }

  .hf-duel__card:hover::before,
  .hf-duel__card:focus-visible::before {
    box-shadow:
      0 0 0.300cqw 0 color-mix(in srgb, var(--hf-gold) 95%, transparent),
      0 0 1.500cqw 0.200cqw color-mix(in srgb, var(--hf-glow) 75%, transparent),
      inset 0 0 0.250cqw 0 color-mix(in srgb, var(--hf-gold) 80%, transparent),
      inset 0 0 1.200cqw -0.100cqw color-mix(in srgb, var(--hf-glow) 60%, transparent);
  }

  .hf-duel__id {
    top: calc(50% + 0.450cqw);
    gap: 0.600cqw;
  }

  .hf-duel__name {
    font-size: 2.500cqw;
  }

  .hf-duel__pick {
    font-size: 1.250cqw;
  }

  .hf-why {
    gap: 0.520cqw;
    min-height: 0;
    height: 2.250cqw;
    margin-right: 0.900cqw;
    padding: 0 1.050cqw 0 1.250cqw;
    border-width: max(1px, 0.120cqw);
    font-size: 1.150cqw;
  }

  .hf-duel__vs {
    left: -0.110cqw;
    position: relative;
    width: 3.818cqw;
    height: 3.818cqw;
    margin-top: 0;
    border-width: max(2px, 0.200cqw);
    box-shadow:
      0 0 0.800cqw color-mix(in srgb, var(--hf-red) 70%, transparent),
      inset 0 0 0.400cqw color-mix(in srgb, var(--hf-red) 45%, transparent);
  }

  .hf-duel__vs-text {
    position: relative;
    left: -0.120cqw;
    font-size: 2.240cqw;
  }

  .hf-ctas {
    --hf-off: 0.490cqw;
    margin-top: 1.000cqw;
  }

  .hf-ctas .hf-ctas__pick {
    gap: 1.378cqw;
    width: 31.510cqw;
    height: 5.014cqw;
    padding-left: 4.270cqw;
    box-shadow:
      inset 0 0.110cqw 0.080cqw color-mix(in srgb, #fff 45%, transparent),
      0 0.400cqw 1.200cqw -0.250cqw color-mix(in srgb, var(--hf-glow) 85%, transparent),
      0 0.600cqw 1.300cqw color-mix(in srgb, #000 55%, transparent);
  }

  .hf-ctas__pick::after {
    height: 0.300cqw;
  }

  .hf-ctas__label {
    font-size: 2.339cqw;
  }

  .hf-ctas__arrow {
    width: 2.190cqw;
    height: 2.190cqw;
  }

  .hf-ctas__pick:hover .hf-ctas__arrow {
    transform: translateX(0.400cqw);
  }

  /* ── Five ways in: the drawing's panel across the foot, hairlines
     between. The drawing has four columns; with the Wire added they are
     five even ones, and each column's padding and gap are taken in by
     the same measure (--hf-fit) so the words keep the drawing's size. ── */

  .hf-explore {
    --hf-fit: 0.450;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    height: 6.268cqw;
    margin: 2.400cqw 2.564cqw 0 4.103cqw;
    border: max(1px, 0.100cqw) solid var(--hf-rule);
    border-top-color: #edd781;
    border-radius: 1.120cqw;
    background: linear-gradient(180deg, #040708, #010609);
  }

  /* The light on the panel's top rule. */
  .hf-explore::before {
    content: "";
    position: absolute;
    top: -0.550cqw;
    right: 1%;
    left: 30%;
    height: 1.100cqw;
    background:
      radial-gradient(ellipse 34% 50% at 42% 50%, color-mix(in srgb, #ffcf7a 55%, transparent), transparent),
      radial-gradient(ellipse 9% 50% at 96% 50%, color-mix(in srgb, #ffcf7a 45%, transparent), transparent);
    pointer-events: none;
  }

  .hf-explore__link {
    height: auto;
    padding: 0 0 0 calc(var(--hf-pad) * var(--hf-fit));
    border: 0;
    border-radius: 0;
    background: none;
  }

  .hf-explore__link:first-child {
    border-radius: 1cqw 0 0 1cqw;
  }

  .hf-explore__link:last-child {
    border-radius: 0 1cqw 1cqw 0;
  }

  .hf-explore__link:hover,
  .hf-explore__link:focus-visible {
    background: color-mix(in srgb, var(--hf-gold) 9%, transparent);
  }

  .hf-explore__link:first-child::after {
    content: none;
  }

  .hf-explore__link + .hf-explore__link::before {
    content: "";
    position: absolute;
    top: 16.500%;
    bottom: 18%;
    left: 0;
    width: 1px;
    background: #52565a;
  }

  .hf-explore__link--news {
    --hf-pad: 2.600cqw;
    --hf-sign-w: 100%;
    --hf-sign-box: 3.400cqw;
    --hf-sign-ratio: 124 / 112;
    --hf-gap: 1.900cqw;
  }

  .hf-explore__link--racing {
    --hf-pad: 2.393cqw;
    --hf-sign-w: 100%;
    --hf-sign-box: 3.305cqw;
    --hf-sign-ratio: 116 / 113;
    --hf-gap: 1.937cqw;
  }

  .hf-explore__link--ai {
    --hf-pad: 2.792cqw;
    --hf-sign-box: 3.675cqw;
    --hf-sign-ratio: 129 / 119;
    --hf-gap: 1.766cqw;
  }

  .hf-explore__link--cubs {
    --hf-pad: 2.650cqw;
    --hf-sign-box: 3.447cqw;
    --hf-sign-ratio: 121 / 114;
    --hf-gap: 2.051cqw;
  }

  .hf-explore__link--paddock {
    --hf-pad: 2.650cqw;
    --hf-sign-box: 3.447cqw;
    --hf-sign-ratio: 124 / 112;
    --hf-gap: 2.051cqw;
  }

  .hf-explore__link--record {
    --hf-pad: 2.678cqw;
    --hf-sign-w: 100%;
    --hf-sign-box: 3.048cqw;
    --hf-sign-ratio: 107 / 126;
    --hf-gap: 2.108cqw;
  }

  .hf-explore__ico {
    position: relative;
    top: -0.230cqw;
    width: var(--hf-sign-box);
    aspect-ratio: var(--hf-sign-ratio);
  }

  .hf-explore__go {
    display: none;
  }

  .hf-explore__text {
    position: relative;
    top: -0.100cqw;
    gap: 0.480cqw;
    margin-left: calc(var(--hf-gap) * var(--hf-fit));
  }

  .hf-explore__name {
    font-size: 1.740cqw;
  }

  .hf-explore__note {
    font-size: 1.267cqw;
  }
}

/* ── REDUCED MOTION ────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .hf-duel__card::before,
  .hf-ctas__arrow,
  .hf-explore__link {
    transition: none;
  }
}

/* ── TICKER ────────────────────────────────────────────── */

/* LIVE UPDATES bar is pinned to the viewport bottom on every
   breakpoint so the live signal stays visible regardless of
   scroll position. The .page-landing body padding-bottom
   matches the ticker height so the page footer never sits
   behind it.

   Mobile + desktop unified — previously desktop had the ticker
   flowing inline at the base of the hero, which meant scrolling
   to read the live updates and losing them once past the hero. */
.page-landing .ticker-bar--hero-foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: calc(40px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  flex: 0 0 auto;
  border-top: 1px solid rgba(212, 175, 55, 0.16);
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.35);
}

.page-landing {
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
}
