/* ============================================================
   SCARLET PETAL AUTOMATION — Reverse Mortgage Funnel
   shared.css — Single source of truth for all funnel pages
   ============================================================ */

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
    /* Backgrounds */
    --bg:           #07090F;
    --bg-deep:      #040609;
    --surface:      rgba(8, 16, 38, 0.88);
    --border:       rgba(30, 55, 110, 0.45);

    /* Primary — Trust Navy */
    --primary:       #1A4FBF;
    --primary-light: #3D72F0;
    --primary-dim:   rgba(26, 79, 191, 0.12);
    --border-glow:   rgba(26, 79, 191, 0.3);

    /* Accent — Amber Gold (CTAs only) */
    --gold:          #E8A020;
    --gold-light:    #F5B842;
    --gold-dim:      rgba(232, 160, 32, 0.14);
    --gold-border:   rgba(232, 160, 32, 0.25);

    /* Text */
    --white:    #EEF2FF;
    --muted:    #7B8DB8;
    --faint:    #3D4F72;

    /* Utils */
    --blur:      blur(20px);
    --radius:    1rem;
    --radius-lg: 1.5rem;
    --ease:      cubic-bezier(0.22, 1, 0.36, 1);
    --max:       1140px;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; }

/* ── BASE ───────────────────────────────────────────────────── */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.65;
    min-height: 100vh;
}
.page { min-height: 100vh; }

img, svg { display: block; }
a { color: inherit; text-decoration: none; }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}
.inner--mid { max-width: 840px; }
.inner--narrow { max-width: 640px; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.05;
    color: var(--white);
}
p { color: var(--muted); line-height: 1.75; }

/* ── SECTIONS ───────────────────────────────────────────────── */
.section { padding: 6rem 0; }
.section--alt {
    background: linear-gradient(180deg, var(--bg) 0%, rgba(26,79,191,0.04) 50%, var(--bg) 100%);
}
.section__label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--primary-light);
    margin-bottom: 1rem;
}
.section__heading {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    margin-bottom: 1.1rem;
    max-width: 760px;
}
.section__sub {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 600px;
    margin-bottom: 3rem;
    line-height: 1.75;
}

/* ── NAV ────────────────────────────────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(7, 9, 15, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(30,55,110,0.4);
    padding: 1rem 0;
}
.nav__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ── LOGO ───────────────────────────────────────────────────── */
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.97rem;
    font-weight: 500;
    color: var(--white);
    letter-spacing: 0.005em;
}
.logo strong { font-weight: 800; }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    border-radius: 9999px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -0.01em;
}
.btn--primary {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #07090F;
    font-weight: 800;
    box-shadow: 0 4px 24px rgba(232,160,32,0.3);
    animation: btn-pulse 3s ease-in-out infinite;
}
.btn--primary:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 40px rgba(232,160,32,0.5);
    color: #07090F;
}
.btn--nav {
    background: var(--primary-dim);
    color: var(--primary-light);
    border: 1px solid rgba(26,79,191,0.3);
    padding: 0.55rem 1.3rem;
    font-size: 0.87rem;
    font-weight: 700;
}
.btn--nav:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.btn--xl { padding: 1.15rem 2.8rem; font-size: 1.1rem; }
.btn--full { width: 100%; display: flex; }

/* ── BADGES ─────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--primary-dim);
    border: 1px solid rgba(26,79,191,0.3);
    color: var(--primary-light);
}
.badge--pulse { animation: badge-glow 2.5s ease-in-out infinite; }
.badge--gold {
    background: var(--gold-dim);
    border-color: var(--gold-border);
    color: var(--gold);
}

/* ── CARDS ──────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}
.card--glow {
    border-color: var(--border-glow);
    box-shadow: 0 0 50px rgba(26,79,191,0.08);
}

/* ── CHECKLIST ──────────────────────────────────────────────── */
.checklist {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: var(--white);
    font-size: 0.94rem;
    line-height: 1.5;
}
.checklist li::before {
    content: '✓';
    color: var(--primary-light);
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
    width: 1rem;
}
.checklist--muted li { color: var(--muted); }
.checklist--muted li::before { content: '✗'; color: var(--faint); }

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer {
    padding: 3rem 0 2.5rem;
    border-top: 1px solid var(--border);
}
.footer__top {
    margin-bottom: 1.5rem;
}
.footer__divider {
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}
.footer__copy {
    font-size: 0.78rem;
    color: var(--faint);
    line-height: 1.7;
    max-width: 640px;
}
.footer__links {
    margin-top: 0.75rem;
    font-size: 0.78rem;
    color: var(--faint);
}
.footer__links a { color: var(--faint); text-decoration: underline; }
.footer__links a:hover { color: var(--muted); }

/* ── FORM ELEMENTS ──────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.label {
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.01em;
}
.label sup { color: var(--gold); margin-left: 2px; }
.input, .select, .textarea {
    width: 100%;
    padding: 0.875rem 1.1rem;
    border-radius: 0.65rem;
    background: rgba(8,16,38,0.9);
    border: 1px solid rgba(30,55,110,0.6);
    color: var(--white);
    font-family: inherit;
    font-size: 0.97rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,79,191,0.18);
}
.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237B8DB8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 2.5rem;
    cursor: pointer;
}
.textarea { resize: vertical; min-height: 100px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* ── PROGRESS ───────────────────────────────────────────────── */
.progress-bar {
    height: 3px;
    background: rgba(30,55,110,0.4);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 2.5rem;
}
.progress-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    border-radius: 9999px;
    transition: width 0.5s var(--ease);
}

/* ── RADIO GROUP ────────────────────────────────────────────── */
.radio-group { display: flex; flex-direction: column; gap: 0.55rem; }
.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(30,55,110,0.5);
    background: rgba(8,16,38,0.5);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 0.93rem;
    color: var(--white);
}
.radio-label:hover { border-color: var(--border-glow); }
.radio-label input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.radio-label:has(input:checked) { border-color: var(--primary); background: var(--primary-dim); }

/* ── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes btn-pulse {
    0%, 100% { box-shadow: 0 4px 24px rgba(232,160,32,0.3); }
    50%       { box-shadow: 0 4px 40px rgba(232,160,32,0.55); }
}
@keyframes badge-glow {
    0%, 100% { box-shadow: none; }
    50%       { box-shadow: 0 0 12px rgba(26,79,191,0.35); }
}
@keyframes fade-up {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── REVEAL ON SCROLL ───────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal--d1 { transition-delay: 0.1s; }
.reveal--d2 { transition-delay: 0.2s; }
.reveal--d3 { transition-delay: 0.32s; }
.reveal--d4 { transition-delay: 0.46s; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .form-grid { grid-template-columns: 1fr; }
    .inner { padding: 0 1.25rem; }
}
@media (max-width: 640px) {
    .section { padding: 4rem 0; }
    .btn--xl { padding: 1rem 2rem; font-size: 1rem; }
    .nav__inner { gap: 0.75rem; }
}
