/* ============================================
   ZenTen - Custom Styles
   禅意极简 · 自然绿色系
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    /* 主色系 - 大地棕 */
    --primary-50: #F8F3EE;
    --primary-100: #E5D9CA;
    --primary-200: #D4B08C;
    --primary-300: #C99D70;
    --primary-400: #A87C50;
    --primary-500: #8B6840;
    --primary-600: #6B4D31;
    --primary-700: #4A3625;
    --primary-800: #3E3E31;
    --primary-900: #48423B;

    /* 中性色系 */
    --neutral-50: #F8F6F4;
    --neutral-100: #E5E0DC;
    --neutral-200: #D1C8C3;
    --neutral-300: #AB9E99;
    --neutral-400: #8A7F7A;
    --neutral-500: #6B6260;

    /* 强调色 */
    --accent-green: #8B9E7F;
    --accent-blue: #7A8A91;
    --accent-red: #8B3A3A;

    /* 背景 */
    --bg-base: #F8F6F4;
    --bg-card: #FFFFFF;

    /* 文字 */
    --text-primary: #3E3E31;
    --text-secondary: #6B6260;
    --text-muted: #AB9E99;

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(62, 62, 49, 0.04);
    --shadow-md: 0 4px 12px rgba(62, 62, 49, 0.07);
    --shadow-lg: 0 10px 30px rgba(62, 62, 49, 0.1);
    --shadow-xl: 0 20px 50px rgba(168, 124, 80, 0.15);

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* 过渡 */
    --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

::selection {
    background-color: rgba(168, 124, 80, 0.2);
    color: var(--text-primary);
}

/* ---------- Header Styles ---------- */
#header:not(.scrolled) {
    background-color: transparent;
}

#header.scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(212, 176, 140, 0.5);
    box-shadow: 0 1px 20px rgba(62, 62, 49, 0.06);
}

/* Header Logo Background */
#header-logo {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#header-logo::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(135deg, rgba(168, 124, 80, 0.25), rgba(212, 176, 140, 0.2));
    border-radius: 16px;
    z-index: 0;
}

#header-logo > div {
    position: relative;
    z-index: 1;
    width: 100% !important;
    height: 100% !important;
}

#header-logo svg {
    position: relative;
    z-index: 1;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
    transition: all var(--transition-base);
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ---------- Hero Section Background Orbs ---------- */
.hero-orb {
    animation: orbFloat 20s ease-in-out infinite;
}

.hero-orb-1 {
    top: 5%;
    left: -5%;
    background: radial-gradient(circle, var(--primary-200), transparent 70%);
    animation-delay: 0s;
}

.hero-orb-2 {
    bottom: 10%;
    right: -8%;
    background: radial-gradient(circle, var(--primary-300), transparent 70%);
    animation-delay: -7s;
}

.hero-orb-3 {
    top: 40%;
    right: 25%;
    background: radial-gradient(circle, var(--primary-100), transparent 70%);
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

/* ---------- Floating Particles ---------- */
.particle {
    animation: particleFloat linear infinite;
}

.particle-1 { top: 20%; left: 15%; animation-duration: 18s; animation-delay: 0s; }
.particle-2 { top: 60%; left: 80%; animation-duration: 22s; animation-delay: -5s; }
.particle-3 { top: 75%; left: 25%; animation-duration: 16s; animation-delay: -10s; }
.particle-4 { top: 35%; left: 65%; animation-duration: 20s; animation-delay: -3s; }
.particle-5 { top: 50%; left: 45%; animation-duration: 25s; animation-delay: -8s; }

@keyframes particleFloat {
    0% { 
        opacity: 0; 
        transform: translateY(0) scale(0.5); 
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { 
        opacity: 0; 
        transform: translateY(-120px) scale(1.2); 
    }
}

/* ---------- Hero Logo Container ---------- */
.hero-logo-reveal {
    animation: heroFadeInUp 1s ease-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

#hero-logo svg {
    z-index: 1;
    position: relative;
}

.hero-title-reveal {
    animation: heroFadeInUp 1s ease-out forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.hero-subtitle-reveal {
    animation: heroFadeInUp 1s ease-out forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

.hero-desc-reveal {
    animation: heroFadeInUp 1s ease-out forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

.hero-cta-reveal {
    animation: heroFadeInUp 1s ease-out forwards;
    animation-delay: 1.1s;
    opacity: 0;
}

.hero-stats-reveal {
    animation: heroFadeInUp 1s ease-out forwards;
    animation-delay: 1.3s;
    opacity: 0;
}

@keyframes heroFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Indicator Fade Out */
.scroll-indicator {
    animation: fadeInBounce 1s ease-out 2s forwards, fadeOut 0.5s ease-in 6s forwards;
    opacity: 0;
}

@keyframes fadeInBounce {
    to { opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

/* ---------- Feature Cards ---------- */
.feature-card {
    position: relative;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(212, 176, 140, 0.3);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-400), var(--primary-500));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(168, 124, 80, 0.5);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon-wrapper {
    position: relative;
    width: 56px;
    height: 56px;
    margin-bottom: 1.25rem;
}

.feature-icon-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.feature-card:hover .feature-icon-bg {
    background: linear-gradient(135deg, var(--primary-200), var(--primary-300));
    transform: rotate(-5deg) scale(1.05);
}

.feature-icon {
    position: relative;
    z-index: 1;
    width: 28px;
    height: 28px;
    color: var(--primary-500);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: color var(--transition-base);
}

.feature-card:hover .feature-icon {
    color: var(--primary-600);
}

/* ---------- Screenshot Mockups ---------- */
.screenshot-mockup {
    position: relative;
    width: 260px;
    height: 520px;
    background: rgba(62, 62, 49, 0.04);
    border-radius: 36px;
    padding: 10px;
    box-shadow: 
        0 25px 50px -12px rgba(62, 62, 49, 0.12),
        0 0 0 1px rgba(62, 62, 49, 0.04),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    transition: all var(--transition-slow);
}

.screenshot-mockup.mockup-highlight {
    transform: scale(1.08);
    box-shadow: 
        0 35px 60px -15px rgba(168, 124, 80, 0.2),
        0 0 0 1px rgba(168, 124, 80, 0.1),
        0 0 80px rgba(212, 176, 140, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.screenshot-item:hover .screenshot-mockup {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 35px 60px -12px rgba(62, 62, 49, 0.18),
        0 0 0 1px rgba(168, 124, 80, 0.1);
}

.screenshot-item:hover .screenshot-mockup.mockup-highlight {
    transform: translateY(-16px) scale(1.1);
}

.mockup-notch {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 26px;
    background: #1a1a1e;
    border-radius: 20px;
    z-index: 2;
}

.mockup-screen {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    overflow: hidden;
    background: white;
}

/* ---------- Scroll Animations ---------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.delay-100 { transition-delay: 0.1s; }
.animate-on-scroll.delay-200 { transition-delay: 0.2s; }
.animate-on-scroll.delay-300 { transition-delay: 0.3s; }
.animate-on-scroll.delay-400 { transition-delay: 0.4s; }

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Back to Top Button ---------- */
#back-to-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
}

#back-to-top:hover {
    box-shadow: 0 8px 25px rgba(168, 124, 80, 0.4);
}

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

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 1024px) {
    .screenshot-mockup {
        width: 220px;
        height: 440px;
    }

    .screenshot-mockup.mockup-highlight {
        transform: scale(1.03);
    }
}

@media (max-width: 768px) {
    .screenshot-mockup {
        width: 200px;
        height: 400px;
        border-radius: 30px;
        padding: 8px;
    }

    .mockup-screen {
        border-radius: 22px;
    }

    .mockup-notch {
        width: 70px;
        height: 22px;
        top: 11px;
    }

    .hero-orb {
        opacity: 0.15 !important;
    }

    .particle {
        display: none;
    }

    .screenshot-mockup.mockup-highlight {
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .screenshot-mockup {
        width: 180px;
        height: 360px;
        border-radius: 26px;
        padding: 7px;
    }

    .mockup-screen {
        border-radius: 19px;
    }

    .feature-card {
        padding: 1.5rem 1.25rem;
    }
}

/* ---------- Smooth Page Load ---------- */
body {
    animation: pageLoad 0.4s ease-out;
}

@keyframes pageLoad {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ---------- Custom Scrollbar (Webkit) ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-200);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-300);
}

/* ---------- Focus Styles for Accessibility ---------- */
:focus-visible {
    outline: 2px solid var(--primary-400);
    outline-offset: 2px;
    border-radius: 4px;
}

a:focus-visible,
button:focus-visible {
    outline-offset: 3px;
}
