/* ============================================================
   careers.css — Careers / Apply page
   Reuses base.css tokens, cursor, buttons, .display, .eyebrow
   ============================================================ */

:root { --error: #FF6B6B; --form-maxw: 840px; }

.careers-body { background: var(--bg); }

/* ---- slim sticky header ---- */
.chead {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--shell);
  border-bottom: 1px solid transparent;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.chead.scrolled {
  padding: 11px var(--shell);
  background: rgba(10,10,10,0.72); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
}
.chead__logo img { height: 34px; width: auto; transition: height 0.4s var(--ease); }
.chead.scrolled .chead__logo img { height: 30px; }
.chead__back {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 500; color: var(--text);
  transition: color 0.3s var(--ease);
}
.chead__back .ar { transition: transform 0.3s var(--ease); }
.chead__back:hover { color: var(--lime); }
.chead__back:hover .ar { transform: translateX(-4px); }

/* ---- page shell ---- */
.cpage { max-width: var(--form-maxw); margin: 0 auto; padding: 0 var(--shell); position: relative; z-index: 2; }

/* ---- hero ---- */
.chero { position: relative; text-align: center; padding: clamp(104px, 13vh, 148px) 0 clamp(32px, 4vw, 52px); }
.chero__glow {
  position: absolute; top: 8%; left: 50%; transform: translateX(-50%);
  width: min(760px, 96vw); height: 460px; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(196,255,61,0.16), transparent 64%);
  filter: blur(46px);
}
.chero > *:not(.chero__glow) { position: relative; z-index: 1; }
.chero .eyebrow { justify-content: center; margin-bottom: 24px; }
.chero h1 { font-size: clamp(40px, 7vw, 86px); margin: 0 auto; max-width: 14ch; }
.chero__sub { margin: clamp(20px, 3vw, 30px) auto 0; max-width: 52ch; color: #d4d4d0; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.55; }

/* ---- form card ---- */
.cform-card {
  background: var(--panel); border: 1px solid var(--hairline); border-radius: 22px;
  padding: clamp(26px, 4vw, 52px); margin-bottom: clamp(60px, 9vw, 110px);
  box-shadow: 0 40px 90px rgba(0,0,0,0.45);
  opacity: 0; transform: translateY(34px);
  animation: cardIn 0.9s var(--ease) 0.15s forwards;
}
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }

/* ---- group ---- */
.fgroup { margin-bottom: clamp(34px, 4vw, 48px); }
.fgroup:last-of-type { margin-bottom: 0; }
.fgroup__head {
  display: flex; align-items: center; gap: 18px; margin-bottom: 26px;
}
.fgroup__title {
  font-family: "Archivo", sans-serif; font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.04em; font-size: 14px; color: var(--lime); white-space: nowrap;
}
.fgroup__rule { flex: 1; height: 1px; background: var(--hairline); }

/* ---- grid of fields ---- */
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field--full { grid-column: 1 / -1; }

/* ---- field ---- */
.field { display: flex; flex-direction: column; gap: 9px; }
.field label {
  font-size: 13px; font-weight: 500; letter-spacing: 0.02em; color: #cfcfcd;
  display: inline-flex; align-items: center; gap: 5px;
}
.field label .req { color: var(--lime); font-weight: 700; }

.field input, .field select, .field textarea {
  width: 100%; font-family: "Inter", sans-serif; font-size: 15px; color: var(--text);
  background: #0E0E10; border: 1px solid var(--hairline); border-radius: 12px;
  padding: 14px 15px; outline: none;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder, .field textarea::placeholder { color: #6f6f6d; }
.field textarea { resize: vertical; min-height: 104px; line-height: 1.5; }

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--lime); box-shadow: 0 0 0 3px rgba(196,255,61,0.30); background: #101210;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--hairline-strong); }

/* select chevron */
.field--select { position: relative; }
.field--select::after {
  content: ""; position: absolute; right: 16px; bottom: 19px; width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); pointer-events: none; transition: border-color 0.3s var(--ease);
}
.field--select:focus-within::after { border-color: var(--lime); }
.field select option { background: #111113; color: var(--text); }

/* date input icon tint */
.field input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.7); cursor: pointer; }
.field input[type="date"] { color-scheme: dark; }

.field__hint { font-size: 12px; color: var(--muted); line-height: 1.45; }
.field__err {
  font-size: 12px; color: var(--error); line-height: 1.4;
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.3s var(--ease), opacity 0.3s var(--ease);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.field.invalid input:focus, .field.invalid select:focus, .field.invalid textarea:focus { box-shadow: 0 0 0 3px rgba(255,107,107,0.25); }
.field.invalid .field__err { max-height: 40px; opacity: 1; margin-top: -1px; }

/* ---- segmented pill toggle ---- */
.segmented {
  display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px;
  background: #0E0E10; border: 1px solid var(--hairline); border-radius: 100px; width: fit-content;
}
.segmented button {
  font-family: "Inter", sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  color: #cfcfcd; background: transparent; border: none; border-radius: 100px;
  padding: 10px 18px; cursor: pointer; white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--lime); color: #0A0A0A; }

/* ---- submit + footer ---- */
.fsubmit-wrap { margin-top: clamp(32px, 4vw, 44px); }
.btn-submit {
  width: 100%; justify-content: center; font-size: 16px; min-height: 60px; cursor: pointer;
}
.btn-submit[disabled] { cursor: wait; opacity: 0.9; }
.btn-submit .spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(10,10,10,0.35); border-top-color: #0A0A0A;
  animation: cspin 0.7s linear infinite; display: none;
}
.btn-submit.loading .spinner { display: inline-block; }
.btn-submit.loading .btn-submit__label { opacity: 0.7; }
@keyframes cspin { to { transform: rotate(360deg); } }

.fnote { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

.ferror-banner {
  display: none; align-items: flex-start; gap: 12px; margin-top: 18px;
  background: rgba(255,107,107,0.08); border: 1px solid rgba(255,107,107,0.4);
  border-radius: 12px; padding: 15px 18px; color: #ffd2d2; font-size: 14px; line-height: 1.5;
}
.ferror-banner.show { display: flex; }
.ferror-banner svg { flex: none; color: var(--error); margin-top: 1px; }
.ferror-banner a { color: var(--lime); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   SUCCESS STATE
   ============================================================ */
.success { text-align: center; padding: clamp(30px, 5vw, 56px) 0; display: none; }
.success.show { display: block; }
.success__check {
  width: 110px; height: 110px; border-radius: 50%; background: var(--lime);
  display: flex; align-items: center; justify-content: center; margin: 0 auto clamp(28px, 4vw, 40px);
  transform: scale(0); box-shadow: 0 0 60px rgba(196,255,61,0.45);
}
.success.show .success__check { animation: checkPop 0.6s var(--ease) forwards; }
@keyframes checkPop { 0% { transform: scale(0); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.success__check svg { width: 54px; height: 54px; color: #0A0A0A; }
.success__check svg path { stroke-dasharray: 40; stroke-dashoffset: 40; }
.success.show .success__check svg path { animation: checkDraw 0.5s var(--ease) 0.35s forwards; }
@keyframes checkDraw { to { stroke-dashoffset: 0; } }
.success h1 { font-size: clamp(36px, 6vw, 68px); margin-bottom: 22px; }
.success p { max-width: 50ch; margin: 0 auto 34px; color: #d4d4d0; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.6; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 680px) {
  .fgrid { grid-template-columns: 1fr; }
  .chead__back span.txt { display: none; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; text-align: center; padding: 11px 10px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cform-card { opacity: 1 !important; transform: none !important; animation: none !important; }
  .success__check { transform: scale(1) !important; animation: none !important; }
  .success__check svg path { stroke-dashoffset: 0 !important; animation: none !important; }
  .btn-submit .spinner { animation-duration: 1.4s; }
}
