/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Nunito', 'Microsoft YaHei', 'PingFang SC', sans-serif; 
    /* Soft, warm background like a crafting table */
    background-color: #fdfaf6; 
    color: #5c4b41; 
    line-height: 1.6; 
    min-height: 100vh; 
    overflow-x: hidden; 
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Theme Variables - Felt Craft */
:root {
    --bg-wood: #e8d8c8;
    --bg-felt-light: #fdfaf6;
    --felt-blue: #6eb5e5;
    --felt-blue-dark: #4a90e2;
    --felt-stitch: #d4a373;
    --text-main: #5c4b41;
    --text-muted: #8c7a6b;
    --btn-shadow: #c2b2a0;
}

/* Felt Texture Generator */
.felt-texture {
    position: relative;
}
.felt-texture::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* SVG Noise for felt fuzziness */
    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='1.5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
}

/* Stitching Border */
.stitch-border {
    border: 2px dashed var(--felt-stitch);
    border-radius: 15px;
    padding: 2px;
}

/* Navigation */
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 5%; 
    background: rgba(253, 250, 246, 0.95); 
    backdrop-filter: blur(2px);
    position: sticky; 
    top: 0; 
    z-index: 100; 
    box-shadow: 0 4px 15px rgba(92, 75, 65, 0.05);
}
.nav-logo { 
    font-size: 26px; 
    font-weight: 900; 
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--felt-blue-dark);
}
.nav-logo svg {
    width: 36px;
    height: 36px;
    fill: var(--felt-blue);
    /* Soft drop shadow for felt thickness */
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.1));
}
.nav-links { display: flex; gap: 30px; align-items: center; font-weight: 800; }
.nav-links a { 
    color: var(--text-muted); 
    transition: all 0.3s; 
    font-size: 16px; 
    padding: 5px 10px;
    border-radius: 20px;
}
.nav-links a:hover { 
    color: var(--felt-blue-dark); 
    background: rgba(110, 181, 229, 0.1);
}
.btn-download-nav { 
    padding: 10px 24px !important; 
    background: var(--felt-blue);
    color: #fff !important; 
    border-radius: 25px !important;
    box-shadow: 0 4px 0 var(--felt-blue-dark);
    transition: all 0.2s; 
}
.btn-download-nav:hover { 
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--felt-blue-dark);
    background: var(--felt-blue-dark);
}

/* Hero Section - Wooden Desk Background */
.hero-wrapper {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 5% 100px;
    overflow: hidden;
    /* Wooden desk texture */
    background-color: var(--bg-wood);
    background-image: 
        repeating-linear-gradient(90deg, transparent 0, transparent 40px, rgba(255,255,255,0.1) 40px, rgba(255,255,255,0.1) 42px),
        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.05' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E");
}

/* Crafted Felt Plane Graphic */
.felt-plane-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.15;
}
.felt-plane {
    width: 100%;
    height: 100%;
    fill: var(--felt-blue);
    filter: drop-shadow(10px 10px 5px rgba(0,0,0,0.2));
}
.felt-stitch-line {
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-dasharray: 8 8;
}

.hero-content { 
    z-index: 5; 
    max-width: 900px; 
    text-align: center;
    position: relative;
    /* Felt patch background for text */
    background: var(--bg-felt-light);
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 15px 30px rgba(92, 75, 65, 0.15), inset 0 0 20px rgba(0,0,0,0.02);
}

.hero-title {
    font-size: 36px; /* Adjusted for longer title */
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--felt-blue-dark);
    /* Soft rounded text look */
    text-shadow: 2px 2px 0px rgba(110, 181, 229, 0.3);
    line-height: 1.4;
}

.hero p { 
    font-size: 18px; 
    margin-bottom: 40px; 
    color: var(--text-muted);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 700;
}

.hero-buttons { display: flex; gap: 20px; justify-content: center; margin-bottom: 50px; flex-wrap: wrap; }

.btn-felt { 
    padding: 16px 35px; 
    font-size: 18px; 
    font-weight: 800; 
    color: #fff; 
    background: var(--felt-blue);
    border: none;
    border-radius: 30px;
    box-shadow: 0 6px 0 var(--felt-blue-dark), 0 10px 10px rgba(0,0,0,0.1);
    transition: all 0.2s;
}
.btn-felt:hover { 
    transform: translateY(2px);
    box-shadow: 0 4px 0 var(--felt-blue-dark), 0 6px 6px rgba(0,0,0,0.1);
    background: #5ca5d4;
}
.btn-felt:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 var(--felt-blue-dark);
}

.btn-felt-outline { 
    padding: 16px 35px; 
    font-size: 18px; 
    font-weight: 800; 
    color: var(--felt-blue-dark); 
    background: #fff;
    border: 3px solid var(--felt-blue);
    border-radius: 30px;
    box-shadow: 0 6px 0 var(--felt-blue), 0 10px 10px rgba(0,0,0,0.05);
    transition: all 0.2s;
}
.btn-felt-outline:hover { 
    transform: translateY(2px);
    box-shadow: 0 4px 0 var(--felt-blue), 0 6px 6px rgba(0,0,0,0.05);
    background: #f0f7fb;
}

.hero-images { 
    display: flex; 
    justify-content: center; 
    gap: 25px; 
    align-items: flex-end; 
}
.hero-images img { 
    max-width: 28%; 
    border-radius: 20px;
    border: 8px solid #fff;
    box-shadow: 0 10px 20px rgba(92, 75, 65, 0.2);
    transition: all 0.3s; 
    /* Soften images slightly to match felt aesthetic */
    filter: sepia(0.1) contrast(0.95);
}
.hero-images img:nth-child(2) {
    transform: translateY(-15px);
    z-index: 2;
}
.hero-images img:hover { 
    transform: translateY(-20px) rotate(2deg); 
    filter: sepia(0) contrast(1);
}

/* Features Section */
.features { padding: 100px 5%; background: var(--bg-felt-light); position: relative; z-index: 10;}
.section-title { 
    text-align: center; 
    font-size: 36px; 
    margin-bottom: 60px; 
    font-weight: 900;
    color: var(--text-main);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 20%;
    width: 60%;
    height: 4px;
    background: var(--felt-blue);
    border-radius: 2px;
}

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1200px; margin: 0 auto; }

.feature-card { 
    padding: 40px 30px; 
    text-align: center; 
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(92, 75, 65, 0.08);
    transition: all 0.3s; 
    position: relative;
}
.feature-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 15px 25px rgba(92, 75, 65, 0.12);
}
.feature-card h3 { 
    font-size: 22px; 
    margin-bottom: 15px; 
    font-weight: 900; 
    color: var(--felt-blue-dark);
    /* Decorative stitched underline */
    border-bottom: 2px dashed var(--felt-stitch);
    display: inline-block;
    padding-bottom: 8px;
}
.feature-card p { color: var(--text-muted); font-size: 15px; font-weight: 600;}

/* Blog Section */
.blog { padding: 100px 5%; background: #f5f0e6; }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; max-width: 1100px; margin: 0 auto; }
.blog-card { 
    display: flex; 
    flex-direction: column; 
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(92, 75, 65, 0.08);
    transition: all 0.3s;
}
.blog-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 15px 25px rgba(92, 75, 65, 0.12);
}
.blog-card img { width: 100%; height: 260px; object-fit: cover; border-bottom: 4px solid var(--felt-blue);}
.blog-content { padding: 30px; }
.blog-date { display: inline-block; margin-bottom: 15px; font-size: 14px; color: #fff; background: var(--felt-stitch); padding: 5px 15px; border-radius: 15px; font-weight: 800;}
.blog-content h3 { font-size: 22px; margin-bottom: 15px; font-weight: 900; color: var(--text-main);}
.blog-content p { color: var(--text-muted); margin-bottom: 0; font-weight: 600;}
.btn-more { 
    display: block; 
    width: 240px; 
    margin: 60px auto 0; 
    text-align: center; 
    padding: 15px; 
    background: #fff;
    color: var(--felt-blue-dark); 
    font-weight: 800; 
    border: 2px dashed var(--felt-blue);
    border-radius: 30px;
    transition: all 0.3s; 
}
.btn-more:hover { background: var(--felt-blue); color: #fff; border-style: solid; }

/* FAQ Section */
.faq { padding: 100px 5%; max-width: 900px; margin: 0 auto; background: var(--bg-felt-light); margin-top: 40px; margin-bottom: 80px; border-radius: 30px; box-shadow: 0 10px 30px rgba(92,75,65,0.05);}
.faq-item { 
    background: #fff; 
    margin-bottom: 20px; 
    padding: 25px 30px; 
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(92,75,65,0.03);
    transition: all 0.3s;
}
.faq-item:hover { 
    transform: translateX(5px);
    box-shadow: 0 6px 15px rgba(92,75,65,0.08);
}
.faq-question { font-size: 18px; font-weight: 900; margin-bottom: 12px; color: var(--felt-blue-dark);}
.faq-question::before { content: '✿ '; color: var(--felt-stitch); }
.faq-answer { color: var(--text-muted); font-size: 15px; font-weight: 600; padding-left: 25px;}

/* Footer */
.footer { background: #4a3f35; padding: 80px 5% 30px; color: #dcd3cb; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; max-width: 1200px; margin: 0 auto 50px; }
.footer-col h4 { font-size: 18px; color: #fff; margin-bottom: 25px; font-weight: 900;}
.footer-col ul li { margin-bottom: 15px; }
.footer-col ul li a { color: #dcd3cb; transition: all 0.2s; font-weight: 600;}
.footer-col ul li a:hover { color: var(--felt-blue); padding-left: 5px;}
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px dashed rgba(255,255,255,0.1); font-size: 14px;}

/* 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 { 
    padding: 40px 30px; 
    text-align: center; 
    background: #fff; 
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(92, 75, 65, 0.08);
    transition: all 0.3s;
}
.download-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 15px 25px rgba(92, 75, 65, 0.12);
}
.download-card h3 { font-size: 24px; margin-bottom: 15px; font-weight: 900; color: var(--felt-blue-dark);}
.download-card p { color: var(--text-muted); margin-bottom: 30px; font-size: 15px; font-weight: 600;}
.btn-dl-card { 
    display: inline-block; 
    padding: 12px 30px; 
    background: var(--felt-blue);
    color: #fff; 
    font-weight: 800; 
    border-radius: 25px;
    box-shadow: 0 4px 0 var(--felt-blue-dark);
    transition: all 0.2s; 
}
.btn-dl-card:hover { 
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--felt-blue-dark);
    background: var(--felt-blue-dark); 
}

/* Page specific headers */
.page-header { 
    padding: 100px 5% 80px; 
    text-align: center; 
    background: var(--bg-wood);
    background-image: 
        repeating-linear-gradient(90deg, transparent 0, transparent 40px, rgba(255,255,255,0.1) 40px, rgba(255,255,255,0.1) 42px);
}
.page-header-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-felt-light);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.page-header h1 { 
    font-size: 42px; 
    margin-bottom: 20px; 
    font-weight: 900;
    color: var(--felt-blue-dark);
}
.page-header p { font-size: 18px; color: var(--text-muted); font-weight: 700;}

/* === 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;
    }
}
