/* ══════════════════════════════════════════════════════════════
   RLX MATCHING APPLICATION — Dedicated Stylesheet
   Version 1 | luxury · intentional · premium form design
   ══════════════════════════════════════════════════════════════ */

/* ── PAGE BASE ──────────────────────────────────────────────── */
.matching-page {
  background: var(--navy-0);
}

/* ── HERO ────────────────────────────────────────────────────── */
.ma-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: clamp(110px, 15vw, 200px) var(--pad-x) clamp(60px, 8vw, 110px);
  background: var(--navy-1);
}

.ma-hero__glow {
  position: absolute;
  top: -200px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 640px;
  background: radial-gradient(ellipse, rgba(201,168,76,.13) 0%, transparent 68%);
  pointer-events: none;
}

.ma-hero__content {
  position: relative; z-index: 2;
  max-width: 580px; margin: 0 auto;
}

.ma-hero__title {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 1.2rem;
}
.ma-hero__title em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-lt);
}

.ma-hero__sub {
  font-family: var(--sans);
  font-size: clamp(.82rem, 1.6vw, .96rem);
  font-weight: 300;
  color: rgba(255,255,255,.52);
  letter-spacing: .05em;
  line-height: 1.8;
  margin-bottom: 2.6rem;
}

/* Progress bar in hero */
.ma-hero__progress-wrap {
  max-width: 320px;
  margin: 0 auto;
}
.ma-hero__progress-track {
  height: 2px;
  background: rgba(201,168,76,.14);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: .8rem;
}
.ma-hero__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-lt));
  border-radius: 2px;
  transition: width .5s var(--ease);
  width: 25%;
}
.ma-hero__progress-label {
  font-family: var(--sans);
  font-size: .58rem; font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase;
  color: rgba(255,255,255,.3);
}

/* ── FORM WRAP ───────────────────────────────────────────────── */
.ma-form-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(80px, 12vw, 140px);
}

/* ── SECTION NAV ─────────────────────────────────────────────── */
.ma-section-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: clamp(2rem, 4vw, 3.2rem) 0 clamp(2.4rem, 4vw, 3.6rem);
  border-bottom: 1px solid rgba(201,168,76,.12);
  margin-bottom: clamp(2.4rem, 5vw, 4rem);
  flex-wrap: wrap;
  row-gap: .6rem;
}

.ma-section-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem 1.2rem;
  position: relative;
  transition: opacity .3s var(--ease);
  opacity: .38;
}
.ma-section-btn--active { opacity: 1; }
.ma-section-btn--done   { opacity: .65; cursor: pointer; }

.ma-section-btn__num {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 300;
  color: rgba(201,168,76,.4);
  line-height: 1;
  transition: color .3s var(--ease);
}
.ma-section-btn--active .ma-section-btn__num { color: var(--gold); }
.ma-section-btn--done .ma-section-btn__num   { color: rgba(201,168,76,.55); }

.ma-section-btn__label {
  font-family: var(--sans);
  font-size: .56rem; font-weight: 600;
  letter-spacing: .26em; text-transform: uppercase;
  color: rgba(255,255,255,.35);
  transition: color .3s var(--ease);
}
.ma-section-btn--active .ma-section-btn__label { color: var(--gold-lt); }
.ma-section-btn--done .ma-section-btn__label   { color: rgba(255,255,255,.5); }

.ma-section-sep {
  width: clamp(24px, 6vw, 56px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.22), transparent);
  flex-shrink: 0;
}

/* ── CONTACT BAR ─────────────────────────────────────────────── */
.ma-contact-bar {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(201,168,76,.14);
  border-radius: 4px;
  padding: clamp(1.4rem, 3vw, 2rem) clamp(1.4rem, 3vw, 2.2rem);
  margin-bottom: clamp(2.4rem, 5vw, 3.6rem);
}
.ma-contact-bar__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.2rem;
}

/* ── FORM FIELDS (shared) ────────────────────────────────────── */
.ma-field-group {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.ma-label {
  font-family: var(--sans);
  font-size: .58rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: rgba(255,255,255,.42);
}
.ma-required { color: var(--gold); }

.ma-input,
.ma-textarea {
  font-family: var(--sans);
  font-size: .92rem; font-weight: 300;
  color: #fff;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: 3px;
  padding: .9rem 1.1rem;
  outline: none;
  transition: border-color .3s var(--ease), background .3s var(--ease);
  width: 100%;
}
.ma-input::placeholder,
.ma-textarea::placeholder {
  color: rgba(255,255,255,.2);
}
.ma-input:focus,
.ma-textarea:focus {
  border-color: rgba(201,168,76,.55);
  background: rgba(255,255,255,.07);
}
.ma-input.ma-input--error,
.ma-textarea.ma-textarea--error {
  border-color: rgba(200, 36, 90, .6);
}
.ma-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.7;
}

.ma-char-count {
  font-family: var(--sans);
  font-size: .58rem; font-weight: 500;
  color: rgba(255,255,255,.22);
  text-align: right;
  margin-top: .4rem;
  letter-spacing: .06em;
}

/* ── FORM SECTIONS ───────────────────────────────────────────── */
.ma-section {
  display: none;
  animation: maSectionIn .45s var(--ease) both;
}
.ma-section--active {
  display: block;
}
@keyframes maSectionIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section header */
.ma-section__header {
  display: flex;
  align-items: flex-start;
  gap: 1.6rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(1.4rem, 3vw, 2rem);
  border-bottom: 1px solid rgba(201,168,76,.12);
}
.ma-section__num {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  font-weight: 300;
  color: rgba(201,168,76,.16);
  line-height: .9;
  flex-shrink: 0;
}
.ma-section__title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.1;
  margin-bottom: .5rem;
}
.ma-section__desc {
  font-family: var(--sans);
  font-size: clamp(.78rem, 1.5vw, .9rem);
  font-weight: 300;
  color: rgba(255,255,255,.42);
  line-height: 1.7;
  letter-spacing: .04em;
}

/* ── QUESTIONS ───────────────────────────────────────────────── */
.ma-question {
  margin-bottom: clamp(2.2rem, 4vw, 3.2rem);
  padding-bottom: clamp(2.2rem, 4vw, 3.2rem);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.ma-question:last-of-type {
  border-bottom: none;
}

.ma-question__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .6rem .5rem;
  font-family: var(--serif);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.5;
  margin-bottom: 1.4rem;
}

.ma-question__num {
  font-family: var(--sans);
  font-size: .58rem; font-weight: 700;
  letter-spacing: .18em;
  color: var(--gold);
  background: rgba(201,168,76,.1);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: 2px;
  padding: .25rem .55rem;
  flex-shrink: 0;
}

.ma-tag {
  font-family: var(--sans);
  font-size: .56rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: .2rem .65rem;
  flex-shrink: 0;
}

/* ── OPTIONS GRID ────────────────────────────────────────────── */
.ma-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .7rem;
}

/* Hide native input */
.ma-option input[type="radio"],
.ma-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
  pointer-events: none;
}

.ma-option {
  cursor: pointer;
  display: block;
}

.ma-option__box {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .95rem 1.1rem;
  border: 1px solid rgba(201,168,76,.16);
  border-radius: 4px;
  background: rgba(255,255,255,.03);
  transition:
    border-color .25s var(--ease),
    background   .25s var(--ease),
    transform    .18s var(--ease);
  user-select: none;
}
.ma-option__box:hover {
  border-color: rgba(201,168,76,.38);
  background: rgba(201,168,76,.05);
  transform: translateY(-1px);
}

/* Custom check/radio indicator */
.ma-option__check {
  width: 16px; height: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(201,168,76,.3);
  border-radius: 2px;
  position: relative;
  transition: border-color .25s var(--ease), background .25s var(--ease);
  background: transparent;
}
.ma-options--single .ma-option__check {
  border-radius: 50%;
}

/* Checked state — driven by JS adding .ma-option--selected */
.ma-option--selected .ma-option__box {
  border-color: var(--gold);
  background: rgba(201,168,76,.1);
}
.ma-option--selected .ma-option__check {
  background: var(--gold);
  border-color: var(--gold);
}
.ma-option--selected .ma-option__check::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -54%) rotate(45deg);
  width: 4px; height: 7px;
  border-right: 1.5px solid var(--navy-0);
  border-bottom: 1.5px solid var(--navy-0);
}
.ma-options--single .ma-option--selected .ma-option__check::after {
  border: none;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--navy-0);
  transform: translate(-50%, -50%) rotate(0);
}

/* Disabled (max reached) */
.ma-option--disabled .ma-option__box {
  opacity: .35;
  cursor: not-allowed;
  transform: none;
}

.ma-option__text {
  font-family: var(--sans);
  font-size: clamp(.8rem, 1.5vw, .9rem);
  font-weight: 300;
  color: rgba(255,255,255,.78);
  line-height: 1.4;
  transition: color .25s var(--ease);
}
.ma-option--selected .ma-option__text {
  color: #fff;
  font-weight: 400;
}

/* ── ERROR MESSAGES ──────────────────────────────────────────── */
.ma-error {
  display: none;
  font-family: var(--sans);
  font-size: .64rem; font-weight: 600;
  letter-spacing: .1em;
  color: rgba(200, 36, 90, .9);
  margin-top: .8rem;
}
.ma-error--visible { display: block; }

/* ── NAV BUTTONS ─────────────────────────────────────────────── */
.ma-nav-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(1.4rem, 3vw, 2rem);
  border-top: 1px solid rgba(201,168,76,.1);
  gap: 1rem;
}
.ma-nav-btns--submit { flex-wrap: wrap; }

.ma-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--sans);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: all .35s var(--ease);
  padding: 1rem 2rem;
}

.ma-btn--next {
  background: linear-gradient(115deg,#8a6520 0%,var(--gold) 30%,var(--gold-lt) 50%,var(--gold) 70%,#8a6520 100%);
  background-size: 240% 100%;
  background-position: 0% center;
  color: var(--navy-0);
  font-weight: 700;
  box-shadow: 0 4px 24px rgba(201,168,76,.2);
}
.ma-btn--next:hover {
  background-position: 100% center;
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(201,168,76,.4);
}

.ma-btn--back {
  background: transparent;
  border: 1px solid rgba(201,168,76,.28);
  color: rgba(255,255,255,.52);
}
.ma-btn--back:hover {
  border-color: rgba(201,168,76,.55);
  color: var(--gold-pale);
}

.ma-btn--submit {
  background: linear-gradient(115deg,#8a6520 0%,var(--gold) 30%,var(--gold-lt) 50%,var(--gold) 70%,#8a6520 100%);
  background-size: 240% 100%;
  background-position: 0% center;
  color: var(--navy-0);
  font-weight: 700;
  padding: 1.2rem 3rem;
  box-shadow: 0 4px 28px rgba(201,168,76,.22), inset 0 1px 0 rgba(255,255,255,.18);
}
.ma-btn--submit:hover {
  background-position: 100% center;
  transform: translateY(-3px);
  box-shadow: 0 18px 52px rgba(201,168,76,.45), 0 6px 16px rgba(201,168,76,.28);
}
.ma-btn--submit:disabled {
  opacity: .5; cursor: not-allowed; transform: none;
  box-shadow: none;
}
.ma-btn__arrow { font-size: 1rem; }

/* ── REVIEW STRIP ────────────────────────────────────────────── */
.ma-review-strip {
  background: rgba(201,168,76,.05);
  border: 1px solid rgba(201,168,76,.14);
  border-radius: 4px;
  padding: 1.6rem 1.8rem;
  margin: 2rem 0 1.4rem;
}
.ma-review-strip__label {
  font-family: var(--sans);
  font-size: .58rem; font-weight: 700;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}
.ma-review-strip__answers {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.ma-review-item {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
}
.ma-review-item__q {
  font-family: var(--sans);
  font-size: .58rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.28);
  flex-shrink: 0;
  padding-top: .1rem;
  min-width: 24px;
}
.ma-review-item__a {
  font-family: var(--serif);
  font-size: clamp(.8rem,1.5vw,.9rem);
  font-weight: 300; font-style: italic;
  color: rgba(255,255,255,.65);
  line-height: 1.5;
}

/* ── SUBMIT NOTE ─────────────────────────────────────────────── */
.ma-submit-note {
  font-family: var(--sans);
  font-size: .58rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.2);
  text-align: center;
  margin-top: 1.4rem;
  line-height: 1.9;
}

/* ── SUCCESS STATE ───────────────────────────────────────────── */
.ma-section--success {
  padding: clamp(60px, 10vw, 120px) 0;
}
.ma-success {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}
.ma-success__mark {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 1.6rem;
  display: block;
  animation: goldPulse 1.8s var(--ease) infinite alternate;
}
@keyframes goldPulse {
  from { opacity: .7; transform: scale(.96); }
  to   { opacity: 1;  transform: scale(1.04); }
}
.ma-success__title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1.4rem;
}
.ma-success__body {
  font-family: var(--serif);
  font-size: clamp(.9rem, 1.8vw, 1.1rem);
  font-weight: 300;
  color: rgba(255,255,255,.62);
  line-height: 1.8;
  margin-bottom: .6rem;
}
.ma-success__sub {
  font-family: var(--serif);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  font-style: italic;
  color: var(--gold-lt);
  margin-bottom: 2.8rem;
}
.ma-success__btn { margin-top: .4rem; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ma-contact-bar__inner {
    grid-template-columns: 1fr 1fr;
  }
  .ma-contact-bar__inner .ma-field-group:last-child {
    grid-column: span 2;
  }
  .ma-options {
    grid-template-columns: 1fr 1fr;
  }
  .ma-section__header { gap: 1rem; }
  .ma-section__num { font-size: clamp(2.8rem, 8vw, 4rem); }
  .ma-section-nav { gap: 0; }
  .ma-section-sep { width: clamp(16px, 3vw, 28px); }
  .ma-nav-btns { flex-direction: column-reverse; align-items: stretch; }
  .ma-btn--submit { text-align: center; justify-content: center; }
  .ma-btn--back { justify-content: center; }
  .ma-btn--next { justify-content: center; }
}

@media (max-width: 520px) {
  .ma-contact-bar__inner { grid-template-columns: 1fr; }
  .ma-contact-bar__inner .ma-field-group:last-child { grid-column: auto; }
  .ma-options { grid-template-columns: 1fr; }
  .ma-hero__title { font-size: clamp(2.4rem, 12vw, 3.6rem); }
  .ma-section-btn__label { display: none; }
  .ma-section-btn { padding: .5rem .7rem; }
}
