:root {
  --navy: #0D1B3E;
  --navy-2: #142654;
  --navy-3: #1D3572;
  --gold: #D4AF37;
  --gold-2: #C89F2C;
  --gold-3: #B48F1F;
  --ink: #14161B;
  --ink-2: #3A4152;
  --muted: #6B7280;
  --line: #E6E8EE;
  --line-2: #F1F2F6;
  --bg: #FCFCFC;
  --bg-alt: #F7F7F4;
  --white: #FFFFFF;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(13,27,62,.06);
  --shadow: 0 4px 20px rgba(13,27,62,.08);
  --shadow-lg: 0 20px 60px rgba(13,27,62,.12);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--navy);
}
.logo {
  width: 34px;
  height: 34px;
  color: var(--navy);
  flex-shrink: 0;
}
.logo-sm { width: 28px; height: 28px; }
.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.01em;
}
.header-tag {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* HERO */
.hero {
  padding: 88px 0 96px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212,175,55,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 820px;
  position: relative;
}
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-3);
  background: rgba(212,175,55,.1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--navy);
  margin-bottom: 20px;
  font-weight: 700;
}
.lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 620px;
  margin-bottom: 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
  max-width: 720px;
}
.hero-stat {
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.stat-num {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  color: var(--navy);
  letter-spacing: -.01em;
  margin-bottom: 2px;
}
.stat-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.hero-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  font-family: var(--sans);
}
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-gold {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 6px 20px rgba(212,175,55,.35);
}
.btn-gold:hover { background: var(--gold-2); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(212,175,55,.45); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* SECTIONS */
.section {
  padding: 88px 0;
}
.section-alt { background: var(--bg-alt); }
.section-navy { background: var(--navy); color: rgba(255,255,255,.9); }
.section-form { background: var(--bg-alt); }
.section h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--navy);
  margin-bottom: 12px;
  font-weight: 700;
}
.section h2.on-navy { color: var(--white); }
.section h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 17px;
  color: var(--navy);
  margin-bottom: 12px;
  margin-top: 4px;
}
.section-lede {
  color: var(--muted);
  margin-bottom: 40px;
  font-size: 17px;
}

/* TWO-COLUMN */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.two-col p { margin-bottom: 16px; color: var(--ink-2); line-height: 1.7; }

.check-list {
  list-style: none;
  padding: 0;
}
.check-list li {
  padding: 10px 0 10px 28px;
  position: relative;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  line-height: 1.55;
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  width: 16px;
  height: 8px;
  border-left: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg);
}

/* REQUIREMENTS GRID */
.req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
}
.req-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.req-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.req-must { background: rgba(13,27,62,.08); color: var(--navy); }
.req-nice { background: rgba(212,175,55,.15); color: var(--gold-3); }
.req-list {
  list-style: none;
  padding: 0;
}
.req-list li {
  padding: 10px 0;
  color: var(--ink-2);
  line-height: 1.55;
  border-bottom: 1px solid var(--line-2);
}
.req-list li:last-child { border-bottom: none; }

/* OFFER GRID */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.offer-item {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
}
.offer-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
}
.offer-item strong {
  color: var(--white);
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}
.offer-item p {
  font-size: 14px;
  color: rgba(255,255,255,.7);
  line-height: 1.5;
}

/* PROCESS */
.process {
  list-style: none;
  counter-reset: process;
  padding: 0;
  max-width: 780px;
  margin-top: 40px;
}
.process li {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.process li:last-child { border-bottom: none; }
.step-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.process h3 { color: var(--navy); font-size: 18px; margin-bottom: 6px; margin-top: 8px; }
.process p { color: var(--ink-2); line-height: 1.55; }

/* FORM */
.form-container {
  max-width: 780px;
}
.apply-form fieldset {
  border: none;
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  border: 1px solid var(--line);
}
.apply-form legend {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--navy);
  padding: 0 10px;
  margin-left: -10px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin-top: 20px;
}
.apply-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 12px;
}
.apply-form input[type="text"],
.apply-form input[type="email"],
.apply-form input[type="tel"],
.apply-form input[type="url"],
.apply-form input[type="date"],
.apply-form select,
.apply-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  margin-top: 6px;
  font-weight: 400;
  transition: border .15s ease, box-shadow .15s ease;
}
.apply-form input:focus,
.apply-form select:focus,
.apply-form textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(13,27,62,.1);
}
.apply-form textarea { resize: vertical; min-height: 90px; }
.hint {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 6px;
  margin-bottom: 12px;
  line-height: 1.5;
}
small.hint { margin-top: 4px; }
.ref-block {
  padding-top: 20px;
  margin-top: 8px;
  border-top: 1px solid var(--line-2);
}
.ref-block:first-of-type { border-top: none; padding-top: 8px; }
.ref-block strong {
  display: block;
  color: var(--navy);
  font-size: 14px;
  margin-bottom: 8px;
}
.chk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 8px;
}
.chk {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: var(--white);
  transition: all .15s ease;
  margin-top: 0;
}
.chk:hover { border-color: var(--navy-3); background: #FAFAFB; }
.chk input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
  margin: 0;
}
.consent {
  padding: 20px 24px;
  background: rgba(212,175,55,.08);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  border: 1px solid rgba(212,175,55,.25);
}
.consent .chk {
  background: transparent;
  border: none;
  padding: 0;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
}
.consent .chk:hover { background: transparent; }
.consent a { color: var(--navy); text-decoration: underline; }
.form-status {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius);
  font-weight: 500;
  display: none;
}
.form-status.success {
  display: block;
  background: rgba(16,161,105,.1);
  color: #0B7B4B;
  border: 1px solid rgba(16,161,105,.3);
}
.form-status.error {
  display: block;
  background: rgba(200,50,50,.08);
  color: #B02929;
  border: 1px solid rgba(200,50,50,.25);
}

/* FOOTER */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding: 32px 0;
  font-size: 13px;
}
.site-footer .logo { color: var(--gold); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-inner > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  transition: color .15s ease;
}
.footer-links a:hover { color: var(--gold); }

/* MOBILE */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .header-tag { display: none; }
  .hero { padding: 60px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 12px; }
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .req-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .apply-form fieldset { padding: 24px 20px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .process li { gap: 16px; }
  .step-num { width: 36px; height: 36px; font-size: 16px; }
}

/* A field the submit handler has flagged as still needing filling in. Cleared
   the moment it becomes valid — see showWhatIsMissing() in app.js. */
.apply-form .field-error {
  border-color: #B02929;
  box-shadow: 0 0 0 3px rgba(200,50,50,.12);
}

/* The header is sticky and 68px tall, so anything scrolled to the top of the
   viewport lands underneath it — an #apply link as much as a flagged field.
   This keeps both clear of it. */
.apply-form input,
.apply-form select,
.apply-form textarea,
section[id] {
  scroll-margin-top: 84px;
}
