/* RateWatch partner signup page (VG-3703) - layout per Carolina's Figma "OB-RW"
   Frames: Primary >= 1280, 800-1279, 1-799 */

:root {
    --rw-bg: #f6e7dd;
    --rw-surface: #faf6f2;
    --rw-card: #ffffff;
    --rw-text: #1d1a39;
    --rw-muted: #4a4760;
    --rw-border: #d9d6e0;
    --rw-accent: #3d2be0;
    --rw-button: #6b5be2;
    --rw-button-hover: #5847d4;
    --rw-submit: #2b1b8c;
    --rw-submit-hover: #21136f;
    --rw-error: #b3261e;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--rw-bg);
    color: var(--rw-text);
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--rw-accent); }

/* ---------- Header ---------- */
.rw-topbar {
    height: 6px;
    background: linear-gradient(90deg, #3d2bf0 0%, #c21cf2 55%, #ff4f7b 100%);
}

.rw-header {
    background: var(--rw-surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    position: relative;
}

.rw-brand {
    display: flex;
    align-items: center;
    gap: 28px;
}

.rw-brand a { display: inline-flex; }
.rw-brand .rw-mc-logo { height: 32px; width: auto; }
.rw-brand .rw-partner-logo { height: 32px; width: auto; }   /* Carolina 9/25: desktop spec */

.rw-nav ul {
    list-style: none;
    display: flex;
    gap: 44px;
    margin: 0;
    padding: 0;
}

.rw-nav a {
    color: var(--rw-text);
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.rw-nav a:hover { color: var(--rw-accent); }

.rw-menu-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 6px;
    cursor: pointer;
    color: var(--rw-text);
}

.rw-menu-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    margin: 3px 0;
    background: currentColor;
}

/* ---------- Page grid ---------- */
.rw-page {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 458px;
    grid-template-rows: auto 1fr;   /* tall form shouldn't stretch the hero row */
    grid-template-areas:
        "hero  form"
        "media form";
    column-gap: 28px;
    row-gap: 28px;
    align-items: start;
    max-width: 1440px;
    margin: 0 auto;
    padding: 54px 28px 64px;
}

.rw-hero  { grid-area: hero; }
.rw-media { grid-area: media; }
.rw-form  { grid-area: form; }

/* ---------- Hero ---------- */
.rw-hero h1 {
    font-size: 48px;
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 40px;
    max-width: 700px;
}

.rw-hero-body {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}

.rw-phones {
    flex: 0 0 auto;
    width: 282px;
    max-width: 38%;
    height: auto;
    aspect-ratio: 510 / 586;   /* Carolina's phone artwork (transparent PNG) */
}

.rw-benefits {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
}

.rw-benefits li {
    position: relative;
    padding-left: 36px;
    font-size: 22px;
    margin-bottom: 26px;
}

.rw-benefits li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 7px;
    width: 14px;
    height: 7px;
    border-left: 2px solid var(--rw-accent);
    border-bottom: 2px solid var(--rw-accent);
    transform: rotate(-45deg);
}

.rw-pitch {
    font-size: 22px;
    margin: 0 0 20px;
}

.rw-pitch strong {
    color: var(--rw-accent);
    font-weight: 500;
}

.rw-button {
    display: inline-block;
    background: var(--rw-button);
    color: #fff;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    padding: 11px 18px;
    border-radius: 999px;
}

.rw-button:hover { background: var(--rw-button-hover); }

/* ---------- Video + app download ---------- */
.rw-media {
    background: var(--rw-surface);
    border-radius: 10px;
    padding: 18px 20px 20px;
    text-align: center;
}

.rw-video {
    width: 100%;
    max-width: 518px;
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
    margin: 0 auto;
}

/* ---------- Video poster + modal (VG-3703) ---------- */
/* No separate text/play overlay here on purpose - the poster image itself already has the
   "Hear from Other Loan Officers!" caption and play button baked into it (source: Carolina's
   asset from trustengine.com/game-film). Adding our own overlay on top duplicated that text. */
.rw-video-poster {
    position: relative;
    display: block;
    width: 100%;
    max-width: 518px;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: none;
    transition: opacity 0.15s ease;
}

.rw-video-poster:hover,
.rw-video-poster:focus-visible {
    opacity: 0.9;
}

.rw-video-poster img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.rw-video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.rw-video-modal.is-open { display: block; }

.rw-video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 12, 35, 0.82);
}

.rw-video-modal-frame {
    position: relative;
    width: min(92vw, 900px);
    margin: 6vh auto;
}

.rw-video-modal-body iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
    border-radius: 6px;
}

.rw-video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: var(--rw-card);
    color: var(--rw-text);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

body.rw-modal-open { overflow: hidden; }

.rw-media p {
    margin: 22px 0 12px;
    font-size: 17px;
    font-weight: 500;
}

.rw-stores {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.rw-stores img {
    height: 44px;
    width: auto;
    display: block;
}

/* ---------- Signup form ---------- */
.rw-form {
    background: var(--rw-card);
    border-radius: 28px;
    padding: 30px 27px 27px;
}

.rw-form h2 {
    color: var(--rw-accent);
    font-size: 23px;
    font-weight: 600;
    margin: 0 0 22px;
}

.rw-field { margin-bottom: 18px; }

.rw-field input[type="text"],
.rw-field input[type="password"],
.rw-field select {
    width: 100%;
    height: 62px;
    padding: 0 18px;
    border: 1px solid var(--rw-border);
    border-radius: 4px;
    background: #fff;
    color: var(--rw-text);
    font: inherit;
    font-size: 17px;
}

.rw-field input::placeholder { color: var(--rw-muted); opacity: 1; }

.rw-field input:focus,
.rw-field select:focus {
    outline: 2px solid var(--rw-accent);
    outline-offset: -1px;
    border-color: var(--rw-accent);
}

.rw-help {
    color: var(--rw-muted);
    font-size: 17px;
    margin: 10px 0 0;
}

.rw-field-gap { margin-top: 28px; }

.rw-form .error {
    display: block;
    color: var(--rw-error);
    font-size: 15px;
    margin-top: 6px;
}

.rw-form .error br { display: none; }

.rw-deactivated {
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 1px solid var(--rw-error);
    border-radius: 6px;
    color: var(--rw-error);
    font-weight: 600;
}

.rw-submit {
    width: 100%;
    height: 62px;
    margin-top: 10px;
    border: 0;
    border-radius: 4px;
    background: var(--rw-submit);
    color: #fff;
    font: inherit;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
}

.rw-submit:hover { background: var(--rw-submit-hover); }

/* ---------- 800 - 1279 ---------- */
@media (max-width: 1279px) {
    .rw-header { padding: 14px 22px; }
    .rw-brand { gap: 12px; }
    .rw-brand .rw-mc-logo { height: 22px; }
    .rw-brand .rw-partner-logo { height: 28px; }

    .rw-menu-toggle { display: block; }
    .rw-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--rw-surface);
        border-top: 1px solid var(--rw-border);
        z-index: 10;
    }
    .rw-nav.is-open { display: block; }
    .rw-nav ul { flex-direction: column; gap: 0; padding: 8px 22px 14px; }
    .rw-nav li a { display: block; padding: 10px 0; }

    .rw-page {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-template-areas: "hero" "media" "form";
        row-gap: 22px;
        max-width: 760px;
        padding: 38px 22px 48px;
    }

    .rw-hero h1 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 22px; max-width: none; }
    .rw-hero-body { gap: 30px; }
    .rw-phones { width: 180px; }
    .rw-benefits li { font-size: 19px; margin-bottom: 18px; }
    .rw-benefits li::before { top: 6px; }
    .rw-pitch { font-size: 14px; margin-bottom: 16px; }
    .rw-button { font-size: 15px; padding: 8px 14px; }

    .rw-media p { font-size: 15px; margin: 18px 0 10px; }
    .rw-stores img { height: 36px; }

    .rw-form { border-radius: 16px 16px 0 0; padding: 24px 15px 22px; }
    .rw-form h2 { font-size: 19px; }
    .rw-field input[type="text"],
    .rw-field input[type="password"],
    .rw-field select { height: 50px; font-size: 15px; padding: 0 14px; }
    .rw-help { font-size: 13px; margin-top: 6px; }
    .rw-submit { height: 50px; font-size: 15px; }
}

/* ---------- 1 - 799 ---------- */
@media (max-width: 799px) {
    .rw-header { padding: 12px 16px; }
    .rw-page { padding: 30px 16px 40px; row-gap: 18px; }

    .rw-hero h1 { font-size: 20px; margin-bottom: 14px; }
    .rw-hero-body { flex-wrap: wrap; gap: 14px; }
    .rw-phones { width: 104px; max-width: 34%; }
    .rw-benefits { flex: 1 1 0; min-width: 0; margin-bottom: 0; }
    .rw-benefits li { font-size: 13px; padding-left: 22px; margin-bottom: 8px; }
    .rw-benefits li::before { left: 2px; top: 5px; width: 9px; height: 5px; }
    .rw-hero-copy { display: contents; }
    .rw-pitch { flex: 1 1 100%; font-size: 13px; margin: 0; }
    .rw-button { flex: 1 1 100%; display: block; text-align: center; font-size: 14px; padding: 7px 14px; }

    .rw-media { padding: 14px 12px 16px; }
    .rw-video { max-width: 180px; }
    /* rw-video-poster deliberately NOT capped like the old iframe - full-card-width poster
       matches the Figma reference at this breakpoint. */
    .rw-media p { font-size: 13px; margin: 12px auto 8px; max-width: 170px; }
    .rw-stores img { height: 34px; }

    .rw-form { border-radius: 16px; padding: 22px 14px 20px; }
    .rw-form h2 { font-size: 18px; margin-bottom: 16px; }
    .rw-field { margin-bottom: 14px; }
}

/* ---------- Success confirmation (RWConfirmation.aspx) ---------- */
.rw-confirm {
    max-width: 810px;
    margin: 0 auto;
    padding: 44px 28px 64px;
}

.rw-confirm h1 {
    font-size: 42px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}

.rw-confirm .rw-lead { margin: 0 0 28px; }

.rw-confirm-card {
    background: var(--rw-surface);
    border-radius: 10px;
    padding: 24px 24px 26px;
}

.rw-confirm-card h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px;
}

.rw-confirm-card p { margin: 0 0 12px; }
.rw-confirm-card .rw-stores { justify-content: flex-start; margin-bottom: 28px; }
.rw-confirm-card .rw-button { margin-bottom: 30px; }
.rw-contact a { color: inherit; text-decoration: none; }

.rw-signoff {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 500;
    margin: 4px 0 0;
}

.rw-signoff img { width: 28px; height: 28px; }

.rw-notice {
    border: 1px solid var(--rw-accent);
    border-radius: 6px;
    background: #fff;
    padding: 12px 14px;
    margin: 0 0 24px;
}

@media (max-width: 1279px) {
    .rw-confirm { max-width: 760px; padding: 30px 22px 48px; }
    .rw-confirm h1 { font-size: 36px; }
    .rw-confirm .rw-lead { font-size: 15px; margin-bottom: 20px; }
    .rw-confirm-card { font-size: 15px; }
    .rw-confirm-card .rw-button { margin-bottom: 24px; }
}

@media (max-width: 799px) {
    .rw-confirm { padding: 22px 16px 40px; }
    .rw-confirm h1 { font-size: 17px; margin-bottom: 4px; }
    .rw-confirm .rw-lead { font-size: 13px; margin-bottom: 16px; }
    .rw-confirm-card { font-size: 14px; padding: 18px 14px 20px; }
    .rw-confirm-card h2 { font-size: 15px; }
    .rw-confirm-card .rw-stores { flex-direction: column; align-items: flex-start; gap: 8px; }
    .rw-confirm-card .rw-button { display: inline-block; font-size: 14px; padding: 7px 16px; }
    .rw-signoff { font-size: 14px; }
    .rw-signoff img { width: 20px; height: 20px; }
}
