/* ========================================
   Index Page — Enterprise Design
   ======================================== */

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    transition: all var(--transition-base);
    border-bottom: 1px solid transparent;
}

.header-scrolled {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: var(--border-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Header on dark hero */
.header:not(.header-scrolled) .logo-text { color: #FFFFFF; }
.header:not(.header-scrolled) .logo-text strong { color: #93B4FF; }
.header:not(.header-scrolled) .nav-link { color: rgba(255, 255, 255, 0.6); }
.header:not(.header-scrolled) .nav-link:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.08); }
.header:not(.header-scrolled) .btn-ghost { color: rgba(255, 255, 255, 0.7); }
.header:not(.header-scrolled) .btn-ghost:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.08); }
.header:not(.header-scrolled) .mobile-menu-btn span { background: #FFFFFF; }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo-text {
    font-size: 24px;
    font-weight: var(--weight-medium);
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-text strong {
    font-weight: var(--weight-extrabold);
    color: var(--primary);
}

.nav {
    display: flex;
    gap: var(--space-6);
}

.nav-link {
    font-size: 13px;
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    transition: all var(--transition-base);
    padding: var(--space-8) var(--space-12);
    border-radius: var(--radius-md);
}

.nav-link:hover {
    color: var(--primary);
    background: var(--primary-50);
}

.nav-link i { margin-right: 5px; font-size: 12px; opacity: 0.7; }
.nav-link:hover i { opacity: 1; }

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.header-actions .btn {
    padding: var(--space-8) var(--space-16);
    font-size: 13px;
    border-radius: var(--radius-md);
}

.header-actions .btn i { font-size: 12px; }

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-8);
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all var(--transition-base);
}

/* --- Hero (Fullscreen Center, Dark) --- */
.hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: #070C1A;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.hero-glow-1 {
    width: 600px; height: 600px;
    background: rgba(37, 99, 235, 0.1);
    top: -15%; left: -5%;
    animation: glowFloat 10s ease-in-out infinite;
}

.hero-glow-2 {
    width: 500px; height: 500px;
    background: rgba(99, 102, 241, 0.07);
    top: 10%; right: -10%;
    animation: glowFloat 12s ease-in-out infinite reverse;
}

.hero-glow-3 {
    width: 400px; height: 400px;
    background: rgba(37, 99, 235, 0.05);
    bottom: -10%; left: 30%;
    animation: glowFloat 14s ease-in-out infinite 3s;
}

@keyframes glowFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Center content */
.hero-center {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 var(--space-24);
}

.hero-label {
    display: inline-block;
    font-size: 12px;
    font-weight: var(--weight-bold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: var(--space-32);
}

.hero-headline {
    margin-bottom: var(--space-24);
}

.hero-line {
    display: block;
    font-size: 68px;
    font-weight: var(--weight-extrabold);
    color: #FFFFFF;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.hero-line-accent {
    background: linear-gradient(135deg, #60A5FA 0%, #818CF8 50%, #A78BFA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: var(--text-body-lg);
    color: rgba(255, 255, 255, 0.45);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-48);
}

/* Hero CTA button */
.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-20) var(--space-48);
    background: #FFFFFF;
    color: var(--primary);
    font-size: var(--text-body-lg);
    font-weight: var(--weight-bold);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.hero-cta-btn span:first-child {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: var(--space-10);
}

.hero-cta-btn i { font-size: 16px; }

.hero-cta-glow {
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: linear-gradient(135deg, #60A5FA, #818CF8, #60A5FA);
    background-size: 200% 200%;
    z-index: 0;
    opacity: 0;
    filter: blur(16px);
    transition: opacity var(--transition-base);
    animation: glowShift 4s ease-in-out infinite;
}

@keyframes glowShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.15);
}

.hero-cta-btn:hover .hero-cta-glow {
    opacity: 0.7;
}

.hero-cta-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
    animation: ctaBtnPulse 3s ease-in-out infinite;
}

/* Sequential reveal animation */
.hero-anim {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-anim.show {
    opacity: 1;
    transform: translateY(0);
}

/* Bottom stats bar */
.hero-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
}

.hero-bottom-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-20) var(--space-24);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-48);
}

.hero-stat-item {
    display: flex;
    align-items: center;
    gap: var(--space-12);
}

.hero-stat-item strong {
    font-size: var(--text-h3);
    font-weight: var(--weight-extrabold);
    color: #FFFFFF;
    letter-spacing: var(--tracking-tight);
}

.hero-stat-item span {
    font-size: var(--text-small);
    color: rgba(255, 255, 255, 0.4);
    font-weight: var(--weight-medium);
}

.hero-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
}

.hero-scroll span {
    font-size: 10px;
    font-weight: var(--weight-semibold);
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.2);
}

.hero-scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
    50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
    100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* KEEP: chat-preview-input trailing rule from old code */
.chat-preview-input i:last-child {
    color: var(--primary);
    cursor: pointer;
    transition: transform var(--transition-base);
}
.chat-preview-input i:last-child:hover {
    transform: translateX(2px);
}

/* --- Trust Banner --- */
.trust-banner {
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-16) 0;
}
.trust-inner {
    display: flex;
    align-items: center;
    gap: var(--space-32);
}
.trust-label {
    font-size: var(--text-overline);
    font-weight: var(--weight-semibold);
    color: var(--text-tertiary);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    white-space: nowrap;
}
.trust-items {
    display: flex;
    align-items: center;
    gap: var(--space-32);
    flex-wrap: wrap;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    font-size: 13px;
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
}
.trust-item i { color: var(--primary); font-size: 14px; }

/* --- Why Section --- */
.why-card {
    text-align: center;
    padding: var(--space-40) var(--space-24);
    border: 1px solid transparent;
}

.why-card:hover {
    border-color: var(--primary-light);
}

.why-icon {
    width: 72px;
    height: 72px;
    background: var(--primary-50);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-20);
    color: var(--primary);
    transition: all var(--transition-slow);
}

.why-card:hover .why-icon {
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

.why-icon i { font-size: 28px; }
.why-icon--green { background: #ecfdf5 !important; color: #16a34a !important; }
.why-icon--amber { background: #fefce8 !important; color: #d97706 !important; }
.why-icon--rose { background: #fff1f2 !important; color: #e11d48 !important; }

.why-card:hover .why-icon--green { box-shadow: 0 8px 20px rgba(22, 163, 106, 0.15); }
.why-card:hover .why-icon--amber { box-shadow: 0 8px 20px rgba(217, 119, 6, 0.15); }
.why-card:hover .why-icon--rose { box-shadow: 0 8px 20px rgba(225, 29, 72, 0.15); }

.why-title {
    font-size: var(--text-body);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-8);
}

.why-desc {
    font-size: var(--text-small);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* --- How It Works (Steps) --- */
.how-section {
    background: var(--bg-card);
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-16);
}

.step-card {
    background: var(--bg-base);
    border-radius: var(--radius-2xl);
    padding: var(--space-40) var(--space-32);
    text-align: center;
    flex: 1;
    max-width: 320px;
    position: relative;
    border: 1px solid var(--border-light);
    transition: all var(--transition-slow);
}

.step-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--text-inverse);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-body);
    font-weight: var(--weight-bold);
    margin: 0 auto var(--space-16);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.step-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-50);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-16);
    color: var(--primary);
    font-size: 22px;
}

.step-title {
    font-size: var(--text-body);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-8);
}

.step-desc {
    font-size: var(--text-small);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

.step-arrow {
    color: var(--text-tertiary);
    flex-shrink: 0;
    margin-top: var(--space-64);
    opacity: 0.4;
}
.step-arrow i { font-size: 20px; }

.how-cta {
    text-align: center;
    margin-top: var(--space-56);
}

/* --- Ad Banner --- */
.ad-banner {
    padding: var(--space-16) 0;
}

.ad-slot {
    background: var(--bg-hover);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    color: var(--text-tertiary);
    font-size: var(--text-small);
    font-weight: var(--weight-medium);
}

/* --- Featured Accountants --- */
.accountant-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
    padding: var(--space-24);
}

.accountant-header {
    display: flex;
    align-items: center;
    gap: var(--space-16);
}

.accountant-avatar {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-50), var(--primary-light));
    border-radius: var(--radius-xl);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
}

.accountant-name {
    font-size: var(--text-body);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
}

.accountant-office {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}
.accountant-office i { font-size: 11px; margin-right: 4px; color: var(--text-tertiary); }

.accountant-tags {
    display: flex;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.accountant-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-12);
    border-top: 1px solid var(--border-light);
}

.accountant-rating {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-size: var(--text-small);
}

.accountant-rating strong {
    color: var(--text-primary);
    font-weight: var(--weight-semibold);
}

.accountant-rating span {
    color: var(--text-tertiary);
    font-size: 13px;
}

.accountant-exp {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: var(--weight-medium);
}
.accountant-exp i { margin-right: 4px; font-size: 11px; }

.accountant-location {
    font-size: 13px;
    color: var(--text-tertiary);
}
.accountant-location i { margin-right: 4px; font-size: 11px; }

.featured-cta {
    text-align: center;
    margin-top: var(--space-40);
}

/* --- Reviews --- */
.review-section {
    background:
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
        var(--bg-card);
}

.review-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
    padding: var(--space-32);
}

.review-rating {
    display: flex;
    gap: 3px;
    font-size: 14px;
}

.review-text {
    font-size: var(--text-body);
    color: var(--text-primary);
    line-height: var(--leading-relaxed);
    font-weight: var(--weight-regular);
}

.review-author {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    font-size: var(--text-small);
    padding-top: var(--space-12);
    border-top: 1px solid var(--border-light);
}

.review-author-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-50), var(--primary-light));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 14px;
    flex-shrink: 0;
}

.review-author div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.review-author strong {
    color: var(--text-primary);
    font-weight: var(--weight-semibold);
}

.review-author span {
    color: var(--text-tertiary);
    font-size: 13px;
}

/* --- QnA --- */
.qna-list {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
}

.qna-item {
    border-bottom: 1px solid var(--border-light);
}

.qna-item:first-child {
    border-top: 1px solid var(--border-light);
}

.qna-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-24) var(--space-4);
    font-size: var(--text-body);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    text-align: left;
    transition: color var(--transition-base);
    gap: var(--space-16);
}

.qna-question:hover {
    color: var(--primary);
}

.qna-question span i { margin-right: 10px; color: var(--primary); font-size: 14px; opacity: 0.7; }

.qna-arrow {
    flex-shrink: 0;
    transition: transform var(--transition-base);
    color: var(--text-tertiary);
    font-size: 14px;
}
.qna-item.open .qna-arrow { transform: rotate(180deg); }

.qna-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.qna-item.open .qna-answer {
    max-height: 200px;
}

.qna-answer p {
    font-size: var(--text-small);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    padding: 0 var(--space-4) var(--space-24) calc(var(--space-4) + 24px);
}

.qna-cta {
    text-align: center;
    margin-top: var(--space-48);
}

/* --- CTA Section --- */
.cta-section {
    background:
        radial-gradient(ellipse 80% 60% at 50% 120%, rgba(0, 0, 0, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #2563EB 0%, #1E40AF 50%, #1E3A8A 100%);
    padding: var(--space-96) 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.cta-inner {
    text-align: center;
    position: relative;
}

.cta-icon {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-32);
    font-size: 30px;
    color: var(--text-inverse);
    backdrop-filter: blur(8px);
}

.cta-title {
    font-size: var(--text-h2);
    font-weight: var(--weight-extrabold);
    color: var(--text-inverse);
    margin-bottom: var(--space-16);
    letter-spacing: var(--tracking-tight);
}

.cta-desc {
    font-size: var(--text-body-lg);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-40);
}

.cta-section .btn-primary {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    font-size: var(--text-body);
    padding: var(--space-16) var(--space-40);
}

.cta-section .btn-primary:hover {
    background: var(--primary-50);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* --- Footer --- */
.footer {
    background: #0F172A;
    padding: var(--space-80) 0 var(--space-40);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-56);
    margin-bottom: var(--space-56);
}

.footer-brand .logo-text {
    color: var(--text-inverse);
    font-size: 22px;
}

.footer-brand-desc {
    color: #64748B;
    font-size: var(--text-small);
    margin-top: var(--space-10);
    line-height: var(--leading-normal);
}

.footer-social {
    display: flex;
    gap: var(--space-10);
    margin-top: var(--space-24);
}
.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    font-size: 16px;
    transition: all var(--transition-base);
}
.footer-social a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-inverse);
    transform: translateY(-2px);
}

.footer-links h4 {
    color: #E2E8F0;
    font-size: 13px;
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-20);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}
.footer-links h4 i { margin-right: 6px; font-size: 12px; opacity: 0.5; }

.footer-links a {
    display: block;
    color: #94A3B8;
    font-size: var(--text-small);
    margin-bottom: var(--space-12);
    transition: all var(--transition-base);
}

.footer-links a:hover {
    color: var(--text-inverse);
    transform: translateX(3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: var(--space-32);
    text-align: center;
}

.footer-bottom p {
    color: #475569;
    font-size: var(--text-caption);
    letter-spacing: var(--tracking-wide);
}

/* --- Floating Chat Trigger --- */
.fchat-trigger {
    position: fixed;
    bottom: var(--space-32);
    right: var(--space-32);
    z-index: 1001;
}

.fchat-btn {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-2xl);
    background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 100%);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.35);
    transition: all var(--transition-base);
}

.fchat-btn:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.45);
}

.fchat-btn-icon {
    font-size: 24px;
    transition: transform var(--transition-base);
    z-index: 1;
}

.fchat-btn-pulse {
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 100%);
    opacity: 0;
    animation: fchatPulse 3s ease-in-out infinite;
}

@keyframes fchatPulse {
    0%, 100% { transform: scale(1); opacity: 0; }
    50% { transform: scale(1.15); opacity: 0.3; }
}

.fchat-tooltip {
    position: absolute;
    right: 76px;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    background: var(--text-primary);
    color: var(--text-inverse);
    font-size: 13px;
    font-weight: var(--weight-medium);
    padding: var(--space-8) var(--space-16);
    border-radius: var(--radius-md);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    pointer-events: none;
}

.fchat-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: var(--text-primary);
    border-right: none;
}

.fchat-trigger:hover .fchat-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* --- Chat Overlay --- */
.fchat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}

.fchat-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* --- Chat Slide Panel --- */
.fchat-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 100vw;
    background: var(--bg-card);
    z-index: 1003;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12);
}

.fchat-panel.open {
    transform: translateX(0);
}

/* Panel Header */
.fchat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-20) var(--space-24);
    background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 100%);
    color: var(--text-inverse);
    flex-shrink: 0;
}

.fchat-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-12);
}

.fchat-header-avatar {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    position: relative;
    backdrop-filter: blur(8px);
}

.fchat-header-status {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 12px;
    height: 12px;
    background: #22C55E;
    border: 2px solid var(--primary);
    border-radius: var(--radius-full);
}

.fchat-header-info strong {
    display: block;
    font-size: 15px;
    font-weight: var(--weight-semibold);
}

.fchat-header-info span {
    font-size: 12px;
    opacity: 0.7;
}

.fchat-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.fchat-header-expand,
.fchat-header-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-fast);
    font-size: 15px;
}

.fchat-header-expand:hover,
.fchat-header-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-inverse);
}

/* Quick Actions */
.fchat-quick {
    padding: var(--space-16) var(--space-24);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    background: var(--bg-base);
}

.fchat-quick-label {
    display: block;
    font-size: var(--text-overline);
    font-weight: var(--weight-semibold);
    color: var(--text-tertiary);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    margin-bottom: var(--space-10);
}

.fchat-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8);
}

.fchat-quick-tag {
    padding: var(--space-6) var(--space-12);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    background: var(--bg-card);
    transition: all var(--transition-base);
}

.fchat-quick-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Chat Body */
.fchat-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-24);
    display: flex;
    flex-direction: column;
    gap: var(--space-20);
    scroll-behavior: smooth;
}

.fchat-body::-webkit-scrollbar {
    width: 4px;
}
.fchat-body::-webkit-scrollbar-track {
    background: transparent;
}
.fchat-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

.fchat-date {
    text-align: center;
    font-size: var(--text-overline);
    font-weight: var(--weight-medium);
    color: var(--text-tertiary);
    padding: var(--space-8) 0;
    position: relative;
}

.fchat-date::before,
.fchat-date::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: var(--border-light);
}
.fchat-date::before { left: 0; }
.fchat-date::after { right: 0; }

/* Messages */
.fchat-msg {
    display: flex;
    gap: var(--space-10);
    animation: msgSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.fchat-msg-ai {
    align-self: flex-start;
    max-width: 85%;
}

.fchat-msg-user {
    align-self: flex-end;
    max-width: 80%;
    flex-direction: row-reverse;
}

.fchat-msg-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-50), var(--primary-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 2px;
}

.fchat-msg-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.fchat-msg-ai .fchat-msg-bubble {
    background: var(--bg-base);
    color: var(--text-primary);
    border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) var(--radius-sm);
    padding: var(--space-12) var(--space-16);
    font-size: 14px;
    line-height: var(--leading-normal);
    border: 1px solid var(--border-light);
}

.fchat-msg-user .fchat-msg-bubble {
    background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 100%);
    color: var(--text-inverse);
    border-radius: var(--radius-xl) var(--radius-xl) var(--radius-sm) var(--radius-xl);
    padding: var(--space-12) var(--space-16);
    font-size: 14px;
    line-height: var(--leading-normal);
}

.fchat-msg-time {
    font-size: 11px;
    color: var(--text-tertiary);
}

.fchat-msg-user .fchat-msg-time {
    text-align: right;
}

/* Chat Input Area */
.fchat-input-area {
    flex-shrink: 0;
    border-top: 1px solid var(--border-light);
    background: var(--bg-card);
}

.fchat-input-row {
    display: flex;
    align-items: center;
    gap: var(--space-10);
    padding: var(--space-16) var(--space-24);
}

.fchat-input-wrap {
    flex: 1;
    position: relative;
}

.fchat-input {
    width: 100%;
    padding: var(--space-12) var(--space-20);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-base);
    transition: all var(--transition-base);
    font-family: var(--font-family);
}

.fchat-input::placeholder {
    color: var(--text-tertiary);
}

.fchat-input:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
    outline: none;
}

.fchat-send {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 100%);
    color: var(--text-inverse);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: all var(--transition-base);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.fchat-send:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.fchat-send:active {
    transform: scale(0.96);
}

.fchat-input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-24) var(--space-12);
    font-size: 11px;
}

.fchat-input-footer span {
    color: var(--text-tertiary);
}

.fchat-input-footer span i {
    margin-right: 4px;
    font-size: 10px;
}

.fchat-input-footer a {
    color: var(--primary);
    font-weight: var(--weight-medium);
    transition: all var(--transition-base);
}

.fchat-input-footer a:hover {
    color: var(--primary-dark);
}

.fchat-input-footer a i {
    margin-left: 3px;
    font-size: 10px;
    transition: transform var(--transition-base);
}

.fchat-input-footer a:hover i {
    transform: translateX(3px);
}

/* --- Animations --- */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for grid items */
.grid .fade-up:nth-child(1) { transition-delay: 0s; }
.grid .fade-up:nth-child(2) { transition-delay: 0.08s; }
.grid .fade-up:nth-child(3) { transition-delay: 0.16s; }
.grid .fade-up:nth-child(4) { transition-delay: 0.24s; }

/* --- Responsive: Tablet --- */
@media (max-width: 1023px) {
    .hero-line { font-size: 48px; }
    .hero-bottom-inner { gap: var(--space-32); }
    .hero-stat-item strong { font-size: var(--text-h4); }
    .hero-scroll { display: none; }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- Responsive: Mobile --- */
@media (max-width: 767px) {
    .nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: var(--space-12) var(--space-20);
        gap: var(--space-4);
        box-shadow: var(--shadow-xl);
        border-bottom: 1px solid var(--border-light);
    }

    .nav-open {
        display: flex;
    }

    .nav-link {
        padding: var(--space-12) var(--space-16);
        border-radius: var(--radius-lg);
    }

    .header-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-line { font-size: 36px; }
    .hero-sub { font-size: var(--text-body); }
    .hero-cta-btn { padding: var(--space-16) var(--space-32); font-size: var(--text-body); }
    .hero-bottom-inner { flex-wrap: wrap; gap: var(--space-24) var(--space-32); justify-content: center; }
    .hero-stat-divider { display: none; }
    .hero-stat-item strong { font-size: var(--text-body-lg); }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-32);
    }

    .fchat-trigger {
        bottom: var(--space-20);
        right: var(--space-20);
    }

    .fchat-btn {
        width: 56px;
        height: 56px;
    }

    .fchat-btn-icon { font-size: 20px; }

    .fchat-tooltip { display: none; }

    .fchat-panel {
        width: 100vw;
    }

    .cta-title {
        font-size: var(--text-h3);
    }
}

/* --- Button icons --- */
.btn i { font-size: 13px; }
.btn-lg i { font-size: 15px; }
