/* ============================================================
   维愿祈福 · 官网 v2.0
   通俗直白 · 响应式 · 纯静态
   ============================================================ */

/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: #2C2C2C;
    background: #FCF9F5;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 颜色 ===== */
:root {
    --gold: #C8A96E;
    --gold-dark: #B8964E;
    --gold-light: #F5EDE0;
    --dark: #1A2332;
    --dark-light: #2C3A4A;
    --bg: #FCF9F5;
    --card-bg: #FFFFFF;
    --text: #2C2C2C;
    --text-light: #666666;
    --text-muted: #999999;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
}

/* ===== 按钮 ===== */
.btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background: var(--gold);
    color: #fff;
    font-weight: 600;
    border-radius: 30px;
    transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
}

/* ===== 导航 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(252, 249, 245, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
}
.logo-icon {
    font-size: 24px;
}
.logo-text {
    color: var(--dark);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}
.nav-links a {
    font-size: 15px;
    color: var(--text-light);
    transition: color 0.2s;
}
.nav-links a:hover {
    color: var(--gold);
}
.nav-btn {
    background: var(--gold);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 30px;
}
.nav-btn:hover {
    background: var(--gold-dark) !important;
    color: #fff !important;
}
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.menu-toggle span {
    width: 26px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: 0.3s;
}
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== 第1屏：主视觉 ===== */
.hero {
    position: relative;
    padding: 0;
    display: block;
    background-color: #FCF9F5;
    background-image: linear-gradient(135deg, #FCF9F5 0%, #F5EDE0 100%);
}
/* 背景图与页面内容同宽（跟随 .container 的 1072px 内容区），高度按图片比例撑开首屏 */
.hero::before {
    content: "";
    display: block;
    width: calc(100% - 48px);
    max-width: 1072px;
    min-height: 420px;
    margin: 0 auto;
    aspect-ratio: 1072 / 536;
    /* 两层：左侧浅色蒙版（保证文字可读）→ 背景图 */
    background-image:
        linear-gradient(90deg, rgba(252,249,245,0.94) 0%, rgba(252,249,245,0.86) 30%, rgba(252,249,245,0.5) 52%, rgba(252,249,245,0.1) 72%, rgba(252,249,245,0) 85%),
        url("../assets/hero-bg.webp");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}
.hero .container {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.hero-text h1 {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 12px;
}
.hero-text p {
    font-size: 17px;
    color: var(--text-light);
    margin-bottom: 6px;
}
.hero-sub {
    font-size: 15px !important;
    color: var(--text-muted) !important;
    margin-top: 8px;
}
.hero-qr {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}
/* 二维码统一等比显示，避免拉伸变形导致扫不出来 */
.qr-img {
    display: block;
    object-fit: contain;
}
.hero-qr img {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    border: 2px solid #e0d8d0;
    background: #fff;
}
.hero-qr span {
    font-size: 15px;
    font-weight: 500;
    color: var(--dark);
}
/* ===== 第2屏：是什么 ===== */
.what {
    padding: 80px 0;
    background: var(--bg);
}
.what h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
}
.what-desc {
    text-align: center;
    font-size: 18px;
    color: var(--text-light);
    margin: 12px 0 40px;
}
.what-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.what-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    border: 1px solid #eee;
    box-shadow: var(--shadow);
}
.what-icon {
    font-size: 40px;
    margin-bottom: 12px;
}
.what-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}
.what-card p {
    font-size: 15px;
    color: var(--text-light);
}

/* ===== 第3屏：怎么用 ===== */
.how {
    padding: 80px 0;
    background: var(--card-bg);
}
.how h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
}
.how-steps {
    max-width: 640px;
    margin: 32px auto 0;
}
.how-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}
.how-step:last-child {
    border-bottom: none;
}
.step-num {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--gold);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.step-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}
.step-content p {
    font-size: 15px;
    color: var(--text-light);
}

/* ===== 第4屏：会员 ===== */
.pricing {
    padding: 80px 0;
    background: var(--bg);
}
.pricing h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
}
.pricing-table {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}
.plan {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px 24px;
    border: 1px solid #eee;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow);
}
.plan.recommended {
    border-color: var(--gold);
    background: #FDFBF7;
}
.badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 16px;
    border-radius: 20px;
}
.plan-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}
.plan-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 16px;
}
.plan-price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}
.plan ul {
    list-style: none;
    text-align: left;
    font-size: 14px;
    color: var(--text-light);
}
.plan ul li {
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
}
.plan ul li:last-child {
    border-bottom: none;
}

/* ===== 第5屏：轮播 ===== */
.testimonials {
    padding: 80px 0;
    background: var(--card-bg);
}
.testimonials h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
}
.section-sub {
    text-align: center;
    font-size: 16px;
    color: var(--text-light);
    margin-top: 4px;
}
.carousel-wrapper {
    position: relative;
    max-width: 720px;
    margin: 32px auto 0;
    overflow: hidden;
    border-radius: 16px;
}
.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}
.carousel-slide {
    min-width: 100%;
    padding: 0 20px;
}
.testimonial-card {
    background: var(--bg);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.testimonial-icon {
    font-size: 44px;
    margin-bottom: 12px;
}
.testimonial-text {
    font-size: 18px;
    color: var(--dark);
    line-height: 1.7;
    margin-bottom: 8px;
}
.testimonial-author {
    font-size: 14px;
    color: var(--text-muted);
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid #ddd;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background 0.2s;
}
.carousel-btn:hover {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
}
.carousel-btn.prev {
    left: -12px;
}
.carousel-btn.next {
    right: -12px;
}
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}
.carousel-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s;
}
.carousel-dots span.active {
    background: var(--gold);
}

/* ===== 第6屏：CTA ===== */
.cta {
    padding: 80px 0;
    background: var(--dark);
    text-align: center;
}
.cta h2 {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}
.cta p {
    font-size: 18px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}
.cta-qr {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.cta-qr img {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    border: 3px solid rgba(255,255,255,0.1);
    background: #fff;
}
.cta-qr span {
    font-size: 16px;
    color: rgba(255,255,255,0.4);
}

/* ===== 底部 ===== */
.footer {
    background: #0F1A2E;
    color: rgba(255,255,255,0.5);
    padding: 40px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 40px;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-brand .logo-icon {
    font-size: 24px;
}
.footer-brand .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.footer-brand p {
    font-size: 14px;
    color: rgba(255,255,255,0.3);
    margin-top: 2px;
}
.footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
}
.footer-links a {
    font-size: 14px;
    color: rgba(255,255,255,0.4);
    transition: color 0.2s;
}
.footer-links a:hover {
    color: var(--gold);
}
.footer-qr {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}
.footer-qr img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: #fff;
}
.footer-qr span {
    font-size: 13px;
    color: rgba(255,255,255,0.3);
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: rgba(255,255,255,0.2);
    padding-top: 16px;
}
.footer-bottom a {
    color: rgba(255,255,255,0.2);
    text-decoration: none;
}
.footer-bottom a:hover {
    color: var(--gold);
}
.footer-bottom a img {
    width: auto;
    height: 16px;
    vertical-align: middle;
}
.footer-beian {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.footer-beian a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ============================================================ */
/* 响应式 */
/* ============================================================ */

/* 平板 */
@media (max-width: 900px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .hero-qr {
        justify-content: center;
        align-items: center;
    }
    /* 窄屏首屏变上下排列、高度回到内容撑开，背景图整屏铺满并改用竖向蒙版 */
    .hero {
        padding: 70px 0 50px;
        background-image:
            linear-gradient(180deg, rgba(252,249,245,0.94) 0%, rgba(252,249,245,0.88) 45%, rgba(252,249,245,0.96) 100%),
            url("../assets/hero-bg.webp"),
            linear-gradient(135deg, #FCF9F5 0%, #F5EDE0 100%);
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
    }
    .hero::before {
        display: none;
    }
    .hero .container {
        position: static;
    }
    .pricing-table {
        grid-template-columns: 1fr 1fr;
    }
    .plan:first-child {
        display: none;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-qr {
        justify-content: center;
    }
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 手机 */
@media (max-width: 600px) {
    .menu-toggle {
        display: flex;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        padding: 20px;
        border-bottom: 1px solid #eee;
        gap: 16px;
    }
    .nav-links.active {
        display: flex;
    }
    .nav-btn {
        width: 100%;
        text-align: center;
    }
    .hero-text h1 {
        font-size: 32px;
    }
    .what-grid {
        grid-template-columns: 1fr;
    }
    .pricing-table {
        grid-template-columns: 1fr;
    }
    .plan:first-child {
        display: none;
    }
    .plan.recommended {
        order: -1;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }
    .footer-beian {
        justify-content: center;
    }
    .hero {
        padding: 80px 0 40px;
        /* 手机单独用竖版背景图（1242×1400），避免横图在竖屏上被裁掉两侧 */
        background-image:
            linear-gradient(180deg, rgba(252,249,245,0.94) 0%, rgba(252,249,245,0.88) 45%, rgba(252,249,245,0.96) 100%),
            url("../assets/hero-bg-mobile.webp"),
            linear-gradient(135deg, #FCF9F5 0%, #F5EDE0 100%);
    }
    .hero-text h1 {
        font-size: 28px;
    }
    .hero-text p {
        font-size: 15px;
    }
}
