/* ---------- Hero ---------- */

.apply-hero-actions {
  display: flex;
  justify-content: center;
  margin-top: clamp(20px, 2.2vw, 28px);
}
.apply-hero-actions .btn {
  min-height: 60px;
  padding: 0 28px 0 22px;
  font-size: 19px;
  font-weight: 700;
}

/* ---------- Role ---------- */

.apply-role {
  position: relative;
  z-index: 1;
  margin-top: -88px;
  padding-top: 0;
  padding-bottom: clamp(40px, 5vw, 64px);
}
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}
.role-card {
  padding: 24px 24px 26px;
  background: var(--cloud);
  border: 2px solid var(--navy);
  border-radius: 22px;
  box-shadow: var(--edge-card);
}
.role-card h3 {
  font-size: clamp(20px, 1.8vw, 23px);
  font-weight: 700;
}
.role-card p {
  margin-top: 10px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.role-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.role-list li {
  position: relative;
  padding-left: 30px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.role-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(0.8em - 7px);
  width: 20px;
  height: 14px;
  background: url("../assets/img/cloud-bullet.svg") center / contain no-repeat;
}
.role-note {
  max-width: 44em;
  margin: clamp(24px, 3vw, 32px) auto 0;
  text-align: center;
  color: var(--ink-soft);
}

/* ---------- Application card ---------- */

.apply-section { padding-top: clamp(24px, 3vw, 40px); }
.apply-card {
  max-width: 880px;
  margin-inline: auto;
  padding: clamp(24px, 3.4vw, 44px);
  background: var(--cloud);
  border: 2px solid var(--navy);
  border-radius: 26px;
  box-shadow: var(--edge-card);
}
.apply-card-title {
  margin: 0;
  font-family: "Bricolage Grotesque", var(--font-display);
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -0.025em;
}
.how-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 14px;
}
.how-row li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}
.how-num {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  background: var(--aqua);
  border: 2px solid var(--navy);
  border-radius: 8px;
  box-shadow: 0 2px 0 var(--navy);
  font: 700 13px/1 var(--font-display);
  color: var(--navy);
}

.apply-gate {
  margin-top: 20px;
  padding: 18px 20px;
  background: var(--aqua-soft);
  border: 2px solid var(--navy);
  border-radius: 18px;
}
.apply-gate[hidden],
.no-js .apply-gate { display: none; }
.gate-wait {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--ink-soft);
}
.gate-wait[hidden] { display: none; }
.gate-out {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
}
.gate-text {
  flex: 1 1 320px;
  font-weight: 600;
  color: var(--navy);
}
.gate-text a,
.gate-switch {
  font-weight: 700;
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.gate-btn { flex: none; }
.gate-in {
  display: flex;
  align-items: center;
  gap: 14px;
}
.gate-in[hidden],
.gate-out[hidden] { display: none; }
.gate-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border: 2px solid var(--navy);
  border-radius: 50%;
  object-fit: cover;
}
.gate-who {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.gate-switch { flex: none; }
.gate-note {
  margin-top: 12px;
  font-weight: 600;
  color: #B42318;
}

.apply-closed {
  display: grid;
  justify-items: start;
  gap: 14px;
  margin-top: 20px;
  padding: 18px 20px;
  border: 2px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--ink-soft);
}
.apply-closed[hidden] { display: none; }

/* ---------- Form ---------- */

.apply-form { margin-top: 28px; }
.no-js .apply-form { display: none; }
.form-grid {
  display: grid;
  gap: 26px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.form-grid:disabled .field { opacity: 0.55; }
.field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}
.field label,
.choice legend {
  font: 700 15.5px/1.35 var(--font-display);
  color: var(--navy);
}
.field input:not([type="radio"]),
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 15px;
  background: var(--cloud);
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  font: 500 16px/1.4 var(--font-body);
  color: var(--navy);
  transition: border-color 0.2s ease;
}
.field textarea {
  min-height: 170px;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-mute); }
.field input:not([type="radio"]):hover,
.field textarea:hover { border-color: var(--blue); }
.field input:not([type="radio"]):focus-visible,
.field textarea:focus-visible { border-color: var(--navy); }
.field-hint,
.field-count {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-mute);
}
.field-count.is-short { color: #B42318; }
.field-count.is-ok { color: var(--blue); }
.field-error {
  display: none;
  font-size: 13.5px;
  font-weight: 700;
  color: #B42318;
}
.field.is-invalid .field-error { display: block; }
.field.is-invalid input:not([type="radio"]),
.field.is-invalid textarea { border-color: #B42318; }
.field--trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.choice {
  margin: 0;
  padding: 0;
  border: 0;
}
.choice legend {
  margin-bottom: 9px;
  padding: 0;
}
.choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.choice--stack .choice-list {
  flex-direction: column;
  align-items: stretch;
}
.choice .choice-opt {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 50px;
  padding: 11px 18px 11px 14px;
  background: var(--cloud);
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  font: 600 15.5px/1.35 var(--font-body);
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.choice .choice-opt:hover { border-color: var(--blue); }
.choice .choice-opt:has(input:checked) {
  background: var(--aqua-soft);
  border-color: var(--navy);
}
.choice .choice-opt:has(input:focus-visible) {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.field.is-invalid .choice-opt { border-color: #B42318; }
.choice-opt input {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0;
  background: var(--cloud);
  border: 2px solid var(--navy);
  border-radius: 50%;
  appearance: none;
  cursor: pointer;
}
.choice-opt input:focus-visible { outline: none; }
.choice-opt input::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--navy);
  transform: scale(0);
  transition: transform 0.15s ease;
}
.choice-opt input:checked::before { transform: scale(1); }
.choice-other { margin-top: 10px; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 4px;
}
.apply-submit {
  min-height: 58px;
  padding: 0 28px 0 22px;
  font-size: 18px;
  font-weight: 700;
}
.apply-submit.is-busy {
  pointer-events: none;
  opacity: 0.7;
}
.form-status {
  flex: 1 1 260px;
  font-weight: 600;
  color: var(--ink-soft);
}
.form-status.is-bad { color: #B42318; }
.form-status a {
  color: var(--blue);
  text-decoration: underline;
}

.apply-done {
  margin-top: 24px;
  padding: 26px 24px 28px;
  text-align: center;
  background: var(--aqua-soft);
  border: 2px solid var(--navy);
  border-radius: 20px;
}
.apply-done:focus { outline: none; }
.done-cloud {
  width: 96px;
  height: auto;
  margin: 0 auto 10px;
}
.apply-done h3 {
  font-family: "Bricolage Grotesque", var(--font-display);
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.apply-done p {
  max-width: 34.85em;
  margin: 10px auto 0;
  color: var(--ink-soft);
}

/* ---------- Responsive ---------- */

@media (max-width: 979px) {
  .role-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 759px) {
  .apply-role { margin-top: -44px; }
  .role-card { padding: 20px 18px 22px; }
  .how-row {
    flex-direction: column;
    gap: 8px;
  }
  .choice-list {
    flex-direction: column;
    align-items: stretch;
  }
  .gate-in {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 2px;
  }
  .gate-wait { min-height: calc(2lh + 2px); }
  .gate-avatar { grid-row: 1 / span 2; }
  .gate-who { grid-column: 2; align-self: end; }
  .gate-switch { grid-column: 2; justify-self: start; align-self: start; }
  .gate-btn,
  .apply-submit { width: 100%; }
  .apply-hero-actions .btn { width: 100%; }
}
