/* ---------- Tokens ---------- */
:root {
  --navy: #10053B;        /* page background, card buttons, card body text */
  --ink: #0A0328;         /* card titles, general text */
  --red: #D82221;         /* login button, card button hover */
  --red-dark: #b81b1a;
  --sky: #89CFF0;         /* baby blue: card outlines, section pill border */
  --white: #fff;
  --line: #d9d4f2;
  --font: "Noto Serif", Georgia, "Times New Roman", serif;

  --fs-body: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  --fs-card-title: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --fs-pill: clamp(1.15rem, 1rem + 0.8vw, 1.5rem);
  --fs-hero-top: clamp(1.25rem, 0.9rem + 2vw, 2.4rem);
  --fs-hero: clamp(2rem, 1.2rem + 4.2vw, 4rem);
  --gap: clamp(1rem, 0.5rem + 2.2vw, 2rem);
  --pad-x: clamp(1rem, 0.5rem + 3vw, 3rem);
  --header-h: 4.25rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--navy); scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px var(--navy); }

.container { width: min(100% - 2 * var(--pad-x), 74rem); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: #fff; color: var(--ink); padding: .6rem 1rem; border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

/* ---------- Pinned background ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(16, 5, 59, .55) 0%, rgba(16, 5, 59, .78) 100%),
    url("../assets/backgroundimage.jpg") center / cover no-repeat;
  background-color: var(--navy);
}

/* ---------- Header (nav bar styling pending new design) ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(16, 5, 59, .72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.site-header__inner {
  display: flex; justify-content: flex-end; align-items: center;
  min-height: var(--header-h);
  padding-inline: var(--pad-x);
}
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.site-nav a { color: #fff; text-decoration: none; font-size: 1.05rem; padding: .5rem .25rem; }
.site-nav a:not(.btn-login):hover { text-decoration: underline; text-underline-offset: 6px; }
.btn-login {
  background: var(--red); padding: .6rem 1.25rem !important; border-radius: 6px; font-weight: 600;
  transition: background-color .2s;
}
.btn-login:hover { background: var(--red-dark); }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0; margin-left: auto;
  background: transparent; border: 1px solid rgba(255, 255, 255, .45); border-radius: 8px; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: #fff; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: min(88svh, 46rem);
  padding: calc(var(--header-h) + 2rem) var(--pad-x) 3rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff;
}
.hero__logo { width: clamp(7rem, 5rem + 8vw, 11.75rem); height: auto; margin-bottom: clamp(1.5rem, 3vw, 3rem); }
.hero__ministry { margin: 0; font-size: var(--fs-hero-top); font-weight: 400; line-height: 1.25; text-wrap: balance; }
.hero__title { margin: .35rem 0 0; font-size: var(--fs-hero); font-weight: 700; line-height: 1.1; text-wrap: balance; }

/* ---------- Notice ticker ---------- */
.notice { background: var(--ink); color: #fff; overflow: hidden; border-block: 1px solid rgba(255, 255, 255, .15); }
.notice__track { display: flex; width: max-content; animation: ticker 32s linear infinite; }
.notice p { margin: 0; padding: .7rem 4rem; white-space: nowrap; font-size: .95rem; }
.notice:hover .notice__track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Shared section pieces ---------- */
.pill {
  display: block; width: fit-content; max-width: 100%; margin: 0 auto clamp(2rem, 4vw, 3.5rem);
  padding: .75rem 2.5rem; border-radius: 999px; text-align: center;
  font-size: var(--fs-pill); font-weight: 600; line-height: 1.3; color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
}
.pill--glass {
  background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.grid {
  display: grid; gap: var(--gap); align-items: stretch;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ---------- Services (white section) ---------- */
.services { background: #fff; padding-block: clamp(3rem, 6vw, 5rem); }

/* Pill needs dark text + baby blue outline now that the section is white */
.services .pill {
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--sky);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}

/* Focus ring must be visible on white */
.services :focus-visible { outline-color: var(--navy); box-shadow: 0 0 0 6px #fff; }

.card {
  display: flex; flex-direction: column;
  background: #fff; border: 2px solid var(--sky); border-radius: 10px;
  padding: clamp(1.25rem, 1rem + 1.2vw, 2rem); text-align: center;
  box-shadow: 0 0 0 rgba(16, 5, 59, 0);
  transition: box-shadow .25s ease, transform .25s ease;
}
.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(16, 5, 59, .22), 0 4px 10px rgba(137, 207, 240, .45);
}
.card--featured { border-top: 6px solid var(--red); }
.card__title { margin: 0 0 .75rem; font-size: var(--fs-card-title); font-weight: 700; line-height: 1.3; color: var(--ink); text-wrap: balance; }
.card__text { margin: 0 0 1.75rem; color: var(--navy); }
.new { color: var(--red); font-weight: 700; }
.card__btn {
  margin: auto auto 0; display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 9.5rem; padding: .6rem 1.75rem;
  background: var(--navy); color: #fff; text-decoration: none; border-radius: 6px;
  box-shadow: 0 3px 8px rgba(16, 5, 59, .35); transition: background-color .2s, transform .15s;
}
.card__btn:hover,
.card__btn:focus-visible { background: var(--red); }
.card__btn:active { transform: translateY(1px); }

/* ---------- Apply (coming soon): photo shows through ---------- */
.apply { padding-block: clamp(4rem, 9vw, 7rem) clamp(5rem, 10vw, 8rem); text-align: center; }
.badge {
  display: inline-block; margin: 0 0 1rem; padding: .25rem .9rem; border-radius: 999px;
  background: #fff; color: var(--ink); font-size: .85rem; font-weight: 600;
}
.soon {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  min-height: 8rem; padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, .94); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); font-weight: 700; font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); line-height: 1.35;
  text-align: left; cursor: not-allowed; user-select: none;
}
.soon svg { flex: none; width: 2.5rem; height: 2.5rem; fill: none; stroke: var(--navy); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #fff; padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom, 0px)); font-size: .95rem; border-top: 1px solid rgba(255, 255, 255, .15); }
.site-footer p { margin: .25rem 0; }
.site-footer a { text-underline-offset: 3px; }

/* ---------- Tablet ---------- */
@media (max-width: 62rem) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid > :last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - var(--gap) / 2); justify-self: center; }
}

/* ---------- Phone ---------- */
@media (max-width: 40rem) {
  .grid { grid-template-columns: 1fr; }
  .grid > :last-child:nth-child(odd) { width: auto; }
  .pill { padding-inline: 1.5rem; }
  .soon { min-height: 6.5rem; }

  .nav-toggle { display: flex; }
  .site-header__inner { flex-wrap: wrap; }
  .site-nav {
    display: none; flex-direction: column; align-items: stretch; width: 100%;
    gap: .25rem; padding: .5rem 0 1rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .8rem .5rem; min-height: 44px; }
  .btn-login { text-align: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card:hover, .card:focus-within { transform: none; }
  .notice__track { animation: none; width: auto; }
  .notice p { white-space: normal; text-align: center; padding: .7rem var(--pad-x); }
  .notice p[aria-hidden="true"] { display: none; }
  * { transition-duration: .01ms !important; }
}

/* ======================================================
   Check Results page
   ====================================================== */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100svh; }

.auth__info {
  padding: calc(var(--header-h) + 2rem) var(--pad-x) 3rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff;
}
.auth__title { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 3rem); }
.steps { margin-top: clamp(1.5rem, 4vw, 3rem); max-width: 28rem; width: 100%; text-align: left; }
.steps__title { margin: 0 0 .75rem; font-size: 1.15rem; font-weight: 600; }
.steps ol { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: .75rem; }
.steps li { counter-increment: step; display: flex; gap: .85rem; align-items: flex-start; }
.steps li::before {
  content: counter(step); flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: .95rem;
  background: var(--sky); color: var(--ink);
}

.auth__panel {
  background: #fff; color: var(--ink);
  padding: calc(var(--header-h) + 2rem) var(--pad-x) 3rem;
  display: flex; justify-content: center; align-items: center;
}
.auth__inner { width: 100%; max-width: 30rem; }
.auth__panel :focus-visible { outline-color: var(--navy); box-shadow: 0 0 0 6px #fff; }

.back {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px;
  padding: .4rem 1rem .4rem .7rem; border: 2px solid var(--sky); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
  transition: background-color .2s, color .2s, border-color .2s;
}
.back svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.back:hover { background: var(--navy); border-color: var(--navy); color: #fff; }

.auth__heading { margin: 1.5rem 0 .5rem; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); line-height: 1.2; }
.byname { margin: 0 0 1rem; font-size: .95rem; }
.byname a { color: var(--red); text-underline-offset: 3px; }
.byname a:hover { color: var(--red-dark); }

.notice--panel { background: #f3f1fb; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 1.5rem; }
.notice--panel p { padding: .55rem 3rem; font-size: .9rem; }

.form { display: grid; gap: 1.15rem; }
.field label { display: block; margin-bottom: .35rem; font-weight: 600; color: var(--ink); }
.field input, .field select {
  width: 100%; min-height: 48px; padding: .7rem .9rem;
  font: inherit; color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: 8px;
  transition: border-color .2s, box-shadow .2s;
}
.field input:hover, .field select:hover { border-color: var(--sky); }
.field input:focus, .field select:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(137, 207, 240, .6); }
.field select { appearance: none; -webkit-appearance: none; padding-right: 2.5rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none' stroke='%2310053B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .9rem center; }

.submit {
  min-height: 52px; width: 100%; margin-top: .25rem;
  font: inherit; font-weight: 700; color: #fff; background: var(--navy);
  border: 0; border-radius: 8px; cursor: pointer;
  box-shadow: 0 3px 8px rgba(16, 5, 59, .35); transition: background-color .2s, transform .15s;
}
.submit:hover, .submit:focus-visible { background: var(--red); }
.submit:active { transform: translateY(1px); }
.help { margin: 0; font-size: .95rem; color: var(--navy); }
.help a { color: var(--red); text-underline-offset: 3px; }
.help a:hover { color: var(--red-dark); }

@media (max-width: 62rem) {
  .auth { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .auth__info { padding-bottom: 2.5rem; }
  .auth__panel { padding-top: 2rem; align-items: flex-start; }
}
@media (max-width: 40rem) {
  .notice--panel p { padding-inline: 1.5rem; }
}

/* ======================================================
   Register + SIN pages (step / option buttons)
   ====================================================== */
.auth__sub { margin: .5rem 0 0; font-size: clamp(1.05rem, 1rem + .5vw, 1.35rem); opacity: .92; }
.steps__text { margin: 0; }
.steps + .steps { margin-top: 1.75rem; }
.lead { margin: 0 0 1.25rem; color: var(--navy); }

.actions { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .9rem; }
.lead + .actions { margin-top: 0; }
.action {
  display: flex; align-items: center; gap: 1rem; min-height: 4.25rem;
  padding: .9rem 1.1rem; background: #fff; color: var(--ink);
  border: 2px solid var(--sky); border-radius: 10px;
  text-decoration: none; font-weight: 700; line-height: 1.35;
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .25s, transform .25s;
}
.action__tag {
  flex: none; min-width: 4.75rem; padding: .2rem .65rem; border-radius: 999px; text-align: center;
  background: var(--navy); color: #fff; font-size: .8rem; font-weight: 600; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.action__label { flex: 1; text-wrap: balance; }
.action svg { flex: none; width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.action:hover, .action:focus-visible {
  background: var(--navy); border-color: var(--navy); color: #fff;
  transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16, 5, 59, .22);
}
.action:hover .action__tag, .action:focus-visible .action__tag { background: var(--sky); color: var(--ink); }
.action:active { transform: translateY(0); }

@media (max-width: 40rem) {
  .action { flex-wrap: wrap; gap: .5rem .75rem; }
  .action__label { flex: 1 1 12rem; }
}
@media (prefers-reduced-motion: reduce) {
  .action:hover, .action:focus-visible { transform: none; }
}