/* =============================================================================
   MORI Vision — Form System
   Namespace: .mv-
   Depends on: style.css (CSS custom properties), Bootstrap 5 grid
   ============================================================================= */

/* ── Section wrapper ─────────────────────────────────────────────────────────── */

.mv-form-section {
    position: relative;
}

/* ── Two-column layout: info left + card right ───────────────────────────────── */

.mv-form-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 0 8rem;
    align-items: start;
}

/* ── Info column ─────────────────────────────────────────────────────────────── */

.mv-form-info {
    padding-top: 1rem;
}

.mv-form-info__label {
    display: inline-block;
    font-family: var(--f-body);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-velvet-bloom);
    margin-bottom: 2rem;
}

.mv-form-info__title {
    font-family: var(--f-display);
    font-size: 7.2rem;
    font-weight: 700;
    line-height: 0.95;
    color: var(--c-white);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 2.8rem;
}

.mv-form-info__body {
    font-family: var(--f-body);
    font-size: 1.6rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 3.2rem;
    max-width: 42rem;
}

/* Benefits list */

.mv-form-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.mv-form-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    font-family: var(--f-body);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}

.mv-form-benefits li::before {
    content: '';
    display: inline-flex;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    margin-top: 0.1rem;
    background-color: var(--c-velvet-bloom);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23272320' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 8 6.5 11.5 13 5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1.2rem;
}

/* ── Form card ───────────────────────────────────────────────────────────────── */

.mv-form-card {
    background: var(--c-white);
    border-radius: 2.4rem;
    padding: 4rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
    position: relative;
}

/* ── Field base ──────────────────────────────────────────────────────────────── */

.mv-field {
    position: relative;
    margin-bottom: 2rem;
}

.mv-field input,
.mv-field textarea,
.mv-field select {
    display: block;
    width: 100%;
    padding: 2.2rem 1.6rem 0.8rem;
    border: 1.5px solid var(--c-border);
    border-radius: 1.2rem;
    font-size: 1.5rem;
    font-family: var(--f-body);
    color: var(--c-eclipse-noir);
    background-color: var(--c-white);
    transition: border-color 180ms ease, box-shadow 180ms ease;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    line-height: 1.4;
}

.mv-field textarea {
    resize: vertical;
    min-height: 11rem;
    padding-top: 2.6rem;
    line-height: 1.6;
}

/* Select custom arrow */
.mv-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23272320' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 8 10 13 15 8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.4rem center;
    background-size: 1.8rem;
    padding-right: 4rem;
    cursor: pointer;
}

/* Floating label — positioned to visually match the input's content area */
.mv-field label {
    position: absolute;
    /* Input height ≈ padding-top(2.2rem) + content(2.1rem) + padding-bottom(0.8rem) = 5.1rem
       Center = 2.55rem. Label height ≈ 1.5rem. Top of label = 2.55 - 0.75 = 1.8rem */
    top: 1.8rem;
    left: 1.6rem;
    right: 1.6rem;
    transform: none;
    font-family: var(--f-body);
    font-size: 1.5rem;
    color: var(--c-muted);
    pointer-events: none;
    transition: top 180ms ease, transform 180ms ease, color 180ms ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5rem;
}

/* Textarea label sits near the top of the content area */
.mv-field textarea ~ label {
    top: 1.6rem;
}

/* Focused OR has-value: float the label to the top */
.mv-field.is-focused label,
.mv-field.has-value label {
    top: 0.7rem;
    transform: scale(0.82);
    transform-origin: left top;
    color: var(--c-eclipse-noir);
    font-weight: 500;
}

.mv-field.is-focused textarea ~ label,
.mv-field.has-value textarea ~ label {
    top: 0.7rem;
    transform: scale(0.82);
    transform-origin: left top;
    color: var(--c-eclipse-noir);
    font-weight: 500;
}

/* Focused border */
.mv-field.is-focused input,
.mv-field.is-focused textarea,
.mv-field.is-focused select {
    border-color: var(--c-eclipse-noir);
    box-shadow: 0 0 0 3px rgba(39, 35, 32, 0.06);
}

/* Error state */
.mv-field.has-error input,
.mv-field.has-error textarea,
.mv-field.has-error select {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.08);
}

.mv-field.has-error label {
    color: #e74c3c;
}

/* Field error message */
.mv-field__err {
    display: block;
    min-height: 1.8rem;
    font-family: var(--f-body);
    font-size: 1.15rem;
    color: #e74c3c;
    margin-top: 0.4rem;
    padding-left: 0.2rem;
    line-height: 1.4;
}

/* ── Two-column row ──────────────────────────────────────────────────────────── */

.mv-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2rem;
}

/* ── Wizard progress indicator ───────────────────────────────────────────────── */

.mv-progress {
    display: flex;
    align-items: center;
    margin-bottom: 3.6rem;
    padding-bottom: 3.2rem;
    border-bottom: 1px solid var(--c-border);
}

.mv-progress__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
}

.mv-progress__dot {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    border: 1.5px solid var(--c-border);
    background: var(--c-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 200ms ease, border-color 200ms ease;
}

.mv-progress__dot span {
    font-family: var(--f-body);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--c-muted);
    transition: color 200ms ease;
    line-height: 1;
}

.mv-progress__step-label {
    font-family: var(--f-body);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--c-muted);
    letter-spacing: 0.04em;
    white-space: nowrap;
    transition: color 200ms ease;
}

/* Active step */
.mv-progress__step.active .mv-progress__dot {
    background: var(--c-eclipse-noir);
    border-color: var(--c-eclipse-noir);
}

.mv-progress__step.active .mv-progress__dot span {
    color: var(--c-white);
}

.mv-progress__step.active .mv-progress__step-label {
    color: var(--c-eclipse-noir);
    font-weight: 600;
}

/* Done step */
.mv-progress__step.done .mv-progress__dot {
    background: var(--c-eclipse-noir);
    border-color: var(--c-eclipse-noir);
}

.mv-progress__step.done .mv-progress__dot span::before {
    content: '✓';
    font-size: 1.3rem;
    color: var(--c-white);
    font-family: Arial, sans-serif;
}

.mv-progress__step.done .mv-progress__dot span {
    display: none;
}

.mv-progress__step.done .mv-progress__dot::after {
    content: '✓';
    font-size: 1.4rem;
    color: var(--c-white);
    font-family: Arial, sans-serif;
    font-weight: 700;
    line-height: 1;
}

.mv-progress__step.done .mv-progress__step-label {
    color: var(--c-eclipse-noir);
}

/* Connecting line between steps */
.mv-progress__line {
    flex: 1;
    height: 1.5px;
    background: var(--c-border);
    margin: 0 1.2rem;
    margin-bottom: 2.4rem; /* offset to align with dots, not labels */
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.mv-progress__line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: var(--c-eclipse-noir);
    transition: width 300ms ease;
    border-radius: 2px;
}

.mv-progress__line--done::after {
    width: 100%;
}

/* ── Step container ──────────────────────────────────────────────────────────── */

.mv-form__steps-wrap {
    overflow: hidden;
}

.mv-form__step {
    display: none;
}

.mv-form__step.active {
    display: block;
}

.mv-form__step.entering {
    animation: mvStepIn 260ms ease both;
}

@keyframes mvStepIn {
    from {
        opacity: 0;
        transform: translateX(18px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mv-form__step-title {
    font-family: var(--f-display);
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--c-eclipse-noir);
    margin-bottom: 2.4rem;
    letter-spacing: -0.01em;
}

/* ── Navigation bar ──────────────────────────────────────────────────────────── */

.mv-form__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2.4rem;
    padding-top: 2.4rem;
    border-top: 1px solid var(--c-border);
}

.mv-form__nav-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-left: auto;
}

/* ── Global error ────────────────────────────────────────────────────────────── */

.mv-form__global-err {
    display: none;
    background: #fdf0f0;
    border: 1.5px solid #f5c6c6;
    border-radius: 1rem;
    padding: 1.4rem 1.6rem;
    margin-top: 2rem;
    font-family: var(--f-body);
    font-size: 1.35rem;
    color: #c0392b;
    line-height: 1.5;
}

.mv-form__global-err.is-visible {
    display: block;
}

/* ── Success state ───────────────────────────────────────────────────────────── */

.mv-form__success {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
}

.mv-form__success.is-visible {
    display: block;
}

.mv-form__success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 8rem;
    height: 8rem;
    background: var(--c-velvet-bloom);
    border-radius: 50%;
    font-size: 3.2rem;
    color: var(--c-white);
    font-family: Arial, sans-serif;
    font-weight: 700;
    margin-bottom: 2.4rem;
}

.mv-form__success-title {
    font-family: var(--f-display);
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--c-eclipse-noir);
    margin-bottom: 1.2rem;
    letter-spacing: -0.01em;
}

.mv-form__success-body {
    font-family: var(--f-body);
    font-size: 1.5rem;
    color: var(--c-muted);
    line-height: 1.65;
    margin-bottom: 3.2rem;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

/* ── Loading state on submit button ─────────────────────────────────────────── */

.mv-form.is-loading .mv-btn-submit,
.mv-form.is-loading .mv-btn-next {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Contact page specific (centered card, no info column) ───────────────────── */

.mv-form-card--centered {
    max-width: 72rem;
    margin: 0 auto;
}

/* ── Responsive: ≤991px → single column ─────────────────────────────────────── */

@media (max-width: 991px) {
    .mv-form-layout {
        grid-template-columns: 1fr;
        gap: 6rem 0;
    }

    .mv-form-info__title {
        font-size: 5.2rem;
    }

    .mv-fields-row {
        grid-template-columns: 1fr;
    }

    .mv-form-card {
        padding: 2.4rem;
    }
}

/* ── Responsive: ≤575px → compact ───────────────────────────────────────────── */

@media (max-width: 575px) {
    .mv-progress__step-label {
        display: none;
    }

    .mv-form-card {
        padding: 2rem;
        border-radius: 1.6rem;
    }

    .mv-form-info__title {
        font-size: 4.2rem;
    }

    .mv-form__success-icon {
        width: 6.4rem;
        height: 6.4rem;
        font-size: 2.6rem;
    }

    .mv-form__success-title {
        font-size: 2rem;
    }
}
