/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Georgia', 'Times New Roman', 'Microsoft YaHei', serif; 
    /* Impasto Oil Painting Background Base */
    background-color: #0b1d3a; 
    color: #f0f4f8; 
    line-height: 1.6; 
    min-height: 100vh; 
    overflow-x: hidden; 
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Theme Variables - Impasto Starry Night */
:root {
    --oil-dark: #0b1d3a;
    --oil-blue: #1c4587;
    --oil-light-blue: #4a86e8;
    --oil-yellow: #f1c232;
    --oil-white: #f8f9fa;
    --text-main: #f0f4f8;
    --text-muted: #b0c4de;
    --brush-shadow: 2px 2px 4px rgba(0,0,0,0.6), inset 1px 1px 2px rgba(255,255,255,0.2);
}

/* Navigation */
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 5%; 
    background: rgba(11, 29, 58, 0.8); 
    backdrop-filter: blur(2px);
    position: sticky; 
    top: 0; 
    z-index: 100; 
    border-bottom: 3px solid var(--oil-blue);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.nav-logo { 
    font-size: 28px; 
    font-weight: bold; 
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--oil-yellow);
    text-shadow: 2px 2px 0px #000;
    font-style: italic;
}
.nav-logo svg {
    width: 36px;
    height: 36px;
    fill: var(--oil-yellow);
    filter: drop-shadow(2px 2px 1px #000);
}
.nav-links { display: flex; gap: 30px; align-items: center; font-weight: bold; }
.nav-links a { 
    color: var(--text-muted); 
    transition: all 0.3s; 
    font-size: 16px; 
    position: relative;
    text-shadow: 1px 1px 2px #000;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0; width: 0; height: 3px;
    background: var(--oil-yellow);
    transition: width 0.3s ease;
    border-radius: 2px;
}
.nav-links a:hover { color: var(--oil-white); }
.nav-links a:hover::after { width: 100%; }

.btn-download-nav { 
    padding: 10px 24px !important; 
    background: var(--oil-yellow);
    color: var(--oil-dark) !important; 
    border-radius: 8px;
    box-shadow: var(--brush-shadow);
    transition: all 0.3s; 
    font-weight: bold;
    text-shadow: none !important;
}
.btn-download-nav::after { display: none; }
.btn-download-nav:hover { 
    transform: translateY(-2px) scale(1.05);
    background: #ffd966;
    box-shadow: 3px 3px 6px rgba(0,0,0,0.7), inset 2px 2px 3px rgba(255,255,255,0.4);
}

/* Hero Section - Impasto */
.hero-wrapper {
    position: relative;
    min-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 60px 5% 100px;
    overflow: hidden;
    background: radial-gradient(circle at 70% 30%, #1c4587 0%, #0b1d3a 70%);
}

/* SVG Swirls mimicking thick brush strokes */
.oil-swirls {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}
.oil-swirls path {
    fill: none;
    stroke-linecap: round;
    animation: swirlAnim 20s linear infinite alternate;
}
.swirl-1 { stroke: var(--oil-light-blue); stroke-width: 40; filter: blur(2px); }
.swirl-2 { stroke: var(--oil-blue); stroke-width: 60; filter: blur(2px); }
.swirl-3 { stroke: var(--oil-yellow); stroke-width: 20; filter: blur(2px); opacity: 0.4; }

@keyframes swirlAnim {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.1) rotate(5deg); }
}

/* Central Plane SVG */
.hero-plane-svg {
    position: absolute;
    top: 40%; left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    z-index: 2;
    filter: drop-shadow(5px 10px 15px rgba(0,0,0,0.8));
    animation: planeFloat 6s ease-in-out infinite alternate;
}
.hero-plane-svg polygon {
    fill: var(--oil-yellow);
    stroke: #e69138;
    stroke-width: 2;
}
.hero-plane-svg .plane-shadow {
    fill: #b45f06;
}

@keyframes planeFloat {
    0% { transform: translate(-50%, -50%) rotate(-5deg); }
    100% { transform: translate(-50%, -60%) rotate(5deg); }
}

.hero-content { 
    z-index: 20; 
    max-width: 1000px; 
    text-align: center;
    position: relative;
    margin-top: 20px;
    background: rgba(11, 29, 58, 0.6);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    border: 2px solid rgba(255,255,255,0.05);
}

.hero-title {
    font-size: 32px; /* Adjusted for longer title */
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--oil-yellow);
    text-shadow: 3px 3px 5px rgba(0,0,0,0.8);
    font-style: italic;
    line-height: 1.4;
}

.hero p { 
    font-size: 20px; 
    margin-bottom: 40px; 
    color: var(--oil-white);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.hero-buttons { display: flex; gap: 20px; justify-content: center; margin-bottom: 50px; flex-wrap: wrap; }

.btn-primary { 
    padding: 16px 35px; 
    font-size: 18px; 
    font-weight: bold; 
    color: var(--oil-dark); 
    background: var(--oil-yellow);
    border: none;
    border-radius: 10px;
    box-shadow: var(--brush-shadow);
    transition: all 0.3s;
}
.btn-primary:hover { 
    transform: translateY(-3px) scale(1.02);
    background: #ffd966;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.7), inset 2px 2px 4px rgba(255,255,255,0.5);
}

.btn-outline { 
    padding: 16px 35px; 
    font-size: 18px; 
    font-weight: bold; 
    color: var(--oil-white); 
    background: rgba(28, 69, 135, 0.6);
    border: 2px solid var(--oil-light-blue);
    border-radius: 10px;
    box-shadow: var(--brush-shadow);
    transition: all 0.3s;
}
.btn-outline:hover { 
    transform: translateY(-3px) scale(1.02);
    background: var(--oil-blue);
    border-color: var(--oil-white);
}

.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-radius: 8px;
    border: 8px solid #2b2b2b; /* Frame effect */
    box-shadow: 10px 15px 25px rgba(0, 0, 0, 0.8);
    transition: all 0.4s ease; 
    /* Canvas texture overlay simulation */
    filter: contrast(1.1) saturate(1.2);
}
.hero-images img:nth-child(2) {
    transform: translateY(-20px);
    z-index: 2;
}
.hero-images img:hover { 
    transform: translateY(-30px) scale(1.05); 
    box-shadow: 15px 20px 35px rgba(0, 0, 0, 0.9);
}

/* Features Section */
.features { padding: 100px 5%; background: #12233f; position: relative; z-index: 10; border-top: 5px solid var(--oil-blue);}
.section-title { 
    text-align: center; 
    font-size: 38px; 
    margin-bottom: 60px; 
    font-weight: bold;
    color: var(--oil-yellow);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    font-style: italic;
}

.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: var(--oil-blue);
    border-radius: 12px;
    box-shadow: var(--brush-shadow);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s; 
    position: relative;
    overflow: hidden;
}
/* Impasto texture overlay */
.feature-card::before {
    content: ''; position: absolute; top:0; left:0; width:100%; height:100%;
    background: 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.1' 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");
    pointer-events: none;
}
.feature-card:hover { 
    transform: translateY(-8px); 
    background: var(--oil-light-blue);
    box-shadow: 5px 10px 20px rgba(0,0,0,0.6), inset 2px 2px 5px rgba(255,255,255,0.3);
}
.feature-card h3 { 
    font-size: 24px; 
    margin-bottom: 15px; 
    font-weight: bold; 
    color: var(--oil-white);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
.feature-card p { color: var(--text-muted); font-size: 16px; text-shadow: 1px 1px 1px rgba(0,0,0,0.5);}

/* Blog Section */
.blog { padding: 100px 5%; background: #0b1d3a; }
.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(--oil-blue);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--brush-shadow);
    transition: all 0.3s;
}
.blog-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 5px 10px 25px rgba(0,0,0,0.7);
}
.blog-card img { 
    width: 100%; height: 260px; object-fit: cover; 
    filter: contrast(1.2) saturate(1.1);
    border-bottom: 3px solid var(--oil-yellow);
}
.blog-content { padding: 35px; position: relative;}
.blog-date { display: inline-block; margin-bottom: 15px; font-size: 14px; color: var(--oil-dark); background: var(--oil-yellow); padding: 5px 15px; border-radius: 4px; font-weight: bold; box-shadow: 2px 2px 4px rgba(0,0,0,0.5);}
.blog-content h3 { font-size: 24px; margin-bottom: 15px; font-weight: bold; color: var(--oil-white); text-shadow: 1px 1px 2px rgba(0,0,0,0.8);}
.blog-content p { color: var(--text-muted); margin-bottom: 0;}
.btn-more { 
    display: block; 
    width: 240px; 
    margin: 60px auto 0; 
    text-align: center; 
    padding: 16px; 
    background: transparent;
    color: var(--oil-yellow); 
    font-weight: bold; 
    border: 2px solid var(--oil-yellow);
    border-radius: 8px;
    transition: all 0.3s; 
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}
.btn-more:hover { background: var(--oil-yellow); color: var(--oil-dark); box-shadow: 0 0 15px rgba(241, 194, 50, 0.5);}

/* FAQ Section */
.faq { padding: 100px 5%; max-width: 900px; margin: 0 auto; background: #12233f; margin-top: 40px; margin-bottom: 80px; border-radius: 20px; box-shadow: 0 15px 40px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.05);}
.faq-item { 
    background: var(--oil-blue); 
    margin-bottom: 20px; 
    padding: 25px 30px; 
    border-radius: 12px;
    border-left: 5px solid var(--oil-yellow);
    box-shadow: var(--brush-shadow);
    transition: all 0.3s;
}
.faq-item:hover { 
    transform: translateX(5px);
    background: var(--oil-light-blue);
}
.faq-question { font-size: 20px; font-weight: bold; margin-bottom: 12px; color: var(--oil-white); text-shadow: 1px 1px 2px rgba(0,0,0,0.8);}
.faq-answer { color: var(--text-muted); font-size: 16px; text-shadow: 1px 1px 1px rgba(0,0,0,0.5);}

/* Footer */
.footer { background: #050e1d; padding: 80px 5% 30px; color: #8a9eb5; border-top: 5px solid var(--oil-yellow);}
.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(--oil-yellow); margin-bottom: 25px; font-weight: bold; font-style: italic;}
.footer-col ul li { margin-bottom: 15px; }
.footer-col ul li a { color: #8a9eb5; transition: all 0.2s; font-weight: bold;}
.footer-col ul li a:hover { color: var(--oil-white); text-decoration: underline;}
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid 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: var(--oil-blue); 
    border-radius: 16px;
    box-shadow: var(--brush-shadow);
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}
.download-card:hover { 
    transform: translateY(-8px); 
    background: var(--oil-light-blue);
}
.download-card h3 { font-size: 24px; margin-bottom: 15px; font-weight: bold; color: var(--oil-yellow); text-shadow: 1px 1px 2px rgba(0,0,0,0.8);}
.download-card p { color: var(--oil-white); margin-bottom: 30px; font-size: 16px;}
.btn-dl-card { 
    display: inline-block; 
    padding: 14px 30px; 
    background: var(--oil-yellow);
    color: var(--oil-dark); 
    font-weight: bold; 
    border-radius: 8px;
    box-shadow: var(--brush-shadow);
    transition: all 0.2s; 
}
.btn-dl-card:hover { 
    transform: translateY(-2px);
    background: #ffd966; 
}

/* Page specific headers */
.page-header { 
    padding: 100px 5% 80px; 
    text-align: center; 
    background: radial-gradient(circle at 50% 50%, #1c4587 0%, #0b1d3a 100%);
    border-bottom: 3px solid var(--oil-yellow);
}
.page-header-content {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(11, 29, 58, 0.7);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.1);
}
.page-header h1 { 
    font-size: 42px; 
    margin-bottom: 20px; 
    font-weight: bold;
    color: var(--oil-yellow);
    font-style: italic;
    text-shadow: 3px 3px 5px rgba(0,0,0,0.8);
}
.page-header p { font-size: 20px; color: var(--oil-white); text-shadow: 1px 1px 2px rgba(0,0,0,0.8);}

/* === 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;
    }
}
