.apply-page {
  background: var(--paper);
  color: var(--text);
}

[hidden] { display: none !important; }

.apply-page .site-header {
  background: rgba(13, 15, 12, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.apply-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(64px, 8vw, 116px)) 0 clamp(64px, 8vw, 104px);
  background:
    radial-gradient(900px 600px at 82% 20%, rgba(140, 248, 0, 0.12), transparent 62%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--ink);
  background-size: auto, 96px 96px, 96px 96px, auto;
  color: #fff;
  overflow: hidden;
}

.apply-hero::after {
  content: "";
  position: absolute;
  top: 12%;
  left: -10%;
  width: 130%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(140, 248, 0, 0.35), transparent);
  transform: rotate(-11deg);
  transform-origin: center;
  pointer-events: none;
}

.apply-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(42px, 7vw, 96px);
  align-items: center;
}

.apply-hero h1 {
  max-width: 12ch;
  margin-bottom: 26px;
  font-size: clamp(3rem, 6.6vw, 5.7rem);
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.apply-hero__lead {
  max-width: 58ch;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.75);
  font-size: clamp(16px, 1.35vw, 18.5px);
  line-height: 1.7;
}

.apply-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.82);
}

.apply-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.apply-facts span { color: var(--green); }

.apply-hero__card {
  padding: clamp(26px, 3.2vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.apply-hero__card h2 {
  max-width: 15ch;
  margin-bottom: 24px;
  font-size: clamp(24px, 2.2vw, 31px);
}

.apply-mini-steps {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.apply-mini-steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.apply-mini-steps li > span {
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
}

.apply-mini-steps strong {
  display: block;
  margin-bottom: 3px;
  font-size: 15px;
}

.apply-mini-steps p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  line-height: 1.55;
}

.apply-main {
  padding: clamp(56px, 8vw, 100px) 0 clamp(76px, 9vw, 120px);
}

.apply-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.apply-form-wrap {
  min-width: 0;
}

.apply-form {
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid rgba(13, 15, 12, 0.12);
  background: #fff;
  box-shadow: 0 20px 60px rgba(13, 15, 12, 0.05);
}

.apply-form__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  padding-bottom: 28px;
}

.apply-form__head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
}

.apply-form__note {
  max-width: 26ch;
  margin: 0;
  color: var(--muted-light);
  font-size: 12.5px;
  line-height: 1.55;
}

.form-section {
  margin: 0;
  padding: 30px 0 4px;
  border: 0;
  border-top: 1px solid rgba(13, 15, 12, 0.12);
}

.form-section + .form-section { margin-top: 26px; }

.form-section__legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  padding: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.form-section__legend span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--green-deep);
}

.form-section__intro {
  margin: -8px 0 20px;
  color: var(--muted-light);
  font-size: 13.5px;
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.form-field { min-width: 0; }
.form-field--full { grid-column: 1 / -1; }

.form-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
}

.label-optional {
  color: var(--muted-light);
  font-weight: 400;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 14px;
  border: 1px solid rgba(13, 15, 12, 0.18);
  border-radius: 2px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.35;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field textarea {
  min-height: 170px;
  resize: vertical;
}

.form-field select {
  appearance: none;
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: calc(100% - 19px) 22px, calc(100% - 14px) 22px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--green-deep);
  box-shadow: 0 0 0 3px rgba(140, 248, 0, 0.18);
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: #9aa091; }

.field-hint {
  margin: 6px 0 0;
  color: var(--muted-light);
  font-size: 12px;
  line-height: 1.5;
}

.field-error {
  min-height: 0;
  margin: 5px 0 0;
  color: #a83216;
  font-size: 12px;
  line-height: 1.4;
}

.field-error:empty { display: none; }

.has-error input,
.has-error select,
.has-error textarea { border-color: #b54227; }

.form-error {
  margin: 0 0 24px;
  padding: 14px 16px;
  border-left: 3px solid #b54227;
  background: #fff1ed;
  color: #7d2514;
  font-size: 13.5px;
  line-height: 1.5;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.upload {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 158px;
  padding: 18px;
  border: 1px dashed rgba(13, 15, 12, 0.28);
  background: #fbfcf7;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.upload:hover,
.upload.is-dragover {
  border-color: var(--green-deep);
  background: #f4fbe9;
  transform: translateY(-2px);
}

.upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  border: 1px solid rgba(13, 15, 12, 0.2);
  font-size: 18px;
  line-height: 1;
  color: var(--green-deep);
}

.upload__title {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
}

.upload__hint {
  display: block;
  color: var(--muted-light);
  font-size: 11.5px;
  line-height: 1.45;
}

.upload__file {
  display: block;
  margin-top: auto;
  padding-top: 14px;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.upload.has-file {
  border-style: solid;
  border-color: var(--green-deep);
  background: #f4fbe9;
}

.upload.has-file .upload__file { color: var(--green-deep); }

.form-consent {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid rgba(13, 15, 12, 0.12);
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted-light);
}

.checkbox input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--green-deep);
}

.checkbox a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--green-deep);
  text-underline-offset: 2px;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 28px;
}

.form-actions .btn[disabled] {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.form-actions__note {
  max-width: 38ch;
  margin: 0;
  color: var(--muted-light);
  font-size: 11.5px;
  line-height: 1.5;
}

.apply-aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 16px;
}

.apply-aside__card {
  padding: 26px;
  border: 1px solid rgba(13, 15, 12, 0.12);
  background: #fff;
}

.apply-aside__card h2 {
  margin-bottom: 22px;
  font-size: 25px;
}

.apply-aside__list {
  display: grid;
  gap: 0;
  margin: 0;
}

.apply-aside__list div {
  display: grid;
  gap: 3px;
  padding: 12px 0;
  border-top: 1px solid rgba(13, 15, 12, 0.1);
}

.apply-aside__list dt {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.apply-aside__list dd {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
}

.apply-aside__note {
  padding: 20px;
  border-left: 2px solid var(--green);
  background: #e9ebdf;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted-light);
}

.apply-aside__note strong { color: var(--text); }
.apply-aside__note p { margin: 7px 0 0; }

.apply-success {
  padding: clamp(30px, 4.5vw, 54px);
  border: 1px solid rgba(13, 15, 12, 0.12);
  background: #fff;
}

.apply-success h2 {
  max-width: 18ch;
  margin-bottom: 20px;
  font-size: clamp(30px, 3.7vw, 46px);
}

.apply-success > p {
  max-width: 60ch;
  color: var(--muted-light);
  line-height: 1.7;
}

.apply-success__ref {
  margin-top: 24px;
  padding: 14px 16px;
  border-left: 3px solid var(--green);
  background: #f4fbe9;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text);
}

.apply-success__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.apply-success .btn--ghost {
  border-color: rgba(13, 15, 12, 0.2);
  color: var(--text);
}

.apply-success .btn--ghost:hover {
  border-color: var(--green-deep);
  color: var(--green-deep);
}

@media (max-width: 1020px) {
  .apply-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 30px; }
  .upload-grid { grid-template-columns: 1fr; }
  .upload { min-height: 128px; }
}

@media (max-width: 860px) {
  .apply-hero__grid { grid-template-columns: 1fr; gap: 34px; }
  .apply-hero__card { max-width: 620px; }
  .apply-layout { grid-template-columns: 1fr; }
  .apply-aside { position: static; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .apply-hero { padding-top: calc(var(--header-h) + 48px); }
  .apply-hero h1 { font-size: clamp(2.7rem, 12vw, 4rem); }
  .apply-facts { display: grid; gap: 8px; }
  .apply-form { padding: 22px 18px; }
  .apply-form__head { display: block; }
  .apply-form__note { margin-top: 12px; max-width: none; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .form-field--full { grid-column: auto; }
  .form-actions { align-items: stretch; }
  .form-actions .btn { width: 100%; }
  .form-actions__note { max-width: none; }
  .apply-aside { grid-template-columns: 1fr; }
  .apply-aside__card { padding: 22px 20px; }
  .apply-success { padding: 26px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .upload { transition: none; }
}
