/* Careers page — extends the Operator system (styles.css loads first). */

.careers-hero {
  min-height: auto;
  padding-top: clamp(130px, 18vh, 200px);
  padding-bottom: clamp(16px, 2.5vh, 32px);
}
.careers-title {
  font-family: var(--font-sans);
  font-size: clamp(2.8rem, 7.5vw, 6.5rem);
  font-weight: 350;
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--hero-ink);
  margin-bottom: clamp(20px, 3vh, 32px);
}
.careers-intro {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 56ch;
}

/* ---------------- The application form ---------------- */
.careers-form-wrap { padding-top: 0; padding-bottom: clamp(64px, 10vh, 120px); }
.careers-form {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.6vh, 26px);
  margin-top: clamp(22px, 3.5vh, 38px);
  border-top: 1px solid var(--border);
  padding-top: clamp(26px, 4vh, 40px);
}

.cf-field { display: flex; flex-direction: column; gap: 10px; position: relative; }

/* Clear, readable labels — number + bright text (not faint grey) */
.cf-label {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.cf-num { color: var(--muted); opacity: 0.7; font-variant-numeric: tabular-nums; }
.cf-label-text { color: var(--text); }
.cf-req { color: var(--muted); }
.cf-hint { font-size: 13px; color: var(--muted); margin-top: -2px; }

/* Boxed inputs — obvious where to type, big tap targets on mobile */
.cf-field input[type=text], .cf-field input[type=email], .cf-field input[type=tel],
.cf-field input[type=number], .cf-field input[type=date], .cf-field textarea, .cf-field select {
  width: 100%;
  font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 15px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  resize: vertical;
  -webkit-appearance: none; appearance: none;
}
.cf-field textarea { min-height: 130px; line-height: 1.55; }
.cf-field input::placeholder, .cf-field textarea::placeholder { color: var(--muted); opacity: 0.55; }

.cf-field select {
  cursor: pointer; color: var(--muted);
  background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: calc(100% - 18px) 22px, calc(100% - 13px) 22px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
.cf-field select.has-value { color: var(--text); }
.cf-field select option { background: #16171C; color: #EDEBE6; }

.cf-field input:focus, .cf-field textarea:focus, .cf-field select:focus {
  outline: none;
  border-color: var(--text);
  background: color-mix(in srgb, var(--surface) 55%, var(--bg));
  box-shadow: 0 0 0 3px rgba(237, 235, 230, 0.09);
}
.cf-field input[type=date] { color-scheme: dark; }

/* Choice chips — clear tap targets, fill when selected */
.cf-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.cf-choice {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 12px 18px; cursor: pointer; user-select: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.cf-choice:hover { border-color: var(--text); }
.cf-choice input { position: absolute; opacity: 0; pointer-events: none; }
.cf-mark {
  width: 16px; height: 16px; border: 1.5px solid var(--border-strong); border-radius: 50%;
  display: inline-block; position: relative; flex-shrink: 0; transition: border-color 0.2s ease;
}
.cf-mark-sq { border-radius: 4px; }
.cf-mark::after {
  content: ""; position: absolute; inset: 3px; border-radius: inherit;
  background: var(--text); transform: scale(0); transition: transform 0.2s var(--ease);
}
.cf-choice input:checked ~ .cf-mark { border-color: var(--text); }
.cf-choice input:checked ~ .cf-mark::after { transform: scale(1); }
.cf-choice:has(input:checked) { border-color: var(--text); background: var(--surface); }
.cf-choice input:focus-visible ~ .cf-mark { outline: 2px solid var(--accent); outline-offset: 3px; }

/* File upload — clear dropzone */
.cf-file { display: flex; flex-direction: column; gap: 14px; }
.cf-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cf-file-label {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border: 1px dashed var(--border-strong); border-radius: 12px;
  background: var(--surface);
  padding: 20px; cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.cf-file-label:hover { border-color: var(--text); }
.cf-file-input:focus-visible + .cf-file-label { outline: 2px solid var(--accent); outline-offset: 3px; }
.cf-file-text { font-size: 15px; color: var(--muted); }
.cf-file-btn {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 9px 18px; color: var(--text);
  flex-shrink: 0;
}
.cf-file-preview {
  width: 110px; height: 110px; object-fit: cover; border-radius: 12px;
  border: 1px solid var(--border);
}
.cf-file-preview[hidden] { display: none; }

/* Submit — solid primary button, full-width on mobile */
.cf-actions { display: flex; flex-direction: column; gap: 16px; padding-top: 12px; }
.careers-form .contact-submit {
  background: var(--text); color: var(--bg); border-color: var(--text);
  padding: 16px 32px; font-size: 12px;
  align-self: flex-start;
}
.careers-form .contact-submit:hover { background: var(--muted); border-color: var(--muted); }

.careers-closed { padding: 40px 0 80px; }

/* submitted page */
.submitted-hero { min-height: 72vh; }
.submitted-actions { margin-top: clamp(28px, 4vh, 44px); }
.submitted-meta { margin-top: clamp(32px, 5vh, 56px); opacity: 0.7; }

/* Success mark — a circle + checkmark that draw themselves */
.success-mark {
  width: clamp(64px, 9vw, 84px);
  margin-bottom: clamp(28px, 4vh, 44px);
  opacity: 0;
  transform: scale(0.85);
  animation: sm-in 0.6s var(--ease) 0.1s forwards;
}
.success-mark svg { width: 100%; height: auto; overflow: visible; }
.success-mark circle, .success-mark path {
  fill: none; stroke-linecap: round; stroke-linejoin: round;
}
/* faint full ring sits underneath so the shape reads before it finishes */
.sm-ring { stroke: var(--text); stroke-width: 1.5; opacity: 0.12; }
.sm-circle {
  stroke: var(--text); stroke-width: 1.5;
  stroke-dasharray: 233; stroke-dashoffset: 233;
  transform: rotate(-90deg); transform-origin: 40px 40px;
  animation: sm-draw 0.9s var(--ease) 0.35s forwards;
}
.sm-check {
  stroke: var(--text); stroke-width: 2.4;
  stroke-dasharray: 60; stroke-dashoffset: 60;
  animation: sm-draw 0.45s var(--ease) 1s forwards;
}
@keyframes sm-in { to { opacity: 1; transform: scale(1); } }
@keyframes sm-draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .success-mark { opacity: 1; transform: none; animation: none; }
  .sm-circle, .sm-check { stroke-dashoffset: 0; animation: none; }
}

.careers-footer {
  border-top: 1px solid var(--border);
  padding: 32px var(--gutter);
  margin-top: clamp(60px, 10vh, 120px);
}

/* ---------------- Mobile ---------------- */
@media (max-width: 640px) {
  .careers-form { gap: 20px; }
  .cf-choices { gap: 8px; }
  .cf-choice { width: 100%; }
  .careers-form .contact-submit { align-self: stretch; text-align: center; justify-content: center; }
  .cf-file-label { flex-direction: column; align-items: flex-start; gap: 14px; }
}
