/* School application form (school-application.html). Builds on styles.css tokens. */
.header.solid { position: relative; background: var(--brand-950); }
.apply-page { background: var(--brand-50); }
.apply { padding: clamp(32px, 6vw, 64px) 0 clamp(48px, 8vw, 96px); max-width: 860px; }
.apply-intro { margin-bottom: 28px; }
.apply-intro h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); color: var(--brand-900); letter-spacing: -.02em; line-height: 1.15; margin: 16px 0 12px; }

.card {
  background: #fff; border: 1px solid var(--brand-100); border-radius: 22px;
  padding: clamp(18px, 3.5vw, 32px); margin: 0 0 20px; min-width: 0;
  box-shadow: 0 10px 30px rgba(17, 52, 77, .06);
}
.card legend {
  float: left; width: 100%; padding: 0; margin: 0 0 16px;
  font-size: 1.2rem; font-weight: 800; color: var(--brand-900); letter-spacing: -.01em;
}
.card legend + * { clear: both; }
.hint { color: var(--ink-500); font-size: .92rem; margin: -6px 0 14px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span2 { grid-column: 1 / -1; }
.card .field { margin-bottom: 4px; }
.grid .field { margin-bottom: 0; }
.card > .field { margin-bottom: 18px; }
.label, .field > label { display: flex; justify-content: space-between; gap: 8px; }
.count { font-style: normal; font-weight: 600; font-size: .8rem; color: var(--ink-500); }
.count.full { color: #c53030; }

.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field input[type="number"],
.field input[type="time"], .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink-900);
  padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--ink-200); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field select { appearance: auto; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(0, 160, 240, .18); }
.field .invalid, .invalid > .drop { border-color: #d64545 !important; }
.field .other { margin-top: 10px; }
.chips + .other { margin-top: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips label { cursor: pointer; display: inline-flex; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  background: var(--brand-50); border: 1.5px solid var(--brand-100); color: var(--ink-700); transition: all .15s;
}
.chips label:hover span { border-color: var(--sky); }
.chips input:checked + span { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.chips input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }

.photo input[type="file"] { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.drop {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; margin-top: 8px; overflow: hidden;
  border: 2px dashed var(--brand-200); border-radius: 16px; background: var(--brand-50);
  color: var(--brand-600); font-weight: 700; text-align: center; padding: 12px; cursor: pointer;
}
.drop:hover { border-color: var(--sky); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo input:focus-visible + .drop, .photo:focus-within .drop { outline: 3px solid var(--sky); outline-offset: 2px; }
.drop img:not([hidden]) ~ .drop-text { position: absolute; bottom: 8px; left: 8px; right: 8px; padding: 6px 10px; border-radius: 999px; background: rgba(11, 33, 51, .72); color: #fff; font-size: .8rem; }

.consent { display: flex; gap: 12px; align-items: flex-start; margin: 20px 0; cursor: pointer; color: var(--ink-700); }
.consent input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--brand-700); }
.consent.invalid span { color: #c53030; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#turnstile-slot { margin-bottom: 16px; }
#submit-btn[disabled] { opacity: .6; cursor: progress; }
.done { text-align: center; padding: clamp(28px, 6vw, 56px); }
.done h2 { color: var(--brand-900); font-size: 1.8rem; margin-bottom: 12px; }
.done p { color: var(--ink-700); margin-bottom: 14px; }
.done .ref { font-size: .95rem; color: var(--ink-500); }
.done .btn { margin-top: 10px; }

@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
}

.photo.logo { grid-column: 1 / -1; }
.photo.logo .drop { aspect-ratio: 1 / 1; max-width: 200px; background: repeating-conic-gradient(var(--brand-50) 0% 25%, #fff 0% 50%) 0 0 / 16px 16px; }
.photo.logo .drop img { object-fit: contain; }
.photo .hint { margin: 8px 0 0; }
.hint.req { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-700); }
.label { font-weight: 700; font-size: .92rem; color: var(--brand-900); }
