
:root {
  --navy: #101a2c;
  --navy-light: #1d3349;
  --gold: #ffc66b;
  --teal: #78d9ce;
  --paper: #f4f7fb;
  --text: #19283b;
  --muted: #718096;
  --border: #e0e7ef;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

.navbar-custom {
  min-height: 78px;
  padding: 15px clamp(18px, 6vw, 85px);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  border-bottom: 1px solid #304054;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: white;
  text-decoration: none;
  font: 800 16px Manrope, sans-serif;
  letter-spacing: 1px;
}

.brand b { color: var(--gold); }

.brand small {
  display: block;
  font: 600 8px "DM Sans", sans-serif;
  letter-spacing: 2px;
  color: #9fb0c3;
  margin-top: 4px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--gold);
  border: 1px solid #a9854c;
  font-size: 21px;
}

.nav-apply {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.nav-apply i { margin-left: 7px; }

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 45px;
  align-items: center;
  padding: 70px clamp(20px, 7vw, 100px);
  min-height: 540px;
  color: white;
  background:
    radial-gradient(circle at 78% 45%, #29475d 0, transparent 35%),
    linear-gradient(120deg, #101a2c, #192b41 70%, #101a2c);
}

.hero::after {
  content: "";
  position: absolute;
  right: -100px;
  top: -100px;
  width: 300px;
  height: 650px;
  border: 1px solid #78d9ce24;
  transform: rotate(35deg);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #bdcedd;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

.eyebrow i {
  color: var(--teal);
  font-size: 8px;
  animation: pulse 1.8s infinite;
}

.hero h1 {
  font: 800 clamp(42px, 5.4vw, 70px)/1.08 Manrope, sans-serif;
  letter-spacing: -3px;
  margin: 23px 0 18px;
}

.hero h1 span { color: var(--gold); }

.hero-content p {
  max-width: 530px;
  color: #bac7d6;
  font-size: 14px;
  line-height: 1.9;
  margin-bottom: 28px;
}

.main-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  padding: 15px 22px;
  color: var(--navy);
  background: var(--gold);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s, background .25s;
}

.main-btn:hover {
  color: var(--navy);
  background: #ffda9b;
  transform: translateY(-3px);
  box-shadow: 0 12px 25px #ffc66b2a;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 28px;
  font-size: 12px;
  color: #d9e2eb;
}

.hero-features i {
  color: var(--teal);
  margin-right: 5px;
}

.blueprint {
  position: relative;
  min-height: 390px;
  display: grid;
  place-items: center;
  border: 1px solid #78d9ce50;
  background:
    linear-gradient(#78d9ce0d 1px, transparent 1px),
    linear-gradient(90deg, #78d9ce0d 1px, transparent 1px);
  background-size: 28px 28px;
}

.blueprint-label, .blueprint-footer {
  position: absolute;
  left: 15px;
  right: 15px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #a9c5d5;
  font: 700 9px monospace;
  letter-spacing: 1px;
}

.blueprint-label { top: 16px; }
.blueprint-footer { bottom: 16px; align-items: center; }

.building-svg { width: 100%; max-width: 420px; }

.drawing {
  stroke-dasharray: 650;
  stroke-dashoffset: 650;
  animation: drawBuilding 5s ease-in-out infinite alternate;
}

.measure { animation: moveDash 12s linear infinite; }

.node {
  fill: var(--gold);
  filter: drop-shadow(0 0 6px var(--gold));
  animation: pulse 2s infinite;
}

.pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 5px #78d9ce20;
  animation: pulse 2s infinite;
}

.application-container {
  max-width: 1000px;
  padding-top: 65px;
  padding-bottom: 75px;
}

.form-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}

.eyebrow.dark { color: #718096; }

.form-heading h2 {
  margin: 12px 0 8px;
  font: 800 clamp(28px, 4vw, 42px)/1.2 Manrope, sans-serif;
  letter-spacing: -1.5px;
}

.form-heading h2 span { color: #b78032; }

.form-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.form-heading p b { color: #c23e46; }

.privacy-tag {
  white-space: nowrap;
  padding: 10px 12px;
  background: #e6f5ef;
  color: #247b62;
  font-size: 11px;
  font-weight: 700;
}

.progress-box {
  padding: 21px 23px;
  margin-bottom: 22px;
  background: var(--navy);
  color: white;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #bdcbd9;
}

.progress-text strong {
  color: var(--gold);
  font: 800 16px Manrope, sans-serif;
}

.progress-track {
  height: 5px;
  margin: 13px 0 17px;
  background: #34445a;
}

#progressBar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width .35s ease;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #bdcbd9;
  font-size: 10px;
}

.progress-labels i {
  color: var(--teal);
  margin-right: 5px;
}

.form-card {
  background: white;
  border: 1px solid var(--border);
  padding: clamp(20px, 3.5vw, 34px);
  margin-bottom: 18px;
  box-shadow: 0 8px 28px #14263c08;
  animation: riseIn .55s both;
}

.form-card:nth-of-type(2) { animation-delay: .08s; }
.form-card:nth-of-type(3) { animation-delay: .15s; }

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid #edf1f5;
}

.section-icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: #e9f6f3;
  color: #287f74;
  font-size: 22px;
}

.section-heading small, .submit-panel small {
  color: #a27b3f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.section-heading h3, .submit-panel h3 {
  margin: 4px 0;
  font: 800 19px Manrope, sans-serif;
}

.section-heading p, .submit-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.field { min-width: 0; }

.field label {
  display: block;
  margin-bottom: 8px;
  color: #354459;
  font-size: 12px;
  font-weight: 700;
}

.field label b, .consent b { color: #c23e46; }

.form-control, .form-select {
  min-height: 46px;
  border-color: #dce4ed;
  border-radius: 2px;
  background-color: #fbfcfe;
  font-size: 13px;
}

textarea.form-control { min-height: 86px; }

.form-control:focus, .form-select:focus {
  border-color: #4da69e;
  box-shadow: 0 0 0 3px #78d9ce25;
}

.input-suffix { display: flex; }

.input-suffix .form-control { border-radius: 2px 0 0 2px; }

.input-suffix span {
  min-width: 42px;
  display: grid;
  place-items: center;
  background: #edf1f5;
  border: 1px solid #dce4ed;
  border-left: 0;
  font-size: 13px;
  font-weight: 700;
}

.upload-box {
  min-height: 220px;
  padding: 28px 18px;
  border: 2px dashed #b7c9d6;
  background: #f7fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-align: center;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.upload-box:hover, .upload-box.drag-over {
  border-color: #31978c;
  background: #edf9f6;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e1f3ef;
  color: #287e74;
  font-size: 25px;
}

.upload-box strong {
  font: 800 16px Manrope, sans-serif;
}

.upload-box span:not(.upload-icon) {
  color: #728196;
  font-size: 12px;
}

.upload-box small { color: #b04b51; font-size: 11px; }
.upload-box #fileName { color: #218167; font-size: 12px; overflow-wrap: anywhere; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 17px;
  background: #f8fafc;
  border: 1px solid #e2eaf1;
  color: #596a7f;
  font-size: 12px;
  line-height: 1.8;
  cursor: pointer;
}

.consent input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: #287f74;
}

.submit-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 27px;
  margin-top: 22px;
  background: linear-gradient(110deg, var(--navy), var(--navy-light));
  color: white;
}

.submit-panel h3 { margin-top: 7px; }
.submit-panel p { color: #bdcbd9; }

.submit-panel .main-btn { min-width: 205px; }

#submitBtn:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}

.form-status {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
}

.form-status.visible { display: block; }
.form-status.error { background: #fff0f0; color: #a62c35; border: 1px solid #f0c9cd; }
.form-status.info { background: #eaf7f4; color: #236f66; border: 1px solid #cdebe6; }

.success-panel {
  padding: 55px 22px;
  text-align: center;
  background: white;
  border: 1px solid #cce9df;
  box-shadow: 0 20px 55px #10233a12;
  animation: riseIn .5s both;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0 auto 23px;
  border-radius: 50%;
  color: #16845e;
  background: #e5f8ef;
  font-size: 38px;
  animation: successPop .65s both;
}

.success-panel small {
  color: #247b62;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.success-panel h2 {
  margin: 15px 0;
  font: 800 clamp(25px, 4vw, 39px) Manrope, sans-serif;
}

.success-panel p { color: #68798b; font-size: 14px; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 26px clamp(18px, 6vw, 85px);
  background: #0d1727;
  color: #aab8c7;
  font-size: 11px;
}

.footer p { margin: 0; }
.footer > span { font-size: 10px; }

@keyframes drawBuilding {
  from { stroke-dashoffset: 650; opacity: .45; }
  to { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes moveDash { to { stroke-dashoffset: -250; } }

@keyframes pulse {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes successPop {
  from { transform: scale(.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .blueprint { min-height: 310px; }
  .form-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .navbar-custom { min-height: 68px; padding: 12px 16px; }
  .brand { font-size: 13px; }
  .brand-icon { width: 36px; height: 36px; }
  .brand small { font-size: 7px; }
  .nav-apply { font-size: 11px; }
  .hero { padding: 43px 20px 32px; gap: 28px; }
  .hero h1 { font-size: 43px; letter-spacing: -2px; }
  .hero-content p { font-size: 13px; }
  .hero-features { gap: 12px; font-size: 11px; }
  .blueprint { min-height: 270px; }
  .application-container { padding-top: 40px; padding-bottom: 45px; }
  .progress-box { padding: 17px 14px; }
  .progress-labels span { font-size: 0; }
  .progress-labels i { font-size: 16px; }
  .form-card { padding: 20px 15px; }
  .section-heading { gap: 10px; }
  .section-icon { flex-basis: 39px; width: 39px; height: 39px; font-size: 19px; }
  .section-heading h3 { font-size: 16px; }
  .section-heading p { font-size: 10px; }
  .submit-panel { flex-direction: column; align-items: stretch; padding: 23px 18px; }
  .submit-panel .main-btn { width: 100%; }
  .footer { padding: 23px 18px; }
  .footer > span { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
