:root {
  --green: #36a852;
  --dark: #18752f;
  --ink: #172019;
  --muted: #657067;
  --bg: #f6faf7;
  --line: #dfe7df;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

.wrap {
  width: min(1080px, 92%);
  margin: auto;
}

header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: 900;
  color: var(--green);
  text-decoration: none;
  letter-spacing: -1.5px;
}

.hero {
  padding: 82px 0 68px;
  background: linear-gradient(135deg, #eaf7ed, #fff 65%);
}

.eyebrow {
  color: var(--dark);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(44px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -4px;
  max-width: 850px;
  margin: 16px 0 22px;
}

.hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 19px;
}

.button {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 14px 22px;
  font: 800 16px inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.button:hover {
  background: var(--dark);
}

.button:disabled,
button:disabled {
  opacity: 0.65;
  cursor: not-allowed !important;
}

section {
  padding: 70px 0;
}

.section-title {
  font-size: 34px;
  letter-spacing: -1.2px;
  margin: 0 0 18px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.fact,
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}

.fact strong {
  display: block;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--green);
  margin-bottom: 4px;
}

.fact span {
  font-weight: 700;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card h3 {
  margin: 0 0 7px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.apply {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(24px, 5vw, 48px);
  box-shadow: 0 12px 40px rgba(23, 32, 25, 0.06);
  max-width: 880px;
  margin: auto;
}

.apply h2 {
  font-size: 38px;
  letter-spacing: -1.5px;
  margin: 0 0 6px;
}

.apply > p {
  color: var(--muted);
  margin: 0 0 30px;
}

form {
  display: grid;
  gap: 19px;
}

form h3 {
  margin: 18px 0 0;
  font-size: 20px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfd9d0;
  border-radius: 8px;
  padding: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(54, 168, 82, 0.15);
  border-color: var(--green);
}

input.invalid,
select.invalid,
textarea.invalid {
  border-color: #dc2626 !important;
  background-color: rgba(254, 242, 242, 0.4) !important;
  outline-color: rgba(220, 38, 38, 0.2) !important;
}

.field-error {
  display: none;
  color: #dc2626;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 4px;
  line-height: 1.3;
}

.field-error.show {
  display: block;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px 16px;
}

legend {
  font-weight: 750;
  font-size: 14px;
  padding: 0 4px;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.checks label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}

.checks input {
  width: auto;
}

.small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.required {
  color: var(--dark);
  margin-left: 2px;
  display: inline;
}

.confirm-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.confirm-line input {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
}

.submit-row {
  display: flex;
  justify-content: flex-end;
}

.form-intro {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.form-intro strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}

.submit-notice {
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: #dc2626;
  margin-bottom: 10px;
  display: block;
}

.other-specify-wrap {
  width: 100%;
  flex: 0 0 100%;
  margin-top: 6px;
}

.other-specify-input {
  max-width: 340px;
  padding: 8px 12px;
  font-size: 14px;
}

.submit-row .button {
  width: auto;
  padding: 11px 18px;
  font-size: 14px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}

/* Glassmorphic Alert Modal System */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 18, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  padding: 20px;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  padding: 36px 30px;
  width: min(440px, 100%);
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  transform: scale(0.92) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.modal-icon.success {
  background: rgba(54, 168, 82, 0.15);
  color: #36a852;
}

.modal-icon.error {
  background: rgba(220, 38, 38, 0.15);
  color: #dc2626;
}

.modal-title {
  font-size: 22px;
  font-weight: 850;
  margin: 0 0 10px;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.modal-message {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 26px;
  line-height: 1.55;
  white-space: pre-line;
}

.modal-btn {
  border: 0;
  border-radius: 12px;
  padding: 13px 24px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}

.modal-btn.success {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 14px rgba(54, 168, 82, 0.3);
}

.modal-btn.success:hover {
  background: var(--dark);
}

.modal-btn.error {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.modal-btn.error:hover {
  background: #b91c1c;
}

@media (max-width: 720px) {
  .facts,
  .cards,
  .row {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 60px 0;
  }
  .hero h1 {
    letter-spacing: -2.5px;
  }
  .roles-dropdown {
    left: 50% !important;
    transform: translateX(-50%) !important;
    min-width: 230px !important;
    max-width: calc(100vw - 32px) !important;
  }
}
