/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Microsoft YaHei', sans-serif; 
    /* Blackboard Background with Chalk Dust Texture */
    background-color: #2c3338; 
    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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.06'/%3E%3C/svg%3E");
    color: #f4f4f5; 
    line-height: 1.6; 
    min-height: 100vh; 
    overflow-x: hidden; 
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Theme Variables - Chalkboard */
:root {
    --chalk-white: #f8f9fa;
    --chalk-blue: #64b5f6;
    --chalk-blue-hover: #42a5f5;
    --chalk-gray: #b0bec5;
    --board-dark: #22282c;
    --board-light: #343c42;
    --chalk-shadow: 1px 1px 2px rgba(255,255,255,0.2), 0 0 8px rgba(255,255,255,0.05);
    --chalk-blue-shadow: 1px 1px 2px rgba(100,181,246,0.4), 0 0 10px rgba(100,181,246,0.2);
}

/* Navigation */
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 5%; 
    background: rgba(44, 51, 56, 0.9); 
    backdrop-filter: blur(2px);
    position: sticky; 
    top: 0; 
    z-index: 100; 
    border-bottom: 2px dashed rgba(255,255,255,0.1);
}
.nav-logo { 
    font-size: 26px; 
    font-weight: bold; 
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--chalk-white);
    text-shadow: var(--chalk-shadow);
    letter-spacing: 1px;
}
.nav-logo svg {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: var(--chalk-blue);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 2px rgba(100,181,246,0.5));
}
.nav-links { display: flex; gap: 30px; align-items: center; font-weight: bold; }
.nav-links a { 
    color: var(--chalk-gray); 
    transition: all 0.3s; 
    font-size: 16px; 
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--chalk-blue);
    transition: width 0.3s ease;
    box-shadow: var(--chalk-blue-shadow);
}
.nav-links a:hover { color: var(--chalk-white); text-shadow: var(--chalk-shadow); }
.nav-links a:hover::after { width: 100%; }

.btn-download-nav { 
    padding: 8px 20px !important; 
    background: transparent;
    color: var(--chalk-blue) !important; 
    border: 2px solid var(--chalk-blue);
    border-radius: 6px;
    transition: all 0.3s; 
    font-family: inherit;
    box-shadow: var(--chalk-blue-shadow);
    text-shadow: var(--chalk-blue-shadow);
}
.btn-download-nav::after { display: none; }
.btn-download-nav:hover { 
    background: rgba(100,181,246,0.1);
    color: var(--chalk-white) !important;
    transform: scale(1.05) rotate(-2deg);
}

/* Hero Section - Chalkboard */
.hero-wrapper {
    position: relative;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 60px 5% 100px;
    overflow: hidden;
}

/* Chalk Blackboard Graphics */
.chalk-graphics {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.8;
}

/* Central Chalk Plane SVG */
.hero-plane-svg {
    position: absolute;
    top: 45%; left: 50%;
    transform: translate(-50%, -50%);
    width: 900px;
    height: 700px;
    z-index: 1;
}
.hero-plane-svg path, .hero-plane-svg polygon, .hero-plane-svg line, .hero-plane-svg circle {
    fill: none;
    stroke: var(--chalk-blue);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 3px rgba(100,181,246,0.6));
}
.hero-plane-svg .chalk-dash {
    stroke-dasharray: 8 12;
    stroke: rgba(255,255,255,0.5);
    stroke-width: 1.5;
}
.hero-plane-svg .chalk-scribble {
    stroke-width: 1;
    opacity: 0.6;
}
.hero-plane-svg text {
    fill: var(--chalk-white);
    font-size: 16px;
    font-family: 'Comic Sans MS', cursive;
    text-shadow: var(--chalk-shadow);
    stroke: none;
    filter: none;
}
.hero-plane-svg .text-blue {
    fill: var(--chalk-blue);
    text-shadow: var(--chalk-blue-shadow);
}

.hero-content { 
    z-index: 20; 
    max-width: 1000px; 
    text-align: center;
    position: relative;
    margin-top: 40px;
    background: rgba(44, 51, 56, 0.7);
    padding: 40px;
    border: 3px dashed rgba(255,255,255,0.2);
    border-radius: 10px;
    backdrop-filter: blur(2px);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.hero-title {
    font-size: 32px; /* Adjusted for longer title */
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--chalk-white);
    text-shadow: var(--chalk-shadow);
    line-height: 1.5;
    letter-spacing: 1px;
}

.hero p { 
    font-size: 18px; 
    margin-bottom: 40px; 
    color: var(--chalk-gray);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
}

.hero-buttons { display: flex; gap: 20px; justify-content: center; margin-bottom: 50px; flex-wrap: wrap; }

.btn-primary { 
    padding: 14px 30px; 
    font-size: 18px; 
    font-weight: bold; 
    color: var(--board-dark); 
    background: var(--chalk-blue);
    border: 2px solid var(--chalk-blue);
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3), inset 0 0 10px rgba(255,255,255,0.5);
    font-family: inherit;
}
.btn-primary:hover { 
    transform: translateY(-3px) rotate(1deg);
    background: var(--chalk-blue-hover);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4), inset 0 0 10px rgba(255,255,255,0.6);
}

.btn-outline { 
    padding: 14px 30px; 
    font-size: 18px; 
    font-weight: bold; 
    color: var(--chalk-white); 
    background: transparent;
    border: 2px dashed var(--chalk-white);
    border-radius: 8px;
    transition: all 0.3s;
    font-family: inherit;
    text-shadow: var(--chalk-shadow);
}
.btn-outline:hover { 
    background: rgba(255,255,255,0.05);
    transform: translateY(-3px) rotate(-1deg);
    border-style: solid;
}

.hero-images { 
    display: flex; 
    justify-content: center; 
    gap: 25px; 
    align-items: flex-end; 
    margin-top: 20px;
    z-index: 20;
}
.hero-images img { 
    max-width: 28%; 
    border: 4px solid var(--chalk-white);
    border-radius: 4px;
    background: var(--board-dark);
    padding: 5px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.6);
    transition: all 0.4s; 
    /* Slight chalky fade to images */
    opacity: 0.9;
}
.hero-images img:nth-child(2) {
    transform: translateY(-20px) rotate(2deg);
    z-index: 2;
}
.hero-images img:nth-child(1) { transform: rotate(-3deg); }
.hero-images img:nth-child(3) { transform: rotate(3deg); }

.hero-images img:hover { 
    transform: translateY(-10px) scale(1.05) rotate(0deg); 
    opacity: 1;
    z-index: 10;
}

/* Features Section */
.features { padding: 100px 5%; position: relative; z-index: 10; background: var(--board-light); border-top: 2px dashed rgba(255,255,255,0.1); border-bottom: 2px dashed rgba(255,255,255,0.1);}
.section-title { 
    text-align: center; 
    font-size: 36px; 
    margin-bottom: 60px; 
    font-weight: bold;
    color: var(--chalk-white);
    text-shadow: var(--chalk-shadow);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}
/* Chalk underline */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--chalk-blue);
    border-radius: 5px;
    box-shadow: var(--chalk-blue-shadow);
    transform: rotate(-1deg);
}

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1200px; margin: 0 auto; }

.feature-card { 
    padding: 40px 30px; 
    background: rgba(34, 40, 44, 0.6);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    transition: all 0.3s; 
    position: relative;
}
.feature-card:hover { 
    transform: translateY(-5px) scale(1.02); 
    border-color: var(--chalk-blue);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4), inset 0 0 15px rgba(100,181,246,0.1);
}
.feature-card h3 { 
    font-size: 22px; 
    margin-bottom: 15px; 
    color: var(--chalk-blue);
    text-shadow: var(--chalk-blue-shadow);
}
.feature-card p { color: var(--chalk-gray); font-size: 15px; }

/* Blog Section */
.blog { padding: 100px 5%; background: var(--board-dark); }
.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: var(--board-light);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    transition: all 0.3s;
    overflow: hidden;
}
.blog-card:hover { 
    border-color: var(--chalk-white);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}
.blog-card img { 
    width: 100%; height: 260px; object-fit: cover; 
    border-bottom: 2px dashed rgba(255,255,255,0.1);
    opacity: 0.85;
}
.blog-card:hover img { opacity: 1; }
.blog-content { padding: 30px; }
.blog-date { display: inline-block; margin-bottom: 15px; font-size: 13px; color: var(--board-dark); background: var(--chalk-white); padding: 4px 12px; border-radius: 4px; font-weight: bold; transform: rotate(-2deg);}
.blog-content h3 { font-size: 22px; margin-bottom: 15px; color: var(--chalk-white); text-shadow: var(--chalk-shadow);}
.blog-content p { color: var(--chalk-gray); margin-bottom: 0; font-size: 15px;}
.btn-more { 
    display: block; 
    width: 240px; 
    margin: 60px auto 0; 
    text-align: center; 
    padding: 14px; 
    background: transparent;
    color: var(--chalk-white); 
    font-weight: bold; 
    border: 2px dashed var(--chalk-white);
    border-radius: 8px;
    transition: all 0.3s; 
    font-family: inherit;
    font-size: 16px;
}
.btn-more:hover { background: rgba(255,255,255,0.1); border-style: solid; transform: rotate(1deg);}

/* FAQ Section */
.faq { padding: 100px 5%; max-width: 900px; margin: 0 auto; background: var(--board-light); margin-top: 40px; margin-bottom: 80px; border: 2px solid rgba(255,255,255,0.1); border-radius: 12px; box-shadow: 10px 10px 30px rgba(0,0,0,0.4);}
.faq-item { 
    background: transparent; 
    margin-bottom: 25px; 
    padding: 0 0 20px 0; 
    border-bottom: 1px dashed rgba(255,255,255,0.2);
}
.faq-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.faq-question { font-size: 20px; font-weight: bold; margin-bottom: 12px; color: var(--chalk-blue); text-shadow: var(--chalk-blue-shadow);}
.faq-question::before { content: 'Q: '; color: var(--chalk-white); }
.faq-answer { color: var(--chalk-gray); font-size: 15px;}
.faq-answer::before { content: 'A: '; color: var(--chalk-white); opacity: 0.7;}

/* Footer */
.footer { background: #1a1e21; padding: 60px 5% 30px; color: var(--chalk-gray); border-top: 3px solid var(--chalk-blue); }
.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: var(--chalk-white); margin-bottom: 25px; text-shadow: var(--chalk-shadow);}
.footer-col ul li { margin-bottom: 12px; font-size: 15px;}
.footer-col ul li a { color: var(--chalk-gray); transition: all 0.2s; }
.footer-col ul li a:hover { color: var(--chalk-blue); padding-left: 5px;}
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px dashed rgba(255,255,255,0.1); font-size: 13px; opacity: 0.7;}

/* 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: var(--board-light); 
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    transition: all 0.3s;
}
.download-card:hover { 
    border-color: var(--chalk-blue);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}
.download-card h3 { font-size: 24px; margin-bottom: 15px; color: var(--chalk-white); text-shadow: var(--chalk-shadow);}
.download-card p { color: var(--chalk-gray); margin-bottom: 30px; font-size: 15px;}
.btn-dl-card { 
    display: inline-block; 
    padding: 12px 25px; 
    background: var(--chalk-blue);
    color: var(--board-dark); 
    font-weight: bold; 
    border-radius: 6px;
    transition: all 0.2s; 
    font-family: inherit;
    font-size: 16px;
}
.btn-dl-card:hover { 
    background: var(--chalk-white); 
    transform: scale(1.05);
}

/* Page specific headers */
.page-header { 
    padding: 80px 5% 60px; 
    text-align: center; 
    border-bottom: 2px dashed rgba(255,255,255,0.1);
    background: rgba(34, 40, 44, 0.8);
}
.page-header-content {
    max-width: 800px;
    margin: 0 auto;
}
.page-header h1 { 
    font-size: 40px; 
    margin-bottom: 20px; 
    color: var(--chalk-white);
    text-shadow: var(--chalk-shadow);
}
.page-header p { font-size: 18px; color: var(--chalk-blue); text-shadow: var(--chalk-blue-shadow);}

/* === 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;
    }
}
