:root {
  --ink: #161616;
  --muted: #5f6569;
  --line: #d8e2e5;
  --paper: #ffffff;
  --soft: #f4f8f8;
  --brand: #92c6ce;
  --brand-dark: #476f76;
  --brand-ink: #101820;
  --blue: #16627a;
  --teal: #547f74;
  --coral: #b85b48;
  --focus: #167694;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Roboto, Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

.application-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.form-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 180px;
  margin-bottom: 18px;
  padding: 28px;
  color: #fff;
  background: var(--brand-ink);
  border-top: 6px solid var(--brand);
  border-radius: 8px;
}

.form-header__content {
  display: grid;
  gap: 10px;
}

.form-logo {
  width: min(210px, 66vw);
  height: auto;
  margin-bottom: 8px;
}

.form-header__contact {
  display: grid;
  gap: 7px;
  min-width: 220px;
  padding: 16px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

.form-header__contact a {
  color: #fff;
  text-decoration: none;
}

.form-header__contact a:hover {
  text-decoration: underline;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.1rem, 5vw, 3.9rem);
  line-height: 1;
}

.form-header p:last-child {
  max-width: 620px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.02rem;
}

.application-form {
  display: grid;
  gap: 16px;
}

.trap-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-section {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.form-section h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.section-note {
  max-width: 820px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.96rem;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bdc8d2;
  border-radius: 6px;
  font: inherit;
  font-weight: 400;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(146, 198, 206, 0.34);
  border-color: var(--focus);
}

.application-form.was-validated input:invalid,
.application-form.was-validated select:invalid,
.application-form.was-validated textarea:invalid,
input.touched:invalid,
select.touched:invalid,
textarea.touched:invalid {
  border-color: var(--coral);
  background: #fff9f7;
}

.field-hint {
  color: #6c7478;
  font-size: 0.8rem;
  font-weight: 500;
}

.wide-field {
  margin-top: 16px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.form-actions p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.form-actions p.success {
  color: var(--teal);
}

.form-actions p.error {
  color: var(--coral);
}

button {
  min-height: 46px;
  padding: 0 20px;
  color: #fff;
  background: var(--brand-dark);
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: #355b61;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 760px) {
  .application-shell {
    width: min(100% - 20px, 1120px);
    padding: 10px 0 32px;
  }

  .form-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    padding: 22px;
  }

  .form-header__contact {
    width: 100%;
  }

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

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
