/* 
   CAPIX SOLAR - Future Energy 
   Design System
*/

:root {
    --primary: #ffcc00;
    --primary-dark: #e6b800;
    --secondary: #007aff;
    --font-main: 'Outfit', sans-serif;
    --font-alt: 'Space Grotesk', sans-serif;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Dark Theme (Default) */
    --bg-main: #0a0a0a;
    --bg-card: #151515;
    --text-main: #ffffff;
    --text-dim: #a0a0a0;
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(20, 20, 20, 0.8);
}

[data-theme="light"] {
    --bg-main: #ffffff;
    --bg-card: #f9f9fb;
    --text-main: #0a0a0a;
    --text-dim: #666666;
    --border: rgba(0, 0, 0, 0.05);
    --glass: rgba(255, 255, 255, 0.9);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.container { max-width: 1300px; margin: 0 auto; padding: 0 2rem; }
.section-padding { padding: 8rem 0; }
.yellow { color: var(--primary); }

/* Preloader */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; z-index: 10000; display: flex; justify-content: center; align-items: center;
}
.loader-content { text-align: center; }
.sun-icon { font-size: 3rem; color: var(--primary); animation: spin 4s linear infinite; }
.loader-text { font-family: var(--font-alt); font-weight: 700; letter-spacing: 0.3em; margin-top: 1rem; color: white; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Navbar */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    padding: 1.5rem 0; background: var(--glass); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border); transition: padding 0.3s ease;
}
.navbar.scrolled { padding: 1rem 0; }

.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: var(--text-main); font-family: var(--font-alt); font-weight: 700; font-size: 1.4rem; }
.zap-icon { color: var(--primary); fill: var(--primary); }

.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-main); font-weight: 500; opacity: 0.8; transition: var(--transition); }
.nav-links a:hover { opacity: 1; color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 1.5rem; }

/* Language Dropdown */
.lang-dropdown { position: relative; }
.lang-current { 
    background: var(--bg-card); border: 1px solid var(--border); padding: 0.5rem 1rem; border-radius: 50px;
    color: var(--text-main); cursor: pointer; display: flex; align-items: center; gap: 0.5rem; font-weight: 600;
}
.lang-options { 
    position: absolute; top: calc(100% + 10px); right: 0; background: var(--bg-card); 
    border: 1px solid var(--border); border-radius: 15px; padding: 0.5rem; width: 120px;
    opacity: 0; visibility: hidden; transform: translateY(10px); transition: var(--transition); box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.lang-dropdown:hover .lang-options { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-opt { 
    width: 100%; background: none; border: none; padding: 0.6rem; border-radius: 10px;
    color: var(--text-main); cursor: pointer; text-align: left; display: flex; gap: 0.8rem; transition: background 0.3s;
}
.lang-opt:hover { background: var(--border); }

.theme-btn { 
    background: none; border: none; color: var(--text-main); cursor: pointer; font-size: 1.2rem; display: flex;
}
[data-theme="light"] .dark-icon, [data-theme="dark"] .light-icon { display: block; }
[data-theme="light"] .light-icon, [data-theme="dark"] .dark-icon { display: none; }

/* Hero */
.hero { min-height: 90vh; position: relative; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.hero-overlay { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, var(--bg-main) 40%, transparent 100%);
}

.hero-content { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 4rem; align-items: center; }
.hero-badge { 
    display: inline-block; padding: 0.6rem 1.2rem; background: rgba(255,204,0,0.1); 
    border: 1px solid var(--primary); border-radius: 50px; color: var(--primary); 
    font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; margin-bottom: 2rem;
}
.hero-title { font-family: var(--font-alt); font-size: clamp(3.5rem, 8vw, 6rem); line-height: 1; margin-bottom: 2rem; }
.hero-desc { font-size: 1.2rem; color: var(--text-dim); max-width: 550px; margin-bottom: 3.5rem; }

.hero-btns { display: flex; gap: 1.5rem; }
.btn { 
    padding: 1.2rem 2.5rem; border-radius: 50px; font-weight: 700; text-decoration: none; 
    transition: var(--transition); display: inline-flex; align-items: center; gap: 10px; cursor: pointer; border: none;
}
.btn-primary { background: var(--primary); color: #000; }
.btn-primary:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(255,204,0,0.3); }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
.btn-block { width: 100%; justify-content: center; }

/* Floating Cards */
.hero-visual { position: relative; height: 400px; }
.floating-card { 
    position: absolute; top: 10%; right: 0; background: var(--glass); backdrop-filter: blur(10px);
    padding: 2rem; border-radius: 24px; border: 1px solid var(--border); display: flex; gap: 1.5rem; align-items: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); animation: float 6s ease-in-out infinite;
}
.floating-card.secondary { top: 60%; right: 20%; animation-delay: -3s; }
.floating-card i { color: var(--primary); width: 40px; height: 40px; }
.card-info { display: flex; flex-direction: column; }
.card-title { font-size: 0.8rem; color: var(--text-dim); font-weight: 700; }
.card-val { font-size: 1.8rem; font-weight: 800; font-family: var(--font-alt); }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

/* Calculator */
.glass-panel { background: var(--glass); border: 1px solid var(--border); border-radius: 40px; padding: 4rem; backdrop-filter: blur(40px); }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.calc-text h2 { font-size: 3.5rem; margin-bottom: 2rem; }
.calc-text p { font-size: 1.2rem; color: var(--text-dim); margin-bottom: 3rem; }
.calc-steps { display: flex; flex-direction: column; gap: 1.5rem; }
.step { display: flex; align-items: center; gap: 1rem; font-weight: 700; }
.step i { color: var(--primary); }

.calc-form { background: var(--bg-card); padding: 3rem; border-radius: 30px; border: 1px solid var(--border); }
.slider { 
    -webkit-appearance: none; width: 100%; height: 8px; border-radius: 5px; background: var(--border); 
    outline: none; margin: 2rem 0;
}
.slider::-webkit-slider-thumb { 
    -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); cursor: pointer; 
}
.range-val { font-size: 2.5rem; font-weight: 800; text-align: center; margin-bottom: 2rem; }
.result-box { text-align: center; background: var(--bg-main); padding: 2rem; border-radius: 20px; border: 1px solid var(--border); margin-bottom: 2rem; }
.result-box span { font-size: 0.9rem; color: var(--text-dim); display: block; margin-bottom: 0.5rem; }
.result-box h3 { font-size: 2.5rem; }

/* Benefits */
.section-header.center { text-align: center; margin-bottom: 5rem; }
.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.benefit-card { padding: 3.5rem; background: var(--bg-card); border-radius: 32px; border: 1px solid var(--border); transition: var(--transition); }
.benefit-card:hover { transform: translateY(-10px); border-color: var(--primary); box-shadow: 0 30px 60px rgba(0,0,0,0.1); }
.benefit-icon { width: 60px; height: 60px; background: var(--primary); border-radius: 15px; display: flex; align-items: center; justify-content: center; margin-bottom: 2rem; color: #000; }
.benefit-card h3 { font-size: 1.5rem; margin-bottom: 1.2rem; }
.benefit-card p { color: var(--text-dim); }

/* CTA */
.cta-box { background: linear-gradient(135deg, var(--primary) 0%, #ff9900 100%); padding: 6rem; border-radius: 50px; text-align: center; color: #000; }
.cta-box h2 { font-size: 3.5rem; margin-bottom: 1.5rem; font-family: var(--font-alt); }
.cta-box p { font-size: 1.3rem; margin-bottom: 3rem; opacity: 0.8; }
.cta-form { display: flex; gap: 1rem; max-width: 600px; margin: 0 auto; }
.cta-form input { flex: 1; padding: 1.2rem 2rem; border-radius: 50px; border: none; font-family: inherit; font-size: 1rem; outline: none; }

/* Footer */
.footer { padding: 8rem 0 4rem; background: var(--bg-card); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 5rem; margin-bottom: 5rem; }
.footer-info .logo { margin-bottom: 1.5rem; }
.footer-info p { color: var(--text-dim); max-width: 300px; }
.footer-links, .footer-social { display: flex; flex-direction: column; gap: 1.5rem; }
.footer-links a { text-decoration: none; color: var(--text-dim); transition: 0.3s; }
.footer-links a:hover { color: var(--primary); transform: translateX(5px); }
.social-flex { display: flex; gap: 1rem; }
.social-flex a { width: 45px; height: 45px; border: 1px solid var(--border); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--text-main); transition: 0.3s; }
.social-flex a:hover { background: var(--primary); color: #000; border-color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 4rem; text-align: center; color: var(--text-dim); font-size: 0.9rem; }

/* Responsive */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-text { display: flex; flex-direction: column; align-items: center; }
    .hero-btns { justify-content: center; }
    .hero-visual { display: none; }
    .calc-grid { grid-template-columns: 1fr; gap: 3rem; }
    .benefits-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}

@media (max-width: 768px) {
    .cta-form { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-info { display: flex; flex-direction: column; align-items: center; }
    .social-flex { justify-content: center; }
}

/* Animations Classes */
.reveal-y { opacity: 0; transform: translateY(30px); }
.reveal-up { opacity: 0; transform: translateY(40px); }
.reveal-fade { opacity: 0; }
