@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&family=Open+Sans:wght@400;600&display=swap");

:root {
  --navy: #123e5a;
  --navy-dark: #082f49;
  --orange: #ef7d22;
  --orange-dark: #c95d0d;
  --text: #30383e;
  --white: #ffffff;
  --page-width: 1140px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.72;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.page-width {
  width: min(calc(100% - 44px), var(--page-width));
  margin-inline: auto;
}

/*
 * Each major content container uses one of the three original
 * background images with a separate tint layer above it.
 */
.section-background {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.section-background::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ---------------------------------------------------------
   Title container: xtra.png with a deep blue tint
   --------------------------------------------------------- */

.hero {
  min-height: 430px;
  display: grid;
  place-items: center;
  padding: 92px 0 82px;
  background:
    url("/assets/xtra.png")
    center center / cover no-repeat;
}

.hero::before {
  background:
    linear-gradient(
      90deg,
      rgba(5, 32, 51, 0.84),
      rgba(9, 54, 77, 0.68)
    ),
    linear-gradient(
      180deg,
      rgba(1, 19, 34, 0.14),
      rgba(1, 20, 34, 0.38)
    );
}

.hero__content {
  text-align: center;
}

.hero h1 {
  max-width: 930px;
  margin: 0 auto 22px;
  color: var(--white);
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-size: clamp(2.7rem, 5.5vw, 4.65rem);
  font-weight: 600;
  line-height: 1.09;
  letter-spacing: -0.035em;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.48);
}

.hero p {
  margin: 0;
  color: #ff9b4a;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.22rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.52);
}

/* ---------------------------------------------------------
   Program container: moon-over-clouds.jpg with a light tint
   --------------------------------------------------------- */

.about {
  padding: 78px 0 84px;
  background:
    url("/assets/moon-over-clouds.jpg")
    center center / cover no-repeat;
}

.about::before {
  background:
    linear-gradient(
      135deg,
      rgba(240, 246, 249, 0.88),
      rgba(226, 239, 245, 0.80)
    ),
    rgba(212, 231, 239, 0.34);
}

.content-surface {
  padding: 52px 58px 56px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(18, 62, 90, 0.12);
  box-shadow: 0 14px 42px rgba(7, 37, 56, 0.16);
  backdrop-filter: blur(1.5px);
}

h2 {
  position: relative;
  margin: 0 0 44px;
  padding-bottom: 14px;
  color: var(--navy);
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  font-weight: 600;
  line-height: 1.18;
  text-transform: uppercase;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 3px;
  background: var(--orange);
}

.about-grid {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.portrait {
  margin: 0;
  text-align: center;
}

.portrait img {
  width: 208px;
  border: 1px solid rgba(18, 62, 90, 0.12);
}

.portrait figcaption {
  margin-top: 12px;
  color: var(--navy);
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.4;
}

.about-copy p {
  margin: 0 0 22px;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.feature-image {
  margin: 48px 0 0;
}

.feature-image img {
  width: 100%;
  box-shadow: 0 10px 28px rgba(7, 37, 56, 0.16);
}

.download-row {
  margin: 26px 0 0;
  text-align: center;
}

.download-row a {
  display: inline-block;
  color: var(--orange);
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-weight: 600;
  text-underline-offset: 4px;
}

.download-row a:hover,
.download-row a:focus-visible {
  color: var(--orange-dark);
}

/* ---------------------------------------------------------
   Gallery container: Hubble image with a dark blue tint
   --------------------------------------------------------- */

.gallery {
  padding: 82px 0 96px;
  background:
    url("/assets/hubble-m31.webp")
    center center / cover no-repeat;
}

.gallery::before {
  background:
    linear-gradient(
      180deg,
      rgba(6, 37, 57, 0.80),
      rgba(5, 31, 48, 0.88)
    ),
    rgba(4, 28, 45, 0.36);
}

.gallery h2 {
  color: var(--white);
}

.gallery-intro {
  margin: -18px 0 38px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.02rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
}

.gallery-item {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.23);
  text-align: center;
}

.gallery-item__image {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--white);
}

.gallery-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item__image--contain img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.gallery-item h3 {
  margin: 20px 18px 6px;
  color: var(--navy);
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.gallery-item p {
  min-height: 54px;
  margin: 0 18px 21px;
  font-size: 0.9rem;
  line-height: 1.55;
}

@media (max-width: 960px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-item__image {
    height: 280px;
  }
}

@media (max-width: 700px) {
  .page-width {
    width: min(calc(100% - 28px), var(--page-width));
  }

  .hero {
    min-height: 370px;
    padding: 66px 0 58px;
    background-position: 58% center;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 11vw, 3.35rem);
  }

  .about {
    padding: 28px 0;
    background-size: auto 100%;
  }

  .content-surface {
    padding: 34px 23px 38px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .portrait {
    width: 208px;
    text-align: left;
  }

  .feature-image {
    margin-top: 34px;
  }

  .gallery {
    padding: 54px 0 65px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item__image {
    height: auto;
    min-height: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Show more of the moon-over-clouds background */
@media (min-width: 701px) {
  .about {
    background-position: center top;
    background-repeat: no-repeat;
    background-color: #dce8ee;
  }
}


/* Display the gallery background without a tint overlay */
.gallery::before {
  background: none;
}


/* Show moon-over-clouds without a tint overlay */
.about::before {
  background: none;
}


/* Smaller centered Halloween image */
.feature-image {
  width: min(100%, 420px);
  margin: 38px auto 0;
}

.feature-image img {
  width: 100%;
  height: auto;
  box-shadow: none;
}

@media (max-width: 700px) {
  .feature-image {
    width: min(90%, 420px);
    margin-top: 30px;
  }
}

