/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Comic Sans MS', 'PingFang SC', 'Microsoft YaHei', sans-serif; 
    background-color: #87CEEB; /* Sky blue clay */
    /* Noise texture to simulate clay roughness */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    color: #4a4a4a; 
    line-height: 1.6; 
    min-height: 100vh; 
    overflow-x: hidden; 
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Claymation Variables */
:root {
    --clay-blue: #5D9CEC;
    --clay-green: #A0D468;
    --clay-yellow: #FFCE54;
    --clay-red: #ED5565;
    --clay-orange: #FC6E51;
    --clay-white: #F5F7FA;
    --clay-dark: #434A54;
    --clay-shadow: rgba(0, 0, 0, 0.15);
}

/* SVG Filter for Clay Edges */
.clay-edge {
    filter: url('#clay-filter');
}

/* Navigation */
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 5%; 
    background: var(--clay-white); 
    position: sticky; 
    top: 0; 
    z-index: 100; 
    border-bottom: 6px solid #E6E9ED;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 8px 0 var(--clay-shadow);
    margin-bottom: 20px;
}
.nav-logo { 
    font-size: 28px; 
    font-weight: 900; 
    color: var(--clay-blue); 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}
.nav-logo svg { fill: var(--clay-blue); filter: drop-shadow(2px 2px 0px rgba(0,0,0,0.1)); }
.nav-links { display: flex; gap: 25px; align-items: center; font-weight: bold; }
.nav-links a { 
    font-size: 16px; 
    color: var(--clay-dark); 
    padding: 8px 15px;
    border-radius: 15px;
    transition: transform 0.1s steps(2);
}
.nav-links a:hover { 
    background: #E6E9ED;
    transform: rotate(2deg) scale(1.05);
}
.btn-download-nav { 
    background: var(--clay-orange);
    color: white !important; 
    border-radius: 20px !important;
    border: 3px solid #E9573F;
    box-shadow: 0 4px 0 #E9573F;
    transition: all 0.1s steps(2);
}
.btn-download-nav:hover { 
    transform: translateY(2px) rotate(-2deg);
    box-shadow: 0 2px 0 #E9573F;
}
.btn-download-nav:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #E9573F;
}

/* Hero Section */
.hero { 
    position: relative; 
    padding: 60px 5% 80px; 
    text-align: center; 
    min-height: 85vh; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
}

/* Clay Scenery Elements */
.clay-mountain {
    position: absolute;
    bottom: -50px;
    z-index: 0;
    background: var(--clay-green);
    border-radius: 50% 50% 0 0;
    border: 8px solid #8CC152;
}
.mountain-1 { width: 600px; height: 300px; left: -100px; }
.mountain-2 { width: 800px; height: 400px; right: -200px; background: #8CC152; border-color: #79A746; z-index: -1;}
.clay-cloud {
    position: absolute;
    background: white;
    border-radius: 50px;
    box-shadow: 0 8px 0 rgba(0,0,0,0.05);
    animation: stopMotionFloat 4s steps(6) infinite;
}
.cloud-1 { width: 120px; height: 40px; top: 15%; left: 10%; }
.cloud-1::before { content:''; position:absolute; width:60px; height:60px; background:white; border-radius:50%; top:-30px; left:20px;}
.cloud-2 { width: 160px; height: 50px; top: 25%; right: 15%; animation-delay: 1s;}
.cloud-2::before { content:''; position:absolute; width:80px; height:80px; background:white; border-radius:50%; top:-40px; left:30px;}

@keyframes stopMotionFloat {
    0% { transform: translateY(0); }
    25% { transform: translateY(-5px) translateX(5px); }
    50% { transform: translateY(-10px) translateX(0); }
    75% { transform: translateY(-5px) translateX(-5px); }
    100% { transform: translateY(0); }
}

.hero-content { z-index: 3; max-width: 800px; margin: 0 auto; position: relative; background: var(--clay-white); padding: 40px; border-radius: 30px; border: 6px solid #E6E9ED; box-shadow: 0 12px 0 var(--clay-shadow); }
.hero h1 { 
    font-size: 48px; 
    margin-bottom: 20px; 
    color: var(--clay-blue); 
    text-shadow: 3px 3px 0px rgba(0,0,0,0.1);
    line-height: 1.2; 
}
.hero p { 
    font-size: 20px; 
    margin-bottom: 40px; 
    color: var(--clay-dark); 
    font-weight: bold; 
}

.hero-buttons { display: flex; gap: 20px; justify-content: center; margin-bottom: 30px; flex-wrap: wrap; }
.btn-clay { 
    padding: 15px 35px; 
    font-size: 18px; 
    font-weight: 900; 
    background: var(--clay-yellow); 
    color: var(--clay-dark); 
    border-radius: 25px; 
    border: 4px solid #F6BB42;
    box-shadow: 0 8px 0 #F6BB42; 
    cursor: pointer; 
    transition: all 0.1s steps(2);
}
.btn-clay:hover { 
    transform: translateY(4px) rotate(2deg);
    box-shadow: 0 4px 0 #F6BB42; 
}
.btn-clay:active {
    transform: translateY(8px);
    box-shadow: 0 0 0 #F6BB42;
}
.btn-pc { 
    background: var(--clay-blue);
    color: white;
    border-color: #4A89DC;
    box-shadow: 0 8px 0 #4A89DC;
}
.btn-pc:hover { box-shadow: 0 4px 0 #4A89DC; }
.btn-pc:active { box-shadow: 0 0 0 #4A89DC; }

.hero-images { 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
    z-index: 3; 
    align-items: flex-end; 
    position: relative;
    margin-top: 40px;
}
.hero-images img { 
    max-width: 28%; 
    border-radius: 20px; 
    border: 8px solid var(--clay-white);
    box-shadow: 0 15px 0 var(--clay-shadow); 
    animation: stopMotionWobble 3s steps(4) infinite;
}
.hero-images img:nth-child(2) { animation-delay: 0.5s; z-index: 2; transform: scale(1.1); }
.hero-images img:nth-child(3) { animation-delay: 1s; }

@keyframes stopMotionWobble {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(2deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-2deg); }
    100% { transform: rotate(0deg); }
}

/* Features Section */
.features { padding: 100px 5%; background: #F5F7FA; position: relative; border-top: 8px solid #E6E9ED; border-radius: 40px 40px 0 0; margin-top: -30px; z-index: 10;}
.section-title { 
    text-align: center; 
    font-size: 38px; 
    margin-bottom: 60px; 
    color: var(--clay-dark); 
    text-shadow: 2px 2px 0px rgba(0,0,0,0.05);
}
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1200px; margin: 0 auto; }
.feature-card { 
    background: white; 
    padding: 40px 30px; 
    border-radius: 30px; 
    border: 5px solid #E6E9ED;
    box-shadow: 0 10px 0 var(--clay-shadow); 
    text-align: center; 
    transition: transform 0.1s steps(2);
}
.feature-card:hover { 
    transform: translateY(5px) scale(1.02); 
    box-shadow: 0 5px 0 var(--clay-shadow); 
    border-color: var(--clay-blue);
}
.feature-card h3 { 
    font-size: 22px; 
    margin-bottom: 15px; 
    color: var(--clay-red); 
    font-weight: 900;
}
.feature-card p { color: #656D78; font-size: 16px; font-weight: bold; }

/* Blog Section */
.blog { padding: 100px 5%; background: #E6E9ED; }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; max-width: 1100px; margin: 0 auto; }
.blog-card { 
    background: white; 
    border-radius: 30px; 
    border: 6px solid var(--clay-white);
    box-shadow: 0 12px 0 var(--clay-shadow); 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    transition: transform 0.1s steps(2);
}
.blog-card:hover { 
    transform: translateY(6px); 
    box-shadow: 0 6px 0 var(--clay-shadow); 
}
.blog-card img { width: 100%; height: 260px; object-fit: cover; border-bottom: 6px solid #E6E9ED;}
.blog-content { padding: 30px; }
.blog-date { display: inline-block; background: var(--clay-yellow); color: var(--clay-dark); padding: 5px 15px; border-radius: 15px; font-size: 14px; font-weight: 900; margin-bottom: 15px; border: 3px solid #F6BB42;}
.blog-content h3 { font-size: 22px; margin-bottom: 15px; color: var(--clay-dark); }
.blog-content p { color: #656D78; margin-bottom: 0; font-weight: bold;}
.btn-more { 
    display: block; 
    width: 220px; 
    margin: 60px auto 0; 
    text-align: center; 
    padding: 15px; 
    background: var(--clay-green); 
    color: white; 
    border: 4px solid #8CC152; 
    border-radius: 25px; 
    font-weight: 900; 
    font-size: 18px;
    box-shadow: 0 8px 0 #8CC152;
    transition: all 0.1s steps(2); 
}
.btn-more:hover { 
    transform: translateY(4px);
    box-shadow: 0 4px 0 #8CC152;
}

/* FAQ Section */
.faq { padding: 100px 5%; max-width: 900px; margin: 0 auto; background: var(--clay-white); border-radius: 40px; border: 8px solid #E6E9ED; margin-bottom: 80px; box-shadow: 0 15px 0 var(--clay-shadow);}
.faq-item { 
    background: white; 
    margin-bottom: 20px; 
    border-radius: 20px; 
    padding: 25px 30px; 
    border: 4px solid #E6E9ED;
    box-shadow: 0 6px 0 rgba(0,0,0,0.05); 
    transition: transform 0.1s steps(2);
}
.faq-item:hover { 
    transform: translateX(5px); 
    border-color: var(--clay-orange);
}
.faq-question { font-size: 18px; font-weight: 900; color: var(--clay-dark); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.faq-question::before { content: 'Q:'; color: var(--clay-orange); font-size: 24px; }
.faq-answer { color: #656D78; font-weight: bold; font-size: 16px; padding-left: 35px; }

/* Footer */
.footer { background: var(--clay-dark); padding: 80px 5% 30px; color: white; border-top: 10px solid #323A45; border-radius: 40px 40px 0 0;}
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; max-width: 1200px; margin: 0 auto 50px; }
.footer-col h4 { font-size: 20px; color: var(--clay-yellow); margin-bottom: 25px; font-weight: 900; text-shadow: 2px 2px 0 rgba(0,0,0,0.2);}
.footer-col ul li { margin-bottom: 15px; }
.footer-col ul li a { color: #CCD1D9; font-weight: bold; transition: color 0.1s; }
.footer-col ul li a:hover { color: white; padding-left: 5px; }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 4px dashed #323A45; color: #AAB2BD; font-size: 14px; font-weight: bold;}

/* Page specific headers */
.page-header { 
    padding: 100px 5% 60px; 
    text-align: center; 
    background: var(--clay-white);
    border-radius: 40px;
    border: 8px solid #E6E9ED;
    box-shadow: 0 15px 0 var(--clay-shadow);
    max-width: 1000px;
    margin: 40px auto;
}
.page-header h1 { 
    font-size: 42px; 
    color: var(--clay-blue); 
    margin-bottom: 20px; 
    text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}
.page-header p { color: var(--clay-dark); font-size: 20px; font-weight: bold;}

/* Download Page Grid */
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; max-width: 1100px; margin: 60px auto; padding: 0 5%; }
.download-card { 
    background: white; 
    border-radius: 30px; 
    padding: 40px 30px; 
    text-align: center; 
    border: 6px solid #E6E9ED;
    box-shadow: 0 12px 0 var(--clay-shadow); 
    transition: transform 0.1s steps(2);
}
.download-card:hover { 
    transform: translateY(6px); 
    box-shadow: 0 6px 0 var(--clay-shadow); 
    border-color: var(--clay-green);
}
.download-card h3 { color: var(--clay-dark); font-size: 24px; margin-bottom: 15px; font-weight: 900;}
.download-card p { color: #656D78; margin-bottom: 30px; font-size: 16px; font-weight: bold;}

/* === perf: reduce motion & lower GPU cost === */
.feature-card,
.blog-card,
.hero-content,
.glass-panel,
.pearl-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.navbar {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* perf: limit decorative infinite layers on mid/low-end devices */
@media (max-width: 768px) {
    .bubble:nth-child(n+3),
    .tiny-plane:nth-child(n+3),
    .bg-shard:nth-child(n+4),
    .orb:nth-child(n+2) {
        display: none !important;
    }
}
