/* ============================================================
   Havoc Games / careers page
   Builds on styles.css (tokens, nav, footer, buttons, reveal).
   ============================================================ */

.nav-links a.is-active { color: var(--text); }
.nav-links a.is-active::after { width: 100%; }

.cv-req { color: var(--orange); }

/* A class that sets display wins against the browser rule for [hidden], so the
   parts the page shows and hides have to say it again. Without this the resume
   box shows its empty and filled states at once, the draft note never goes
   away, and the filled form stays on screen above "Application received".
   .cv-modal has its own copy of this further down. */
.cv-form[hidden],
.cv-count-pill[hidden],
.cv-draft-note[hidden],
.cv-drop-idle[hidden],
.cv-drop-file[hidden] { display: none; }

/* ---------- Hero ---------- */
.cv-hero {
  position: relative;
  min-height: 78vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.cv-hero-media { position: absolute; inset: 0; z-index: -2; }
.cv-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cv-hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 10, 13, 0.9) 0%, rgba(10, 10, 13, 0.6) 55%, rgba(10, 10, 13, 0.7) 100%),
    linear-gradient(180deg, rgba(10, 10, 13, 0.7) 0%, rgba(10, 10, 13, 0.45) 45%, var(--bg) 100%);
}
.cv-hero-shade::after {
  content: ''; position: absolute; left: -10%; bottom: -20%;
  width: 55%; height: 70%;
  background: radial-gradient(closest-side, rgba(255, 90, 31, 0.16), transparent 70%);
}
.cv-hero-inner { padding: calc(var(--nav-h) + 56px) 0 90px; }
.cv-hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.9rem, 8.2vw, 6.6rem);
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: 0.008em;
  max-width: 13ch;
}
.cv-hero h1 .dot { color: var(--gold); }

/* ---------- Section heads ---------- */
.cv-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.cv-head .lead { margin-top: 18px; }
.cv-count-pill {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 7px;
  background: var(--orange); color: var(--ink);
  font-size: 11px; letter-spacing: 0;
  clip-path: var(--cut-sm);
}

/* ---------- Role cards ---------- */
.cv-roles { padding-top: 0; }
.cv-list { display: grid; gap: 14px; }
.cv-card {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  padding: 30px 34px;
  background: var(--bg-2);
  clip-path: var(--cut);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}
.cv-card:hover, .cv-card:focus-visible {
  transform: translateY(-4px);
  background: var(--bg-3);
  box-shadow: inset 0 0 0 1px rgba(255, 90, 31, 0.45);
}
.cv-card h3 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.05;
}
.cv-card p { color: var(--muted); margin-top: 8px; max-width: 64ch; font-size: 15px; }
.cv-card-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--gold); white-space: nowrap; font-size: 15px;
}
.cv-card-cta span { transition: transform 0.25s ease; }
.cv-card:hover .cv-card-cta span { transform: translate(3px, -3px); }

.cv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cv-chips li {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 7px 12px;
  color: var(--text);
  background: var(--bg-3);
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: var(--cut-sm);
}
.cv-chips-lg { margin: 22px 0 0; }
.cv-chips-lg li { font-size: 12.5px; padding: 9px 15px; background: var(--bg-2); }

.cv-skel {
  height: 134px;
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--bg-3) 50%, var(--bg-2) 100%);
  background-size: 200% 100%;
  animation: cv-shimmer 1.4s ease infinite;
  clip-path: var(--cut);
}
@keyframes cv-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.cv-empty {
  padding: 40px 32px; text-align: center;
  background: var(--bg-2);
  clip-path: var(--cut);
  box-shadow: inset 0 0 0 1px var(--line);
}
.cv-empty h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; text-transform: uppercase; margin-bottom: 10px; }
.cv-empty p { color: var(--muted); max-width: 52ch; margin-inline: auto; }
.cv-empty .btn { margin-top: 22px; }

/* ---------- Job hero ---------- */
.cv-job-hero {
  padding: calc(var(--nav-h) + 52px) 0 56px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(50% 120% at 90% 0%, rgba(255, 90, 31, 0.14), transparent 70%),
    var(--bg-2);
}
.cv-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 30px;
  transition: color 0.2s ease;
}
.cv-back:hover { color: var(--text); }
.cv-job-title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1; text-transform: uppercase; letter-spacing: 0.01em;
  max-width: 18ch;
}
.cv-job-summary { margin-top: 22px; max-width: 64ch; font-size: clamp(1rem, 1.3vw, 1.12rem); }
.cv-job-hero .hero-ctas { margin-top: 30px; }

/* ---------- Job body ---------- */
.cv-job-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(40px, 6vw, 80px); align-items: start; }
.jd { max-width: 72ch; }
.jd-section + .jd-section { margin-top: 44px; }
.jd h2 {
  font-family: var(--display); font-weight: 400; font-size: 1.55rem;
  text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.jd h2::before { content: '//'; color: var(--orange); font-family: var(--body); font-weight: 700; font-size: 14px; }
.jd p { color: var(--muted); }
.jd p + p { margin-top: 14px; }
.jd ul { display: grid; gap: 11px; }
.jd li { position: relative; padding-left: 26px; color: rgba(242, 241, 236, 0.86); }
.jd li::before {
  content: '//'; position: absolute; left: 0; top: 1px;
  color: var(--orange); font-weight: 700; font-size: 13px;
}
.jd-note {
  padding: 26px 28px;
  background: var(--bg-2);
  clip-path: var(--cut);
  box-shadow: inset 0 0 0 1px rgba(255, 184, 77, 0.28);
}
.jd-note h2 { font-size: 1.3rem; }

.cv-job-aside { position: sticky; top: calc(var(--nav-h) + 24px); }
.cv-facts {
  background: var(--bg-2);
  padding: 30px 28px;
  clip-path: var(--cut);
  box-shadow: inset 0 0 0 1px var(--line);
}
.cv-facts dl { display: grid; gap: 16px; }
.cv-facts dt { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.cv-facts dd { font-weight: 600; margin-top: 3px; font-size: 15px; }
.cv-facts .btn { width: 100%; margin-top: 26px; }
.cv-facts-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; text-align: center; }

/* ---------- Apply form ---------- */
.cv-apply {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: clamp(72px, 9vw, 120px) 0;
}
.cv-apply-wrap { max-width: 860px; }
.cv-form { display: grid; gap: 44px; margin-top: 8px; }

.cv-hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

.cv-draft-note {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px;
  font-size: 13.5px; color: var(--muted);
  background: var(--bg-3);
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: var(--cut-sm);
}

.cv-fs { border-top: 1px solid var(--line); padding-top: 34px; }
.cv-fs-title {
  font-family: var(--display); font-weight: 400; font-size: 1.5rem;
  text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 24px;
}
.cv-step { color: var(--orange); margin-right: 10px; font-size: 0.85em; }

.cv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; }
.cv-field-full { grid-column: 1 / -1; }
.cv-field > label {
  display: block; font-size: 13.5px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 8px;
}
.cv-field label b { color: var(--orange); font-weight: 700; }
.cv-opt { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 6px; }

.cv-form input:not([type="checkbox"]):not([type="file"]):not([type="radio"]),
.cv-form select,
.cv-form textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid rgba(242, 241, 236, 0.14);
  border-radius: 0;
  color: var(--text);
  padding: 13px 14px;
  font: inherit; font-size: 15px; line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none; appearance: none;
}
.cv-form input::placeholder, .cv-form textarea::placeholder { color: rgba(166, 165, 174, 0.6); }
.cv-form input:focus, .cv-form select:focus, .cv-form textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.18);
}
.cv-form select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a6a5ae' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  cursor: pointer;
}
.cv-form select option { background: var(--bg-3); color: var(--text); }
.cv-form textarea { resize: vertical; min-height: 110px; }
.cv-form input[type="number"] { -moz-appearance: textfield; }
.cv-form input[type="number"]::-webkit-inner-spin-button,
.cv-form input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.cv-field.is-invalid input, .cv-field.is-invalid select, .cv-field.is-invalid textarea,
.cv-field.is-invalid .cv-drop, .cv-field.is-invalid .cv-chipbox, .cv-field.is-invalid .cv-yesno {
  border-color: #ff6f61;
}
.cv-hint { font-size: 12.5px; color: var(--muted); margin-top: 7px; line-height: 1.5; }
.cv-hint.is-echo { color: var(--gold); font-weight: 600; }
.cv-err { display: none; font-size: 12.5px; color: #ff8f85; margin-top: 7px; font-weight: 500; }
.cv-field.is-invalid .cv-err { display: block; }
.cv-count { font-size: 12px; color: var(--muted); text-align: right; margin-top: 6px; }

/* Drop zone */
.cv-drop {
  position: relative;
  border: 1.5px dashed rgba(242, 241, 236, 0.24);
  background: var(--bg-3);
  padding: 30px 20px;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.cv-drop input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.cv-drop:focus-within { border-color: var(--orange); }
.cv-drop.is-over { border-color: var(--orange); background: rgba(255, 90, 31, 0.08); }
.cv-drop.has-file { border-style: solid; border-color: rgba(255, 184, 77, 0.45); }
.cv-drop.has-file input[type="file"] { pointer-events: none; }
.cv-drop-idle { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); font-size: 14.5px; }
.cv-drop-idle svg { color: var(--orange); }
.cv-drop-idle strong { color: var(--text); }
.cv-drop-file { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; font-size: 14.5px; }
.cv-file-name { font-weight: 600; word-break: break-all; }
.cv-file-size { color: var(--muted); font-size: 13px; }
.cv-file-remove {
  position: relative; z-index: 2;
  color: var(--gold); font-weight: 600; font-size: 13px; text-decoration: underline; text-underline-offset: 3px;
}

/* Links */
.cv-links { display: grid; gap: 10px; }
.cv-link-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.cv-link-input { position: relative; }
.cv-link-input input { padding-right: 110px !important; }
.cv-link-tag {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); pointer-events: none;
}
.cv-icon-btn {
  width: 44px; height: 46px; display: grid; place-items: center;
  background: var(--bg-3); color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: color 0.2s ease, box-shadow 0.2s ease;
}
.cv-icon-btn:hover { color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 90, 31, 0.5); }
.cv-add {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--gold);
  transition: color 0.2s ease;
}
.cv-add:hover { color: var(--text); }
.cv-add[hidden] { display: none; }

/* Chips */
.cv-chipbox {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 7px 10px;
  background: var(--bg-3);
  border: 1px solid rgba(242, 241, 236, 0.14);
  cursor: text;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cv-chipbox:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.18); }
.cv-chipbox-chips { display: contents; }
.cv-form .cv-chipbox input {
  flex: 1; min-width: 180px; width: auto;
  background: none; border: 0; box-shadow: none; padding: 7px 4px;
}
.cv-form .cv-chipbox input:focus { box-shadow: none; }
.cv-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 12px;
  font-size: 13px; font-weight: 600;
  background: rgba(255, 90, 31, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 90, 31, 0.45);
  clip-path: var(--cut-sm);
}
.cv-chip button { font-size: 12px; opacity: 0.7; line-height: 1; padding: 2px; }
.cv-chip button:hover { opacity: 1; }
.cv-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.cv-suggest .lbl { font-size: 12px; color: var(--muted); margin-right: 4px; }
.cv-suggest button {
  font-size: 12.5px; padding: 5px 10px;
  background: var(--bg-3); color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: var(--cut-sm);
  transition: color 0.2s ease, box-shadow 0.2s ease;
}
.cv-suggest button:hover { color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 90, 31, 0.5); }
.cv-suggest button.is-picked { display: none; }

/* Pay */
.cv-pay { display: grid; grid-template-columns: 132px 1fr 150px; gap: 8px; }
/* Pay is always monthly, so the period sits there as a label, not a choice. */
.cv-pay-per { display: grid; align-items: center; font-size: 14.5px; color: var(--muted); }

/* Yes / no */
.cv-yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid rgba(242, 241, 236, 0.14); background: var(--bg-3); max-width: 280px; }
.cv-yesno label {
  position: relative; display: grid; place-items: center;
  padding: 12px 14px; font-size: 14.5px; font-weight: 600; cursor: pointer;
  color: var(--muted); transition: background 0.2s ease, color 0.2s ease;
}
.cv-yesno label + label { border-left: 1px solid rgba(242, 241, 236, 0.14); }
.cv-yesno input { position: absolute; opacity: 0; width: 0; height: 0; }
.cv-yesno input:checked + span { color: var(--ink); }
.cv-yesno label:has(input:checked) { background: linear-gradient(120deg, var(--orange), var(--orange-deep)); color: var(--ink); }
.cv-yesno label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: -2px; }

/* Consent */
#consentField { margin-top: 26px; }
.cv-consent {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14px; line-height: 1.55; color: rgba(242, 241, 236, 0.86);
  cursor: pointer;
}
.cv-consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--orange); cursor: pointer; }
.cv-link { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; padding: 0; font: inherit; }
.cv-link:hover { color: var(--text); }

/* Submit */
.cv-submit { border-top: 1px solid var(--line); padding-top: 32px; display: grid; gap: 14px; justify-items: start; }
.cv-submit .cv-hint { margin-top: 0; }
.cv-submit-btn { min-width: 280px; position: relative; overflow: hidden; }
.cv-submit-btn .cv-progress {
  position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%);
  background: rgba(22, 16, 11, 0.28);
  transition: width 0.25s ease;
}
.cv-submit-btn .cv-submit-label { position: relative; }
.cv-submit-btn[disabled] { cursor: progress; transform: none; box-shadow: none; }
.cv-alert {
  width: 100%;
  padding: 14px 16px;
  font-size: 14px; line-height: 1.5;
  color: #ffb9b2;
  background: rgba(227, 59, 46, 0.12);
  box-shadow: inset 0 0 0 1px rgba(227, 59, 46, 0.5);
}

/* Success */
.cv-success {
  padding: clamp(28px, 4vw, 44px);
  background: var(--bg-3);
  clip-path: var(--cut);
  box-shadow: inset 0 0 0 1px rgba(255, 184, 77, 0.35);
}
.cv-success .lead { margin-top: 18px; }
.cv-success .lead strong { color: var(--text); }
.cv-ref {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px;
  margin: 26px 0;
  padding: 18px 22px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: var(--cut-sm);
}
.cv-ref span { font-size: 11.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.cv-ref strong { font-family: var(--display); font-weight: 400; font-size: 2.1rem; letter-spacing: 0.08em; color: var(--gold); }
.cv-success-note { color: var(--muted); font-size: 14.5px; max-width: 62ch; }
.cv-success .hero-ctas { margin-top: 28px; }

/* ---------- Modal ---------- */
.cv-modal {
  position: fixed; inset: 0; z-index: 150;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(6, 6, 9, 0.9);
}
.cv-modal[hidden] { display: none; }
.cv-modal-card {
  position: relative;
  width: min(640px, 100%); max-height: 90vh; overflow: auto;
  padding: 40px 36px;
  background: var(--bg-2);
  clip-path: var(--cut);
  box-shadow: inset 0 0 0 1px var(--line);
}
.cv-modal-close { position: absolute; top: 16px; right: 18px; padding: 8px; color: var(--muted); font-size: 15px; }
.cv-modal-close:hover { color: var(--text); }
.cv-modal h2 { font-family: var(--display); font-weight: 400; font-size: 1.8rem; text-transform: uppercase; margin-bottom: 18px; }
.cv-modal-body p { color: var(--muted); font-size: 14.5px; }
.cv-modal-body p + p { margin-top: 12px; }
.cv-modal-body strong { color: var(--text); }
.cv-modal-body a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cv-job-grid { grid-template-columns: 1fr; gap: 44px; }
  .cv-job-aside { position: static; }
}
@media (max-width: 860px) {
  .cv-hero-inner { padding-bottom: 72px; }
}
@media (max-width: 700px) {
  .cv-grid { grid-template-columns: 1fr; }
  .cv-card { grid-template-columns: 1fr; gap: 16px; padding: 26px 24px; }
  .cv-pay { grid-template-columns: 1fr 1fr; }
  .cv-pay input { grid-column: 1 / -1; order: -1; }
  .cv-submit-btn { width: 100%; min-width: 0; }
}
@media (max-width: 560px) {
  .cv-modal-card { padding: 34px 22px; }
  .cv-ref strong { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cv-skel { animation: none; }
}
