/* US Solar Energy Landing Page 
   Design System & Foundation - Light Mode
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
    /* Color Palette - Light Mode */
    --color-gold: #DCA407; /* Vibrant gold for balanced contrast on light backdrops */
    --color-gold-hover: #B88604;
    --color-gold-light: rgba(220, 164, 7, 0.1);
    --color-bg: #FFFFFF;
    --color-bg-secondary: #F8FAFC; /* Slate 50 */
    --color-surface: #FFFFFF;
    --color-text-headline: #0F172A; /* Slate 900 */
    --color-text-body: #334155; /* Slate 700 - Darker for improved contrast */
    --color-gray-100: #F1F5F9;
    --color-gray-200: #E2E8F0;
    --color-gray-400: #94A3B8;
    --color-white: #ffffff;
    
    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #F5BB1B 0%, #C48300 100%);
    --gradient-overlay: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.98));
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;

    /* Spacing & Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --radius-full: 9999px;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    background-color: var(--color-bg);
    color: var(--color-text-body);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-headline);
    line-height: 1.2;
}

/* Container */
.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    max-width: 1216px;
}

/* Layout Utilities */
.section-padding {
    padding: 6rem 0;
}

@media (min-width: 768px) {
    .section-padding {
        padding: 8rem 0;
    }
}

/* Components Helpers */
.text-gradient {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0px 2px 4px rgba(15, 23, 42, 0.15)); /* Adds smooth contrast without distorting background-clipping */
}

.glass-card {
    background: var(--gradient-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px -10px rgba(148, 163, 184, 0.15);
    transition: var(--transition-smooth);
    padding: 2.5rem;
}

.glass-card:hover {
    border-color: rgba(202, 162, 3, 0.3);
    box-shadow: 0 20px 50px -15px rgba(202, 162, 3, 0.1);
}

/* Grid helper */
.grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 767px) {
    .grid { grid-template-columns: 1fr; }
    .hidden-mobile { display: none !important; }
}

.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.gap-16 { gap: 4rem; }

/* Flex helpers */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }

/* Buttons & CTAs */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--gradient-gold);
    color: #0F172A; /* Match header text for legibility */
    box-shadow: 0 10px 15px -3px rgba(202, 162, 3, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(202, 162, 3, 0.4);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-text-headline);
    border: 1px solid var(--color-gray-200);
}

.btn-secondary:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-gray-400);
}

/* Badge Headers */
.badge-header {
    display: inline-block;
    color: var(--color-gold);
    font-size: 0.875rem; /* Increased from 0.75rem */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0px 1px 2px rgba(15, 23, 42, 0.1)); /* Enhances letter contrast backdrop */
}

/* --- Section Specifics --- */

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: var(--color-bg); /* Solid white backing for crisp logo framing */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-gray-100);
    padding: 1rem 0;
    transition: var(--transition-smooth);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-headline);
    padding: 0.5rem;
    z-index: 101;
}

.menu-toggle svg line {
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--color-bg);
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid var(--color-gray-100);
        box-shadow: 0 10px 15px -3px rgba(148, 163, 184, 0.1);
        padding: 1rem 0;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--color-gray-100);
        width: 100%;
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    .header-cta {
        display: none !important;
    }

    .menu-toggle.active .line-mid {
        opacity: 0;
    }

    .menu-toggle.active .line-top {
        transform: translateY(6px) rotate(45deg);
        transform-origin: 12px 6px;
    }

    .menu-toggle.active .line-bottom {
        transform: translateY(-6px) rotate(-45deg);
        transform-origin: 12px 18px;
    }
}

.nav-links a {
    color: var(--color-text-body);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--color-gold);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.5) 0%, rgba(15, 23, 42, 0.85) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    max-width: 800px;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .hero .container {
        padding-top: 13rem; /* Pushes content down to prevent overlap from the tall 3x logo header */
        padding-bottom: 8rem;
    }
    .hero h1 {
        font-size: 4.5rem;
    }
}

.hero p {
    font-size: 1.125rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

/* Stats Bar */
.trust-bar {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-gray-100);
    border-bottom: 1px solid var(--color-gray-200);
    padding: 2.5rem 0;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-gold);
    margin-bottom: 0.25rem;
}

.stat-item p {
    font-size: 0.75rem;
    color: var(--color-text-body);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
}

/* Services */
.services-section {
    background-color: var(--color-bg-secondary);
}

.service-card {
    background: var(--color-bg);
}

.service-card .icon {
    width: 3.5rem;
    height: 3.5rem;
    background: var(--color-gold-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
    margin-bottom: 1.5rem;
}

.service-card h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-card ul {
    list-style: none;
    margin: 1.5rem 0;
}

.service-card ul li {
    font-size: 0.875rem;
    color: var(--color-text-body);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-card ul li::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--color-gold);
    border-radius: 50%;
}

/* Calculator */
.calc-input-wrapper {
    background: var(--color-bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-gray-200);
}

.calc-input-wrapper label {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-body);
    margin-bottom: 1rem;
}

.currency-input {
    position: relative;
    margin-bottom: 1.5rem;
}

.currency-input span {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gold);
    font-weight: 700;
    font-size: 1.5rem;
}

.currency-input input {
    width: 100%;
    background: var(--color-bg);
    border: 1px solid var(--color-gray-200);
    padding: 1rem 1rem 1rem 2.5rem;
    border-radius: var(--radius-md);
    color: var(--color-text-headline);
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.slider-input {
    width: 100%;
    height: 6px;
    background: var(--color-gray-200);
    border-radius: var(--radius-full);
    outline: none;
    cursor: pointer;
    accent-color: var(--color-gold);
}

.result-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-gray-100);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-card .val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-gold);
}

/* Benefits (Real examples) */
.example-card {
    border: 1px solid var(--color-gray-200);
    background: var(--color-bg);
}

.example-header {
    background: linear-gradient(135deg, rgba(202, 162, 3, 0.05) 0%, rgba(202, 162, 3, 0.01) 100%);
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-gray-100);
    text-align: center;
}

.example-header span {
    font-size: 0.75rem;
    color: var(--color-text-body);
    font-weight: 500;
}

.example-header h5 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-text-headline);
}

.example-body {
    padding: 1.75rem;
}

.example-body .row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-gray-100);
    font-size: 0.875rem;
    color: var(--color-text-body);
}
/* Sub-components overwrite/utilities from previous */
.glass-subheading {
    color: var(--color-text-body);
}
input::placeholder {
    color: var(--color-gray-400);
}
button {
    font-family: var(--font-body);
}

/* --- Portfolio Gallery --- */
.portfolio-card {
    aspect-ratio: 1 / 1;
    cursor: pointer;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.3) 50%, rgba(15, 23, 42, 0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.portfolio-card:hover .portfolio-img {
    transform: scale(1.08);
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h4 {
    transform: translateY(15px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.portfolio-overlay p {
    transform: translateY(15px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
}

.portfolio-overlay i {
    transform: translateY(15px) scale(0.8);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
}

.portfolio-card:hover .portfolio-overlay h4,
.portfolio-card:hover .portfolio-overlay p,
.portfolio-card:hover .portfolio-overlay i {
    transform: translateY(0) scale(1);
}

/* Floating Call CTA */
.floating-call {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--color-gold); /* Deep gold matched theme color */
    color: #FFFFFF;
    padding: 0.85rem 1.4rem;
    border-radius: var(--radius-full);
    box-shadow: 0 10px 25px -5px rgba(220, 164, 7, 0.4);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    z-index: 999;
    font-weight: 800;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
}
.floating-call svg {
    width: 1.125rem;
    height: 1.125rem;
}
.floating-call:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 15px 30px rgba(220, 164, 7, 0.5);
    background: var(--color-gold-hover);
}
@keyframes sonar {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1.7); opacity: 0; }
}
.floating-call .sonar {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: var(--color-gold);
    border-radius: inherit;
    z-index: -1;
    transform: translate(-50%, -50%);
    animation: sonar 2s ease-out infinite;
}

/* Reviews Continuous Marquee */
.marquee-wrapper {
    overflow: hidden;
    padding: 2rem 0;
    position: relative;
    background: var(--color-bg);
}
.marquee-content {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: scroll 45s linear infinite;
}
.marquee-content:hover {
    animation-play-state: paused;
}
.review-card {
    background: var(--color-bg);
    border: 1px solid var(--color-gray-100);
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 380px;
    flex-shrink: 0;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px -3px rgba(148, 163, 184, 0.05);
}
.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px -5px rgba(220, 164, 7, 0.1);
    border-color: rgba(220, 164, 7, 0.2);
}
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 1rem)); } /* Half-length translate for seamless loop */
}
