/* ==========================================================================
   Chapman Family Foundation — Site styles
   Fonts: Noto Serif JP (headings), Inter (body), Instrument Sans (footer)
   Icons: Material Symbols (Google Fonts)
   ========================================================================== */

:root {
  --navy: #102d43;
  --teal: #17627b;
  --gold: #f1a23b;
  --gold-soft: #f2a543;
  --cream: #f8f5ee;
  --black: #000000;
  --white: #ffffff;

  --font-heading: "Noto Serif JP", serif;
  --font-body: "Inter", sans-serif;
  --font-footer: "Instrument Sans", sans-serif;

  --container-width: 1600px;
  --container-pad: clamp(1.25rem, 4vw, 5.5rem);
}

/* ---- Reset ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
p,
ul,
li,
figure {
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

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

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--teal);
  border: 4px solid var(--navy);
  border-radius: 10px;
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(0.9rem, 1vw, 1.125rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.85rem 1.75rem;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--navy);
  transform: translateY(-2px);
}

.btn .material-symbols-outlined {
  font-size: 1.1em;
}

.btn--light {
  background: var(--cream);
  color: var(--navy);
  border-color: var(--cream);
}

.btn--light:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}

/* ---- Site header -------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background-color 0.25s ease;
}

.site-header.is-scrolled {
  background: var(--navy);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: 1.1rem;
  padding-inline: clamp(1.25rem, 2vw, 2.5rem);
  margin-inline: 0;
  max-width: 100%;
}

.site-header__logo img {
  height: 46px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2.25rem);
  margin-right: auto;
}

.site-nav__link {
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--gold-soft);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header__cta {
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 0.25rem;
}

.nav-toggle .material-symbols-outlined {
  font-size: 2rem;
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--black);
  overflow: hidden;
  padding-top: clamp(4rem, 29.8vw, 32.19rem);
  padding-bottom: clamp(3rem, 6.14vw, 6.63rem);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/hero-overlay.png");
  background-size: 185.18% 190.16%;
  background-position: 18.34% 75.24%;
  opacity: 0.3;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin-inline: 0;
  padding-inline: clamp(1.25rem, 2vw, 2.5rem);
}

.hero__heading {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2.75rem, 6vw, 6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--gold);
  margin-bottom: 1.75rem;
}

.hero__heading span {
  color: var(--cream);
}

.hero__text {
  font-size: clamp(1.1rem, 1.6vw, 2rem);
  color: var(--white);
  max-width: 58ch;
  margin-bottom: 2.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---- Rooted-in-Detroit (about) --------------------------------------------
   Positioned as proportional percentages of the original 1728x820 design
   frame so the composition (gold circle, accent line, photo) scales
   correctly together at any viewport width. -------------------------------- */
.about {
  background: var(--navy);
}

.about__canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1728 / 820;
  clip-path: inset(-100vh 0 0 0);
  /* clip-path doesn't shrink scrollable overflow, so the gold circle that
     bleeds past the right edge would otherwise add a horizontal scrollbar. */
  overflow-x: clip;
}

.about__shape {
  position: absolute;
  left: 69.16%;
  top: 50%;
  width: 52.89%;
  height: 110.98%;
  transform: translateY(-50%);
  background: var(--gold);
  border-radius: 50%;
  z-index: 0;
}

.about__copy {
  position: absolute;
  left: 8.39%;
  top: 23.17%;
  max-width: 44%;
  display: flex;
  gap: 5.52%;
  z-index: 2;
}

.about__accent {
  flex-shrink: 0;
  width: 2px;
  background: var(--gold);
  align-self: stretch;
}

.about__heading {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(1.1rem, 3.7vw, 4rem);
  letter-spacing: -0.03em;
  color: var(--gold);
  line-height: 1.147;
  margin-bottom: clamp(0.6rem, 1.8vw, 1.5rem);
}

.about__text {
  color: var(--white);
  font-size: clamp(0.7rem, 1.39vw, 1.5rem);
  line-height: 1.45;
}

.about__photo {
  position: absolute;
  z-index: 3;
  left: 55.38%;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.about__photo img {
  position: absolute;
  left: -54.33%;
  top: -33.08%;
  width: 188.74%;
  height: 266.11%;
  max-width: none;
  display: block;
}

/* ---- Where we focus -------------------------------------------------------- */
.focus {
  background: var(--cream);
  padding-block: clamp(3rem, 8vw, 6rem);
}

.focus__heading {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2.25rem, 4.2vw, 4rem);
  letter-spacing: -0.02em;
  color: var(--teal);
  padding-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--gold);
}

.focus__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
}

.focus-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--navy);
  aspect-ratio: 338 / 366;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.focus-card--teal {
  background: var(--teal);
}

.focus-card__bg {
  position: absolute;
  inset: 0;
  opacity: 0.1;
}

.focus-card__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.focus-card__title {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.15rem, 1.6vw, 1.65rem);
  color: var(--cream);
  text-align: center;
  line-height: 1.3;
}

.focus__descriptions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
  margin-top: 1.5rem;
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--gold);
}

.focus__descriptions p {
  font-size: 1rem;
  text-align: center;
  color: var(--navy);
}

.focus__descriptions strong {
  font-weight: 700;
}

/* ---- Progress you can see --------------------------------------------------- */
.progress {
  padding-block: 0;
}

.progress__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: stretch;
  max-width: 100%;
  margin-inline: 0;
  padding-inline: 0;
}

.progress__photo {
  overflow: hidden;
}

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

.progress__copy {
  border-left: 1px solid rgba(16, 45, 67, 0.15);
  padding-block: clamp(3rem, 8vw, 6rem);
  padding-left: clamp(1.5rem, 3vw, 2.5rem);
  padding-right: var(--container-pad);
}

.progress__heading {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2.25rem, 4.2vw, 4rem);
  letter-spacing: -0.02em;
  color: var(--teal);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.progress__text {
  font-size: clamp(1rem, 1.3vw, 1.3rem);
  text-align: justify;
  margin-bottom: 2rem;
}

.progress__stats {
  border-top: 2px solid var(--gold);
  padding-top: 1.75rem;
  margin-bottom: 1.75rem;
}

.progress__stats li {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 1.8vw, 2rem);
  color: var(--teal);
  padding-left: 1.75rem;
  position: relative;
  margin-bottom: 0.9rem;
}

.progress__stats li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.progress__stats li:last-child {
  margin-bottom: 0;
}

.progress__stats strong {
  font-weight: 700;
}

.progress__footnote {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--teal);
  text-align: justify;
}

/* ---- AI in the D ------------------------------------------------------------ */
.ai-feature {
  background: var(--navy);
  padding-block: 0;
}

.ai-feature__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: stretch;
  max-width: 100%;
  margin-inline: 0;
  padding-inline: 0;
}

.ai-feature__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(3rem, 8vw, 6rem);
  padding-right: var(--container-pad);
  margin-left: var(--container-pad);
}

.ai-feature__accent {
  border-left: 2px solid var(--gold);
  padding-left: clamp(1.25rem, 2.5vw, 1.75rem);
}

.ai-feature__copy > .btn {
  align-self: flex-start;
  margin-left: calc(clamp(1.25rem, 2.5vw, 1.75rem) + 2px);
}

.ai-feature__heading {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2.25rem, 4.2vw, 4rem);
  letter-spacing: -0.02em;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.ai-feature__text {
  color: var(--white);
  font-size: clamp(1.05rem, 1.5vw, 1.75rem);
  text-align: justify;
  margin-bottom: 2rem;
}

.ai-feature__photo {
  border-radius: 10px;
  overflow: hidden;
}

.ai-feature__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Google.org progress ------------------------------------------------------ */
.gprogress {
  background: var(--gold);
}

.gprogress__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.gprogress__photo {
  overflow: hidden;
  min-height: 320px;
}

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

.gprogress__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem);
}

.gprogress__accent {
  border-left: 2px solid var(--navy);
  padding-left: clamp(1.25rem, 2.5vw, 1.75rem);
}

.gprogress__content > .btn {
  align-self: flex-start;
  margin-left: calc(clamp(1.25rem, 2.5vw, 1.75rem) + 2px);
}

.gprogress__heading {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2.25rem, 4.2vw, 4rem);
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.gprogress__text {
  font-size: clamp(1.05rem, 1.4vw, 1.5rem);
  color: var(--navy);
  margin-bottom: 1.75rem;
  max-width: 48ch;
}

/* ---- CTA ---------------------------------------------------------------------- */
.cta {
  position: relative;
  background: var(--navy);
  overflow: hidden;
  padding-block: clamp(3rem, 9vw, 7rem);
  text-align: center;
}

.cta__bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/hero-bg.png");
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  pointer-events: none;
}

.cta__content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 2vw, 2.5rem);
}

.cta__heading {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2.25rem, 4.6vw, 4rem);
  letter-spacing: -0.02em;
  color: var(--gold-soft);
  margin-bottom: 1.25rem;
}

.cta__text {
  color: var(--cream);
  font-size: clamp(1.05rem, 1.5vw, 1.75rem);
  margin-bottom: 2.25rem;
}

/* ---- Footer --------------------------------------------------------------------- */
.site-footer {
  background: var(--teal);
  color: var(--cream);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  font-family: var(--font-footer);
}

.site-footer__grid {
  display: flex;
  justify-content: space-between;
  gap: clamp(2rem, 5vw, 4rem);
}

.site-footer__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3rem);
}

.site-footer__logo img {
  height: 64px;
  width: auto;
  margin-bottom: 1.25rem;
}

.site-footer__tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  max-width: 36ch;
  margin-bottom: 1.5rem;
}

.site-footer__copyright {
  font-family: var(--font-body);
  font-size: 0.9rem;
  opacity: 0.85;
}

.site-footer h3 {
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.site-footer__links li {
  margin-bottom: 0.5rem;
}

.site-footer__links a {
  font-weight: 700;
  transition: color 0.2s ease;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  color: var(--navy);
}

.site-footer__contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.site-footer__contact-item .material-symbols-outlined {
  font-size: 1.2rem;
}

.site-footer__social {
  display: flex;
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.site-footer__social a {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
}

.site-footer__social img {
  width: 20px;
  height: 20px;
}

/* ---- Responsive ------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .site-nav {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--black);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem var(--container-pad);
    gap: 1.25rem;
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
    z-index: 99;
  }

  .site-nav.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.25s ease;
  }

  .site-nav.no-transition {
    transition: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-header__actions {
    margin-left: auto;
  }

  .progress__grid,
  .ai-feature__grid,
  .gprogress__grid {
    grid-template-columns: 1fr;
  }

  .about__canvas {
    aspect-ratio: auto;
    padding-block: 2.5rem 0;
  }

  .about__shape {
    display: none;
  }

  .about__copy {
    position: relative;
    left: auto;
    top: auto;
    max-width: none;
    padding-inline: var(--container-pad);
    margin-bottom: 1.75rem;
  }

  .about__heading {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .about__text {
    font-size: 1rem;
  }

  .about__photo {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    height: clamp(260px, 70vw, 380px);
  }

  .about__photo img {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 17%;
  }

  .progress__grid .progress__photo {
    order: 2;
    min-height: 320px;
  }

  .ai-feature__photo {
    order: -1;
    min-height: 320px;
  }

  .focus__grid,
  .focus__descriptions {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer__grid {
    flex-direction: column;
  }

  /* Home page only: centre the stacked footer content */
  body:not(.inner-page) .site-footer__grid {
    text-align: center;
  }

  body:not(.inner-page) .site-footer__logo img {
    margin-inline: auto;
  }

  body:not(.inner-page) .site-footer__nav {
    grid-template-columns: repeat(2, auto);
    justify-content: center;
  }

  body:not(.inner-page) .site-footer__tagline {
    margin-inline: auto;
  }

  body:not(.inner-page) .site-footer__contact-item,
  body:not(.inner-page) .site-footer__social {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .site-header__cta {
    display: none;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .focus__grid,
  .focus__descriptions {
    grid-template-columns: 1fr;
  }

  .site-footer__nav,
  body:not(.inner-page) .site-footer__nav {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}
