/* =====================================================================
   AllAccess Accounting – Careers page
   Everything is scoped to .careers-page so nothing else on the site changes.
   Palette is matched to the site (navy / green / gold). To fine-tune, edit
   the --cr-* variables below.
   ===================================================================== */

/* The page shows its own alerts inside the form card, so hide the global ones */
body:has(.careers-page) .flash-wrap { display: none; }

.careers-page {
  --cr-navy: #0a1647;
  --cr-navy-deep: #050d24;
  --cr-green: #10994f;
  --cr-green-dark: #0b7b3f;
  --cr-gold: #e8a12e;
  --cr-gold-soft: #f3bf62;
  --cr-ink: #0b1647;
  --cr-muted: #5f6a86;
  --cr-line: #dfe4ee;
  --cr-field: #f6f8fc;
  --cr-danger: #c2371f;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(84px, 9vw, 128px) 0 clamp(64px, 8vw, 112px);
  color: #fff;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Background photo + overlay ---------- */
.careers-page::before {
  content: "";
  position: absolute;
  inset: -3%;
  z-index: -2;
  background: url("../images/careers-team.webp") center 38% / cover no-repeat;
  animation: crDrift 32s ease-in-out infinite alternate;
}
.careers-page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(820px 480px at 6% 102%, rgba(16, 153, 79, .30), transparent 62%),
    radial-gradient(640px 400px at 96% -4%, rgba(232, 161, 46, .18), transparent 62%),
    linear-gradient(102deg, rgba(4, 11, 32, .96) 0%, rgba(7, 19, 58, .88) 40%, rgba(8, 22, 66, .64) 100%);
}
@keyframes crDrift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.07) translate3d(-1.2%, -.8%, 0); }
}
@media (max-width: 700px) {
  .careers-page::before { background-image: url("../images/careers-team-mobile.webp"); background-position: 62% 30%; }
  .careers-page::after {
    background:
      radial-gradient(520px 320px at 0% 100%, rgba(16, 153, 79, .28), transparent 62%),
      linear-gradient(180deg, rgba(4, 11, 32, .93) 0%, rgba(7, 19, 58, .86) 55%, rgba(8, 22, 66, .78) 100%);
  }
}

/* ---------- Layout ---------- */
.cr-shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 580px);
  gap: clamp(36px, 5.5vw, 88px);
  align-items: start;
}
@media (max-width: 980px) {
  .cr-shell { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
}

/* ---------- Intro column ---------- */
.cr-intro { padding-top: clamp(0px, 2vw, 24px); animation: crUp .8s cubic-bezier(.2, .7, .2, 1) both; }

.cr-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--cr-gold-soft);
}
.cr-eyebrow::after { content: ""; width: 44px; height: 2px; background: var(--cr-gold); border-radius: 2px; }

.cr-title {
  margin: 0 0 22px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.3rem, 4.5vw, 3.7rem);
  line-height: 1.07;
  letter-spacing: -.012em;
  color: #fff;
}
.cr-title em { font-style: italic; font-weight: 600; color: var(--cr-gold-soft); }

.cr-lead {
  max-width: 520px;
  margin: 0 0 34px;
  font-size: 1.06rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, .8);
}

.cr-sub {
  margin: 0 0 14px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}

/* Open positions */
.cr-roles { list-style: none; margin: 0 0 34px; padding: 0; display: grid; gap: 10px; max-width: 520px; }
.cr-role {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 16px 20px;
  text-align: left;
  font: inherit;
  color: #fff;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform .25s ease, background .25s ease, border-color .25s ease;
}
.cr-role:hover { transform: translateX(6px); background: rgba(255, 255, 255, .12); border-color: rgba(243, 191, 98, .6); }
.cr-role:focus-visible { outline: 3px solid var(--cr-gold); outline-offset: 3px; }
.cr-role-n { font-family: 'Playfair Display', Georgia, serif; font-size: 1.05rem; font-weight: 600; color: var(--cr-gold-soft); }
.cr-role-t { font-weight: 700; font-size: 1rem; }
.cr-role-a { font-size: .78rem; font-weight: 700; letter-spacing: .06em; color: rgba(255, 255, 255, .6); transition: color .25s; }
.cr-role:hover .cr-role-a { color: var(--cr-gold-soft); }
.cr-role.is-picked { background: rgba(16, 153, 79, .28); border-color: rgba(70, 205, 130, .8); }
.cr-role.is-picked .cr-role-a { color: #8ff0b8; }

/* Values */
.cr-values { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; max-width: 520px; }
.cr-values li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  font-size: .8rem; font-weight: 700; letter-spacing: .02em;
  color: rgba(255, 255, 255, .88);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
}
.cr-values li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cr-green); box-shadow: 0 0 0 3px rgba(16, 153, 79, .3); }

/* ---------- Form card ---------- */
.cr-card {
  position: relative;
  padding: clamp(26px, 3.4vw, 40px);
  color: var(--cr-ink);
  background: rgba(255, 255, 255, .97);
  border-radius: 24px;
  box-shadow: 0 40px 90px -24px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .5) inset;
  animation: crUp .9s .12s cubic-bezier(.2, .7, .2, 1) both;
}
.cr-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, var(--cr-green), var(--cr-gold));
}
.cr-card h2 {
  margin: 4px 0 6px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--cr-navy);
}
.cr-card-sub { margin: 0 0 24px; font-size: .92rem; color: var(--cr-muted); }

@keyframes crUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* Alerts */
.cr-alerts { display: grid; gap: 10px; margin-bottom: 20px; }
.cr-alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  font-size: .92rem; font-weight: 600; line-height: 1.5;
  border-radius: 14px;
}
.cr-alert svg { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.cr-alert--success { color: #0a5c30; background: #e6f6ee; border: 1px solid #b5e3c9; }
.cr-alert--danger  { color: #8c2412; background: #fdeeea; border: 1px solid #f4c3b8; }

/* Fields */
.cr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.cr-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.cr-field--full { grid-column: 1 / -1; }
@media (max-width: 560px) { .cr-grid { grid-template-columns: 1fr; } }

.cr-label { font-size: .8rem; font-weight: 800; letter-spacing: .03em; color: var(--cr-navy); }
.cr-label i { font-style: normal; color: var(--cr-green); }

.cr-input, .cr-select, .cr-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0 16px;
  height: 52px;
  font: inherit;
  font-size: .96rem;
  font-weight: 500;
  color: var(--cr-ink);
  background: var(--cr-field);
  border: 1.5px solid var(--cr-line);
  border-radius: 12px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.cr-textarea { height: auto; min-height: 138px; padding: 14px 16px; resize: vertical; line-height: 1.6; }
.cr-input::placeholder, .cr-textarea::placeholder { color: #98a1b8; font-weight: 400; }
.cr-input:hover, .cr-select:hover, .cr-textarea:hover { border-color: #c5cde0; }
.cr-input:focus, .cr-select:focus, .cr-textarea:focus {
  outline: none; background: #fff; border-color: var(--cr-green);
  box-shadow: 0 0 0 4px rgba(16, 153, 79, .16);
}
.cr-input:user-invalid, .cr-select:user-invalid, .cr-textarea:user-invalid { border-color: var(--cr-danger); background: #fff8f6; }

.cr-select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1.5l6 6 6-6' stroke='%230a1647' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center;
}
.cr-count { align-self: flex-end; margin-top: -2px; font-size: .74rem; font-weight: 600; color: #98a1b8; }

/* CV drop zone */
.cr-drop {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: var(--cr-field);
  border: 2px dashed #c3ccdf;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.cr-drop:hover, .cr-drop:focus-within { border-color: var(--cr-green); background: #f0faf4; }
.cr-drop:focus-within { box-shadow: 0 0 0 4px rgba(16, 153, 79, .16); }
.cr-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.cr-drop-ico {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px;
  color: var(--cr-green); background: #e3f5ec; border-radius: 12px;
}
.cr-drop-ico svg { width: 22px; height: 22px; }
.cr-drop-txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cr-drop-main { font-size: .93rem; font-weight: 700; color: var(--cr-navy); overflow-wrap: anywhere; }
.cr-drop-hint { font-size: .78rem; color: var(--cr-muted); }
.cr-drop.has-file { border-style: solid; border-color: var(--cr-green); background: #f0faf4; }
.cr-drop.has-error { border-color: var(--cr-danger); background: #fff8f6; }
.cr-drop.has-error .cr-drop-hint { color: var(--cr-danger); font-weight: 700; }

/* Privacy checkbox */
.cr-check { display: flex; align-items: flex-start; gap: 12px; margin-top: 4px; }
.cr-check input {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 22px; height: 22px; margin: 1px 0 0;
  background: #fff; border: 2px solid #b7c1d8; border-radius: 7px;
  display: grid; place-content: center; cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.cr-check input::after {
  content: ""; width: 11px; height: 6px; margin-top: -2px;
  border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform .15s ease;
}
.cr-check input:checked { background: var(--cr-green); border-color: var(--cr-green); }
.cr-check input:checked::after { transform: rotate(-45deg) scale(1); }
.cr-check input:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(16, 153, 79, .22); }
.cr-check input:disabled { opacity: .45; cursor: not-allowed; background: #eef1f7; }
.cr-check label { font-size: .88rem; line-height: 1.55; color: #3d4663; }
.cr-check a { color: var(--cr-green-dark); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.cr-check a:hover { color: var(--cr-navy); }
.cr-hint { margin: 6px 0 0 34px; font-size: .78rem; font-weight: 700; color: var(--cr-gold); }
.cr-hint[hidden] { display: none; }
.cr-hint--text { color: #b27608; }

/* Submit */
.cr-submit {
  position: relative;
  width: 100%;
  margin-top: 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 17px 24px;
  font: inherit; font-size: .98rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--cr-green), var(--cr-green-dark));
  border: 0; border-radius: 14px;
  box-shadow: 0 16px 32px -12px rgba(16, 153, 79, .65);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s;
}
.cr-submit:hover { transform: translateY(-2px); box-shadow: 0 22px 38px -12px rgba(16, 153, 79, .75); filter: brightness(1.05); }
.cr-submit:active { transform: translateY(0); }
.cr-submit:focus-visible { outline: 3px solid var(--cr-gold); outline-offset: 3px; }
.cr-submit svg { width: 18px; height: 18px; transition: transform .2s; }
.cr-submit:hover svg { transform: translateX(4px); }
.cr-submit:disabled { cursor: progress; opacity: .8; transform: none; }

.cr-secure {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 16px 0 0; font-size: .78rem; font-weight: 600; color: var(--cr-muted);
}
.cr-secure svg { width: 15px; height: 15px; color: var(--cr-green); }

/* Honeypot (hidden from people, visible to bots) */
.cr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .careers-page::before, .cr-intro, .cr-card { animation: none; }
  .cr-role, .cr-submit, .cr-drop { transition: none; }
}
