/* ============================================================
   Marriage Solutions — quiz experience styles
   Used by: find-your-weekend.html, your-results.html,
            results-marriage-encounter.html,
            results-marriage-restored.html
   Palette (from site theme):
     navy    #093567   blue  #4a90e2   ice  #ebf3fc
     gold    #b99a5f   sand  #d9d2c3
   ============================================================ */

:root {
  --ms-navy: #093567;
  --ms-navy-deep: #062548;
  --ms-blue: #4a90e2;
  --ms-blue-dark: #3080de;
  --ms-ice: #ebf3fc;
  --ms-gold: #b99a5f;
  --ms-sand: #d9d2c3;
  --ms-ink: #1c2b3a;
  --ms-muted: #5b6b7d;
  --ms-white: #ffffff;
  --ms-radius: 20px;
  --ms-shadow-soft: 0 10px 40px rgba(9, 53, 103, 0.10);
  --ms-shadow-lift: 0 18px 50px rgba(9, 53, 103, 0.16);
  --ms-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

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

body.ms-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Lato", "Roboto", -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ms-ink);
  background: linear-gradient(178deg, #fdfdfc 0%, #f2f7fd 45%, #e8f1fb 100%);
  overflow-x: hidden;
}

/* ---- ambient drifting glow orbs -------------------------- */
.ms-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  will-change: transform;
}
.ms-orb--blue {
  width: 46vmax; height: 46vmax;
  top: -18vmax; right: -14vmax;
  background: radial-gradient(circle at 35% 35%, rgba(74, 144, 226, 0.30), rgba(74, 144, 226, 0) 70%);
  animation: ms-drift-a 26s ease-in-out infinite alternate;
}
.ms-orb--gold {
  width: 38vmax; height: 38vmax;
  bottom: -16vmax; left: -12vmax;
  background: radial-gradient(circle at 60% 40%, rgba(217, 210, 195, 0.55), rgba(217, 210, 195, 0) 70%);
  animation: ms-drift-b 32s ease-in-out infinite alternate;
}
@keyframes ms-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-6vmax, 5vmax, 0) scale(1.12); }
}
@keyframes ms-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(5vmax, -4vmax, 0) scale(1.08); }
}

/* ---- page shell ------------------------------------------- */
.ms-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.ms-header {
  display: flex;
  justify-content: center;
  padding: 28px 20px 8px;
}
.ms-header img {
  height: 56px;
  width: auto;
  display: block;
}

.ms-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 40px;
  width: 100%;
}

.ms-footer {
  text-align: center;
  padding: 18px 20px 26px;
  font-size: 0.82rem;
  color: var(--ms-muted);
}
.ms-footer a { color: var(--ms-blue); text-decoration: none; }

/* ---- typography ------------------------------------------- */
.ms-eyebrow {
  font-family: "Montserrat", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ms-gold);
  margin: 0 0 18px;
}
.ms-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 5.4vw, 2.9rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--ms-navy);
  margin: 0 0 18px;
}
.ms-lede {
  font-size: clamp(1.02rem, 2.6vw, 1.18rem);
  color: var(--ms-muted);
  max-width: 34em;
  margin: 0 auto 34px;
}
.ms-divider {
  width: 56px; height: 3px;
  border: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--ms-gold), var(--ms-sand));
  margin: 0 auto 26px;
}

/* ---- buttons ----------------------------------------------- */
.ms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  color: var(--ms-white);
  background: linear-gradient(135deg, var(--ms-blue) 0%, #2f6fc4 100%);
  border: 0;
  border-radius: 999px;
  padding: 17px 42px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(74, 144, 226, 0.35);
  transition: transform 0.25s var(--ms-ease), box-shadow 0.25s var(--ms-ease);
}
.ms-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(74, 144, 226, 0.45); }
.ms-btn:active { transform: translateY(0); }
.ms-btn--ghost {
  color: var(--ms-navy);
  background: var(--ms-white);
  border: 1.5px solid rgba(9, 53, 103, 0.18);
  box-shadow: none;
}
.ms-btn--ghost:hover { box-shadow: var(--ms-shadow-soft); }

.ms-hint {
  font-size: 0.86rem;
  color: var(--ms-muted);
  margin-top: 18px;
}

/* ---- step engine (fade / glide between screens) ------------ */
.ms-stage {
  position: relative;
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
}
.ms-step {
  display: none;
  width: 100%;
}
.ms-step.is-active {
  display: block;
  animation: ms-step-in 0.55s var(--ms-ease) both;
}
.ms-step.is-active.is-back {
  animation-name: ms-step-in-back;
}
@keyframes ms-step-in {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ms-step-in-back {
  from { opacity: 0; transform: translateY(-22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* staggered entrance for children of the active step */
.ms-step.is-active .ms-rise {
  animation: ms-step-in 0.6s var(--ms-ease) both;
}
.ms-step.is-active .ms-rise:nth-child(2) { animation-delay: 0.08s; }
.ms-step.is-active .ms-rise:nth-child(3) { animation-delay: 0.16s; }
.ms-step.is-active .ms-rise:nth-child(4) { animation-delay: 0.24s; }
.ms-step.is-active .ms-rise:nth-child(5) { animation-delay: 0.32s; }

/* ---- progress bar ------------------------------------------ */
.ms-progress {
  width: 100%;
  max-width: 660px;
  margin: 0 auto 44px;
}
.ms-progress__label {
  display: flex;
  justify-content: space-between;
  font-family: "Montserrat", sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ms-muted);
  margin-bottom: 10px;
}
.ms-progress__track {
  height: 6px;
  border-radius: 999px;
  background: rgba(9, 53, 103, 0.10);
  overflow: hidden;
}
.ms-progress__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ms-blue), var(--ms-navy));
  transition: width 0.55s var(--ms-ease);
}

/* ---- question screens -------------------------------------- */
.ms-question {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: clamp(1.35rem, 4.4vw, 1.9rem);
  line-height: 1.32;
  color: var(--ms-navy);
  margin: 0 auto 38px;
  max-width: 21em;
  min-height: 3.3em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ms-answers {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.ms-answer {
  flex: 1 1 180px;
  max-width: 260px;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ms-navy);
  background: var(--ms-white);
  border: 1.5px solid rgba(9, 53, 103, 0.14);
  border-radius: 18px;
  padding: 20px 24px;
  cursor: pointer;
  transition: transform 0.22s var(--ms-ease), box-shadow 0.22s var(--ms-ease),
              border-color 0.22s var(--ms-ease), background 0.22s var(--ms-ease),
              color 0.22s var(--ms-ease);
  box-shadow: 0 3px 14px rgba(9, 53, 103, 0.06);
}
.ms-answer:hover {
  transform: translateY(-3px);
  border-color: var(--ms-blue);
  box-shadow: var(--ms-shadow-soft);
}
.ms-answer.is-selected {
  background: var(--ms-navy);
  border-color: var(--ms-navy);
  color: var(--ms-white);
  transform: translateY(-1px) scale(1.02);
}

.ms-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 40px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ms-muted);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}
.ms-back:hover { color: var(--ms-navy); background: rgba(9, 53, 103, 0.06); }
.ms-back[hidden] { display: none; }

/* ---- contact form ------------------------------------------ */
.ms-form {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  text-align: left;
}
.ms-field { margin-bottom: 20px; }
.ms-field > label {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ms-navy);
  margin-bottom: 8px;
}
.ms-field input {
  width: 100%;
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--ms-ink);
  background: var(--ms-white);
  border: 1.5px solid rgba(9, 53, 103, 0.16);
  border-radius: 14px;
  padding: 15px 18px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
}
.ms-field input:focus {
  border-color: var(--ms-blue);
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.16);
}
.ms-field input.is-invalid {
  border-color: #d05252;
  box-shadow: 0 0 0 4px rgba(208, 82, 82, 0.12);
}
.ms-field .ms-error {
  display: none;
  font-size: 0.82rem;
  color: #c04444;
  margin-top: 6px;
}
.ms-field.has-error .ms-error { display: block; }

.ms-tcpa {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.55s var(--ms-ease),
    opacity 0.55s var(--ms-ease),
    margin-top 0.55s var(--ms-ease);
  margin-top: 0;
  pointer-events: none;
}

.ms-tcpa.is-visible {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 12px;
  pointer-events: auto;
}

.ms-tcpa__inner {
  overflow: hidden;
  min-height: 0;
}

.ms-tcpa__label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-family: inherit;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
  margin: 0;
}

.ms-tcpa__text {
  font-family: inherit;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ms-muted);
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.ms-tcpa__label input[type="checkbox"] {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin: 3px 0 0;
  padding: 0;
  border: 1.5px solid rgba(9, 53, 103, 0.22);
  border-radius: 3px;
  background: var(--ms-white);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.ms-tcpa__label input[type="checkbox"]:checked {
  background: var(--ms-blue);
  border-color: var(--ms-blue);
}

.ms-tcpa__label input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 0.5px;
  width: 3px;
  height: 6px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.ms-tcpa__label input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.ms-tcpa__error {
  margin-top: 8px;
  font-size: 0.78rem;
}

.ms-field.has-tcpa-error .ms-tcpa__error {
  display: block;
}

.ms-trust {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--ms-muted);
  margin: 22px 0 26px;
  line-height: 1.5;
}
.ms-trust svg { flex: 0 0 auto; margin-top: 2px; }

/* ---- calculating / reveal ---------------------------------- */
.ms-pulse {
  width: 74px; height: 74px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 144, 226, 0.22), rgba(74, 144, 226, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ms-pulse 1.6s ease-in-out infinite;
}
@keyframes ms-pulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.28); }
  50%      { transform: scale(1.07); box-shadow: 0 0 0 22px rgba(74, 144, 226, 0); }
}

/* ---- results page ------------------------------------------ */
.ms-result-card {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  box-shadow: var(--ms-shadow-lift);
  padding: clamp(36px, 7vw, 64px) clamp(24px, 6vw, 60px);
  text-align: center;
}
.ms-result-kicker {
  font-family: "Montserrat", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ms-muted);
  margin: 0 0 14px;
}
.ms-result-name {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 6.4vw, 3.2rem);
  line-height: 1.12;
  color: var(--ms-navy);
  margin: 0 0 8px;
}
.ms-result-name .ms-accent {
  background: linear-gradient(120deg, var(--ms-blue), var(--ms-navy));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ms-result-sub {
  font-size: clamp(1rem, 2.6vw, 1.15rem);
  color: var(--ms-muted);
  max-width: 32em;
  margin: 14px auto 30px;
}

.ms-next {
  text-align: left;
  max-width: 460px;
  margin: 0 auto 34px;
  padding: 0;
  list-style: none;
}
.ms-next li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
}
.ms-next .ms-next__num {
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ms-ice);
  color: var(--ms-navy);
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.ms-next p { margin: 2px 0 0; color: var(--ms-ink); }
.ms-next strong { color: var(--ms-navy); }

.ms-result-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.ms-call {
  font-size: 0.92rem;
  color: var(--ms-muted);
}
.ms-call a {
  color: var(--ms-blue);
  font-weight: 700;
  text-decoration: none;
}

/* ---- small screens ----------------------------------------- */
@media (max-width: 520px) {
  .ms-header img { height: 46px; }
  .ms-main { padding: 16px 18px 32px; }
  .ms-answers { flex-direction: column; align-items: stretch; }
  .ms-answer { max-width: none; flex: 0 0 auto; }
  .ms-btn { width: 100%; }
  .ms-question { min-height: 0; }
}

/* ---- reduced motion ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ms-orb { animation: none; }
  .ms-step.is-active,
  .ms-step.is-active .ms-rise { animation-duration: 0.01s; animation-delay: 0s; }
  .ms-pulse { animation: none; }
  .ms-btn, .ms-answer { transition: none; }
  .ms-tcpa { transition: none; }
  .ms-tcpa.is-visible { opacity: 1; grid-template-rows: 1fr; }
}
