/* This sheet is loaded on the Field Guide homepage during the experiment.
   Its page and shared chrome colors apply only to the assigned Firehorse arm. */
html[data-firehorse-brand="on"] {
  --fh-night: #170913;
  --fh-deep: #100b10;
  --fh-panel: #291a22;
  --fh-line: #584049;
  --fh-cream: #fff1df;
  --fh-copy: #d8c6c6;
  --fh-gold: #ffc486;
  --fh-width: min(1270px, calc(100% - 2 * clamp(20px, 5vw, 85px)));
  --chrome-ink: var(--fh-cream);
  --chrome-muted: var(--fh-copy);
  --chrome-line: var(--fh-line);
  --chrome-bg: var(--fh-night);
  --chrome-action: var(--fh-cream);
  --chrome-action-hover: #ffdeb6;
  --chrome-action-text: var(--fh-night);
  --chrome-surface: var(--fh-night);
  --chrome-footer-bg: var(--fh-deep);
  --home-webinar-bg: #f5d3a2;
  --chrome-focus: var(--fh-gold);
  background: var(--fh-deep);
  color-scheme: dark;

  & body { background: var(--fh-deep); }
  & .field-guide {
    --ink: var(--fh-cream);
    --paper: var(--fh-night);
    --line: var(--fh-line);
    --rust: var(--fh-gold);
    overflow: clip;
  }
  & .field-guide :focus-visible { outline-color: var(--fh-gold); }
}
.firehorse-stage {
  display: grid;
  align-items: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  min-height: clamp(490px, 43vw, 690px);
  color: #fff7ee;
  background: #170913;
}
.firehorse-portrait {
  position: absolute;
  z-index: -2;
  inset: 0 0 0 auto;
  width: 79%;
}
.firehorse-portrait img, .firehorse-portrait video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 60% 42%;
}
.firehorse-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, #170913, transparent 19%),
              linear-gradient(90deg, #170913 4%, rgba(23,9,19,.97) 24%, rgba(23,9,19,.7) 39%, transparent 60%);
}
.firehorse-stage .fg-intro {
  width: min(45%, 610px);
  margin-left: max(5vw, calc((100% - 1270px)/2));
  padding: 44px 0;
}
.firehorse-stage h1 {
  font-size: clamp(64px, 7.2vw, 116px);
  line-height: .94;
}
.firehorse-stage .fg-lede { color: #f2e4e3; max-width: 25em; }
.firehorse-stage .fg-primary { background: #fff3e0; color: #23131b; }
.firehorse-stage .fg-primary:hover { background: #ffdc9e; }
.firehorse-stage .fg-secondary { border-color: #bda9a8; color: #fff7ee; }
.firehorse-stage .fg-secondary:hover { background: rgba(255,255,255,.12); }
.firehorse-stage :is(.fg-cover-note, .fg-topic) { color: #dfcfd1; }
.firehorse-stage :focus-visible { outline-color: #ffcc78; }

.firehorse-portrait picture { display: block; width: 100%; height: 100%; }
.firehorse-portrait video { position: absolute; inset: 0; opacity: 0; }
.firehorse-portrait video.is-playing { opacity: 1; }
@media (max-width: 680px) {
  .firehorse-stage { display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
  .firehorse-portrait { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 1.38; }
  .firehorse-portrait img, .firehorse-portrait video { object-position: 50% 36%; }
  .firehorse-portrait::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 84%, #170913);
  }
  .firehorse-stage::before { display: none; }
  .firehorse-stage .fg-intro { margin: -4px auto 0; width: 90%; padding: 0 0 24px; }
  .firehorse-stage h1 { font-size: clamp(49px, 12vw, 70px); max-width: 9em; }
  .firehorse-stage .fg-lede { margin-block: 12px 16px; font-size: 16px; }
  .firehorse-stage .fg-actions { gap: 8px; }
}

.firehorse-flow { display: none; }

html[data-firehorse-brand="on"] {
  & .fg-cover-group { display: block; width: 100%; }
  & .fg-cover { display: block; padding: 0; }
  & .fg-plate {
    width: var(--fh-width);
    max-width: none;
    margin: 0 auto;
    padding: clamp(38px, 5vw, 76px) 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  & .fg-plate-head {
    gap: 10px 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--fh-line);
  }
  & .fg-label { color: var(--fh-gold); font-size: 13px; }
  & .fg-switch { padding: 0; border: 0; background: transparent; gap: 4px; }
  & .fg-switch button {
    min-height: 40px;
    padding: 6px 12px;
    border-radius: 4px;
    color: var(--fh-copy);
  }
  & .fg-switch button[aria-selected="true"] { background: var(--fh-cream); color: var(--fh-night); }
  & .fg-switch button:not([aria-selected="true"]):hover { background: var(--fh-panel); }

  & .fg-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas: ". shot" "title shot" "rule shot" "caption shot";
    column-gap: clamp(32px, 7vw, 110px);
    padding-top: clamp(20px, 3vw, 44px);
  }
  & .fg-panel h2 {
    grid-area: title;
    max-width: 12em;
    margin: 0;
    font-size: clamp(46px, 5.5vw, 86px);
    line-height: .99;
    text-wrap: balance;
  }
  & .fg-panel .fg-rule {
    grid-area: rule;
    max-width: 36em;
    min-height: 0;
    margin: 18px 0;
    color: var(--fh-copy);
    font-size: clamp(15px, 1.2vw, 18px);
    line-height: 1.55;
  }
  & .fg-shot {
    grid-area: shot;
    align-self: center;
    padding: clamp(22px, 3vw, 44px);
    aspect-ratio: auto;
    background: linear-gradient(140deg, #302029, #21151e);
    border-color: var(--fh-line);
    border-radius: 6px;
  }
  & .fg-shot:hover { border-color: var(--fh-gold); }
  & .firehorse-flow + img { display: none; }
  & .firehorse-flow { display: grid; }
  & .firehorse-step { position: relative; display: grid; gap: 4px; padding-left: 30px; }
  & .firehorse-step + .firehorse-step { margin-top: 25px; }
  & .firehorse-step::before {
    content: "";
    position: absolute;
    inset: 6px auto auto 0;
    width: 9px;
    height: 9px;
    border: 1px solid var(--fh-gold);
    border-radius: 50%;
  }
  & .firehorse-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 15px;
    bottom: -30px;
    left: 4px;
    border-left: 1px solid #846144;
  }
  & .firehorse-step:last-child::before { background: var(--fh-gold); }
  & .firehorse-step small { font-size: 12px; color: var(--fh-gold); }
  & .firehorse-step strong {
    font-size: clamp(18px, 1.7vw, 27px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -.025em;
  }
  & .fg-caption {
    grid-area: caption;
    align-self: start;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px 18px;
    margin: 0;
    color: var(--fh-copy);
  }
  & .fg-caption a, & .fg-details a, & .fg-faq-meta a { color: var(--fh-gold); }
  & .fg-markets { width: var(--fh-width); margin-inline: auto; border-bottom: 0; }
  & .fg-markets div > span { color: var(--fh-copy); }

  & .fg-examples { background: var(--fh-deep); border-top: 1px solid var(--fh-line); }
  & .fg-contents, & .fg-contents button, & .fg-ticket dl > div,
  & .fg-details section, & .fg-dialog, & .fg-dialog button,
  & .fg-capture-line a, & .fg-notebook-image { border-color: var(--fh-line); }
  & .fg-contents button[aria-selected="true"] { background: var(--fh-panel); }
  & .fg-contents button:hover { background: #35232c; }
  & .fg-ticket { background: var(--fh-panel); border-top-color: var(--fh-gold); }
  & .fg-tab-art { filter: sepia(.32); }
  & .fg-notebook-image, & .fg-dialog-image { background: var(--fh-panel); }
  & .fg-offer {
    border-color: var(--fh-line);
    background: linear-gradient(112deg, #34202a, var(--fh-night) 72%);
  }
  & .fg-offer em { color: var(--fh-gold); }
  & .fg-offer .fg-primary { background: var(--fh-cream); color: var(--fh-night); }
  & .fg-offer .fg-primary:hover { background: var(--chrome-action-hover); }
  & .fg-faq { background: var(--fh-deep); }
  & :is(.fg-examples h2 + p, .fg-contents button small, .fg-ticket-meta, .fg-ticket p,
        .fg-ticket dt, .fg-capture-line p, .fg-offer-main > p, .fg-offer-main > small,
        .fg-details p, .fg-faq-answer, .fg-faq-list details p, .fg-faq-meta) { color: var(--fh-copy); }

  & .email-capture {
    --surface: var(--fh-panel);
    --surface2: var(--fh-deep);
    --border: var(--fh-line);
    --text: var(--fh-cream);
    --text-dim: var(--fh-copy);
    --text-muted: var(--fh-copy);
    --accent: var(--fh-gold);
    --accent-hover: var(--fh-cream);
  }
  & .email-capture .ec-email-form button { color: var(--fh-night); }
  & .email-capture .ec-msg.is-error { color: #ffac9c; }
  & .email-capture .ec-success-icon { color: #aad3a5; }
  & .fg-dialog::backdrop { background: #100810d9; }
}

@media (max-width: 680px) {
  html[data-firehorse-brand="on"] {
    & .fg-plate { padding-block: 32px; }
    & .fg-plate-head { padding-bottom: 10px; }
    & .fg-switch { gap: 0; }
    & .fg-switch button { padding-inline: 9px; }
    & .fg-panel {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      padding-top: 20px;
    }
    & .fg-panel h2 { font-size: clamp(36px, 8.5vw, 53px); }
    & .fg-panel .fg-rule { margin: 10px 0 18px; }
    & .fg-shot { align-self: stretch; }
    & .fg-caption { margin-top: 6px; }
  }
}
