/* 
   WATT HUB - Enterprise Premium CSS
   Dark-mode first, glassmorphism, scroll-driven animations.
*/

:root {
    /* Brand Colors extracted from the Lightning Logo */
    --brand-yellow: #facc15;
    --brand-orange: #f97316;
    --brand-red: #ef4444;
    --brand-green: #22c55e;
    --brand-blue: #3b82f6;
    --brand-purple: #a855f7;

    /* Base Colors - Dark Mode First */
    --bg-color: #0f172a; /* Slate 900 */
    --bg-surface: rgba(30, 41, 59, 0.7); /* Slate 800 with opacity */
    --bg-surface-hover: rgba(51, 65, 85, 0.9); /* Slate 700 */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);

    /* Fonts */
    --font-heading: 'Inter', 'Roboto', sans-serif;
    --font-body: 'Inter', 'Roboto', sans-serif;
}

/* Base resets for enterprise landing */
.enterprise-body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    color-scheme: dark;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card:hover {
    transform: translateY(-5px);
    background: var(--bg-surface-hover);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 0 20px rgba(59, 130, 246, 0.1);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    background: radial-gradient(circle at 50% -20%, rgba(59, 130, 246, 0.15), transparent 60%);
}

.hero-logo {
    width: 250px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 20px rgba(250, 204, 21, 0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem auto;
    line-height: 1.6;
}

/* Typewriter / Slogan Rotator */
.slogan-rotator {
    display: block;
    width: 100%;
    position: relative;
    height: 4rem;
    overflow: hidden;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-yellow);
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
}

.slogan-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    animation: rotateSlogan 15s infinite;
}

.slogan-item:nth-child(1) { animation-delay: 0s; }
.slogan-item:nth-child(2) { animation-delay: 3s; color: var(--brand-orange); text-shadow: 0 0 10px rgba(249, 115, 22, 0.4);}
.slogan-item:nth-child(3) { animation-delay: 6s; color: var(--brand-red); text-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }
.slogan-item:nth-child(4) { animation-delay: 9s; color: var(--brand-green); text-shadow: 0 0 10px rgba(34, 197, 94, 0.4); }
.slogan-item:nth-child(5) { animation-delay: 12s; color: var(--brand-blue); text-shadow: 0 0 10px rgba(59, 130, 246, 0.4); }

@keyframes rotateSlogan {
    0%, 15% { opacity: 1; transform: translateY(0); filter: blur(0); }
    20%, 95% { opacity: 0; transform: translateY(-20px); filter: blur(4px); }
    100% { opacity: 0; transform: translateY(20px); }
}

/* Premium Button */
.btn-premium {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-premium:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

/* Native Popover (HTML5) Styling */
::backdrop {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
}

[popover] {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    color: var(--text-primary);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
}

/* Scroll-driven animations via CSS */
@supports (animation-timeline: view()) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(50px);
        animation: reveal linear both;
        animation-timeline: view();
        animation-range: entry 10% cover 30%;
    }
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Feature Grid (Container Queries setup) */
.feature-container {
    container-type: inline-size;
    width: 100%;
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.feature-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@container (min-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Feature Icon styling */
.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: -webkit-linear-gradient(45deg, var(--brand-yellow), var(--brand-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
