/* ==========================================================================
   Grand Challenge — page-specific composition
   Everything here composes the system in ../assets/css/styles.css: the same
   type scale, colour tokens, radii, accordion, buttons and motion. Only the
   arrangements unique to this page live below.
   ========================================================================== */

.section--tint {
  background: var(--paper-2);
}

/* --------------------------------------------------------------------------
   Hero
   The call line sits above the title, then the co-sponsor, deadline and the
   submission action share one hairline-separated row.
   -------------------------------------------------------------------------- */

.challenge-hero {
  min-height: min(78svh, 680px);
}

/* The home hero uses an explicit two-row grid for title + mission; this hero
   adds a call line and a metadata row, so it reads as one flowing column. */
.challenge-hero__inner {
  display: block;
}

.challenge-hero__call {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  max-width: 86ch;
  margin-bottom: clamp(18px, 2.2vw, 26px);
}

.challenge-hero__call-kicker {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.11em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--brand);
}

.challenge-hero__call-sep {
  font-weight: 400;
  color: var(--line-strong);
}

.challenge-hero__call-sub {
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.4;
  color: var(--ink-2);
}

.challenge-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px clamp(18px, 3vw, 40px);
  margin-top: clamp(24px, 3vw, 38px);
  padding-top: clamp(18px, 2vw, 24px);
  border-top: 1px solid var(--line-strong);
}

.challenge-hero__sponsor {
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.challenge-hero__sponsor::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--accent-bright);
  vertical-align: 0.1em;
}

.challenge-hero__deadline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--ink-2);
}

.challenge-hero__deadline span {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.challenge-hero__deadline strong {
  font-weight: 600;
  color: var(--ink);
}

.challenge-hero__action {
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   Long-form copy (The Challenge, About)
   -------------------------------------------------------------------------- */

.prose {
  max-width: none;
  margin-top: clamp(18px, 2.2vw, 28px);
}

.prose > p {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.68;
  color: var(--ink-2);
  text-wrap: pretty;
}

.prose > p + p {
  margin-top: 1.05em;
}

.prose a:not(.btn) {
  color: var(--brand);
  text-decoration-color: color-mix(in srgb, var(--brand) 45%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:not(.btn):hover {
  text-decoration-color: currentColor;
}

/* --------------------------------------------------------------------------
   Research Themes — the closing note stays visible below the accordion
   -------------------------------------------------------------------------- */

.themes__note {
  max-width: 82ch;
  margin-top: clamp(24px, 2.8vw, 36px);
  padding-left: clamp(18px, 2vw, 24px);
  border-left: 3px solid var(--accent);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.62;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Application Details — numbered requirement / criteria lists
   -------------------------------------------------------------------------- */

.doc-list {
  counter-reset: doc-item;
  display: grid;
  gap: 15px;
  margin: 0;
  padding-inline: 0;
  list-style: none;
}

.doc-list li {
  position: relative;
  padding-left: 38px;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.62;
  color: var(--ink-2);
  text-wrap: pretty;
}

.doc-list li::before {
  counter-increment: doc-item;
  content: counter(doc-item, decimal-leading-zero);
  position: absolute;
  top: 0.16em;
  left: 0;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  color: var(--brand);
}

.doc-list strong {
  font-weight: 600;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Selection stages, folded inside the timeline item
   -------------------------------------------------------------------------- */

.stage-list {
  display: grid;
  gap: 20px;
  margin: 0;
  padding-inline: 0;
  list-style: none;
}

.stage-list__item {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.stage-list__item:first-child {
  padding-top: 0;
  border-top: 0;
}

.stage-list__stage {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.11em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--brand);
}

.stage-list__title {
  margin-top: 7px;
  font-family: var(--font-sans);
  font-size: var(--fs-h4);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
}

.stage-list__item p {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.62;
  color: var(--ink-2);
  text-wrap: pretty;
}

.stage-list__item p + p {
  margin-top: 8px;
}

.stage-list__title + p {
  margin-top: 9px;
}

/* --------------------------------------------------------------------------
   Awards — one open, high-value block rather than a folded section
   -------------------------------------------------------------------------- */

.award {
  position: relative;
  margin-top: var(--sp-block);
  padding: clamp(26px, 3.2vw, 48px);
  border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--paper) 72%);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.award::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--bar);
}

.award__text {
  max-width: 82ch;
  font-family: var(--font-sans);
  font-size: var(--fs-lede);
  font-weight: 400;
  line-height: 1.62;
  color: var(--ink);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.prose > .about__learn {
  font-weight: 600;
  color: var(--ink);
}

/* Footer return link — the header wordmark also leads home, but the footer
   states the route explicitly at the end of the page. */
.site-footer__home {
  margin-left: auto;
}

.site-footer__home:hover svg {
  transform: translateX(-3px);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 700px) {
  .challenge-hero__action {
    margin-left: 0;
  }

  .site-footer__home {
    margin-left: 0;
  }

  .award {
    padding: 24px 20px;
  }
}

@media (max-width: 560px) {
  /* "Grand Challenge" is the longest line in the title; drop the display
     scale a little so it still clears the 320px gutter. */
  .challenge-hero__title {
    font-size: clamp(1.95rem, 9.2vw, 2.5rem);
  }

  .challenge-hero__deadline {
    flex-direction: column;
    gap: 3px;
  }

  .doc-list li {
    padding-left: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .challenge-hero__call,
  .challenge-hero__meta {
    opacity: 1;
    transform: none;
  }
}
