/*
 * Sites compatibility for the repository Resources hero.
 *
 * The GitHub Resources markup already owns its two-column layout through
 * .resources-hero-grid. The newer inner-page scene sheet also turns the outer
 * .resources-hero into a grid for a different hero markup variant, which
 * double-nests the grid and overrides the intended dark hero. Keep the
 * repository composition authoritative for this route.
 */
body.page-resources .resources-hero {
  display: block;
  padding: clamp(4.5rem, 6vw, 6rem) 0;
  background: #071731;
  color: #fffdf6;
}

body.page-resources .resources-shell.resources-hero-grid {
  display: grid;
  width: min(1480px, calc(100% - 48px));
  max-width: 1480px;
  margin-inline: auto;
  grid-template-columns: minmax(0, 1fr) minmax(560px, 600px);
  gap: clamp(4rem, 5vw, 5.5rem);
  align-items: center;
}

body.page-resources .resources-hero h1 {
  max-width: 15ch;
  margin: 0 0 1.45rem;
  color: #fffdf6;
  font-size: clamp(2.65rem, 4.05vw, 4.05rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

body.page-resources .resources-hero p:not(.eyebrow) {
  max-width: 65ch;
  margin: 0;
  color: #dbe6ef;
  font-size: clamp(1rem, 0.4vw + 0.94rem, 1.08rem);
  line-height: 1.62;
}

body.page-resources .resources-hero .eyebrow {
  margin: 0 0 0.75rem;
  color: #dfbc66;
}

body.page-resources .resources-hero .hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
  margin-top: 1.7rem;
}

body.page-resources .resources-hero .button.primary {
  min-height: 46px;
  padding-inline: 21px;
  border: 1px solid #fffdf6;
  background: #fffdf6;
  color: #071731;
}

body.page-resources .resources-hero .button.primary:hover,
body.page-resources .resources-hero .button.primary:focus-visible {
  border-color: #dfbc66;
  background: #dfbc66;
  color: #071731;
}

body.page-resources .resources-hero .button.secondary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0 6px;
  border: 0;
  border-bottom: 1px solid #dfbc66;
  border-radius: 0;
  background: transparent;
  color: #fffdf6;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: none;
}

body.page-resources .resources-hero .button.secondary:hover,
body.page-resources .resources-hero .button.secondary:focus-visible {
  border-bottom-color: #fffdf6;
  background: transparent;
  color: #fffdf6;
}

body.page-resources .resources-hero-visual {
  position: relative;
  display: block;
  width: min(100%, 600px);
  min-width: 0;
  max-width: 600px;
  aspect-ratio: 4 / 3;
  margin: 0;
  padding: 0;
  align-self: center;
  justify-self: end;
  overflow: hidden;
  border: 1px solid #dfbc66;
  border-radius: 2px;
  background: #081a3b;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

@media (max-width: 1100px) and (min-width: 901px) {
  body.page-resources .resources-shell.resources-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(460px, 540px);
    gap: clamp(2rem, 4vw, 3rem);
  }

  body.page-resources .resources-hero-visual {
    width: min(100%, 540px);
    max-width: 540px;
  }
}

body.page-resources .resources-hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 900px) {
  body.page-resources .resources-shell.resources-hero-grid {
    grid-template-columns: 1fr;
  }

  body.page-resources .resources-hero-visual {
    width: min(100%, 600px);
    max-width: 600px;
    justify-self: center;
  }
}

@media (max-width: 620px) {
  body.page-resources .resources-hero {
    padding: 4rem 0;
  }

  body.page-resources .resources-shell.resources-hero-grid {
    width: min(100% - 32px, 1240px);
  }

  body.page-resources .resources-hero h1 {
    font-size: clamp(2.3rem, 10vw, 3.1rem);
  }

  body.page-resources .resources-hero .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  body.page-resources .resources-hero .button.primary {
    width: 100%;
  }

  body.page-resources .resources-hero .button.secondary {
    width: fit-content;
  }
}
