/*
 * Shared presentation for course pages.
 *
 * The course content still uses the original Story layout from main.css. This
 * file only standardizes the opening banner and a few recurring details so the
 * teaching archive feels like one family of pages.
 */

:root {
  --course-accent-inferno: #bb3754;
  --course-accent-viridis: #29788e;
}

.course-page .course-hero {
  position: relative;
  min-height: min(82svh, 760px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
  padding: 0;
  background: #0b0e10;
  text-align: left;
}

.course-page .course-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 8, 10, 0.82) 0%, rgba(5, 8, 10, 0.48) 48%, rgba(5, 8, 10, 0.12) 100%),
    linear-gradient(0deg, rgba(5, 8, 10, 0.68) 0%, rgba(5, 8, 10, 0.08) 58%, rgba(5, 8, 10, 0.2) 100%);
}

.course-page .course-hero.style1,
.course-page .course-hero.style2,
.course-page .course-hero.style5 {
  padding: 0;
  text-align: left;
}

.course-page .course-hero.style1 .content,
.course-page .course-hero.style2 .content,
.course-page .course-hero.style5 .content {
  position: relative;
  z-index: 2;
  align-self: flex-end;
  width: min(100%, 78rem);
  max-width: none;
  margin: 0 auto;
  padding: clamp(6rem, 13vh, 9rem) clamp(1.4rem, 6vw, 5.5rem) clamp(3rem, 7vh, 5rem);
  background: transparent;
  text-align: left;
}

.course-page .course-hero.style1 .image,
.course-page .course-hero.style2 .image,
.course-page .course-hero.style5 .image {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  opacity: 1;
  border-radius: 0;
}

.course-page .course-hero .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-page .course-home-link {
  display: inline-block;
  margin-bottom: 1.1rem;
  color: rgba(255, 255, 255, 0.72);
  border: 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.course-page .course-home-link:hover {
  color: #ffffff;
}

.course-page .course-hero h1 {
  max-width: 18ch;
  margin: 0 0 0.7rem;
  color: #ffffff;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  font-weight: 500;
  line-height: 1.04;
}

.course-page .course-hero h2 {
  margin-top: -0.2rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 400;
}

.course-page .course-hero p.major {
  max-width: 48rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 1.55;
}

.course-page .course-hero h6 {
  max-width: 48rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.5;
}

.course-page .course-hero h6 a {
  color: inherit;
}

.course-page .course-hero h6 a:hover {
  color: #ffffff;
}

.course-page .wrapper > .inner {
  width: min(100%, 78rem);
}

.course-page .index > section > header h3 {
  letter-spacing: -0.01em;
}

.course-page .footer .image img,
.course-page section:last-of-type .image img {
  object-fit: contain;
}

@media screen and (orientation: portrait), screen and (max-width: 736px) {
  .course-page .course-hero,
  .course-page .course-hero.style1,
  .course-page .course-hero.style2,
  .course-page .course-hero.style5 {
    min-height: 72svh;
    flex-direction: row;
  }

  .course-page .course-hero.style1 .content,
  .course-page .course-hero.style2 .content,
  .course-page .course-hero.style5 .content {
    min-height: 0;
    padding: 7rem 1.5rem 2.5rem;
  }

  .course-page .course-hero.style1 .image,
  .course-page .course-hero.style2 .image,
  .course-page .course-hero.style5 .image {
    height: 100%;
  }

  .course-page .course-hero::after {
    background:
      linear-gradient(0deg, rgba(5, 8, 10, 0.82) 0%, rgba(5, 8, 10, 0.3) 70%, rgba(5, 8, 10, 0.18) 100%);
  }
}

.course-page .plain-list {
  list-style: none;
  padding-left: 0;
}


/* Shared site accent palette, without changing the course layouts. */
.course-page a:not(.course-home-link) {
  color: var(--course-accent-viridis);
}

.course-page a:not(.course-home-link):hover,
.course-page a:not(.course-home-link):focus-visible {
  color: var(--course-accent-inferno);
}

.course-page .button:hover,
.course-page input[type="submit"]:hover,
.course-page input[type="button"]:hover {
  box-shadow: inset 0 0 0 1px var(--course-accent-inferno) !important;
  color: var(--course-accent-inferno) !important;
}
