/* ---------------------------------------------------------------------------
   MaDorCARE careers form
   Palette and lettering follow the hiring flyer: navy wordmark, forest-to-lime
   sweep, brick tagline. The sweep is the signature: it is the progress bar.
--------------------------------------------------------------------------- */

:root {
  --navy: #16305c;
  --navy-deep: #0f2244;
  --forest: #0e3f24;
  --green: #2c9b4b;
  --lime: #93d64f;
  --teal: #3faecb;
  --brick: #be3a2b;

  --canvas: #f3f6f4;
  --surface: #ffffff;
  --line: #dde5e0;
  --ink: #16305c;
  --ink-soft: #5a6b72;

  --sweep: linear-gradient(90deg, var(--forest) 0%, var(--green) 48%, var(--lime) 100%);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius: 14px;
  --shell: 620px;
  --bar-h: 68px;
  --foot-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--canvas);
  background-image:
    radial-gradient(120% 70% at 50% 0%, #ffffff 0%, rgba(255,255,255,0) 60%),
    radial-gradient(90% 60% at 100% 100%, rgba(63,174,203,.08) 0%, rgba(255,255,255,0) 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.55;
}

/* ---------------------------------------------------------------- top bar */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 20;
}

.topbar__logo { height: 40px; width: auto; display: block; }

.topbar__meta {
  margin-left: auto;
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* The flyer's forest-to-lime sweep, doing real work. */
.progress {
  position: fixed;
  top: var(--bar-h);
  left: 0;
  right: 0;
  height: 5px;
  background: #e6ece8;
  z-index: 21;
}

.progress__fill {
  height: 100%;
  width: 0%;
  background: var(--sweep);
  transition: width .45s cubic-bezier(.22, .8, .3, 1);
}

/* ------------------------------------------------------------------ stage */

.stage {
  min-height: 100dvh;
  padding: calc(var(--bar-h) + 44px) 20px calc(var(--foot-h) + 32px);
  display: flex;
  justify-content: center;
}

.shell {
  width: 100%;
  max-width: var(--shell);
}

.screen[hidden] { display: none; }

.screen {
  animation: rise .38s cubic-bezier(.22, .8, .3, 1) both;
}

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

/* --------------------------------------------------------------- question */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 18px;
}

.eyebrow__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--navy);
}

.eyebrow__rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.q__title {
  margin: 0 0 10px;
  font-size: clamp(24px, 5.2vw, 32px);
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--navy);
}

.q__help {
  margin: 0 0 26px;
  color: var(--ink-soft);
  font-size: 15px;
}

.q__title + .q__help { margin-top: -2px; }

/* ------------------------------------------------------------- text input */

.field {
  width: 100%;
  font-family: inherit;
  font-size: 18px;
  color: var(--navy);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color .18s, box-shadow .18s;
}

.field::placeholder { color: #a8b6b3; }

.field:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(44, 155, 75, .16);
}

textarea.field { min-height: 150px; resize: vertical; line-height: 1.6; }

.counter {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: right;
}

/* ----------------------------------------------------------------- choices */

.choices {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--navy);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 17px;
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .16s;
}

.choice:hover { border-color: var(--green); transform: translateX(2px); }

.choice:focus-visible {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(44, 155, 75, .16);
}

.choice[aria-checked="true"],
.choice.is-on {
  border-color: var(--green);
  background: rgba(147, 214, 79, .1);
}

.choice__key {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  background: #eef2ef;
  border: 1px solid var(--line);
}

.choice.is-on .choice__key,
.choice[aria-checked="true"] .choice__key {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.choice__body { flex: 1; min-width: 0; }
.choice__label { font-weight: 500; }
.choice__note { display: block; margin-top: 3px; font-size: 14px; color: var(--ink-soft); }

/* -------------------------------------------------------------------- file */

.drop {
  display: block;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .16s, background .16s;
}

.drop:hover, .drop.is-over { border-color: var(--green); background: rgba(147, 214, 79, .07); }

.drop:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(44, 155, 75, .16);
}

.drop__icon { color: var(--green); margin-bottom: 10px; }
.drop__main { font-weight: 600; color: var(--navy); }
.drop__sub { font-size: 14px; color: var(--ink-soft); margin-top: 4px; }
.drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }

.filecard {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--green);
  background: rgba(147, 214, 79, .1);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.filecard__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filecard__size { font-size: 13px; color: var(--ink-soft); }

.linkbtn {
  margin-left: auto;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--brick);
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
}

/* ------------------------------------------------------------ echo + error */

.echo {
  margin-top: 16px;
  padding-left: 13px;
  border-left: 3px solid var(--lime);
  color: var(--ink-soft);
  font-size: 15px;
  animation: rise .3s ease both;
}

.error {
  margin-top: 12px;
  color: var(--brick);
  font-size: 14.5px;
  font-weight: 500;
}

/* ------------------------------------------------------------------ footer */

/* a class selector beats the UA rule for [hidden], so say it explicitly */
.footer[hidden] { display: none; }

.footer {
  position: fixed;
  inset: auto 0 0 0;
  min-height: var(--foot-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(140%) blur(10px);
  border-top: 1px solid var(--line);
  z-index: 20;
}

.footer__inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  font: inherit;
  font-weight: 600;
  border-radius: 999px;
  padding: 14px 30px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .14s, box-shadow .18s, opacity .18s;
}

.btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:not(:disabled):active { transform: translateY(1px); }

.btn--go {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 6px 18px rgba(22, 48, 92, .22);
}

.btn--go:not(:disabled):hover { background: var(--navy-deep); }

.btn--back {
  color: var(--ink-soft);
  background: transparent;
  border-color: var(--line);
  padding: 14px 22px;
}

.btn--back:hover { color: var(--navy); border-color: var(--navy); }

.hint {
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-soft);
}

.hint kbd {
  font: inherit;
  font-size: 12px;
  background: #eef2ef;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
}

/* ------------------------------------------------------- welcome + success */

.hero__kicker {
  font-size: clamp(20px, 4.4vw, 26px);
  font-weight: 700;
  color: var(--forest);
  letter-spacing: -.01em;
  margin: 0;
}

/* The flyer's headline treatment, reused for the two moments that matter. */
.hero__word {
  /* inline-block so the sweep spans the word itself, as it does on the flyer */
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(52px, 15vw, 104px);
  line-height: .92;
  letter-spacing: -.02em;
  margin: 2px 0 0;
  padding-right: .06em;
  background: var(--sweep);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  margin: 22px 0 0;
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 46ch;
}

.rolelist {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.rolelist li {
  background: var(--surface);
  padding: 14px 18px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.rolelist strong { font-weight: 600; color: var(--navy); }
.rolelist span { font-size: 14px; color: var(--ink-soft); }

.meta {
  margin-top: 26px;
  font-size: 14px;
  color: var(--ink-soft);
}

.meta a { color: var(--green); }

.tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--brick);
  font-size: 15px;
}

.receipt {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px;
}

.receipt dt {
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

.receipt dd {
  margin: 4px 0 14px;
  font-weight: 600;
  color: var(--navy);
}

.receipt dd:last-of-type { margin-bottom: 0; }

.receipt code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #eef2ef;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 15px;
}

/* ----------------------------------------------------------------- sending */

.sending {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 15px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ mobile */

@media (max-width: 560px) {
  .hint { display: none; }
  .btn--go { flex: 1; }
  .topbar__meta { font-size: 11px; }

  .rolelist li { flex-direction: column; gap: 2px; padding: 13px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
