/* ═══════════════════════════════════════════════════
   VSSF Aerospace Law Group — Design Tokens & Styles
   Mobile-first · Vanilla CSS · No frameworks
   ═══════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    -webkit-text-size-adjust: 100%;
    interpolate-size: allow-keywords;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

/* ── Design Tokens ─────────────────────────────── */
:root {
    /* Brand Colors — from SiteReferences.md */
    --clr-maroon: #762022;
    --clr-maroon-dark: #5c181a;
    --clr-header: #47292B;
    --clr-charcoal: #444444;
    --clr-navy: #1e2a4a;
    --clr-navy-deep: #141d35;
    --clr-white: #ffffff;
    --clr-offwhite: #F5F5F5;
    --clr-warm-gray: #e8e2de;
    --clr-light-border: rgba(0, 0, 0, 0.08);

    /* Semantic Colors */
    --surface-base: var(--clr-white);
    --surface-alt: var(--clr-offwhite);
    --surface-dark: var(--clr-header);
    --surface-hero: var(--clr-navy-deep);
    --text-primary: var(--clr-charcoal);
    --text-heading: var(--clr-header);
    --text-inverse: rgba(255, 255, 255, 0.92);
    --text-muted: #6b6b6b;
    --accent-primary: var(--clr-maroon);
    --accent-hover: var(--clr-maroon-dark);
    --border-subtle: var(--clr-light-border);

    /* Typography — Nunito Sans (body/headers) + Montserrat (display emphasis) */
    --ff-body: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ff-display: 'Montserrat', 'Nunito Sans', sans-serif;
    --ff-serif: 'Playfair Display', 'Georgia', serif;

    /* Fluid Type Scale — using clamp() */
    --fs-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --fs-sm: clamp(0.875rem, 0.82rem + 0.3vw, 1rem);
    --fs-base: clamp(1.05rem, 0.95rem + 0.5vw, 1.175rem);
    --fs-md: clamp(1.15rem, 1rem + 0.65vw, 1.35rem);
    --fs-lg: clamp(1.35rem, 1.15rem + 1vw, 1.75rem);
    --fs-xl: clamp(1.6rem, 1.3rem + 1.5vw, 2.25rem);
    --fs-2xl: clamp(2rem, 1.6rem + 2vw, 3rem);
    --fs-3xl: clamp(2.5rem, 1.9rem + 3vw, 4rem);

    /* Spacing — 4px base */
    --sp-1: 0.25rem;
    /* 4 */
    --sp-2: 0.5rem;
    /* 8 */
    --sp-3: 0.75rem;
    /* 12 */
    --sp-4: 1rem;
    /* 16 */
    --sp-6: 1.5rem;
    /* 24 */
    --sp-8: 2rem;
    /* 32 */
    --sp-10: 2.5rem;
    /* 40 */
    --sp-12: 3rem;
    /* 48 */
    --sp-16: 4rem;
    /* 64 */
    --sp-20: 5rem;
    /* 80 */
    --sp-24: 6rem;
    /* 96 */

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-pill: 32px;

    /* Transitions */
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --duration-fast: 180ms;
    --duration-normal: 250ms;

    /* Z-Index Scale */
    --z-base: 0;
    --z-raised: 10;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* ── Base Typography ───────────────────────────── */
body {
    font-family: var(--ff-body);
    font-size: var(--fs-base);
    color: var(--text-primary);
    background: var(--surface-base);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--ff-display);
    color: var(--text-heading);
    line-height: 1.15;
    text-wrap: balance;
    font-weight: 700;
}

h1 {
    font-size: var(--fs-3xl);
}

h2 {
    font-size: var(--fs-2xl);
}

h3 {
    font-size: var(--fs-xl);
}

h4 {
    font-size: var(--fs-lg);
}

p {
    max-width: 72ch;
    line-height: 1.7;
}

/* ── Utility ───────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--sp-6);
}

.section-label {
    font-family: var(--ff-display);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: var(--sp-3);
}

.section-heading {
    margin-bottom: var(--sp-4);
}

.section-desc {
    color: var(--text-muted);
    font-size: var(--fs-md);
    margin-bottom: var(--sp-10);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Buttons ───────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    min-height: 48px;
    padding: var(--sp-3) var(--sp-8);
    font-family: var(--ff-display);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

.btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
}

.btn--primary {
    background: var(--accent-primary);
    color: var(--clr-white);
    border: 2px solid var(--accent-primary);
}

.btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn--outline {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.btn--outline:hover {
    background: var(--accent-primary);
    color: var(--clr-white);
}

.btn--outline-light {
    background: transparent;
    color: var(--text-inverse);
    border: 2px solid rgba(255, 255, 255, 0.35);
}

.btn--outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ── Header / Nav ──────────────────────────────── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    padding: var(--sp-4) 0;
    transition: background var(--duration-normal) var(--ease-out),
        box-shadow var(--duration-normal) var(--ease-out);
    background: transparent;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    box-shadow: 0 1px 0 var(--border-subtle);
}

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

.header-logo {
    height: 38px;
    width: auto;
}

.nav-desktop {
    display: none;
}

.nav-desktop a {
    font-family: var(--ff-display);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-heading);
    padding: var(--sp-2) var(--sp-3);
    transition: color var(--duration-fast) var(--ease-out);
}

.site-header:not(.scrolled) .nav-desktop a {
    color: var(--text-inverse);
}

.nav-desktop a:hover {
    color: var(--accent-primary);
}

.nav-desktop a:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

.header-cta {
    display: none;
}

.site-header:not(.scrolled) .header-cta {
    border-color: rgba(255, 255, 255, 0.35);
    color: var(--text-inverse);
}

.site-header:not(.scrolled) .header-cta:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--text-inverse);
}

/* Hamburger */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-heading);
    border-radius: 2px;
    transition: all var(--duration-normal) var(--ease-out);
}

.site-header:not(.scrolled) .menu-toggle span {
    background: var(--clr-white);
}

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

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

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

/* Mobile Navigation Panel */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(360px, 85vw);
    height: 100vh;
    background: var(--clr-white);
    z-index: var(--z-overlay);
    padding: calc(var(--sp-20) + var(--sp-8)) var(--sp-8) var(--sp-8);
    transform: translateX(100%);
    transition: transform var(--duration-normal) var(--ease-out);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
}

.mobile-nav.open {
    transform: translateX(0);
}

.mobile-nav a {
    display: block;
    padding: var(--sp-4) 0;
    font-family: var(--ff-display);
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--text-heading);
    border-bottom: 1px solid var(--border-subtle);
    transition: color var(--duration-fast) var(--ease-out);
}

.mobile-nav a:hover {
    color: var(--accent-primary);
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: calc(var(--z-overlay) - 1);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ── Hero Section ──────────────────────────────── */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: var(--sp-24) var(--sp-6) var(--sp-16);
    background: var(--surface-hero);
    overflow: hidden;
}



.hero-content {
    position: relative;
    text-align: center;
    max-width: 780px;
}

.hero-logo {
    width: clamp(140px, 30vw, 200px);
    height: clamp(140px, 30vw, 200px);
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    margin-inline: auto;
    margin-bottom: var(--sp-10);
    border: 3px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
    font-family: var(--ff-serif);
    font-size: var(--fs-xl);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
    margin-bottom: var(--sp-6);
    font-style: italic;
}

.hero-desc {
    font-size: var(--fs-md);
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
    margin-inline: auto;
    margin-bottom: var(--sp-10);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    align-items: center;
}

/* ── Practice Areas Section ────────────────────── */
.practice-areas {
    padding: var(--sp-20) 0;
    background: var(--surface-alt);
}

.practice-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-6);
}

.practice-card {
    position: relative;
    background: var(--clr-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    perspective: 600px;
    min-height: 320px;
    cursor: pointer;
}

.practice-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 320px;
    transition: transform 0.5s var(--ease-out);
    transform-style: preserve-3d;
}

.practice-card:hover .practice-card-inner,
.practice-card.flipped .practice-card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    padding: var(--sp-8);
}

.card-front {
    background: var(--clr-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.card-front .card-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
    margin-bottom: var(--sp-6);
    flex-shrink: 0;
}

.card-front h3 {
    font-size: var(--fs-lg);
    margin-bottom: var(--sp-3);
}

.card-front p {
    color: var(--text-muted);
    font-size: var(--fs-sm);
    flex: 1;
}

.card-front .card-hint {
    font-size: var(--fs-xs);
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: var(--sp-4);
}

.card-back {
    background: var(--clr-header);
    color: var(--text-inverse);
    transform: rotateY(180deg);
    border-radius: var(--radius-md);
    justify-content: center;
}

.card-back h4 {
    color: var(--clr-warm-gray);
    font-size: var(--fs-md);
    margin-bottom: var(--sp-4);
}

.card-back ul {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

.card-back li {
    font-size: var(--fs-sm);
    padding-left: var(--sp-4);
    position: relative;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
}

.card-back li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
}

/* ── Engagement / How We Work Section ──────────── */
.engagement {
    padding: var(--sp-20) 0;
    background: var(--surface-base);
}

.engagement-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-8);
    counter-reset: engagement;
}

.engagement-card {
    position: relative;
    padding: var(--sp-10) var(--sp-8);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: box-shadow var(--duration-normal) var(--ease-out);
}

.engagement-card:hover {
    box-shadow: var(--shadow-md);
}

.engagement-card::before {
    counter-increment: engagement;
    content: counter(engagement, decimal-leading-zero);
    font-family: var(--ff-display);
    font-size: var(--fs-3xl);
    font-weight: 800;
    color: rgba(118, 32, 34, 0.08);
    position: absolute;
    top: var(--sp-4);
    right: var(--sp-6);
    line-height: 1;
}

.engagement-card h3 {
    font-size: var(--fs-lg);
    margin-bottom: var(--sp-3);
}

.engagement-card p {
    color: var(--text-muted);
    font-size: var(--fs-base);
}

.engagement-card .btn {
    margin-top: var(--sp-6);
}

/* ── Team / About Section ──────────────────────── */
.team {
    padding: var(--sp-20) 0;
    background: var(--surface-alt);
}

.team-profile {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-8);
    align-items: start;
}

.team-info h3 {
    font-size: var(--fs-xl);
    margin-bottom: var(--sp-2);
}

.team-info .team-title {
    font-family: var(--ff-display);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: var(--sp-6);
}

.team-info p {
    color: var(--text-muted);
    margin-bottom: var(--sp-6);
}

.team-contact-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

.team-contact-list li {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    font-size: var(--fs-base);
}

.team-contact-list svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--accent-primary);
}

.team-contact-list a {
    transition: color var(--duration-fast) var(--ease-out);
}

.team-contact-list a:hover {
    color: var(--accent-primary);
}

/* ── Footer ────────────────────────────────────── */
.site-footer {
    background: var(--surface-dark);
    color: var(--text-inverse);
    padding: var(--sp-16) 0 var(--sp-8);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-8);
}

.footer-brand .footer-logo {
    height: 36px;
    margin-bottom: var(--sp-4);
    border-radius: 6px;
    padding: 4px 8px;
    background: #fff;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.55);
    font-size: var(--fs-sm);
    max-width: 36ch;
}

.footer-nav h4 {
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: var(--sp-4);
}

.footer-nav a {
    display: block;
    padding: var(--sp-1) 0;
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.72);
    transition: color var(--duration-fast) var(--ease-out);
}

.footer-nav a:hover {
    color: var(--clr-white);
}

.footer-bottom {
    margin-top: var(--sp-12);
    padding-top: var(--sp-6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.4);
}

/* ── Responsive > 640px ────────────────────────── */
@media (min-width: 40em) {
    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }

    .practice-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .engagement-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

/* ── Responsive > 960px ────────────────────────── */
@media (min-width: 60em) {
    .menu-toggle {
        display: none;
    }

    .nav-desktop {
        display: flex;
        align-items: center;
        gap: var(--sp-2);
    }

    .header-cta {
        display: inline-flex;
    }

    .header-logo {
        height: 44px;
    }

    .practice-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .engagement-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .team-profile {
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-16);
        align-items: center;
    }
}

/* ── Accessibility: Reduced Motion ─────────────── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .practice-card:hover .practice-card-inner,
    .practice-card.flipped .practice-card-inner {
        transform: none;
    }

    /* Show back content directly for reduced motion */
    .practice-card .card-back {
        transform: none;
        position: relative;
    }

    .practice-card .card-front {
        position: relative;
    }
}

/* ── Focus ─────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* ── Chatbot Widget ───────────────────────────────── */
#chat-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-primary, #762022);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#chat-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.3);
}

#chat-fab svg {
    width: 24px;
    height: 24px;
    transition: opacity 0.2s, transform 0.2s;
}

#chat-fab .chat-fab-close {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg);
}

#chat-fab.active .chat-fab-icon {
    opacity: 0;
    transform: rotate(90deg);
}

#chat-fab.active .chat-fab-close {
    opacity: 1;
    transform: rotate(0deg);
}

/* Notification badge on FAB */
.chat-fab-badge {
    position: absolute;
    top: -4px;
    right: 40px;
    width: 20px;
    height: 20px;
    background: #c0392b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    font-family: var(--ff-body, sans-serif);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.4);
    pointer-events: none;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.3s ease, padding 0.3s ease, font-size 0.3s ease;
    padding: 0;
    line-height: 20px;
}

/* Show just "!" by default */
.chat-fab-badge::before {
    content: '!';
}

/* On FAB hover, expand badge to show full text */
#chat-fab:hover .chat-fab-badge {
    width: 220px;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    justify-content: center;
}

#chat-fab:hover .chat-fab-badge::before {
    content: 'Chat with a virtual Assistant';
}

@keyframes badgePulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.75;
    }
}

#chat-panel {
    position: fixed;
    bottom: 96px;
    right: 24px;
    z-index: 9998;
    width: min(400px, calc(100vw - 48px));
    height: min(520px, calc(100vh - 140px));
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#chat-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--clr-header, #0e1a2f);
    color: #fff;
    flex-shrink: 0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-primary, #762022);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.chat-header-info strong {
    display: block;
    font-size: 0.9rem;
    line-height: 1.2;
}

.chat-header-info small {
    font-size: 0.7rem;
    opacity: 0.6;
}

#chat-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s;
}

#chat-close:hover {
    color: #fff;
}

/* Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f7f8fa;
}

.chat-msg p {
    margin: 0;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.55;
    max-width: 85%;
    word-wrap: break-word;
}

.chat-msg.bot p {
    background: #fff;
    color: #1e2a4a;
    border: 1px solid #e8eaee;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.chat-msg.user {
    display: flex;
    justify-content: flex-end;
}

.chat-msg.user p {
    background: var(--accent-primary, #762022);
    color: #fff;
    border-bottom-right-radius: 4px;
    margin-left: auto;
}

/* Input area */
.chat-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #e8eaee;
    background: #fff;
    flex-shrink: 0;
}

#chat-input {
    flex: 1;
    border: 1px solid #dfe1e6;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

#chat-input:focus {
    border-color: var(--accent-primary, #762022);
}

#chat-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-primary, #762022);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

#chat-send:hover {
    background: var(--accent-hover, #5b181a);
}

#chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Typing indicator */
.typing-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    height: 20px;
}

.typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #adb0b8;
    animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

/* Contact prompt bubble */
.chat-contact-prompt {
    text-align: center;
}

.chat-contact-prompt p {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1e2a4a;
    margin-bottom: 6px;
}

.chat-contact-btn {
    display: inline-block;
    margin-top: 4px;
    padding: 8px 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent-primary, #762022);
    border-radius: 24px;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}

.chat-contact-btn:hover {
    background: var(--accent-hover, #5b181a);
    transform: scale(1.04);
}

/* Quick-action starter buttons */
.chat-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 8px;
}

.chat-quick-btn {
    background: #fff;
    color: var(--accent-primary, #762022);
    border: 1px solid var(--accent-primary, #762022);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    line-height: 1.4;
    text-align: left;
}

.chat-quick-btn:hover {
    background: var(--accent-primary, #762022);
    color: #fff;
}

/* Inline email button inside bot messages */
.chat-email-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 6px 0 0;
    font-size: 0.82rem;
    vertical-align: middle;
}