/* =============================================
   AI Receptionist Theme — Complete Stylesheet
   ============================================= */

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #191c1f;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font: inherit; border: none; background: none; }
input, textarea { font: inherit; }

:focus-visible {
    outline: 2px solid #494fdf;
    outline-offset: 2px;
}

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
    --color-primary: #494fdf;
    --color-dark: #000000;
    --color-light: #ffffff;
    --color-surface-dark: #16181a;
    --color-surface-soft: #f4f4f4;
    --color-on-dark: #ffffff;
    --color-on-dark-mute: rgba(255, 255, 255, 0.72);
    --color-ink: #191c1f;
    --color-hairline-light: #e2e2e7;
    --color-hairline-dark: rgba(255, 255, 255, 0.12);

    --font-headline: 'Aeonik Pro', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-pill: 9999px;
    --radius-card: 20px;
    --btn-height: 48px;
    --card-padding: 32px;
    --container-width: 1200px;
    --section-padding: 88px;
    --section-padding-mobile: 64px;
    --nav-height: 64px;
}

/* --- Utility Classes --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Section Themes --- */
.section-dark {
    background: var(--color-dark);
    color: var(--color-on-dark);
}

.section-light {
    background: var(--color-light);
    color: var(--color-ink);
}

.section-center {
    text-align: center;
}

/* --- Section Headings --- */
.section-heading {
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.1;
    margin-bottom: 16px;
}

.section-subtext {
    font-size: 18px;
    color: var(--color-on-dark-mute);
    max-width: 640px;
    line-height: 1.5;
}

.section-light .section-subtext {
    color: rgba(25, 28, 31, 0.72);
}

/* --- Vertical Accordion: Expand Into Window --- */

/* Each scroll-section starts compact with a subtle upward push effect */
.section-scroll {
    transform: translateY(30px);
    opacity: 0.92;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.7s ease;
    will-change: transform, opacity;
}

/* When the section scrolls into view, it expands upward into the window */
.section-scroll.expanded {
    transform: translateY(0);
    opacity: 1;
}

/* Inner expanded content — hidden until section gets .expanded */
.section-scroll .section-expanded {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 1s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.8s ease 0.15s;
    will-change: max-height;
}

.section-scroll.expanded .section-expanded {
    opacity: 1;
}

.section-scroll .section-compact {
    transition: margin-bottom 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-scroll.expanded .section-compact {
    margin-bottom: 48px;
}

/* Scroll hint — pulses to indicate there's more content below */
.scroll-hint {
    display: inline-block;
    margin-top: 16px;
    font-size: 14px;
    color: var(--color-on-dark-mute);
    letter-spacing: 0.05em;
    opacity: 0.6;
    animation: pulse-hint 2s ease-in-out infinite;
}

.section-light .scroll-hint {
    color: rgba(25, 28, 31, 0.5);
}

@keyframes pulse-hint {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* --- Skip to Content --- */
.skip-link {
    position: absolute;
    top: -1000px;
    left: 8px;
    z-index: 10000;
    padding: 12px 20px;
    background: var(--color-dark);
    color: var(--color-on-dark);
    font-size: 14px;
    font-weight: 600;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.1s;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* === NAV BAR === */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
    background: var(--color-dark);
}

.nav-bar.nav-solid {
    box-shadow: 0 1px 0 var(--color-hairline-dark);
}

.nav-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: 20px;
    color: var(--color-on-dark);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--color-on-dark-mute);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--color-on-dark);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.btn-call {
    font-size: 14px;
    padding: 0 20px;
}

/* --- Hamburger Toggle --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.nav-toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-on-dark);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* === HERO === */
.hero-section {
    padding: 120px 0 88px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    text-align: center;
    padding-top: var(--nav-height);
}

.hero-badge {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-on-dark);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: clamp(40px, 8vw, 80px);
    line-height: 1.0;
    color: var(--color-on-dark);
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-subtext {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--color-on-dark-mute);
    max-width: 620px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.hero-tagline {
    font-size: 13px;
    color: var(--color-on-dark-mute);
    opacity: 0.6;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--btn-height);
    padding: 0 28px;
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.2s, background 0.2s, border-color 0.2s;
    border: 1.5px solid transparent;
    line-height: 1;
}

.btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-lg {
    height: 48px;
    padding: 0 36px;
    font-size: 16px;
}

.btn-primary {
    background: var(--color-light);
    color: var(--color-dark);
    border-color: var(--color-light);
}

.btn-outline {
    background: transparent;
    color: var(--color-on-dark);
    border-color: var(--color-on-dark-mute);
}

.btn-outline:hover {
    border-color: var(--color-on-dark);
    background: rgba(255, 255, 255, 0.06);
}

.btn-dark {
    background: var(--color-dark);
    color: var(--color-on-dark);
    border-color: var(--color-dark);
}

.btn-dark:hover {
    background: #222;
}

/* --- Buttons on light bg --- */
.section-light .btn-primary {
    background: var(--color-dark);
    color: var(--color-on-dark);
    border-color: var(--color-dark);
}

.section-light .btn-outline {
    color: var(--color-ink);
    border-color: var(--color-hairline-light);
}

.section-light .btn-outline:hover {
    border-color: var(--color-ink);
    background: rgba(0, 0, 0, 0.04);
}

/* === SECTION PADDING === */
.problem-section,
.how-it-works-section,
.capabilities-section,
.industries-section,
.testimonials-section,
.pricing-section,
.faq-section,
.final-cta-section {
    padding: var(--section-padding) 0;
}

/* === STAT CARDS (Problem) === */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--color-surface-dark);
    border-radius: var(--radius-card);
    padding: var(--card-padding);
}

.stat-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.stat-title {
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--color-on-dark);
}

.stat-text {
    font-size: 15px;
    color: var(--color-on-dark-mute);
    line-height: 1.6;
}

.problem-ctas,
.hiw-ctas,
.caps-ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* === CARDS (How It Works) === */
.cards-3up {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.card-light {
    background: var(--color-light);
    border-radius: var(--radius-card);
    padding: var(--card-padding);
    border: 1px solid var(--color-hairline-light);
}

.card-dark {
    background: var(--color-surface-dark);
    border-radius: var(--radius-card);
    padding: var(--card-padding);
}

.card-step-icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.card-step-title {
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--color-ink);
}

.card-step-text {
    font-size: 15px;
    color: rgba(25, 28, 31, 0.72);
    line-height: 1.6;
}

/* === FEATURES GRID (Capabilities) === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.feature-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.feature-title {
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: 18px;
    margin-bottom: 6px;
    color: var(--color-on-dark);
}

.feature-summary {
    font-size: 14px;
    color: var(--color-on-dark-mute);
    margin-bottom: 8px;
}

.feature-detail {
    font-size: 13px;
    color: var(--color-on-dark-mute);
    opacity: 0.7;
    line-height: 1.5;
}

/* Feature card scroll reveal - visible class */
.feature-card {
    transition: opacity 0.6s ease, transform 0.6s ease;
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === INDUSTRIES GRID === */
.industries-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

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

.industry-tile {
    background: var(--color-surface-soft);
    border-radius: var(--radius-card);
    padding: var(--card-padding);
    transition: transform 0.3s;
}

.industry-tile:hover {
    transform: translateY(-4px);
}

.industry-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.industry-name {
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--color-ink);
}

.industry-desc {
    font-size: 14px;
    color: rgba(25, 28, 31, 0.72);
    line-height: 1.5;
}

/* === TESTIMONIALS === */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-text {
    font-size: 15px;
    font-style: italic;
    color: var(--color-on-dark);
    line-height: 1.7;
    margin-bottom: 20px;
}

.testimonial-author {
    font-size: 13px;
    color: var(--color-on-dark-mute);
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* === PRICING === */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
    align-items: start;
}

.pricing-grid-single {
    grid-template-columns: minmax(0, 600px);
    justify-content: center;
}

.pricing-grid-single .pricing-card-featured {
    transform: none;
}

.pricing-card {
    background: var(--color-surface-soft);
    border-radius: var(--radius-card);
    padding: var(--card-padding);
    display: flex;
    flex-direction: column;
}

.pricing-card-featured {
    background: var(--color-primary);
    color: var(--color-on-dark);
    transform: scale(1.05);
    position: relative;
}

.pricing-card-featured .plan-desc,
.pricing-card-featured .plan-features li {
    color: rgba(255, 255, 255, 0.85);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-light);
    color: var(--color-primary);
    padding: 4px 16px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.plan-name {
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: 24px;
    margin-bottom: 8px;
}

.plan-desc {
    font-size: 14px;
    color: rgba(25, 28, 31, 0.72);
    margin-bottom: 24px;
}

.plan-features {
    margin-bottom: 32px;
    flex-grow: 1;
}

.plan-features li {
    padding: 8px 0;
    font-size: 14px;
    color: rgba(25, 28, 31, 0.8);
    border-bottom: 1px solid var(--color-hairline-light);
}

.pricing-card-featured .plan-features li {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-cta {
    width: 100%;
}

.pricing-note {
    text-align: center;
    font-size: 14px;
    color: rgba(25, 28, 31, 0.5);
    margin-top: 16px;
}

/* === FAQ ACCORDION === */
.faq-list {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--color-hairline-dark);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px 0;
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: 17px;
    color: var(--color-on-dark);
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

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

.faq-icon {
    font-size: 22px;
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 400px;
    padding-bottom: 20px;
}

.faq-answer p {
    font-size: 15px;
    color: var(--color-on-dark-mute);
    line-height: 1.7;
}

/* === FINAL CTA === */
.cta-title {
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: clamp(28px, 4vw, 48px);
    color: var(--color-on-dark);
    margin-bottom: 16px;
    line-height: 1.1;
}

.cta-text {
    font-size: 18px;
    color: var(--color-on-dark-mute);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* === FOOTER === */
.site-footer {
    background: var(--color-dark);
    color: var(--color-on-dark-mute);
    padding: 64px 0 32px;
}

.footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}

.footer-heading {
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: 14px;
    color: var(--color-on-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    font-size: 15px;
    color: var(--color-on-dark-mute);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-on-dark);
}

.footer-divider {
    height: 1px;
    background: var(--color-hairline-dark);
    margin-bottom: 24px;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--color-on-dark-mute);
    opacity: 0.6;
}

/* === CHAT WIDGET === */
.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
}

.chat-bubble {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-on-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(73, 79, 223, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(73, 79, 223, 0.45);
}

.chat-drawer {
    position: absolute;
    bottom: 68px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 48px);
    background: var(--color-light);
    border-radius: var(--radius-card);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.chat-drawer.open {
    display: flex;
}

.chat-drawer-header {
    background: var(--color-dark);
    color: var(--color-on-dark);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 15px;
}

.chat-close {
    color: var(--color-on-dark-mute);
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.chat-drawer-body {
    padding: 20px;
    min-height: 160px;
}

.chat-message {
    margin-bottom: 12px;
}

.chat-message-bot p {
    background: var(--color-surface-soft);
    padding: 14px 16px;
    border-radius: 16px 16px 16px 4px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-ink);
}

.chat-drawer-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--color-hairline-light);
}

.btn-chat-call {
    width: 100%;
    font-size: 14px;
    background: var(--color-primary);
    color: var(--color-on-dark);
    border-color: var(--color-primary);
}

/* === RESPONSIVE === */

/* Tablet / Small Desktop */
@media (max-width: 1024px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--color-dark);
        flex-direction: column;
        padding: 88px 32px 32px;
        gap: 24px;
        align-items: flex-start;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav-menu.open {
        display: flex;
        opacity: 1;
        visibility: visible;
    }

    .nav-links {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .btn-call {
        width: 100%;
    }

    .stat-grid,
    .cards-3up,
    .features-grid,
    .pricing-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .pricing-card-featured {
        transform: none;
    }

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

/* Mobile */
@media (max-width: 768px) {
    :root {
        --section-padding: var(--section-padding-mobile);
    }

    .hero-section {
        padding: 100px 0 64px;
    }

    .stat-grid,
    .cards-3up,
    .features-grid,
    .pricing-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-ctas,
    .problem-ctas,
    .hiw-ctas,
    .caps-ctas,
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-lg {
        width: 100%;
    }

    .nav-inner {
        padding: 0 16px;
    }

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

    .stat-card,
    .card-light,
    .card-dark,
    .pricing-card,
    .industry-tile {
        padding: 24px;
    }

    .chat-drawer {
        width: calc(100vw - 32px);
        right: -4px;
    }
}

/* Small Mobile */
@media (max-width: 425px) {
    .hero-badge {
        font-size: 11px;
        padding: 4px 12px;
    }

    .section-heading {
        font-size: 28px;
    }

    .section-subtext {
        font-size: 16px;
    }

    .faq-question {
        font-size: 15px;
    }

    /* Force stat items to full width at small mobile */
    .stat-grid {
        grid-template-columns: 1fr !important;
    }

    .stat-card {
        min-width: 0;
        width: 100%;
    }
}

/* === PREFERS 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;
    }

    .section-scroll .section-expanded {
        max-height: none;
        opacity: 1;
        overflow: visible;
    }

    .scroll-hint {
        display: none;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}
