:root {
  color-scheme: dark;
  --bg: #0b1b32;
  --surface: #0d1e4c;
  --text: #fff;
  --muted: #b7c1ce;
  --line: rgba(131, 166, 206, .52);
  --accent: #c48cb3;
  --error: #ffaaa2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh;
  background: radial-gradient(ellipse 55% 28rem at 88% 0%, rgba(196, 140, 179, .09), transparent 75%),
              linear-gradient(180deg, #0d1e4c 0%, var(--bg) 36rem, var(--bg) 100%);
  color: var(--text); font-family: Arial, Helvetica, sans-serif; line-height: 1.5;
}
body.modal-open { overflow: hidden; }
a { color: inherit; }
button, input, textarea { font: inherit; }
.page { max-width: 1040px; margin: 0 auto; padding: 96px 32px 116px; }
.intro { margin: 0 auto 76px; text-align: center; }
h1 { margin: 0; font-size: clamp(34px, 4.5vw, 54px); line-height: 1.2; font-weight: 400; letter-spacing: -.035em; text-wrap: balance; }
.title-person { white-space: nowrap; }
.application-form { width: 100%; margin: auto; }
.form-section { margin-bottom: 60px; }
h2 { margin: 0; font-size: clamp(25px, 3vw, 32px); line-height: 1.2; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; }
.field { min-width: 0; }
.field label, .question legend { display: block; margin-bottom: 11px; color: var(--text); font-size: 18px; font-weight: 500; }
.field label > span, .question legend .required { color: var(--accent); }
.field label .optional { color: var(--muted); font-size: 13px; font-weight: 400; }
.field input, .field textarea {
  display: block; width: 100%; padding: 13px 0 15px; border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; outline: none; color: var(--text); background: transparent; transition: border-color .15s;
}
.field input:focus, .field textarea:focus { border-bottom-color: #e5c9d7; box-shadow: 0 1px 0 #e5c9d7; }
.field textarea { min-height: 124px; resize: vertical; }
.field-long { margin: 5px 0 49px; }
.question { min-width: 0; margin: 0 0 48px; padding: 0; border: 0; }
.question legend { width: 100%; margin: 0 0 20px; padding: 0; }
.options { display: grid; gap: 13px; }
.option { display: flex; align-items: flex-start; gap: 15px; width: fit-content; max-width: 100%; color: #d8dfe8; font-size: 17px; cursor: pointer; }
.option input {
  appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0;
  border: 2px solid #8396ad; border-radius: 50%; background: transparent; cursor: pointer;
}
.option input:checked { border: 6px solid var(--accent); background: #fff; }
.option input:focus-visible { outline: 2px solid white; outline-offset: 4px; }
.option:hover span { color: white; }
.options-long .option { max-width: 760px; }
.consents { display: grid; gap: 24px; margin: 8px 0 38px; }
.consent { display: flex; align-items: flex-start; gap: 14px; color: #d8dfe8; font-size: 15px; cursor: pointer; }
.consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.consent a { color: var(--accent); text-underline-offset: 3px; }
.consent-error { margin-top: -19px; font-size: 13px; font-style: italic; }
.consent-error[hidden] { display: none; }
.submit-button, .telegram-button {
  display: flex; align-items: center; justify-content: center; gap: 26px; width: 100%; min-height: 74px;
  padding: 18px 28px; border: 1px solid #f6f3ef; background: #f6f3ef; color: #101010;
  font-size: 18px; font-weight: 800; letter-spacing: .08em; text-align: center; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: background .18s, color .18s, transform .18s;
}
.submit-button {
  position: relative; isolation: isolate; overflow: hidden; border: 0; border-radius: 18px;
  background: linear-gradient(135deg, #b462e6 0%, #8a34c3 48%, #682196 100%); color: #fff;
  box-shadow: 0 16px 32px rgba(30, 7, 54, .38);
  text-shadow: 0 1px 2px rgba(45, 9, 70, .35);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.submit-button::before {
  content: ""; position: absolute; z-index: 0; top: -90%; left: 0; width: 50%; height: 280%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12) 22%, rgba(255, 255, 255, .58) 50%, rgba(255, 255, 255, .12) 78%, transparent);
  pointer-events: none; transform: translate3d(-180%, -20%, 0) rotate(-25deg);
  animation: submit-shine 3.6s ease-in-out infinite;
}
.submit-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(30, 7, 54, .46);
}
.submit-button:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 8px 18px rgba(30, 7, 54, .32);
}
.submit-button:focus-visible { outline: 2px solid #c48cb3; outline-offset: 4px; }
.submit-button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.submit-button:disabled::before { animation: none; }
.submit-button__label, .submit-button__arrow { position: relative; z-index: 1; }
.submit-button__arrow { margin-left: auto; font-size: 25px; font-weight: 400; }
@keyframes submit-shine {
  0%, 12% { transform: translate3d(-180%, -20%, 0) rotate(-25deg); }
  58%, 100% { transform: translate3d(300%, 20%, 0) rotate(-25deg); }
}
@media (prefers-reduced-motion: reduce) {
  .submit-button::before { animation: none; }
  .submit-button { transition: none; }
}
.error { display: block; margin-top: 9px; color: var(--error); font-size: 14px; }
.form-alert { margin-bottom: 28px; padding: 16px 18px; border: 1px solid var(--error); color: var(--error); }
.form-alert ul { margin: 0; padding-left: 20px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.footer { border-top: 1px solid rgba(131, 166, 206, .2); background: #09172a; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 35px; max-width: 1120px; margin: auto; padding: 55px 32px 70px; }
.footer-inner > div { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; color: #aeb9c8; font-size: 14px; }
.footer-inner strong { margin-bottom: 7px; color: white; font-size: 19px; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: white; text-decoration: underline; }
.footer-links span { color: #8b99aa; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 22px; overflow-y: auto; background: rgba(0, 0, 0, .83); }
.success-modal { position: relative; width: min(100%, 720px); max-height: calc(100vh - 44px); overflow-y: auto; padding: 42px 65px 50px; border-radius: 18px; background: #fff; color: #111; text-align: center; box-shadow: 0 24px 90px rgba(0,0,0,.35); }
.success-modal:focus { outline: none; }
.modal-close { position: absolute; top: 15px; right: 20px; width: 42px; height: 42px; padding: 0; border: 0; background: transparent; color: #999; font-size: 39px; line-height: 1; cursor: pointer; }
.modal-close:hover { color: #111; }
.success-mark { display: grid; place-items: center; width: 77px; height: 77px; margin: 0 auto 24px; border-radius: 25px; background: #5ebf59; color: #fff; font-size: 57px; font-weight: 700; transform: rotate(-7deg); }
.success-mark::first-letter { transform: rotate(7deg); }
.success-modal h2 { margin: 0 0 18px; font-size: clamp(30px, 4.2vw, 43px); line-height: 1.08; text-transform: uppercase; }
.success-modal > p { margin: 0 auto 28px; max-width: 520px; font-size: 18px; line-height: 1.5; }
.telegram-button { max-width: 540px; margin: 0 auto 28px; }
.success-modal .contact-note { margin-bottom: 17px; }
.contact-screenshot { display: block; width: min(100%, 350px); height: auto; margin: 0 auto; border-radius: 9px; }

@media (max-width: 700px) {
  .page { padding: 62px 21px 76px; }
  .intro { margin-bottom: 56px; text-align: center; }
  h1 { font-size: clamp(22px, 7vw, 43px); }
  .title-person { display: block; }
  .form-section { margin-bottom: 48px; }
  .contact-grid { gap: 28px; }
  .question { margin-bottom: 42px; }
  .field label, .question legend { font-size: 17px; }
  .option { font-size: 16px; }
  .submit-button { min-height: 68px; font-size: 16px; }
  .footer-inner { grid-template-columns: 1fr; padding: 43px 21px 54px; gap: 32px; }
  .success-modal { padding: 36px 20px 30px; }
  .success-mark { width: 62px; height: 62px; margin-bottom: 18px; font-size: 46px; border-radius: 18px; }
  .success-modal h2 { font-size: 30px; }
  .success-modal > p { font-size: 16px; }
  .modal-close { top: 9px; right: 12px; }
}
