@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --apple-black: #000000;
    --apple-dark: #1d1d1f;
    --apple-card-dark: #141416;
    --apple-grey: #86868b;
    --apple-light-grey: #f5f5f7;
    --apple-border: rgba(0, 0, 0, 0.08);
    --apple-border-dark: rgba(255, 255, 255, 0.12);
    --apple-green: #10b981;
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
}

/* Team directory and advisor profile consistency */
.advisor-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 24px;
    padding: 8px;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.035);
}
.advisor-switcher > span {
    padding: 0 10px;
    color: #86868b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.advisor-switcher a {
    padding: 9px 14px;
    color: #424245;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
.advisor-switcher a:hover { background: #f5f5f7; color: #1d1d1f; }
.advisor-switcher a.active { background: #1d1d1f; color: #fff; }
.advisor-switcher b {
    margin-left: 4px;
    padding: 2px 5px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 8px;
    text-transform: uppercase;
}
.review-empty-state {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
}
.review-empty-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    color: #d97706;
    background: #fffbeb;
    border-radius: 14px;
}
.review-empty-state p { color: #1d1d1f; font-size: 14px; font-weight: 750; }
.review-empty-state span { margin-top: 5px; color: #86868b; font-size: 12px; }
.review-empty-state a {
    margin-top: 18px;
    padding: 10px 16px;
    color: #fff;
    background: #1d1d1f;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}
@media (min-width: 1280px) {
    .team-grid {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
    }
    .team-grid > .team-member-card {
        flex: 0 1 calc((100% - 48px) / 3);
        max-width: 400px;
        padding: 28px;
    }
}
@media (max-width: 767px) {
    .advisor-switcher {
        justify-content: center;
        flex-wrap: wrap;
        overflow-x: visible;
        margin-left: -4px;
        margin-right: -4px;
        padding: 10px;
        gap: 6px;
    }
    .advisor-switcher > span { display: none; }
    .advisor-switcher a {
        flex: 1 1 104px;
        padding: 8px 9px;
        text-align: center;
        font-size: 11px;
    }
}

/* Balanced navigation: centered links, anchored brand and action */
.site-nav-inner { position: relative; justify-content: center; }
.site-nav-inner > div:first-child {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}
.site-nav-menu {
    justify-content: center;
    margin: 0 auto;
}
.site-nav-inner > div:last-of-type {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

@media (min-width: 1181px) {
    /* Keep the four navigation links centered independently from phone/CTA. */
    body > nav#navbar .site-nav-menu > :nth-last-child(2) {
        position: absolute !important;
        right: 168px;
        top: 50%;
        margin-left: 0 !important;
        transform: translateY(-50%);
    }
    body > nav#navbar .site-nav-menu > :last-child {
        position: absolute !important;
        right: 0;
        top: 50%;
        margin-left: 0 !important;
        transform: translateY(-50%);
    }

    /* Advisor pages use the same centered-links / right-actions geometry. */
    body > nav:first-of-type:not(#navbar) .site-nav-inner > a:first-child {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    body > nav:first-of-type:not(#navbar) .site-nav-menu > a[href^="tel:"] {
        position: absolute !important;
        right: 124px;
        top: 50%;
        margin-left: 0 !important;
        transform: translateY(-50%);
    }
    body > nav:first-of-type:not(#navbar) .site-nav-inner > div:last-of-type > a[href="team.html"] {
        display: none !important;
    }
}

/* Equal, centered team cards */
.team-member-card {
    min-width: 0;
    overflow: hidden;
    text-align: center;
}
.team-member-card > div:first-child > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-height: 205px;
    margin-bottom: 22px;
}
.team-member-card > div:first-child > div:first-child > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
}
.team-member-card > div:first-child > div:first-child > div:first-child > div:last-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-width: 0;
}
.team-member-card > div:first-child > div:first-child > div:first-child > div:last-child > div:first-child {
    justify-content: center;
    flex-wrap: wrap;
}
.team-member-card h3 { line-height: 1.15; }
.team-member-card [data-emp-count] { white-space: normal; }
.team-member-card .team-rating-stars { letter-spacing: .04em; }
.team-member-card > div:first-child > div:first-child > span {
    display: inline-flex !important;
    align-items: center;
    align-self: center;
}
.team-member-card > div:first-child > div:nth-child(2) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 66px;
}
.team-member-card > div:first-child > div:nth-child(2) a { justify-content: center; }
.team-member-card > div:first-child > p {
    min-height: 126px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}
.team-member-card > div:first-child > div:nth-child(4) {
    min-height: 156px;
    margin-bottom: 24px;
    text-align: left;
}
.team-member-card > div:last-child { width: 100%; }

@media (min-width: 768px) {
    .team-member-card > div:first-child {
        display: grid;
        grid-template-rows: 220px 82px 170px 180px;
    }
    .team-member-card > div:first-child > * {
        margin-bottom: 0 !important;
    }
    .team-member-card > div:first-child > div:first-child {
        min-height: 0;
    }
    .team-member-card > div:first-child > div:first-child > div:first-child > div:last-child > div:first-child {
        min-height: 52px;
        align-items: center;
    }
    .team-member-card > div:first-child > div:first-child > div:first-child > div:last-child > p {
        min-height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .team-member-card > div:first-child > div:first-child > div:first-child > div:last-child > div:last-child {
        min-height: 36px;
        align-items: center;
        justify-content: center;
    }
    .team-member-card > div:first-child > p {
        min-height: 0;
        padding-top: 24px;
    }
    .team-member-card > div:first-child > div:nth-child(4) {
        min-height: 0;
        margin-top: 18px;
    }
    .team-review-preview {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

@media (max-width: 1180px) {
    .site-nav-menu { display: none !important; }
    .site-nav-inner > div:last-of-type { display: flex !important; }
}
@media (max-width: 640px) {
    .site-nav-inner > div:first-child img,
    .site-nav-inner > a:first-child img { max-width: 112px; }
    .team-member-card > div:first-child > p,
    .team-member-card > div:first-child > div:nth-child(4) { min-height: auto; }
    .advisor-contact-card > div {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .advisor-contact-card > div > div {
        justify-content: center;
    }
    .advisor-contact-card > div > a {
        width: 100%;
        padding: 11px 16px;
        text-align: center;
    }
    .advisor-contact-card > a {
        text-align: center;
    }
}

* {
    box-sizing: border-box;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    background-color: #fbfbfd;
    color: var(--apple-dark);
    overflow-x: hidden;
}

.rating-stars-meter {
    --rating-percent: 100%;
    display: inline-block;
    color: transparent;
    background: linear-gradient(90deg, #fbbf24 0 var(--rating-percent), #d1d5db var(--rating-percent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    white-space: nowrap;
}

.mobile-menu-toggle,
.mobile-navigation-panel {
    display: none;
}

@media (max-width: 1180px) {
    #navbar .site-nav-inner {
        gap: 10px;
    }

    #navbar .site-nav-inner > :first-child {
        min-width: 0;
        flex-shrink: 1;
    }

    #navbar .site-nav-inner > :first-child img {
        width: auto;
        max-width: 112px;
        object-fit: contain;
    }

    #navbar .site-nav-inner > div:last-of-type {
        display: none !important;
    }

    .mobile-menu-toggle {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        color: #1d1d1f;
        background: #f5f5f7;
        border: 1px solid rgba(29, 29, 31, 0.12);
        border-radius: 50%;
        transition: background-color 180ms ease, transform 180ms ease;
    }

    .mobile-menu-toggle:hover,
    .mobile-menu-toggle:focus-visible {
        background: #e8e8ed;
        outline: 3px solid rgba(0, 113, 227, 0.24);
        outline-offset: 2px;
    }

    .mobile-menu-toggle:active {
        transform: translateY(-50%) scale(0.96);
    }

    .mobile-menu-toggle span {
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform 180ms ease, opacity 180ms ease;
    }

    .mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .mobile-navigation-panel {
        position: fixed;
        top: 72px;
        left: 12px;
        right: 12px;
        z-index: 60;
        display: grid;
        padding: 10px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(29, 29, 31, 0.1);
        border-radius: 24px;
        box-shadow: 0 22px 60px rgba(0, 0, 0, 0.18);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
    }

    .mobile-navigation-panel[hidden] {
        display: none;
    }

    .mobile-navigation-panel > a:not(.mobile-menu-call) {
        min-height: 46px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 14px;
        color: #1d1d1f;
        border-radius: 14px;
        font-size: 0.9375rem;
        font-weight: 650;
        text-decoration: none;
    }

    .mobile-navigation-panel > a:not(.mobile-menu-call):hover,
    .mobile-navigation-panel > a:not(.mobile-menu-call):focus-visible,
    .mobile-navigation-panel > a.is-current {
        background: #f5f5f7;
        color: #0071e3;
        outline: none;
    }

    .mobile-navigation-panel > a:not(.mobile-menu-call) span {
        color: #86868b;
        font-size: 1rem;
    }

    .mobile-menu-call {
        min-height: 54px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 8px;
        padding: 0 16px;
        color: #fff;
        background: #1d1d1f;
        border-radius: 18px;
        font-size: 0.875rem;
        font-weight: 700;
        text-decoration: none;
    }

    .mobile-menu-call strong {
        white-space: nowrap;
    }
}

@media (max-width: 374px) {
    #navbar .site-nav-inner img {
        max-width: 96px;
    }

    #navbar .site-nav-inner > div a[href^="tel:"] {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        font-size: 0.6875rem;
    }
}

/* Glassmorphism Navbar */
nav {
    background-color: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

nav.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.94) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.09);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* Subtle Hero Motion Animations */
.hero-badge-float {
    animation: gentleBadgeFloat 5s ease-in-out infinite alternate;
}

@keyframes gentleBadgeFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-4px); }
}

/* Apple Luminous Shimmer on Text */
.apple-shimmer-text {
    background: linear-gradient(
        110deg,
        #1d1d1f 0%,
        #3b3b40 25%,
        #10b981 48%,
        #3b3b40 65%,
        #1d1d1f 100%
    );
    background-size: 220% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textSheen 7s ease-in-out infinite;
}

@keyframes textSheen {
    0%, 20% { background-position: 100% 0; }
    70%, 100% { background-position: -100% 0; }
}

/* Subtle Breathing Ambient Aura */
.hero-ambient-aura {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 650px;
    height: 380px;
    background: radial-gradient(
        circle,
        rgba(16, 185, 129, 0.12) 0%,
        rgba(0, 113, 227, 0.06) 40%,
        rgba(255, 255, 255, 0) 70%
    );
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: auraPulse 8s ease-in-out infinite alternate;
}

@keyframes auraPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.92);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.08);
        opacity: 0.95;
    }
}

/* Micro-interaction on CTA Buttons */
.hero-cta-btn {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-cta-btn:hover {
    transform: translateY(-2px) scale(1.015);
    box-shadow: 0 10px 25px -5px rgba(0, 113, 227, 0.25);
}
.hero-cta-btn:active {
    transform: translateY(0px) scale(0.985);
}

.hero-cta-btn svg {
    transition: transform 0.25s ease;
}
.hero-cta-btn:hover svg {
    transform: translateX(3px);
}

.hero-secondary-btn {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s;
}
.hero-secondary-btn:hover {
    transform: translateY(-2px);
    background-color: #f5f5f7;
}
.hero-secondary-btn:active {
    transform: translateY(0px);
}

/* 3D Floating Financial Card Parallax */
.perspective-stage {
    perspective: 1400px;
    transform-style: preserve-3d;
}

.titanium-card-wrap {
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.titanium-card {
    background: linear-gradient(135deg, #2a2a2e 0%, #151518 50%, #1c1c20 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 8px 24px rgba(16, 185, 129, 0.15);
    border-radius: 22px;
    position: relative;
    overflow: hidden;
}

.floating-pill {
    animation: pillFloat 6s ease-in-out infinite alternate;
}

.pill-delay-1 {
    animation-delay: -2s;
}

.pill-delay-2 {
    animation-delay: -4s;
}

@keyframes pillFloat {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    100% {
        transform: translateY(-12px) rotate(1deg);
    }
}

/* Apple Range Slider */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 28px;
    width: 28px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    margin-top: -11px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.08);
    border: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.3), 0 0 0 2px #0071e3;
}

input[type=range]::-webkit-slider-thumb:active {
    transform: scale(1.08);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #e5e5ea;
    border-radius: 3px;
    transition: background 0.3s ease;
}

input[type=range]:focus {
    outline: none;
}

/* Custom Notification Toast */
.apple-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(29, 29, 31, 0.95);
    backdrop-filter: blur(16px);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
    pointer-events: none;
}

.apple-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Minimalist Marquee */
.marquee-container {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
}
.marquee-content {
    display: flex;
    animation: marquee 25s linear infinite;
}
.marquee-content:hover {
    animation-play-state: paused;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Review Filter Active State */
.review-filter-btn.active {
    background-color: var(--apple-dark) !important;
    color: #ffffff !important;
    border-color: var(--apple-dark) !important;
}

/* Savings summary within the existing qualification form. */
#qualify-modal-card { max-height: calc(100dvh - 32px); overflow-y: auto; }
.qualify-debt-savings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.qualify-debt-savings > div { min-width: 0; }
.qualify-savings { padding: 10px 14px; border: 1px solid #cce9dd; border-radius: 12px; background: #f2faf6; color: #086345; }
.qualify-savings-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qualify-savings-badge { font-size: 10px; font-weight: 700; line-height: 1.4; padding: 2px 7px; border-radius: 6px; background: #e0f2e9; white-space: nowrap; }
.qualify-savings-title { font-size: 11px; font-weight: 600; line-height: 1.4; }
#qualify-savings-range { display: block; margin-top: 3px; font-size: 20px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.qualify-savings-note { margin: 4px 0 0; font-size: 10px; line-height: 1.4; color: #47665b; }

/* Compact, stationary request dialog. */
#qualify-modal-card {
    width: calc(100% - 24px); max-width: 440px; min-width: 0; margin: 0;
    padding: 24px; border-radius: 24px; max-height: calc(100dvh - 24px);
    overflow-x: hidden; overflow-y: auto; scrollbar-width: thin;
    transform: none !important; opacity: 1 !important;
}
#qualify-modal-card, #qualify-modal-card * { animation: none !important; transition: none !important; }
#qualify-modal-card > button { top: 12px; right: 12px; }
#qualify-form-state > h3, #qualify-success-state h3 { font-size: 22px; line-height: 1.2; }
#qualify-form-state > p { font-size: 12px; line-height: 1.5; margin-bottom: 14px; }
#qualify-form-state > .inline-flex { font-size: 10px; margin-bottom: 10px; }
#qualify-form-state > .overflow-hidden { margin-bottom: 16px; }
#qualify-form label { font-size: 10px; }
#qualify-step-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 12px; }
#qualify-modal-card .qualify-debt-savings { gap: 10px; }
#qualify-modal-card .qualify-savings { padding: 8px 12px; }
#qualify-modal-card #qualify-savings-range { font-size: 18px; }
#qualify-modal-card .qualify-savings-title { font-size: 10px; }
#qualify-modal-card .qualify-savings-note { font-size: 10px; line-height: 1.3; }
#qualify-debt-input { font-size: 18px; }
#qualify-step-1 .grid label { padding: 10px; min-height: 42px; }
#qualify-step-1 .grid label span { font-size: 11px; }
#qualify-form button { padding-top: 12px; padding-bottom: 12px; }
#qualify-success-state p { font-size: 12px; line-height: 1.5; }
@media (max-width: 360px), (max-height: 600px) {
    #qualify-modal-card { padding: 18px; border-radius: 20px; }
    #qualify-form-state > h3 { font-size: 20px; }
}

@media (max-width: 360px), (max-height: 600px) {
    #qualify-modal-card { padding: 16px; }
    #qualify-form-state > p { font-size: 11px; line-height: 1.4; margin-bottom: 10px; }
    #qualify-form-state > .inline-flex { margin-bottom: 6px; }
    #qualify-form-state > .overflow-hidden { margin-bottom: 10px; }
    #qualify-step-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 8px; }
    #qualify-modal-card .qualify-debt-savings { gap: 8px; }
    #qualify-step-1 .grid label { padding: 8px; gap: 6px; min-height: 38px; }
    #qualify-step-1 .grid label span { font-size: 10px; }
}
@media (max-width: 360px), (max-height: 600px) { #qualify-form button { padding-top: 8px; padding-bottom: 8px; } }
