:root {
  --page-bg: #ffffff;
  --surface: #ffffff;
  --text-main: #1f2128;
  --text-muted: #6f7785;
  --border: #dfe3eb;
  --border-focus: #97b9ff;
  --button: #0f8cff;
  --button-hover: #0077eb;
  --success: #1f9d55;
  --error: #d33b32;
  --shadow: 0 24px 60px rgba(22, 32, 62, 0.08);
  --radius-xl: 28px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 140, 255, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  color: var(--text-main);
}

button,
input {
  font: inherit;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.hero {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 460px);
  grid-template-areas: "content card";
  gap: 32px;
  align-items: center;
}

.hero__content {
  grid-area: content;
  padding: 24px 8px 24px 0;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background-color: #eef6ff;
  color: #0c6ad4;
  font-size: 14px;
  font-weight: 700;
}

.hero__content h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero__content p {
  margin: 0;
  max-width: 540px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-muted);
}

.form-card {
  grid-area: card;
  background: var(--surface);
  border: 1px solid rgba(223, 227, 235, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 28px;
}

.form-card__header {
  margin-bottom: 24px;
}

.form-card__header h2 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.1;
}

.form-card__header p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

#application-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field__control {
  position: relative;
}

.field label {
  font-size: 15px;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 56px;
  padding: 0 48px 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: #fff;
  color: var(--text-main);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.field input::placeholder {
  color: #9aa3b2;
}

.field input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(15, 140, 255, 0.12);
}

.field input.is-invalid {
  border-color: rgba(211, 59, 50, 0.5);
  box-shadow: 0 0 0 4px rgba(211, 59, 50, 0.1);
}

.field__clear {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: #eef2f7;
  color: #697386;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.field__clear:hover {
  background: #e3e8ef;
  color: #313846;
}

.field__clear.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.field__hint,
.field__error,
.form-status {
  font-size: 14px;
  line-height: 1.4;
}

.field__hint {
  color: var(--text-muted);
}

.field__error {
  min-height: 20px;
  color: var(--error);
}

.submit-button {
  height: 58px;
  margin-top: 4px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(180deg, #19a0ff 0%, var(--button) 100%);
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  box-shadow: 0 16px 30px rgba(15, 140, 255, 0.24);
}

.submit-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #1698f3 0%, var(--button-hover) 100%);
  box-shadow: 0 20px 36px rgba(15, 140, 255, 0.3);
}

.submit-button:active {
  transform: translateY(0);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.75;
  transform: none;
  box-shadow: 0 10px 20px rgba(15, 140, 255, 0.16);
}

.form-status {
  min-height: 20px;
  margin: 0;
  font-weight: 700;
}

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

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

@media (max-width: 920px) {
  .page {
    padding: 28px 16px;
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "card"
      "content";
    gap: 20px;
  }

  .hero__content {
    padding: 0;
  }

  .hero__content h1 {
    margin-top: 14px;
  }
}

@media (max-width: 560px) {
  .page {
    align-items: flex-start;
    padding: 16px 12px 24px;
  }

  .hero {
    gap: 14px;
  }

  .hero__badge {
    padding: 8px 12px;
    font-size: 13px;
  }

  .hero__content h1 {
    margin: 12px 0 12px;
    font-size: clamp(28px, 8vw, 36px);
    line-height: 1.08;
  }

  .hero__content p {
    font-size: 16px;
    line-height: 1.55;
  }

  .form-card {
    padding: 20px 14px 16px;
    border-radius: 22px;
    box-shadow: 0 18px 36px rgba(22, 32, 62, 0.1);
  }

  .form-card__header h2 {
    font-size: 22px;
  }

  .form-card__header p {
    font-size: 14px;
  }

  .field input,
  .submit-button {
    height: 52px;
  }

  .field label {
    font-size: 14px;
  }

  .field__hint,
  .field__error,
  .form-status {
    font-size: 13px;
  }
}
