:root {
  --navy: #0b4b7e;
  --navy-deep: #12315a;
  --teal: #047d83;
  --green: #5b8f32;
  --gold: #f2b22e;
  --sky: #eaf5fa;
  --sky-strong: #d8edf4;
  --text: #19395d;
  --muted: #5e7489;
  --line: #d8e7ee;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(18, 49, 90, 0.13);
  --radius: 8px;
  --font-body: "Inter", Arial, sans-serif;
  --font-display: "Libre Baskerville", Georgia, serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(242, 178, 46, 0.16), transparent 26rem),
    linear-gradient(180deg, #ffffff 0%, #f7fbfd 48%, #ffffff 100%);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  color: var(--teal);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 82px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(216, 231, 238, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 210px;
}

.brand img {
  width: 305px;
  height: 72px;
  object-fit: contain;
  object-position: left center;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3vw, 34px);
  flex: 1;
  font-size: 14px;
  font-weight: 700;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--navy);
  border-radius: 999px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
}

.section-band {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.78fr);
  align-items: center;
  gap: clamp(34px, 6vw, 76px);
  min-height: calc(100vh - 82px);
  padding: clamp(44px, 7vw, 86px) 0 clamp(28px, 5vw, 56px);
}

.hero h1,
.application-hero h1 {
  margin: 0;
  max-width: 750px;
  color: var(--navy-deep);
  font-family: var(--font-display);
  font-size: clamp(42px, 6.5vw, 82px);
  font-weight: 400;
  line-height: 1.08;
}

.hero p,
.application-hero p {
  max-width: 640px;
  margin: 22px 0 0;
  color: #355777;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(11, 75, 126, 0.2);
}

.button.primary:hover,
.button.primary:focus {
  background: #083e69;
  color: var(--white);
}

.button.quiet {
  background: var(--white);
  color: var(--navy);
  border-color: var(--line);
}

.button.quiet:hover,
.button.quiet:focus {
  border-color: var(--teal);
  color: var(--teal);
}

.hero-mark {
  position: relative;
  padding: clamp(20px, 4vw, 38px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(239, 248, 251, 0.86));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-mark::before {
  content: "";
  position: absolute;
  inset: 18px auto auto 18px;
  width: 76px;
  height: 6px;
  background: var(--gold);
  border-radius: 999px;
}

.hero-mark::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 118px;
  height: 6px;
  background: var(--green);
  border-radius: 999px;
}

.hero-mark img {
  position: relative;
  width: 100%;
  border-radius: 6px;
}

.mission-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto 86px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: 0 18px 38px rgba(18, 49, 90, 0.08);
}

.mission-strip div {
  min-height: 150px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.92);
}

.mission-strip strong {
  display: block;
  margin-bottom: 10px;
  color: var(--navy);
  font-size: 16px;
}

.mission-strip span {
  display: block;
  color: var(--muted);
  font-size: 15px;
}

.about,
.contact,
.apply-call {
  padding: clamp(58px, 8vw, 96px) 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 18px;
}

.section-heading h2,
.apply-call h2 {
  margin: 0;
  color: var(--navy-deep);
  font-family: var(--font-display);
  font-size: clamp(32px, 4.6vw, 56px);
  font-weight: 400;
  line-height: 1.14;
}

.section-heading p,
.apply-call p {
  margin: 16px 0 0;
  color: #3d5e7b;
  font-size: 18px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: clamp(34px, 6vw, 74px);
  align-items: start;
}

.about-copy p {
  margin: 0 0 20px;
  max-width: 700px;
  color: #2b4d6d;
  font-size: 18px;
}

.about-copy .about-quote {
  color: #3d5e7b;
  font-size: 18px;
}

.principles {
  display: grid;
  gap: 14px;
}

.principles div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid rgba(4, 125, 131, 0.65);
  border-radius: 8px;
}

.principles span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 18px;
}

.principles p {
  margin: 0;
  color: #294b6a;
  font-weight: 600;
}

.apply-call {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.apply-call div {
  max-width: 720px;
}

.contact-form,
.form-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.contact-form {
  max-width: 820px;
  padding: clamp(22px, 4vw, 38px);
}

.form-grid {
  display: grid;
  gap: 18px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-full {
  grid-column: 1 / -1;
}

.conditional-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: -4px 0 4px;
  padding: 18px;
  border: 1px solid var(--sky-strong);
  border-radius: 8px;
  background: rgba(234, 245, 250, 0.58);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

label span,
.upload-box span {
  color: var(--navy-deep);
  font-size: 13px;
  font-weight: 800;
}

label:has(input[required]) > span::after,
label:has(textarea[required]) > span::after,
label:has(select[required]) > span::after,
.check-row:has(input[required]) > span::after {
  content: " *";
  color: #b32828;
  font-weight: 900;
}

small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #cbdde7;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: 500 16px/1.45 var(--font-body);
  padding: 13px 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(4, 125, 131, 0.13);
}

input.invalid,
textarea.invalid,
select.invalid {
  border-color: #b32828;
  background: #fff9f9;
}

.hidden-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}

.form-actions,
.step-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.form-status.success {
  color: var(--green);
}

.form-status.error {
  color: #a32525;
}

.recaptcha-wrap {
  margin: 4px 0 18px;
  min-height: 78px;
}

.application-page {
  background:
    radial-gradient(circle at 80% 8%, rgba(4, 125, 131, 0.12), transparent 27rem),
    linear-gradient(180deg, #ffffff 0%, #f4f9fb 100%);
}

.application-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(42px, 6vw, 72px) 0 28px;
}

.application-hero p {
  font-size: 18px;
}

.application-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 26px;
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto clamp(56px, 8vw, 96px);
  align-items: start;
}

.progress-rail {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.progress-rail a {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 8px;
  border-radius: 8px;
  color: #476781;
  font-size: 14px;
  font-weight: 800;
}

.progress-rail span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--navy);
  font-size: 12px;
}

.progress-rail a.active {
  background: var(--navy);
  color: #ffffff;
}

.progress-rail a.active span {
  background: var(--gold);
  color: var(--navy-deep);
}

.form-card {
  min-height: 620px;
  padding: clamp(22px, 4vw, 42px);
}

.form-step[hidden] {
  display: none;
}

.form-step {
  animation: fadeUp 220ms ease both;
}

.step-heading {
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.step-heading p {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.step-heading h2 {
  margin: 0;
  color: var(--navy-deep);
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 400;
  line-height: 1.15;
}

.form-step h3,
.submit-note h3 {
  margin: 26px 0 16px;
  color: var(--navy);
  font-size: 18px;
}

.step-note,
.submit-note p {
  color: var(--muted);
  font-size: 15px;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.upload-box {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 122px;
  margin: 0;
  padding: 20px;
  border: 1px dashed #b8d2dd;
  border-radius: 8px;
  background: #f8fcfd;
  cursor: pointer;
}

.upload-box:hover {
  border-color: var(--teal);
  background: #f3fafb;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--teal);
  border-radius: 999px;
  background: #ffffff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.upload-box:hover .upload-button,
.upload-box:focus-within .upload-button {
  background: var(--teal);
  color: #ffffff;
}

.upload-meta {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.upload-filename {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.upload-box.has-file {
  border-color: rgba(91, 143, 50, 0.62);
  background: rgba(244, 249, 241, 0.78);
}

.upload-box.has-file .upload-meta {
  color: var(--green);
  font-weight: 900;
}

.submit-note {
  padding: 22px;
  background: var(--sky);
  border: 1px solid var(--sky-strong);
  border-radius: 8px;
}

.submit-note h3 {
  margin-top: 0;
}

.check-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 22px;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--navy);
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 42px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  text-align: center;
}

.site-footer img {
  width: min(440px, 88vw);
  height: auto;
  object-fit: contain;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 900px) {
  .site-header {
    min-height: auto;
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand {
    min-width: 0;
    flex: 1 1 100%;
    justify-content: center;
  }

  .brand img {
    width: min(300px, 86vw);
    height: auto;
    object-position: center;
    margin: 0 auto;
  }

  .site-nav {
    justify-content: center;
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .header-cta {
    display: none;
  }

  .hero,
  .about-grid,
  .application-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .mission-strip,
  .upload-grid {
    grid-template-columns: 1fr;
  }

  .apply-call,
  .application-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .progress-rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .section-band,
  .mission-strip,
  .application-shell {
    width: min(100% - 24px, 1160px);
  }

  .form-grid.two {
    grid-template-columns: 1fr;
  }

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

  .hero h1,
  .application-hero h1 {
    font-size: 40px;
  }

  .hero-actions,
  .form-actions,
  .step-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .progress-rail {
    grid-template-columns: 1fr;
  }
}
