/* ══════════════════════════════════════════════════
   Wealth Management — Page Styles
   Navy (#1a365d) + Gold (#c9a94e) palette
   ══════════════════════════════════════════════════ */

/* ── Hero Layout ────────────────────────────────── */
.wm-hero {
    position: relative;
    padding: 160px 0 100px;
    background: var(--bg-primary);
    overflow: hidden;
}

.wm-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(26, 54, 93, 0.03) 1px, transparent 0);
    background-size: 40px 40px;
    z-index: 0;
    animation: wmDotDrift 30s linear infinite;
}

.wm-hero::after {
    content: '';
    position: absolute;
    top: -120px;
    right: -180px;
    width: 800px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(201, 169, 78, 0.07) 0%, rgba(26, 54, 93, 0.04) 40%, transparent 70%);
    z-index: 0;
    pointer-events: none;
    animation: wmGlowPulse 7s ease-in-out infinite alternate;
}

@keyframes wmDotDrift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

@keyframes wmGlowPulse {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.08); }
}

.wm-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.wm-hero-text {
    animation: wmFadeSlideUp 0.8s ease-out both;
}

.wm-hero-overline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: 980px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(26, 54, 93, 0.06);
    color: #1a365d;
    margin-bottom: 24px;
}

.wm-hero-overline svg {
    stroke: #c9a94e;
}

.wm-hero-text .headline-hero {
    margin-bottom: 20px;
}

.wm-gradient {
    background: linear-gradient(135deg, #1a365d, #c9a94e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wm-hero-text .subhead {
    margin-bottom: 36px;
    max-width: 480px;
}

.wm-hero-trust {
    margin-top: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.wm-hero-trust-dots {
    display: flex;
    gap: 4px;
}

.wm-hero-trust-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c9a94e;
}

@keyframes wmFadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Phone Mockup ───────────────────────────────── */
.wm-phone-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    animation: wmFadeSlideUp 0.8s 0.3s ease-out both;
}

.wm-phone {
    position: relative;
    width: 290px;
    background: #0f1923;
    border-radius: 44px;
    padding: 12px;
    box-shadow:
        0 40px 100px rgba(26, 54, 93, 0.22),
        0 16px 40px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(201, 169, 78, 0.08);
    animation: wmPhoneFloat 6s ease-in-out infinite;
    z-index: 2;
}

.wm-phone::before {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 60px;
    background: radial-gradient(ellipse, rgba(201, 169, 78, 0.1), transparent 70%);
    filter: blur(16px);
    z-index: -1;
}

@keyframes wmPhoneFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.wm-screen {
    background: var(--bg-section);
    border-radius: 34px;
    overflow: hidden;
}

.wm-screen-header {
    padding: 12px 16px 10px;
    text-align: center;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wm-screen-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a365d, #c9a94e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}

.wm-screen-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.wm-chat {
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 290px;
}

.wm-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wm-msg.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.wm-msg-ai {
    align-self: flex-start;
    background: #e9e9eb;
    color: #000;
    border-bottom-left-radius: 4px;
}

.wm-msg-user {
    align-self: flex-end;
    background: #1a365d;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.wm-typing {
    align-self: flex-start;
    display: flex;
    gap: 5px;
    padding: 12px 16px;
    background: #e9e9eb;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    opacity: 0;
    transition: opacity 0.25s;
}

.wm-typing.visible { opacity: 1; }

.wm-typing-dot {
    width: 7px;
    height: 7px;
    background: #86868b;
    border-radius: 50%;
    animation: wmTypingBounce 1.4s infinite;
}

.wm-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.wm-typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes wmTypingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

.wm-screen-input {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.wm-screen-input-field {
    flex: 1;
    height: 32px;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.wm-screen-input-send {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1a365d;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wm-screen-input-send svg {
    width: 14px;
    height: 14px;
    fill: #fff;
}

/* ── Consultation Booked Notification ──────────── */
.wm-notif {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #fff;
    padding: 12px 20px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.5s, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
}

.wm-notif.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.wm-notif-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #c9a94e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wm-notif-icon svg {
    width: 14px;
    height: 14px;
    stroke: #fff;
    fill: none;
    stroke-width: 2.5;
}

/* ── Floating Badges ────────────────────────────── */
.wm-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s, transform 0.5s;
    z-index: 3;
}

.wm-badge.visible {
    opacity: 1;
    transform: translateY(0);
}

.wm-badge-1 {
    top: 8%;
    right: -60px;
    animation: wmBadgeFloat1 4s ease-in-out infinite alternate;
    animation-play-state: paused;
}

.wm-badge-2 {
    bottom: 35%;
    left: -70px;
    animation: wmBadgeFloat2 4.5s ease-in-out infinite alternate;
    animation-play-state: paused;
}

.wm-badge-3 {
    bottom: 12%;
    right: -50px;
    animation: wmBadgeFloat3 3.8s ease-in-out infinite alternate;
    animation-play-state: paused;
}

.wm-badge.visible { animation-play-state: running; }

.wm-badge-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wm-badge-icon svg {
    width: 14px;
    height: 14px;
}

@keyframes wmBadgeFloat1 { 0% { transform: translateY(0); } 100% { transform: translateY(-8px); } }
@keyframes wmBadgeFloat2 { 0% { transform: translateY(0); } 100% { transform: translateY(-6px); } }
@keyframes wmBadgeFloat3 { 0% { transform: translateY(0); } 100% { transform: translateY(-7px); } }

/* ── Section Spacing ───────────────────────────── */
.wm-process,
.wm-benefits,
.wm-related,
.wm-allocation { padding: 100px 0; }

/* ── Process Steps ──────────────────────────────── */
.wm-process { text-align: center; }
.wm-process .headline-section { margin-bottom: 12px; }
.wm-process .subhead { margin: 0 auto 56px; max-width: 500px; }

.wm-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 960px;
    margin: 0 auto;
}

.wm-step {
    text-align: center;
    padding: 0 16px;
}

.wm-step-num {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(26, 54, 93, 0.06);
    color: #1a365d;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.wm-step:hover .wm-step-num {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(26, 54, 93, 0.12);
}

.wm-step .headline-card {
    margin-bottom: 10px;
    font-size: 20px;
}

.wm-step .body-text {
    font-size: 15px;
}

/* ── Asset Allocation Visualization Section ────── */
.wm-allocation {
    text-align: center;
    background: var(--bg-card);
}

.wm-allocation .headline-section { margin-bottom: 12px; }
.wm-allocation .subhead { margin: 0 auto 56px; max-width: 540px; }

.wm-alloc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 900px;
    margin: 0 auto;
    align-items: center;
}

.wm-alloc-chart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wm-alloc-chart svg {
    width: 240px;
    height: 240px;
    transform: rotate(-90deg);
}

.wm-alloc-segment {
    fill: none;
    stroke-width: 28;
    stroke-linecap: butt;
    stroke-dasharray: 0 251.2;
    transition: stroke-dasharray 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.wm-alloc-chart.animated .wm-alloc-segment { /* JS sets values */ }

.wm-alloc-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.wm-alloc-center-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.wm-alloc-center-label {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.wm-alloc-legend {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wm-alloc-legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wm-alloc-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.wm-alloc-legend-text {
    flex: 1;
}

.wm-alloc-legend-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.wm-alloc-legend-pct {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 1px;
}

.wm-alloc-legend-bar-track {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.wm-alloc-legend-bar {
    height: 100%;
    border-radius: 2px;
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Benefits Bento Grid ── */
.wm-benefits { text-align: center; }
.wm-benefits .headline-section { margin-bottom: 12px; }
.wm-benefits .subhead { margin: 0 auto 56px; max-width: 520px; }

.wm-bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(220px, auto);
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto;
}

.wm-bento-grid .bento-card:nth-child(1) { grid-column: 1 / 3; }
.wm-bento-grid .bento-card:nth-child(2) { grid-column: 3; grid-row: 1 / 3; }
.wm-bento-grid .bento-card:nth-child(6) { grid-column: 2 / 4; }

.wm-bento-grid .bento-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.wm-bento-grid .bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.wm-bento-grid .bento-card-graphic svg {
    transition: transform 0.4s ease;
}

.wm-bento-grid .bento-card:hover .bento-card-graphic svg {
    transform: scale(1.05);
}

/* Pulse animation for accent elements */
@keyframes wmIconPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

.wm-bento-grid .bento-card-graphic .pulse-ring {
    animation: wmIconPulse 3s ease-in-out infinite;
}

/* Floating animation for integration icons */
@keyframes wmIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.wm-bento-grid .bento-app-icon:nth-child(1) { animation: wmIconFloat 3s ease-in-out infinite; }
.wm-bento-grid .bento-app-icon:nth-child(2) { animation: wmIconFloat 3s 0.3s ease-in-out infinite; }
.wm-bento-grid .bento-app-icon:nth-child(3) { animation: wmIconFloat 3s 0.6s ease-in-out infinite; }
.wm-bento-grid .bento-app-icon:nth-child(4) { animation: wmIconFloat 3s 0.9s ease-in-out infinite; }

/* Line draw animation for growth chart */
@keyframes wmLineGrow {
    from { stroke-dashoffset: 300; }
    to { stroke-dashoffset: 0; }
}

.wm-bento-grid .wm-growth-line {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
}

.wm-bento-grid .bento-card:hover .wm-growth-line {
    animation: wmLineGrow 1.5s ease-out forwards;
}

/* ── Stats Banner Override ── */
.wm-hero + .wm-device-morph + .wm-process + .stats,
.wm-allocation + .wm-benefits ~ .stats {
    background: var(--bg-card);
}

/* ── Related Industries ── */
.wm-related { text-align: center; }
.wm-related .headline-section { margin-bottom: 12px; }
.wm-related .subhead { margin: 0 auto 48px; max-width: 480px; }

.wm-related .feature-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.wm-related .feature-card .ind-card-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
    color: #1a365d;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s, transform 0.3s;
}

.wm-related .feature-card:hover .ind-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

.wm-related .ind-icon-graphic {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 14px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wm-related .ind-icon-graphic-navy  { background: rgba(26, 54, 93, 0.04); }
.wm-related .ind-icon-graphic-gold  { background: rgba(201, 169, 78, 0.06); }
.wm-related .ind-icon-graphic-green { background: rgba(29, 185, 84, 0.04); }
.wm-related .ind-icon-graphic-blue  { background: rgba(0, 113, 227, 0.04); }

.wm-related .feature-card:hover .ind-icon-graphic {
    transform: translateY(-4px);
}

.wm-related .ind-icon-graphic svg {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wm-related .feature-card:hover .ind-icon-graphic svg {
    transform: scale(1.08);
}

/* ── Device Morph Dashboard Section ───────────── */
.wm-device-morph {
    position: relative;
    height: 300vh;
    background: var(--bg-primary);
}

.wm-device-morph-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wm-device-frame {
    position: relative;
    width: 80%;
    max-width: 1000px;
    height: 56vh;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
}

.wm-device-frame .app-demo-titlebar { flex-shrink: 0; }
.wm-device-frame .app-demo-body { flex: 1; height: auto; }

.wm-device-dark {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    z-index: 110;
}

.wm-device-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    z-index: 111;
    opacity: 0;
    transform: translateY(24px);
}

.wm-device-content .headline-section {
    color: #fff;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.wm-device-content .subhead {
    color: rgba(255, 255, 255, 0.85);
    max-width: 580px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 960px) {
    .wm-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 48px;
    }

    .wm-hero-text .subhead {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .wm-hero-text .hero-actions {
        justify-content: center;
    }

    .wm-hero-trust {
        justify-content: center;
    }

    .wm-badge { display: none; }

    .wm-phone { width: 260px; }

    .wm-device-frame {
        width: 90%;
    }

    .wm-alloc-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .wm-alloc-legend {
        text-align: center;
    }

    .wm-bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: minmax(200px, auto);
    }
    .wm-bento-grid .bento-card:nth-child(1) { grid-column: 1 / 3; }
    .wm-bento-grid .bento-card:nth-child(2) { grid-column: 1; grid-row: auto; }
    .wm-bento-grid .bento-card:nth-child(6) { grid-column: 1 / 3; }
}

@media (max-width: 768px) {
    .wm-hero { padding: 140px 0 60px; }

    .wm-process,
    .wm-benefits,
    .wm-related,
    .wm-allocation { padding: 80px 0; }

    .wm-phone { width: 240px; border-radius: 36px; padding: 10px; }
    .wm-screen { border-radius: 28px; }
    .wm-chat { min-height: 250px; padding: 12px 10px; }
    .wm-msg { font-size: 12px; }

    .wm-steps {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 400px;
    }

    .wm-device-morph { height: 250vh; }
    .wm-device-frame {
        width: 94%;
        height: 40vh;
    }
    .wm-device-frame .app-demo-sidebar { display: none; }
    .wm-device-frame .app-demo-body { grid-template-columns: 1fr; }
    .wm-device-content { padding: 24px; }
    .wm-device-content .headline-section { font-size: 28px; }
    .wm-device-content .subhead { font-size: 16px; }

    .wm-alloc-chart svg {
        width: 200px;
        height: 200px;
    }

    .wm-bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(180px, auto);
    }
    .wm-bento-grid .bento-card:nth-child(1),
    .wm-bento-grid .bento-card:nth-child(2),
    .wm-bento-grid .bento-card:nth-child(6) { grid-column: 1; grid-row: auto; }
}
