/* ============================================
   AI Phone 360 - Base Styles
   Core styles, variables, reset, and utilities
   ============================================ */

/* CSS Variables */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --accent: #0f172a;
    --accent-blue: #2563eb;
    --accent-light: #3b82f6;
    --accent-green: #10b981;
    --accent-purple: #7c3aed;
    --accent-orange: #f59e0b;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ============================================
   Navigation Styles
   ============================================ */
nav {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links > li {
    position: relative;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text-primary); }

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-icon-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.nav-icon-link svg {
    width: 16px;
    height: 16px;
}

.nav-cta {
    padding: 0.6rem 1.25rem;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-cta:hover {
    background: #1e293b;
    transform: translateY(-1px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background: var(--accent);
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 99;
    padding: 5rem 2rem 2rem;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    width: 100%;
    text-align: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-nav a:hover {
    background: var(--bg-secondary);
}

.mobile-nav .mobile-cta {
    margin-top: 1rem;
    background: var(--accent);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
}

.mobile-nav .mobile-cta:hover {
    background: #1e293b;
}

/* ============================================
   Mega Menu Styles
   ============================================ */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    padding: 1.5rem;
    min-width: 520px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 1000;
}

.nav-links > li:hover .mega-menu,
.nav-links > li.dropdown-open .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.mega-menu-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mega-menu-item:hover {
    background: var(--bg-secondary);
}

.mega-menu-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.mega-menu-item:hover .mega-menu-icon {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    border-color: transparent;
}

.mega-menu-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.mega-menu-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.mega-menu-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.mega-menu-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
    transition: all 0.2s ease;
}

.mega-menu-footer a:hover {
    color: var(--accent-light);
}

/* Pricing Mega Menu */
.mega-menu.pricing-menu {
    min-width: 380px;
    padding: 1rem;
}

.pricing-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.pricing-menu-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    position: relative;
}

.pricing-menu-item:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.pricing-menu-item.featured {
    border-color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.03);
}

.pricing-plan-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.pricing-plan-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.pricing-plan-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.pricing-plan-price span {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
}

.pricing-popular-badge {
    font-size: 0.55rem;
    padding: 0.15rem 0.35rem;
    background: var(--accent-blue);
    color: white;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: absolute;
    top: -0.5rem;
    right: 0.5rem;
}

.mega-menu.pricing-menu .mega-menu-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

.mega-menu.pricing-menu .mega-menu-footer a {
    font-size: 0.8rem;
}

/* ============================================
   Footer Styles
   ============================================ */
footer {
    padding: 3rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.75rem;
    max-width: 240px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-column h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-column li { margin-bottom: 0.5rem; }

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-column a:hover { color: var(--text-primary); }

.footer-bottom {
    max-width: 1100px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-company-link {
    color: var(--text-secondary);
    text-decoration: underline;
    text-decoration-color: var(--border-color);
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

.footer-company-link:hover {
    color: var(--accent-blue);
    text-decoration-color: var(--accent-blue);
}

.social-links {
    display: flex;
    gap: 0.6rem;
}

.social-link {
    width: 34px;
    height: 34px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ============================================
   Cookie Consent Banner
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--accent);
    color: #fff;
    padding: 1.25rem 2rem;
    z-index: 9999;
    display: none;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

.cookie-banner.show { display: block; }

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 280px;
}

.cookie-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.6;
}

.cookie-text a {
    color: #60a5fa;
    text-decoration: none;
}

.cookie-text a:hover { text-decoration: underline; }

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.cookie-btn-accept {
    background: var(--accent-blue);
    color: #fff;
}

.cookie-btn-accept:hover { background: #1d4ed8; }

.cookie-btn-reject {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid #475569;
}

.cookie-btn-reject:hover {
    background: #1e293b;
    color: #fff;
}

.cookie-btn-settings {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid #475569;
}

.cookie-btn-settings:hover {
    background: #1e293b;
    color: #fff;
}

/* ============================================
   Common Utility Classes
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

main { position: relative; z-index: 1; }

/* ============================================
   Waitlist Highlight Effects
   ============================================ */

/* Form highlight glow */
.waitlist-highlight {
    animation: pulseGlow 1s ease-in-out 3;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
    50% {
        box-shadow: 0 0 30px 10px rgba(37, 99, 235, 0.3);
    }
}

/* Input glow effect */
.input-glow {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2), 0 0 30px rgba(37, 99, 235, 0.3) !important;
    animation: inputPulse 1s ease-in-out infinite;
}

@keyframes inputPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2), 0 0 30px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.3), 0 0 40px rgba(37, 99, 235, 0.4);
    }
}

/* Confetti animation */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) scale(0.5);
        opacity: 0;
    }
}

/* Attention arrow */
.attention-arrow {
    position: absolute;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
    animation: bounceArrowHorizontal 0.6s ease-in-out infinite;
    pointer-events: none;
}

.attention-arrow svg {
    width: 28px;
    height: 28px;
    color: var(--accent-blue);
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.3));
    order: 2;
}

.attention-arrow span {
    background: var(--accent-blue);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    order: 1;
}

@keyframes bounceArrowHorizontal {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(8px);
    }
}

/* Mobile: arrow above the form */
@media (max-width: 768px) {
    .attention-arrow {
        flex-direction: column;
        transform: translateX(-50%);
        animation: bounceArrow 0.6s ease-in-out infinite;
    }
    .attention-arrow svg {
        order: 1;
    }
    .attention-arrow span {
        order: 2;
    }
    @keyframes bounceArrow {
        0%, 100% {
            transform: translateX(-50%) translateY(0);
        }
        50% {
            transform: translateX(-50%) translateY(10px);
        }
    }
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 1024px) {
    .footer-content { flex-direction: column; }
}

@media (max-width: 768px) {
    nav { padding: 1rem 1.5rem; }
    .nav-links, .nav-right { display: none; }
    .mobile-menu-btn { display: flex; }

    footer { padding: 2rem 1.5rem; }
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-brand p { text-align: center; }
    .footer-links {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
    .footer-column { text-align: center; }
    .footer-column ul { padding: 0; }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .cookie-banner { padding: 1rem 1.5rem; }
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .cookie-buttons {
        justify-content: center;
        width: 100%;
    }
}

/* ============================================
   Modal Styles
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.modal p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-btn {
    padding: 0.85rem 2rem;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn:hover {
    background: #1e293b;
}
