/*
 * Public pages: the landing page, the applicant guide and the eligibility
 * self-check.
 *
 * Photographs carry a navy scrim wherever text sits over them, so white
 * text keeps a contrast ratio above 7:1 whatever the image behind it. The
 * palette and its limits are set out in portal.css.
 */

/* ------------------------------------------------------------ figures */

.figure { margin: 0; }
.figure img { display: block; width: 100%; height: auto; }
.figure__caption {
  font-size: 0.84rem;
  color: var(--ink-muted);
  padding: 8px 2px 0;
  max-width: none;
}
.figure__credit { display: block; font-size: 0.78rem; opacity: 0.8; }

/* --------------------------------------------------------------- hero */

.hero {
  position: relative;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media picture,
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/*
 * A graded scrim: dense navy where the headline sits, clearing toward the
 * far edge so the photograph is still legible as a photograph.
 */
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(15, 22, 54, 0.94) 0%,
    rgba(15, 22, 54, 0.86) 36%,
    rgba(15, 22, 54, 0.44) 66%,
    rgba(15, 22, 54, 0.22) 100%
  );
}
.hero__inner {
  position: relative;
  /* Block padding only: the inline gutter comes from .shell. */
  padding-block: 72px 80px;
}
.hero__content { max-width: 36rem; }
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--yellow);
  margin: 0 0 12px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.12;
  margin: 0 0 16px;
  max-width: 20ch;
}
.hero__lede {
  font-size: 1.1rem;
  color: #e5e9f8;
  margin-bottom: 28px;
}
.hero .btn--primary { background: var(--yellow); color: var(--navy); }
.hero .btn--primary:hover { background: #e4c003; color: var(--navy); }
.hero .btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
}
.hero .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #fff;
  color: #fff;
}
.hero__note { margin-top: 22px; font-size: 0.92rem; color: #c7cfe8; }
.hero__credit {
  position: absolute;
  right: 10px;
  bottom: 8px;
  margin: 0;
  font-size: 0.7rem;
  color: #fff;
  background: rgba(15, 22, 54, 0.6);
  padding: 3px 8px;
  border-radius: 3px;
}

@media (max-width: 719px) {
  .hero__inner { padding-block: 44px 48px; }
  .hero__scrim {
    background: linear-gradient(
      180deg,
      rgba(15, 22, 54, 0.8) 0%,
      rgba(15, 22, 54, 0.93) 55%,
      rgba(15, 22, 54, 0.96) 100%
    );
  }
}

/* ----------------------------------------------------------- sections */

.section { padding: 56px 0; }
.section--white { background: #fff; border-block: 1px solid var(--line-soft); }
.section__head { max-width: 44rem; margin-bottom: 32px; }
.section__head h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.section__head p { color: var(--ink-muted); margin-bottom: 0; }

/* --------------------------------------------------------- fact strip */

.facts {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 620px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { background: #fff; padding: 20px; }
.fact__value {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.15;
  display: block;
}
.fact__label { font-size: 0.88rem; color: var(--ink-muted); margin: 6px 0 0; }

/* ------------------------------------------------------ media and text */

.media-row { display: grid; gap: 28px; align-items: center; }
@media (min-width: 820px) {
  .media-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .media-row--flip .media-row__media { order: 2; }
}
.media-row + .media-row { margin-top: 48px; }
.media-row__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}
.media-row__body h3 { font-size: 1.3rem; }

/* ---------------------------------------------------------- step cards */

.steps { display: grid; gap: 20px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.step__media { position: relative; }
.step__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.step__number {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.step__body { padding: 18px 20px 22px; flex: 1; }
.step__body h3 { margin-bottom: 8px; font-size: 1.08rem; }
.step__body p { font-size: 0.94rem; margin-bottom: 0; max-width: none; }
.step__gate {
  display: inline-block;
  font-size: 0.74rem;
  color: var(--ink-muted);
  margin-top: 10px;
}

/* ------------------------------------------------------ facility cards */

.facility {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.facility__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}
.facility__body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.facility__body h3 { margin-bottom: 4px; }
.facility__operator {
  font-size: 0.86rem;
  color: var(--ink-muted);
  margin-bottom: 14px;
}
.facility .keyvalue { margin-bottom: 18px; }
.facility .btn-row { margin-top: auto; }

/* ----------------------------------------------------------- checklist */

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-width: none;
}
.checklist li::before {
  content: "";
  width: 14px;
  height: 14px;
  margin-top: 5px;
  border-radius: 3px;
  background: var(--teal);
}
.checklist li.is-exclusion::before { background: var(--coral); }
.checklist__title { font-weight: 600; color: var(--navy); display: block; }
.checklist__note { font-size: 0.88rem; color: var(--ink-muted); }

/* ----------------------------------------------------------------- faq */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); background: #fff; }
.faq summary {
  cursor: pointer;
  padding: 16px 44px 16px 16px;
  font-weight: 600;
  color: var(--navy);
  position: relative;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--blue);
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { background: var(--surface-sunken); }
.faq__answer { padding: 0 16px 18px; }
.faq__answer p { margin-bottom: 0; }

/* ------------------------------------------------------------- callout */

.callout {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
}
.callout h2, .callout h3 { color: #fff; margin-top: 0; }
.callout p { color: #dce1f3; }
.callout a { color: #fff; }
.callout--warn {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--coral);
  border-left: 5px solid var(--coral);
}
.callout--warn h2, .callout--warn h3 { color: var(--navy); }
.callout--warn p { color: var(--ink); }
.callout--warn a { color: var(--blue); }

/* ------------------------------------------------------------- gallery */

.gallery { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.gallery figcaption {
  font-size: 0.8rem;
  color: var(--ink-muted);
  padding-top: 6px;
  max-width: none;
}

/* ------------------------------------------------------------ deadline */

.deadline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  background: #fff6c2;
  border: 1px solid #d9b703;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  color: var(--navy);
}
.deadline strong { font-size: 1.05rem; }
.deadline p { margin: 0; color: var(--navy); max-width: none; }

/* ------------------------------------------- split layout, sign-in etc */

.split { display: grid; gap: 0; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; }
}
.split__media {
  position: relative;
  display: none;
  min-height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 900px) { .split__media { display: block; } }
.split__media picture, .split__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.split__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px;
  background: linear-gradient(
    180deg, rgba(15, 22, 54, 0) 0%, rgba(15, 22, 54, 0.92) 72%);
  color: #fff;
  font-size: 0.9rem;
}
.split__caption span { display: block; opacity: 0.8; font-size: 0.78rem; }

/* --------------------------------------------- banner on inside pages */

.page-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--navy);
}
.page-banner picture, .page-banner img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
  opacity: 0.5;
}
.page-banner__text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 24px;
  color: #fff;
}
.page-banner__text h1 { color: #fff; margin: 0; font-size: 1.6rem; }
.page-banner__text p { color: #dde2f4; margin: 4px 0 0; max-width: 46ch; }

/* ------------------------------------------------- eligibility checker */

.check-question {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.check-question + .check-question { margin-top: 14px; }
.check-question__text { font-weight: 600; color: var(--navy); }
.check-question__guidance {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 6px 0 12px;
}
.check-options { display: flex; gap: 10px; flex-wrap: wrap; }
.check-options label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  min-height: 44px;
}
.check-options label:hover { border-color: var(--blue); }
.check-options input:checked + span { font-weight: 700; color: var(--navy); }
