/* ============================================================
   0020 - Bold Cyan / Geometric Theme
   Modern tech startup style - geometric, energetic, flat design
   ============================================================ */

/* ----- Base & Typography ----- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

/* Selection */
::selection {
    background-color: rgba(8, 145, 178, 0.2);
    color: #0891B2;
}

/* ----- Navbar scroll effect ----- */
#navbar.nav-scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

#navbar .nav-link {
    position: relative;
}

#navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #0891B2, #2563EB);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

#navbar .nav-link:hover::after {
    width: 100%;
}

/* ----- Feature Cards ----- */
.feature-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px) rotate(0.5deg);
    border-color: #67e8f9;
    box-shadow: 0 20px 40px rgba(8, 145, 178, 0.08);
}

/* Feature card icon animation */
.feature-card .fa-2xl,
.feature-card svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .fa-2xl {
    transform: scale(1.15);
}

/* ----- Stats Counters ----- */
.stat-item {
    position: relative;
    overflow: hidden;
}

.stat-item::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ----- Testimonials ----- */
.testimonial-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-3px);
}

.testimonial-card img {
    transition: transform 0.3s ease;
}

.testimonial-card:hover img {
    transform: scale(1.1);
}

/* ----- FAQ Accordion ----- */
.faq-item {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item.active {
    border-color: #0891B2 !important;
    box-shadow: 0 8px 30px rgba(8, 145, 178, 0.1);
}

.faq-item.active .faq-icon {
    background-color: #0891B2 !important;
    color: #ffffff !important;
}

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

.faq-item.active .faq-content {
    display: block !important;
}

.faq-toggle {
    cursor: pointer;
}

.faq-content {
    animation: faqSlideDown 0.3s ease forwards;
}

@keyframes faqSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----- CTA Geometric Animations ----- */
#cta svg rect,
#cta svg circle,
#cta svg polygon {
    animation: geomFloat 6s ease-in-out infinite;
}

#cta svg rect:nth-child(2) {
    animation-delay: -2s;
}

#cta svg circle:nth-child(3) {
    animation-delay: -4s;
}

@keyframes geomFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(3deg);
    }
}

/* ----- Hero Geometric Animation ----- */
#hero svg rect {
    animation: heroGeomPulse 8s ease-in-out infinite;
}

#hero svg rect:nth-child(4) {
    animation-delay: -3s;
}

#hero svg rect:nth-child(5) {
    animation-delay: -6s;
}

@keyframes heroGeomPulse {
    0%, 100% {
        opacity: 0.06;
    }
    50% {
        opacity: 0.2;
    }
}

/* ----- Mobile Menu ----- */
#mobileMenu.show {
    display: block !important;
    animation: menuSlideDown 0.25s ease forwards;
}

@keyframes menuSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----- Scroll reveal (simple) ----- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ----- Button hover effects ----- */
.btn-geometric {
    position: relative;
    overflow: hidden;
}

.btn-geometric::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-geometric:hover::before {
    left: 100%;
}

/* ----- SVG wave / curve at bottom of hero ----- */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
}

/* ----- Geometric Pattern background utility ----- */
.bg-geometric {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='%230891B2' opacity='0.08'/%3E%3C/svg%3E");
}

/* ----- Responsive Tweaks ----- */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    #hero p {
        font-size: 1rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .stat-item {
        padding: 1.5rem;
    }

    .stat-item .text-4xl {
        font-size: 1.75rem;
    }

    .faq-item button span:first-child {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    #hero {
        min-height: 80vh;
    }

    .feature-card .w-16 {
        width: 3rem;
        height: 3rem;
    }

    .feature-card .text-2xl {
        font-size: 1.25rem;
    }
}

/* ----- Focus styles for accessibility ----- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #0891B2;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ----- Smooth counter transition ----- */
.counter.counted {
    color: inherit;
}

/* ----- Hero CTA pulse ----- */
@keyframes subtlePulse {
    0%, 100% { box-shadow: 0 10px 25px rgba(8, 145, 178, 0.3); }
    50% { box-shadow: 0 10px 35px rgba(8, 145, 178, 0.5); }
}

#hero a[href="#cta"] {
    animation: subtlePulse 3s ease-in-out infinite;
}

/* ----- Divider shapes ----- */
.section-divider-cyan {
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, #0891B2, #2563EB);
    border-radius: 2px;
    margin: 0 auto;
}

/* ----- Geometric accent line ----- */
.geom-accent {
    position: relative;
}

.geom-accent::before {
    content: '';
    position: absolute;
    left: 0;
    top: -8px;
    width: 40px;
    height: 3px;
    background: linear-gradient(to right, #0891B2, transparent);
    border-radius: 2px;
}