/* ==========================================================================
   Mayuri Careers — peacock identity
   Brand forest green (#194c00, from mayuriseattle.com) + marigold gold on warm ivory.
   Display: Fraunces (characterful soft serif) · Body: Inter
   ========================================================================== */

:root {
  --ink:        #192824;
  --teal:       #194c00;
  --teal-deep:  #0f2e00;
  --emerald:    #2e7d12;
  --accent:     #00753f;   /* brighter brand green — interactive feedback */
  --accent-soft:#e6f2ea;
  --gold:       #e0a43b;
  --gold-soft:  #f3dcab;
  --plum:       #6f2a52;   /* peacock "eye" accent, used sparingly */
  --ivory:      #fbf7ef;
  --card:       #ffffff;
  --line:       #e7e1d4;
  --line-strong:#d8cfba;
  --muted:      #5b665f;
  --danger:     #b23b3b;
  --danger-bg:  #fbeceb;
  --ok:         #1c7a4d;
  --ok-bg:      #e8f5ee;
  --warn-bg:    #fdf3e0;
  --radius:     14px;
  --radius-sm:  9px;
  --shadow:     0 1px 2px rgba(25,40,36,.04), 0 12px 30px -18px rgba(25,76,0,.35);
  --maxw:       1060px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 22px; max-width: var(--maxw); margin: 0 auto;
}
.topbar__logo img { display: block; width: 64px; height: auto; }
.topbar__brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600; font-size: 1.28rem; color: var(--teal);
  letter-spacing: .2px; line-height: 1.1;
}
.topbar__contact {
  margin-left: auto; text-align: right; font-size: .82rem; color: var(--muted);
}
.topbar__contact a { color: var(--muted); text-decoration: none; }
.topbar__contact span { display: block; }

/* ---------- Language toggle ---------- */
.lang-toggle {
  flex: none; display: inline-flex; align-items: stretch;
  border: 1px solid var(--line-strong); border-radius: 999px;
  overflow: hidden; background: #fff;
}
.lang-btn {
  font: inherit; font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  border: 0; background: transparent; color: var(--muted);
  padding: 6px 13px; cursor: pointer; line-height: 1;
  transition: background .15s, color .15s;
}
.lang-btn:hover { color: var(--teal); }
.lang-btn.is-active { background: var(--teal); color: #fff; }
@media (max-width: 600px) {
  /* Make room for the brand + toggle; the phone/email also live in the footer. */
  .topbar__contact { display: none; }
}

/* ---------- Nav ---------- */
.nav { background: var(--teal-deep); }
.nav__inner {
  display: flex; gap: 6px; max-width: var(--maxw); margin: 0 auto; padding: 0 14px;
}
.nav a {
  color: #dbeae6; text-decoration: none; font-size: .9rem; font-weight: 500;
  padding: 13px 16px; display: inline-block; transition: color .15s, background .15s;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.07); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 140% at 88% -20%, rgba(224,164,59,.30), transparent 45%),
    linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 78%);
  color: #f4efe2;
}
.hero__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 56px 22px 64px;
  position: relative; z-index: 2;
}
.hero__eyebrow {
  font-size: .74rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-soft); font-weight: 600; margin: 0 0 14px;
}
.hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600; font-size: clamp(2.1rem, 5.4vw, 3.5rem); line-height: 1.04;
  margin: 0 0 16px; letter-spacing: -.01em;
}
.hero h1 em { font-style: italic; color: var(--gold); }
.hero p {
  max-width: 46ch; margin: 0 0 28px; font-size: 1.06rem; color: #d7e4e0;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Peacock-feather "eye" — the signature motif, drawn in CSS */
.feather {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  width: 360px; height: 360px; opacity: .9; z-index: 1; pointer-events: none;
}
@media (max-width: 820px) { .feather { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .08s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn--gold { background: var(--gold); color: #2a1c00; }
.btn--gold:hover { box-shadow: 0 8px 22px -10px rgba(224,164,59,.8); }
.btn--ghost { background: transparent; color: #f4efe2; border-color: rgba(255,255,255,.45); }
.btn--ghost:hover { background: rgba(255,255,255,.1); }
.btn--submit {
  background: var(--teal); color: #fff; padding: 16px 40px; font-size: 1.02rem;
}
.btn--submit:hover { background: var(--accent); box-shadow: 0 12px 26px -12px rgba(0,117,63,.55); }

/* ---------- Form shell ---------- */
.form-stage { padding: 44px 0 80px; }
.form-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(20px, 4vw, 40px);
}

/* ---------- Sections ---------- */
.section { padding-top: 40px; }
.section:first-of-type { padding-top: 4px; }
.section__head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 22px; padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.section__mark {
  flex: none; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--gold) 0 36%, var(--teal) 38% 60%, var(--emerald) 62% 100%);
  margin-top: 8px;
}
.section__title {
  font-family: "Fraunces", Georgia, serif; font-weight: 600;
  font-size: 1.42rem; color: var(--teal); margin: 0; line-height: 1.15;
}
.section__hint { display: block; font-family: "Inter"; font-size: .85rem; color: var(--muted); font-weight: 400; margin-top: 2px; }
.section + .section { border-top: 1px solid var(--line); margin-top: 14px; }

/* ---------- Fields ---------- */
.grid { display: grid; gap: 16px 18px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.span-2 { grid-column: span 2; }
@media (max-width: 720px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
}

.field { display: flex; flex-direction: column; min-width: 0; }
.field > label {
  font-size: .82rem; font-weight: 600; color: var(--ink);
  margin-bottom: 6px; letter-spacing: .01em;
}
.field .req { color: var(--gold); }
.field .opt { color: var(--muted); font-weight: 400; }

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="date"],
.field select {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 11px 13px; width: 100%; transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #aab2ab; }
.field input:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,117,63,.18);
}
.field input:disabled { background: #f4f2ec; color: #9aa39c; }

.field-error {
  margin: 6px 0 0; font-size: .78rem; color: var(--danger); min-height: 0;
}
.field.has-error input, .field.has-error select { border-color: var(--danger); background: #fff; }
.field.has-error input:focus, .field.has-error select:focus { box-shadow: 0 0 0 3px rgba(178,59,59,.14); }

/* ---------- Choice (radio) groups ---------- */
.choice {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  padding: 4px 0;
}
.choice > .choice__q { font-size: .9rem; font-weight: 600; margin-right: 2px; }
.choice label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .92rem; padding: 7px 14px; border: 1px solid var(--line-strong);
  border-radius: 999px; cursor: pointer; transition: border-color .15s, background .15s;
}
.choice label:hover { border-color: var(--accent); }
.choice input[type="radio"] { accent-color: var(--teal); margin: 0; }
.choice input[type="radio"]:checked + span { font-weight: 600; color: var(--teal); }
.choice.has-error { color: var(--danger); }
.choice.has-error label { border-color: var(--danger); }

.conditional { display: none; }
.conditional.show { display: flex; }

/* ---------- Repeating tables (Education / References / Employment) ---------- */
.rgroup { display: flex; flex-direction: column; gap: 14px; }
.rrow {
  display: grid; gap: 14px 12px; padding: 18px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fdfcf8;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.rrow:focus-within {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px rgba(0,117,63,.10);
}
.rrow__num {
  justify-self: start; grid-column: 1 / -1;
  font-family: "Fraunces", serif; font-size: .76rem; letter-spacing: .03em;
  text-transform: uppercase; font-weight: 600; color: var(--teal);
  background: var(--gold-soft); padding: 3px 12px; border-radius: 999px;
  margin-bottom: 2px;
}
.edu-grid  { grid-template-columns: 1.4fr 1.6fr .8fr .8fr auto 1fr; }
.ref-grid  { grid-template-columns: 1.2fr 1.6fr 1fr 1fr .8fr; }
.emp-grid  { grid-template-columns: 1.1fr 1.9fr 1fr 1fr 1.4fr; }
/* Align every input to the bottom of its row so labels of different
   line-lengths don't knock the boxes out of horizontal alignment. */
.edu-grid, .ref-grid, .emp-grid { align-items: end; }
@media (max-width: 860px) {
  .edu-grid, .ref-grid, .emp-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .edu-grid, .ref-grid, .emp-grid { grid-template-columns: 1fr; }
}
.grad-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.grad-cell label { font-size: .82rem; font-weight: 600; }
.grad-cell input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--teal); }

/* ---------- Resume + consent ---------- */
.upload {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 18px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm);
  background: #fdfcf8;
}
.upload__label { font-weight: 600; font-size: .92rem; }
.upload__hint { font-size: .8rem; color: var(--muted); }
.upload input[type="file"] { font: inherit; font-size: .88rem; }
.upload input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; border: 1px solid var(--line-strong); background: #fff;
  color: var(--teal); padding: 9px 14px; border-radius: 999px; cursor: pointer; margin-right: 12px;
}

.consent {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 22px;
  font-size: .9rem; color: var(--muted); line-height: 1.5;
}
.consent input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--teal); flex: none; }
.consent.has-error { color: var(--danger); }

.submit-row {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center;
  justify-content: space-between; margin-top: 28px;
}
.g-recaptcha { min-height: 78px; }
.recaptcha-error { color: var(--danger); font-size: .8rem; margin: 6px 0 0; }

/* ---------- Alerts / result ---------- */
.form-alert {
  display: block; padding: 16px 18px; border-radius: var(--radius-sm);
  margin: 0 0 22px; font-size: .94rem; border: 1px solid transparent;
}
.form-alert strong { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.form-alert--ok   { background: var(--ok-bg);    border-color: #bfe3cd; color: #14502f; }
.form-alert--error{ background: var(--danger-bg);border-color: #efc6c4; color: #8d2b2b; }
.form-alert--warn { background: var(--warn-bg);  border-color: #f0d8a6; color: #84591a; }
.result-download {
  display: inline-block; margin-top: 12px; font-weight: 600;
  background: var(--teal); color: #fff !important; text-decoration: none;
  padding: 10px 20px; border-radius: 999px;
}
.result-download:hover { background: var(--accent); }
#submittedMsg:focus { outline: none; }

/* ---------- Footer ---------- */
.foot { background: var(--teal-deep); color: #cfe0dc; margin-top: 0; }
.foot__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 44px 22px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
@media (max-width: 640px) { .foot__inner { grid-template-columns: 1fr; } }
.foot h3 {
  font-family: "Fraunces", serif; color: #fff; font-size: 1.1rem; font-weight: 600;
  margin: 0 0 12px;
}
.foot p { margin: 0 0 8px; font-size: .9rem; }
.foot a { color: var(--gold-soft); text-decoration: none; }
.foot__social { display: flex; gap: 14px; margin-top: 14px; }
.foot__social a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff; transition: background .15s;
}
.foot__social a:hover { background: var(--gold); color: #2a1c00; }
.foot__bar { border-top: 1px solid rgba(255,255,255,.12); }
.foot__bar p { text-align: center; padding: 16px; margin: 0; font-size: .8rem; color: #9fb6b1; }

/* ---------- Submitting overlay ---------- */
.submitting-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(15, 46, 0, .58); backdrop-filter: blur(2px);
}
.submitting-overlay.show { display: flex; }
.submitting-card {
  background: #fff; border-radius: var(--radius);
  padding: 32px 40px; max-width: 90%; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .55);
}
.submitting-spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--teal);
  animation: mayuri-spin .8s linear infinite;
}
.submitting-card strong { font-family: "Fraunces", Georgia, serif; color: var(--teal); font-size: 1.2rem; }
.submitting-card span { color: var(--muted); font-size: .9rem; max-width: 34ch; }
@keyframes mayuri-spin { to { transform: rotate(360deg); } }

/* ---------- Mobile sticky submit ---------- */
.mobile-submit-bar { display: none; }
@media (max-width: 720px) {
  .form-stage { padding-bottom: 92px; }
  .mobile-submit-bar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(251, 247, 239, .94);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-top: 1px solid var(--line-strong);
    box-shadow: 0 -6px 22px -14px rgba(25, 40, 36, .5);
    transition: transform .25s ease, opacity .25s ease;
  }
  .mobile-submit-bar .btn--submit { width: 100%; justify-content: center; padding: 15px; }
  /* Fade the floating bar away once the real submit row is on screen. */
  .mobile-submit-bar.is-hidden {
    transform: translateY(130%); opacity: 0; pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
