/* ============================================================
   桐庐德扑网 — 江南水墨风 (Jiangnan Ink Wash Theme)
   Tailwind CDN base + custom CSS for refined details
   ============================================================ */

/* ---------- Smooth scroll ---------- */
html {
    scroll-behavior: smooth;
}

/* ---------- Selection ---------- */
::selection {
    background-color: #d6d3d1;
    color: #292524;
}

/* ---------- Hero gradient (stone → warm gray → white) ---------- */
.hero-gradient {
    background: linear-gradient(175deg, #f5f5f4 0%, #faf0e8 35%, #fdf8f5 60%, #ffffff 100%);
}

/* ---------- Ink emphasis text ---------- */
.ink-emphasis {
    background: linear-gradient(135deg, #78716c 0%, #57534e 40%, #a0613b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Navigation link underline ---------- */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #78716c, #a0613b);
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* ---------- Navbar scroll shadow ---------- */
#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(87, 83, 78, 0.08);
}

/* ---------- Feature cards ---------- */
.feature-card {
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d6d3d1, #e8bfa3, #d6d3d1, transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.feature-card:hover {
    border-color: #d6d3d1;
    box-shadow: 0 8px 30px rgba(87, 83, 78, 0.06);
    transform: translateY(-3px);
}
.feature-card:hover::before {
    opacity: 1;
}

.feature-card-wide {
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}
.feature-card-wide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #78716c, #e8bfa3, transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.feature-card-wide:hover {
    border-color: #d6d3d1;
    box-shadow: 0 8px 30px rgba(87, 83, 78, 0.06);
    transform: translateY(-2px);
}
.feature-card-wide:hover::before {
    opacity: 1;
}

/* ---------- Feature icon wrapper ---------- */
.feature-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fdf8f5, #faf0e8);
    border: 1px solid #e8bfa3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.35s ease;
}
.feature-card:hover .feature-icon-wrapper,
.feature-card-wide:hover .feature-icon-wrapper {
    background: linear-gradient(135deg, #78716c, #57534e);
    border-color: #57534e;
    box-shadow: 0 4px 15px rgba(120, 113, 108, 0.25);
}
.feature-icon {
    font-size: 1.15rem;
    color: #78716c;
    transition: color 0.35s ease;
}
.feature-card:hover .feature-icon,
.feature-card-wide:hover .feature-icon {
    color: #ffffff;
}

/* ---------- Stats gradient ---------- */
.stats-gradient {
    background: linear-gradient(135deg, #78716c 0%, #8b7e74 30%, #a0613b 70%, #804d30 100%);
}

/* ---------- Counter animation ---------- */
.counter {
    font-variant-numeric: tabular-nums;
}

/* ---------- Testimonial cards ---------- */
.testimonial-card {
    background: #ffffff;
    border: 1px solid #e7e5e4;
    border-radius: 1rem;
    padding: 1.75rem;
    transition: all 0.35s ease;
    position: relative;
}
.testimonial-card::after {
    content: '\201C';
    position: absolute;
    top: 0.5rem;
    right: 1.25rem;
    font-family: 'Noto Serif SC', 'Georgia', serif;
    font-size: 4rem;
    line-height: 1;
    color: #e7e5e4;
    pointer-events: none;
}
.testimonial-card:hover {
    border-color: #d6d3d1;
    box-shadow: 0 8px 30px rgba(87, 83, 78, 0.07);
    transform: translateY(-2px);
}

/* ---------- FAQ accordion ---------- */
.faq-item {
    background: #ffffff;
}
.faq-toggle i {
    transition: transform 0.3s ease;
}
.faq-item.active .faq-toggle i {
    transform: rotate(180deg);
}
.faq-item.active {
    border-color: #d6d3d1;
    box-shadow: 0 4px 20px rgba(87, 83, 78, 0.04);
}
.faq-answer {
    overflow: hidden;
}

/* ---------- CTA gradient ---------- */
.cta-gradient {
    background: linear-gradient(135deg, #78716c 0%, #57534e 50%, #4f46e5 100%);
}

/* ---------- Customer service floating button ripple ---------- */
#csToggle {
    position: relative;
}
#csToggle::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(120, 113, 108, 0.3);
    animation: csPulse 2s ease-out infinite;
}
@keyframes csPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* ---------- Toast animation ---------- */
#toast.show {
    opacity: 1;
    transform: translate(-50%, -8px);
    pointer-events: auto;
}

/* ---------- Mobile menu ---------- */
#mobileMenu {
    animation: slideDown 0.25s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Smooth image rendering ---------- */
img {
    image-rendering: auto;
}

/* ---------- Focus styles ---------- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #78716c;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ---------- Responsive fine-tuning ---------- */
@media (max-width: 640px) {
    .feature-card,
    .feature-card-wide {
        padding: 1.5rem 1.25rem;
    }
    .testimonial-card {
        padding: 1.5rem;
    }
    .testimonial-card::after {
        font-size: 3rem;
        right: 1rem;
    }
    #csPanel {
        width: calc(100vw - 3rem);
        max-width: 300px;
    }
}

@media (max-width: 1024px) {
    .hero-gradient {
        background: linear-gradient(170deg, #f5f5f4 0%, #faf0e8 50%, #fdf8f5 100%);
    }
}
