/* Victory Missions (missions.vchurch.us). Builds on site.css: tokens, header, buttons, kicker, outline, footer. */

/* ---------- Hero ---------- */
.mx-hero {
  position: relative; overflow: hidden; overflow: clip; color: var(--cream); text-align: center;
  padding: clamp(56px, 8vw, 110px) 0 clamp(36px, 5vw, 56px);
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(12, 48, 100, .65), transparent 70%),
    radial-gradient(40% 50% at 85% 60%, rgba(6, 107, 231, .14), transparent 70%),
    var(--abyss);
}
.mx-hero__inner { position: relative; z-index: 1; display: grid; justify-items: center; }
.mx-hero__word { margin: 14px 0 0; font-size: clamp(76px, 15vw, 250px); line-height: .82; }
.mx-hero__word .outline { --stroke: clamp(1px, .09vw, 1.6px); }
.mx-hero__title { margin-top: clamp(14px, 2vw, 22px); font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 4.4vw, 60px); line-height: 1.02; color: #fff; }
.mx-hero__lede { max-width: 58ch; margin-top: 16px; color: var(--silver-dk); font-size: 16.5px; }
.mx-stats { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; margin-top: 30px; }
.mx-stats li { display: grid; justify-items: center; gap: 4px; }
.mx-stats b { font-family: var(--serif); font-weight: 500; font-size: clamp(38px, 4vw, 54px); line-height: 1; color: var(--gold-lt); font-variant-numeric: lining-nums; }
.mx-stats span { font-size: 11px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--silver-dk); }

/* A row of faces: every missionary, linking to their card */
.mx-faces { position: relative; z-index: 1; list-style: none; display: flex; gap: 0; margin: clamp(30px, 4vw, 48px) 0 0; padding: 4px var(--gutter) 10px; overflow-x: auto; scrollbar-width: none; justify-content: safe center; }
.mx-faces::-webkit-scrollbar { display: none; }
.mx-faces li { flex: none; }
.mx-faces li + li { margin-left: -12px; }
.mx-faces a { display: block; border-radius: 50%; transition: transform .3s var(--ease); }
.mx-faces img { display: block; width: 58px; height: 58px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--abyss), 0 0 0 3.5px rgba(223, 167, 64, .7); }
.mx-faces a { position: relative; }
.mx-faces a:hover, .mx-faces a:focus-visible { transform: translateY(-6px); z-index: 2; }

/* ---------- The page menu (sticky under the header) ---------- */
.mx-tabs { position: sticky; top: var(--header-h); z-index: 40; background: rgba(4, 18, 40, .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-block: 1px solid var(--rule-dark); }
.mx-tabs__inner { display: flex; justify-content: center; gap: clamp(8px, 4vw, 48px); }
.mx-tab { position: relative; display: inline-flex; align-items: baseline; gap: 8px; padding: 16px 4px; font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--silver-dk); white-space: nowrap; transition: color .25s; }
.mx-tab b { font-family: var(--serif); font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--gold-lt); }
.mx-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold-grad); transform: scaleX(0); transition: transform .35s var(--ease); }
.mx-tab:hover, .mx-tab[aria-current="true"] { color: #fff; }
.mx-tab[aria-current="true"]::after { transform: scaleX(1); }
[id="map"], [id="missionaries"], [id="apply"] { scroll-margin-top: calc(var(--header-h) + 54px); }

/* ---------- Shared section heads ---------- */
.mx-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 44px); }
.mx-head__title { margin-top: 14px; font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 4.4vw, 62px); line-height: 1.02; color: var(--cream); text-wrap: balance; }
.mx-head__text { margin-top: 14px; color: var(--silver-dk); font-size: 16px; max-width: 60ch; }
.mx-head--ink .mx-head__title { color: var(--navy); }
.vsec { padding-block: clamp(64px, 8vw, 120px); }

/* ---------- 01 · Map ---------- */
.mx-mapbox { position: relative; z-index: 0; isolation: isolate; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px rgba(246, 241, 231, .1), 0 50px 90px -50px rgba(0, 0, 0, .9); }
.mx-mapbox__map { height: clamp(380px, 62vh, 640px); background: #06142c; }
.mx-legend { position: absolute; left: 14px; bottom: 14px; z-index: 500; list-style: none; display: grid; gap: 6px; margin: 0; padding: 12px 14px; border-radius: 10px; background: rgba(4, 18, 40, .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 12.5px; color: var(--silver); }
.mx-legend li { display: flex; align-items: center; gap: 10px; }
.mx-legend__hint { color: var(--silver-dk); font-size: 11.5px; }
.mx-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--gold-lt); box-shadow: 0 0 0 3px rgba(237, 188, 85, .25); }
.mx-dot--home { background: var(--blue); box-shadow: 0 0 0 3px rgba(6, 107, 231, .3), 0 0 0 5px rgba(237, 188, 85, .6); }
@media (max-width: 640px) { .mx-legend { position: static; border-radius: 0; } .mx-legend__hint { display: none; } }

/* Leaflet, in brand */
.leaflet-container { font: inherit; background: #06142c; }
.mx-pin { position: relative; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--gold-lt); border: 2px solid #0b1424; box-shadow: 0 0 0 4px rgba(237, 188, 85, .28), 0 6px 14px rgba(0, 0, 0, .6); color: var(--abyss); font-size: 10px; font-weight: 800; transition: transform .2s; }
.mx-pin:hover { transform: scale(1.18); }
.mx-pin--home { width: 26px; height: 26px; background: var(--blue); color: #fff; box-shadow: 0 0 0 4px rgba(6, 107, 231, .35), 0 0 0 7px rgba(237, 188, 85, .55), 0 6px 14px rgba(0, 0, 0, .6); }
.mx-pin--home::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid rgba(237, 188, 85, .5); animation: mxPulse 2.6s ease-out infinite; }
@keyframes mxPulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.leaflet-popup-content-wrapper { border-radius: 12px; background: #0b1730; color: var(--silver); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(223, 167, 64, .35); }
.leaflet-popup-tip { background: #0b1730; }
.leaflet-popup-content { margin: 14px 16px; min-width: 210px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--silver-dk); }
.mx-pop { display: grid; gap: 12px; }
.mx-pop__who { display: flex; align-items: center; gap: 12px; }
.mx-pop__who img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(223, 167, 64, .7); }
.mx-pop__who b { display: block; font-family: var(--serif); font-size: 19px; font-weight: 500; color: #fff; line-height: 1.1; }
.mx-pop__who span { display: block; font-size: 12.5px; color: var(--silver-dk); margin-top: 2px; }
.mx-pop__who + .mx-pop__who { padding-top: 10px; border-top: 1px solid var(--rule-dark); }
.mx-pop a { color: var(--gold-lt); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.leaflet-control-zoom a { background: #0b1730 !important; color: var(--cream) !important; border-color: rgba(246, 241, 231, .15) !important; }
.leaflet-control-attribution { background: rgba(4, 18, 40, .7) !important; color: var(--silver-dk) !important; font-size: 10.5px; }
.leaflet-control-attribution a { color: var(--silver) !important; }

/* ---------- 02 · Missionaries ---------- */
.mx-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.mx-chip { height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--rule-light); font-size: 13px; font-weight: 600; color: var(--navy); background: rgba(255, 255, 255, .5); transition: background-color .2s, color .2s, border-color .2s; }
.mx-chip small { margin-left: 4px; color: var(--muted); }
.mx-chip:hover { border-color: var(--gold-dk); }
.mx-chip[aria-pressed="true"] { background: var(--navy); color: var(--parchment); border-color: var(--navy); }
.mx-chip[aria-pressed="true"] small { color: var(--gold-lt); }
.mx-chip--country { background: transparent; }
.mx-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.mx-card { scroll-margin-top: calc(var(--header-h) + 70px); display: grid; grid-template-rows: auto 1fr; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid rgba(7, 26, 57, .06); box-shadow: 0 24px 40px -32px rgba(7, 26, 57, .5); transition: transform .3s var(--ease), box-shadow .3s; }
.mx-card[hidden] { display: none; }
.mx-card:hover { transform: translateY(-3px); box-shadow: 0 30px 50px -30px rgba(7, 26, 57, .55); }
.mx-card:target, .mx-card.is-flash { box-shadow: 0 0 0 3px var(--gold), 0 30px 50px -30px rgba(7, 26, 57, .55); }
.mx-card__photo { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--parchment-2); }
.mx-card__body { display: grid; align-content: start; gap: 6px; padding: 18px 18px 16px; }
.mx-card__name { font-family: var(--serif); font-weight: 500; font-size: 25px; line-height: 1.05; color: var(--navy); }
.mx-card__ministry { font-size: 14px; font-weight: 600; color: var(--ink); }
.mx-card__place { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.mx-card__place .ico { width: 15px; height: 15px; color: var(--gold-dk); flex: none; }
.mx-card__map { justify-self: start; display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 0; font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--navy); border-bottom: 1px solid var(--gold-dk); }
.mx-card__map .ico { width: 13px; height: 13px; transition: transform .25s; }
.mx-card__map:hover .ico { transform: translateX(3px); }
.mx-empty { color: var(--muted); }
.no-js .mx-card__map { display: none; }

/* ---------- 03 · Apply ---------- */
.mx-apply__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.mx-apply__intro { position: sticky; top: calc(var(--header-h) + 80px); margin: 0; }
.mx-steps { list-style: none; padding: 0; display: grid; gap: 10px; margin-top: 26px; }
.mx-steps li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--silver); }
.mx-steps b, .mx-fs legend b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(223, 167, 64, .6); font-family: var(--serif); font-size: 16px; font-weight: 500; color: var(--gold-lt); }
.mx-apply__privacy { font-size: 13.5px; margin-top: 24px; }
.req { color: var(--gold-lt); }

.mx-form { display: grid; gap: 22px; }
.mx-fs { margin: 0; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--rule-dark); border-radius: 16px; background: rgba(255, 255, 255, .025); display: grid; gap: 16px; min-width: 0; }
.mx-fs legend { display: flex; align-items: center; gap: 12px; padding: 0 10px; margin-left: -10px; font-family: var(--serif); font-size: clamp(24px, 2.4vw, 30px); font-weight: 500; color: #fff; }
.mx-fs__help { font-size: 14px; color: var(--silver-dk); }
.mx-row { display: grid; gap: 16px; }
.mx-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mx-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .mx-row--2, .mx-row--3 { grid-template-columns: 1fr; } }
.mx-field { display: grid; gap: 7px; min-width: 0; }
.mx-field > span { font-size: 13.5px; font-weight: 600; color: var(--silver); }
.mx-field small { font-size: 12.5px; color: var(--silver-dk); margin-top: -3px; }
.mx-field--tight { margin-top: -6px; }
.mx-field input, .mx-field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 10px; font: inherit; font-size: 16px; color: var(--ink);
  background: #fbfaf6; border: 1px solid rgba(255, 255, 255, .15); outline: none; transition: border-color .2s, box-shadow .2s;
}
.mx-field textarea { resize: vertical; line-height: 1.5; }
.mx-field input:focus-visible, .mx-field textarea:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(223, 167, 64, .35); }
.mx-field input[aria-invalid="true"] { border-color: #e2768c; box-shadow: 0 0 0 3px rgba(226, 118, 140, .35); }
.mx-field input::placeholder, .mx-field textarea::placeholder { color: #8e95a6; }

.mx-days { display: grid; gap: 8px; }
.mx-day { border: 1px solid var(--rule-dark); border-radius: 12px; padding: 4px 14px; transition: background-color .25s, border-color .25s; }
.mx-day.is-on { background: rgba(223, 167, 64, .06); border-color: rgba(223, 167, 64, .35); padding-bottom: 14px; }
.mx-day__toggle { display: flex; align-items: center; gap: 12px; min-height: 46px; font-size: 15px; font-weight: 600; color: #fff; cursor: pointer; }
.mx-day__toggle input, .mx-yesno input { width: 20px; height: 20px; accent-color: var(--gold); }
.mx-day__fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.js .mx-day:not(.is-on) .mx-day__fields { display: none; }
@media (max-width: 640px) { .mx-day__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.mx-yesno { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 12px 0; border-bottom: 1px solid var(--rule-dark); }
.mx-yesno p { flex: 1 1 260px; font-size: 14.5px; color: var(--silver); }
.mx-yesno label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14.5px; color: #fff; cursor: pointer; }

.mx-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mx-submit { display: grid; justify-items: start; gap: 12px; }
.mx-form__status { min-height: 1.4em; font-size: 14px; color: var(--silver); }
.mx-form__status.is-error { color: #f3a6b6; }
.mx-form.is-sending [data-submit] { opacity: .6; pointer-events: none; }

.mx-done { grid-column: 2; display: grid; justify-items: start; gap: 14px; padding: clamp(28px, 4vw, 44px); border-radius: 16px; border: 1px solid rgba(223, 167, 64, .45); background: rgba(223, 167, 64, .06); }
.mx-done[hidden] { display: none; }
.mx-done__icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--gold-grad); color: var(--abyss); }
.mx-done__icon .ico { width: 26px; height: 26px; stroke-width: 2.4; }
.mx-done h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3vw, 38px); color: #fff; }
.mx-done p { color: var(--silver); }

@media (max-width: 960px) {
  .mx-apply__grid { grid-template-columns: 1fr; }
  .mx-apply__intro { position: static; }
  .mx-done { grid-column: 1; }
}

.mx-footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1.1fr; }
@media (max-width: 860px) { .mx-tab { letter-spacing: .14em; } }
@media (max-width: 420px) { .mx-tab { font-size: 11px; gap: 6px; } .mx-tab b { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .mx-pin--home::after { animation: none; } .mx-card, .mx-faces a { transition: none; } }
