/* Homepage hero extras - used by js/hero-extras.js */

/* Hero layout: text on the left, wellbeing card on the right */
.human-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 460px) !important; align-items: center !important; }
.human-hero-copy { padding: 24px 0 !important; }

/* ---------- Rotating language pill ---------- */
.mjx-lang-slot { min-height: 34px; }
.mjx-lang-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px 7px 12px; border-radius: 999px;
  background: #ffffffc7; border: 1px solid var(--human-line, #d9e1dc);
  color: var(--human-forest, #174b43); font-weight: 800; font-size: 14px;
  box-shadow: 0 6px 18px #174b4314;
}
.mjx-lang-icon { font-size: 15px; }
.mjx-lang-word {
  display: inline-block; min-width: 64px;
  transition: opacity .35s ease, transform .35s ease;
}
.mjx-lang-word.is-out { opacity: 0; transform: translateY(-8px); }

/* ---------- Buttons ---------- */
.mjx-cta { margin: 26px 0 22px !important; }
.mjx-cta button { padding: 0 22px; }

/* ---------- Mood question ---------- */
.mjx-mood-card { max-width: 560px; }
.app .mjx-mood-q { font: 600 20px/1.3 Georgia, "Times New Roman", serif; margin: 0 0 12px; letter-spacing: -.01em; }
.mjx-mood-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mjx-mood {
  display: grid; justify-items: center; align-content: center; gap: 8px;
  min-height: 92px; padding: 14px 6px 12px;
  border: 1px solid rgba(23, 75, 67, .10); border-radius: 18px; background: #fff;
  color: #5d716b; font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: 0 1px 2px rgba(23, 75, 67, .05), 0 6px 16px rgba(23, 75, 67, .05);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.mjx-mood:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(23, 75, 67, .06), 0 12px 24px rgba(23, 75, 67, .09); }
.mjx-mood:focus-visible { outline: 3px solid #efb33a; outline-offset: 3px; }
.mjx-mood.active {
  background: #e8f3ee; border-color: var(--human-forest, #174b43); color: var(--human-forest, #174b43);
  box-shadow: 0 0 0 1px var(--human-forest, #174b43) inset, 0 8px 20px rgba(23, 75, 67, .10);
}
.mjx-mood-icon { display: grid; place-items: center; width: 30px; height: 30px; line-height: 0; }
.mjx-mood-clear { color: #d08a16; }
.mjx-mood-cloudy { color: #7f8f99; }
.mjx-mood-stormy { color: #6a5acd; }
.mjx-mood-low { color: #c0603a; }
.mjx-mood.active .mjx-mood-icon { color: var(--human-forest, #174b43); }
.mjx-mood-label { line-height: 1.2; text-align: center; }
.app .mjx-mood-msg { min-height: 0; margin: 10px 2px 0; font-size: 14px; line-height: 1.5; color: #48625c; }
.mjx-mood-msg:empty { display: none; }
.mjx-mood-msg a { color: var(--human-forest, #174b43); font-weight: 800; white-space: nowrap; }

/* ---------- Wellbeing dimensions card ---------- */
/* No white box or big shadow, so the card sits on the page background */
.mjx-dim-card {
  background: transparent; border: 0; box-shadow: none;
  border-radius: 0; padding: 8px 4px 4px;
}
.mjx-dim-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.app .mjx-dim-top h2 { font: 600 21px/1.25 Georgia, "Times New Roman", serif; margin: 0; }
.app .mjx-dim-top p { margin: 2px 0 0; font-size: 13px; color: #6b7f79; line-height: 1.4; }
.mjx-dim-badge {
  display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 14px; background: var(--human-forest, #174b43); font-size: 22px;
}
.mjx-dim-list { display: grid; gap: 11px; }
.mjx-dim-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #33463f; margin-bottom: 4px; }
.mjx-dim-name { display: inline-flex; align-items: center; gap: 2px; }
.mjx-dim-pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.mjx-dim-info {
  width: 18px; height: 18px; margin-inline-start: 6px; border-radius: 50%;
  border: 1px solid #b9c8c2; background: #fff; color: #5b716b;
  font: italic 700 11px/16px Georgia, serif; text-align: center; padding: 0; cursor: pointer;
}
.mjx-dim-info[aria-expanded="true"] { background: var(--human-forest, #174b43); color: #fff; border-color: transparent; }
.app .mjx-dim-desc { margin: 6px 0 2px; font-size: 12.5px; line-height: 1.5; color: #5b716b; }

/* Slider: thin soft track, round thumb that grows a little when you grab it */
.mjx-dim-range {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 6px; margin: 6px 0;
  border-radius: 999px; cursor: pointer; outline: none; touch-action: pan-y; background:
    linear-gradient(90deg, color-mix(in srgb, var(--mjx-color) 70%, #fff), var(--mjx-color)) 0 / var(--mjx-fill, 50%) 100% no-repeat,
    rgba(23, 75, 67, .10);
}
.mjx-dim-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2px solid var(--mjx-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15), 0 0 0 0 color-mix(in srgb, var(--mjx-color) 18%, transparent);
  transition: transform .18s ease, box-shadow .18s ease;
}
.mjx-dim-range::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 2px solid var(--mjx-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
  transition: transform .18s ease, box-shadow .18s ease;
}
.mjx-dim-range:hover::-webkit-slider-thumb { transform: scale(1.1); }
.mjx-dim-range:active::-webkit-slider-thumb,
.mjx-dim-range:focus-visible::-webkit-slider-thumb {
  transform: scale(1.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15), 0 0 0 6px color-mix(in srgb, var(--mjx-color) 18%, transparent);
}
.mjx-dim-range:hover::-moz-range-thumb { transform: scale(1.1); }
.mjx-dim-range:active::-moz-range-thumb,
.mjx-dim-range:focus-visible::-moz-range-thumb {
  transform: scale(1.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15), 0 0 0 6px color-mix(in srgb, var(--mjx-color) 18%, transparent);
}

.mjx-dim-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }
.mjx-dim-status { color: #6b7f79; font-size: 12px; }
.mjx-dim-status.ok { color: #1f7a4f; font-weight: 700; }
.mjx-dim-save {
  border: 0; border-radius: 999px; padding: 10px 22px; min-height: 40px;
  background: var(--human-forest, #174b43); color: #fff; font-weight: 800; cursor: pointer;
}
.mjx-dim-save:hover { background: var(--human-forest-2, #0f3935); }

/* ---------- Questionnaire pop-up ---------- */
body.mjx-modal-open { overflow: hidden; }
.mjx-overlay {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px;
  background: #0b221fa6; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: mjx-fade .2s ease;
}
.mjx-modal {
  width: min(620px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: #fffdf8; border-radius: 26px; box-shadow: 0 30px 80px #0006;
  color: #172d2a; font-family: ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  animation: mjx-pop .22s ease;
}
.mjx-modal-head {
  position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px 22px; background: #fffdf8; border-bottom: 1px solid #e7ece8;
}
.mjx-modal-head h2 { margin: 0; font: 600 20px/1.3 Georgia, "Times New Roman", serif; }
.mjx-modal-x { border: 0; background: #eef3ef; width: 36px; height: 36px; border-radius: 50%; font-size: 16px; cursor: pointer; }
.mjx-modal-body { padding: 20px 22px 22px; }
.mjx-intro { font-size: 16px; line-height: 1.6; color: #34504a; margin: 0 0 12px; }
.mjx-small { font-size: 13px; color: #6b7f79; margin: 0 0 10px; }
.mjx-prefix { font-size: 14px; color: #6b7f79; font-style: italic; margin: 6px 0 2px; }
.mjx-question { font: 600 21px/1.35 Georgia, "Times New Roman", serif; margin: 4px 0 16px; }
.mjx-note { background: #fff5e0; border: 1px solid #f1d9a6; color: #6d4c0f; border-radius: 14px; padding: 10px 13px; font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.mjx-source { font-size: 11.5px; color: #8a9b96; margin: 16px 0 0; line-height: 1.5; }
.mjx-progress { height: 6px; border-radius: 999px; background: #e7ece8; overflow: hidden; margin-bottom: 10px; }
.mjx-progress span { display: block; height: 100%; background: var(--human-forest, #174b43); transition: width .25s ease; }
.mjx-options { display: grid; gap: 8px; }
.mjx-option {
  text-align: start; padding: 13px 16px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid #dfe7e2; background: #fff; font-size: 15px; font-weight: 600; color: #26403a;
  transition: border-color .15s ease, background .15s ease;
}
.mjx-option:hover { border-color: #9fbfb3; background: #f6faf7; }
.mjx-option.active { border-color: var(--human-forest, #174b43); background: #e3f0e8; }
.mjx-modal-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.mjx-modal-actions.split { justify-content: space-between; align-items: center; }
.mjx-modal-actions .primary, .mjx-modal-actions .secondary { padding: 0 22px; }
.mjx-link { border: 0; background: none; color: var(--human-forest, #174b43); font-weight: 800; text-decoration: underline; cursor: pointer; padding: 6px 0; font-size: 14px; }

.mjx-score { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 8px; }
.mjx-score strong { font: 600 56px/1 Georgia, serif; }
.mjx-score span { color: #6b7f79; font-weight: 700; }
.mjx-score-ok strong { color: #1f7a4f; }
.mjx-score-low strong { color: #b7791f; }
.mjx-score-very-low strong { color: #b42318; }
.mjx-meter { height: 10px; border-radius: 999px; background: #ece8e1; overflow: hidden; margin-bottom: 14px; }
.mjx-meter span { display: block; height: 100%; background: var(--human-forest, #174b43); border-radius: inherit; }
.mjx-domains { display: grid; gap: 4px; margin: 6px 0 8px; }
.mjx-domain-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 5px; }
.mjx-domain .mjx-meter { margin-bottom: 10px; }

@keyframes mjx-fade { from { opacity: 0; } }
@keyframes mjx-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (prefers-reduced-motion: reduce) {
  .mjx-overlay, .mjx-modal { animation: none; }
  .mjx-lang-word { transition: none; }
}

/* ---------- Smaller screens ---------- */
@media (max-width: 1050px) {
  .human-hero-grid { grid-template-columns: 1fr !important; }
  .mjx-hero-dims { max-width: 560px; width: 100%; }
}
@media (max-width: 560px) {
  .mjx-mood-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mjx-cta button { width: 100%; justify-content: center; }
  .mjx-modal-body, .mjx-modal-head { padding-left: 16px; padding-right: 16px; }
  .mjx-question { font-size: 19px; }
}

/* ---------- Wellbeing dimensions section (octagon chart + 8 cards) ---------- */
.mjx-wb-head { max-width: 760px; margin-bottom: 26px; }
.app .mjx-wb-head h2 { margin: 8px 0 8px; font-size: clamp(28px, 3vw, 42px); line-height: 1.12; }
.app .mjx-wb-head p { margin: 0; color: #5e716c; line-height: 1.6; }
.mjx-wb-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 32px; align-items: center; }
.mjx-wb-chart-wrap {
  border-radius: 28px; padding: 10px;
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, #ffffffaa 55%, transparent 75%);
}
.mjx-wb-chart { display: block; width: 100%; height: auto; overflow: visible; }
.mjx-wb-ring { fill: none; stroke: rgba(23, 75, 67, .12); stroke-width: 1; }
.mjx-wb-ring.outer { fill: rgba(99, 102, 241, .04); stroke: rgba(23, 75, 67, .18); }
.mjx-wb-spoke { stroke: rgba(23, 75, 67, .10); stroke-width: 1; }
.mjx-wb-shape { fill: rgba(99, 102, 241, .18); stroke: #6366f1; stroke-width: 2.5; stroke-linejoin: round; }
.mjx-wb-dot { stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .2)); }
.mjx-wb-label { font-size: 14px; font-weight: 600; fill: #3d5650; }
.mjx-wb-overall { font: 600 30px Georgia, "Times New Roman", serif; fill: var(--human-forest, #174b43); }
.mjx-wb-overall-lbl { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; fill: #6b7f79; }

.mjx-wb-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mjx-wb-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-height: 148px; padding: 14px 14px 12px; text-align: start; cursor: pointer;
  border: 1px solid rgba(23, 75, 67, .10); border-radius: 18px; background: #fff;
  box-shadow: 0 1px 2px rgba(23, 75, 67, .05), 0 6px 16px rgba(23, 75, 67, .05);
  border-top: 3px solid var(--mjx-color);
  transition: transform .2s ease, box-shadow .2s ease;
}
.mjx-wb-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(23, 75, 67, .06), 0 14px 26px rgba(23, 75, 67, .10); }
.mjx-wb-card:focus-visible { outline: 3px solid #efb33a; outline-offset: 3px; }
.mjx-wb-card-top { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 6px; }
.mjx-wb-chip {
  width: 26px; height: 26px; border-radius: 9px;
  background: color-mix(in srgb, var(--mjx-color) 16%, #fff);
  box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--mjx-color) 16%, #fff), inset 0 0 0 20px var(--mjx-color);
}
.mjx-wb-pct { font-size: 13px; font-weight: 800; color: var(--mjx-color); font-variant-numeric: tabular-nums; }
.mjx-wb-card strong { font-size: 15px; line-height: 1.25; color: var(--human-ink, #172d2a); }
.mjx-wb-card small { font-size: 12px; line-height: 1.4; color: #697b76; flex: 1; }
.mjx-wb-go { margin-top: 6px; font-size: 12.5px; font-weight: 800; color: var(--mjx-color); }
.mjx-wb-card:hover .mjx-wb-go span { margin-inline-start: 3px; }

@media (max-width: 1050px) {
  .mjx-wb-body { grid-template-columns: 1fr; }
  .mjx-wb-chart-wrap { max-width: 520px; margin: 0 auto; width: 100%; }
}
@media (max-width: 640px) {
  .mjx-wb-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mjx-wb-label { font-size: 16px; }
}

/* ---------- "Why wait for a crisis?" (dark forest section) ---------- */
.mjx-why {
  position: relative; overflow: hidden; padding: 84px 0 92px; color: #e8f1ec;
  background:
    radial-gradient(900px 420px at 85% 15%, rgba(213, 166, 61, .10), transparent 60%),
    radial-gradient(800px 500px at 10% 100%, rgba(15, 118, 110, .22), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 34px),
    linear-gradient(160deg, #1b5248 0%, #174b43 45%, #0f3935 100%);
}
.mjx-why-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.mjx-why-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06);
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #dfe9e4;
}
.mjx-why-pill .mjx-ico { color: var(--human-gold, #d5a63d); }
.mjx-ico { display: inline-grid; place-items: center; line-height: 0; }
.app .mjx-why-head h2 { margin: 18px 0 14px; font: 600 clamp(32px, 4vw, 50px)/1.1 Georgia, "Times New Roman", serif; color: #fff; }
.app .mjx-why-head p { margin: 0; font-size: 17px; line-height: 1.6; color: #b9cdc5; }

.mjx-why-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 700px; margin: 0 auto 28px; }
.mjx-why-path {
  padding: 22px 22px 18px; border-radius: 18px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.mjx-why-path.reactive { border-color: rgba(215, 111, 84, .30); }
.mjx-why-path.proactive { background: rgba(255, 255, 255, .08); border-color: rgba(110, 231, 183, .30); }
.mjx-why-path-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mjx-why-badge { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; }
.reactive .mjx-why-badge { background: rgba(215, 111, 84, .18); color: #f08b70; }
.proactive .mjx-why-badge { background: rgba(110, 231, 183, .14); color: #6ee7b7; }
.mjx-why-path-head small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.reactive .mjx-why-path-head small { color: #f08b70; }
.proactive .mjx-why-path-head small { color: #6ee7b7; }
.mjx-why-path-head strong { display: block; margin-top: 2px; font-size: 15px; color: #fff; }

.mjx-why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mjx-why-list li { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; }
.mjx-why-list li.bad { color: #a9bdb5; }
.mjx-why-list li.good { color: #e8f1ec; }
.mjx-why-mark { flex-shrink: 0; width: 14px; font-weight: 800; }
.bad > .mjx-why-mark { color: #f08b70; }
.good > .mjx-why-mark { color: #6ee7b7; }
.mjx-why-list.small { gap: 8px; margin: 12px 0 16px; }
.mjx-why-list.small li { font-size: 13px; }

.mjx-why-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mjx-why-card {
  display: flex; flex-direction: column; padding: 24px 22px 20px; border-radius: 18px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12);
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}
.mjx-why-card:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); }
.mjx-why-card-ico {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 16px; border-radius: 14px;
  background: rgba(213, 166, 61, .14); color: #f1c96b;
}
.app .mjx-why-card h3 { margin: 0; font-size: 16.5px; line-height: 1.3; color: #fff; }
.mjx-why-card .mjx-why-list.small { flex: 1; }
.mjx-why-try {
  align-self: flex-start; padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 13px; font-weight: 800; color: #f1c96b;
}
.mjx-why-try:hover { text-decoration: underline; text-underline-offset: 3px; }
.mjx-why-try:focus-visible { outline: 3px solid #efb33a; outline-offset: 3px; border-radius: 4px; }

@media (max-width: 900px) {
  .mjx-why { padding: 64px 0 70px; }
  .mjx-why-cards { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .mjx-why-paths { grid-template-columns: 1fr; }
}

/* ---------- Alternating section backgrounds from the 2nd section ----------
   Full-width colour bands behind sections that sit inside the page width. */
.eh-hub, .v1-goals, .mjx-wb-section { position: relative; }
.eh-hub { box-shadow: 0 0 0 100vmax #eef4ef; clip-path: inset(0 -100vmax); background: #eef4ef; }
.section.v1-goals { box-shadow: 0 0 0 100vmax #f6f1e7; clip-path: inset(0 -100vmax); background: #f6f1e7; }
.section.mjx-wb-section { box-shadow: 0 0 0 100vmax #ffffff; clip-path: inset(0 -100vmax); background: #ffffff; }
.section.quick-shift { margin-top: 48px; margin-bottom: 48px; }
