/* 
 * WattsIQ - Smart Energy Management Platform
 * Brand Colors: Deep Graphite (#111827), Electric Lime (#A3E635), Blue-Gray (#1E293B), Light Gray (#F3F4F6)
 */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-graphite: #111827;
    --color-lime: #A3E635;
    --color-blue-gray: #1E293B;
    --color-light-gray: #F3F4F6;
    --color-white: #FFFFFF;
    --color-lime-hover: #84CC16;
    --color-gray-text: #94A3B8;
    
    --font-heading: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-graphite);
    color: var(--color-light-gray);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-white);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: 1rem;
    color: var(--color-gray-text);
}

a {
    color: var(--color-lime);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-lime-hover);
}

/* Header Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(163, 230, 53, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-accent {
    color: var(--color-lime);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-menu a {
    color: var(--color-gray-text);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--color-lime);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 10rem 2rem 6rem;
    background: linear-gradient(180deg, var(--color-graphite) 0%, var(--color-blue-gray) 100%);
    position: relative;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    max-width: 900px;
    height: auto;
    margin: 3rem auto 0;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: block;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(163, 230, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(163, 230, 53, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero h1 {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-lime) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-gray-text);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--color-lime);
    color: var(--color-graphite);
}

.btn-primary:hover {
    background: var(--color-lime-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(163, 230, 53, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--color-lime);
    border: 2px solid var(--color-lime);
}

.btn-secondary:hover {
    background: var(--color-lime);
    color: var(--color-graphite);
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Section Layouts */
.section {
    padding: 6rem 2rem;
}

.section-dark {
    background-color: var(--color-graphite);
}

.section-light {
    background-color: var(--color-blue-gray);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--color-gray-text);
    max-width: 700px;
    margin: 0 auto;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Cards */
.card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(163, 230, 53, 0.1);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition);
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.section-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card:hover {
    border-color: rgba(163, 230, 53, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-lime) 0%, var(--color-lime-hover) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--color-graphite);
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card p {
    color: var(--color-gray-text);
    line-height: 1.7;
}

/* Data Panel */
.data-panel {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(17, 24, 39, 0.9) 100%);
    border: 1px solid rgba(163, 230, 53, 0.2);
    border-radius: 16px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.data-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-lime) 0%, transparent 100%);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-lime);
    font-family: var(--font-heading);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--color-gray-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(163, 230, 53, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li::before {
    content: '✓';
    color: var(--color-lime);
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-white);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(163, 230, 53, 0.2);
    border-radius: 8px;
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-lime);
    box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
.site-footer {
    background: var(--color-blue-gray);
    border-top: 1px solid rgba(163, 230, 53, 0.1);
    padding: 4rem 2rem 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: var(--color-white);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: var(--color-gray-text);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--color-lime);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(163, 230, 53, 0.1);
    color: var(--color-gray-text);
    font-size: 0.9rem;
}

/* Tech Diagram */
.tech-diagram {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(163, 230, 53, 0.2);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.tech-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tech-layer {
    padding: 1.5rem;
    background: rgba(17, 24, 39, 0.5);
    border-left: 4px solid var(--color-lime);
    border-radius: 8px;
}

.tech-layer h4 {
    color: var(--color-lime);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.tech-layer p {
    font-size: 0.95rem;
}

/* Article Cards */
.article-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(163, 230, 53, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.article-card:hover {
    border-color: var(--color-lime);
    transform: translateY(-5px);
}

.article-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(163, 230, 53, 0.1);
}

.article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--color-gray-text);
    margin-bottom: 1rem;
}

.article-body {
    padding: 2rem;
}

.article-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(163, 230, 53, 0.1);
    color: var(--color-lime);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Contact Info */
.contact-info {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(163, 230, 53, 0.2);
    border-radius: 12px;
    padding: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--color-lime);
    color: var(--color-graphite);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.contact-details p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 75px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 75px);
        background: var(--color-graphite);
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .hero {
        padding: 8rem 1.5rem 4rem;
    }
    
    .section {
        padding: 4rem 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookie-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        text-align: center;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 1.25rem 1.5rem;
    }
    
    .faq-answer-content {
        padding: 0 1.5rem 1.25rem;
    }
}

/* FAQ Section */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(163, 230, 53, 0.1);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: rgba(163, 230, 53, 0.3);
}

.faq-question {
    width: 100%;
    padding: 1.5rem 2rem;
    background: none;
    border: none;
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--color-lime);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--color-lime);
    transition: var(--transition);
}

.faq-question.active::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer-content {
    padding: 0 2rem 1.5rem;
    color: var(--color-gray-text);
    line-height: 1.7;
}

.faq-answer.active {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--color-blue-gray) 0%, var(--color-graphite) 100%);
    border-top: 2px solid var(--color-lime);
    padding: 1.5rem 2rem;
    z-index: 9999;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text h4 {
    color: var(--color-white);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.cookie-text p {
    color: var(--color-gray-text);
    margin: 0;
    font-size: 0.95rem;
}

.cookie-text a {
    color: var(--color-lime);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: var(--color-lime);
    color: var(--color-graphite);
}

.cookie-btn-accept:hover {
    background: var(--color-lime-hover);
    transform: translateY(-2px);
}

.cookie-btn-decline {
    background: transparent;
    color: var(--color-gray-text);
    border: 1px solid var(--color-gray-text);
}

.cookie-btn-decline:hover {
    color: var(--color-white);
    border-color: var(--color-white);
}

.cookie-btn-settings {
    background: transparent;
    color: var(--color-lime);
    border: 1px solid var(--color-lime);
}

.cookie-btn-settings:hover {
    background: var(--color-lime);
    color: var(--color-graphite);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-lime {
    color: var(--color-lime);
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}

.hidden {
    display: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(163, 230, 53, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-lime);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
