/* ──────────────────────────────────────────────
   EKO Solar Funnel — Style System
   Dark Gemini-inspired theme
   ────────────────────────────────────────────── */

/* ── Custom Properties ────────────────────── */
:root {
    --bg: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    --text-heading: #fafafa;
    --gradient-1: #6366f1;
    --gradient-2: #8b5cf6;
    --gradient-3: #a78bfa;
    --gradient-accent: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    --glow-color: rgba(99, 102, 241, 0.4);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ─────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ── Gradient Text ────────────────────────── */
.gradient-text {
    background: var(--gradient-accent);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ── Section Base ─────────────────────────── */
.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    text-align: center;
    color: var(--text-heading);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto 60px;
}

/* ── Fade-in Animation ────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Hero Section ─────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, var(--bg) 70%);
}

/* Floating glow orbs */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
}

.hero-glow--1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent 70%);
    top: -10%;
    left: -5%;
    animation: floatOrb1 8s ease-in-out infinite;
}

.hero-glow--2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25), transparent 70%);
    bottom: -5%;
    right: -5%;
    animation: floatOrb2 10s ease-in-out infinite;
}

.hero-glow--3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.2), transparent 70%);
    top: 40%;
    left: 60%;
    animation: floatOrb3 12s ease-in-out infinite;
}

@keyframes floatOrb1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, 30px) scale(1.1); }
    66% { transform: translate(-20px, -20px) scale(0.95); }
}

@keyframes floatOrb2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, -40px) scale(1.05); }
    66% { transform: translate(20px, 20px) scale(0.9); }
}

@keyframes floatOrb3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40px, 30px) scale(1.15); }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 0 24px;
    position: relative;
    z-index: 1;
    animation: heroFadeIn 1s ease-out;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-headline {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-heading);
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-subtext {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* ── Buttons ──────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 36px;
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    background: var(--gradient-accent);
    background-size: 200% 200%;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition);
    animation: gradientShift 4s ease-in-out infinite;
}

.btn--glow {
    box-shadow:
        0 0 20px rgba(99, 102, 241, 0.3),
        0 0 60px rgba(99, 102, 241, 0.15);
}

.btn--glow:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow:
        0 0 30px rgba(99, 102, 241, 0.5),
        0 0 80px rgba(99, 102, 241, 0.25);
}

.btn--glow:active {
    transform: translateY(0) scale(0.98);
}

.btn--submit {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    border-radius: var(--radius-sm);
    margin-top: 8px;
}

/* ── Services Cards ───────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 32px;
    transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-accent);
    background-size: 200% 200%;
    animation: gradientShift 4s ease-in-out infinite;
    opacity: 0;
    transition: opacity var(--transition);
}

.card:hover {
    transform: translateY(-6px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(99, 102, 241, 0.08);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    color: var(--gradient-2);
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 10px;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ── Staggered card fade-in ───────────────── */
.services-grid .card:nth-child(1) { transition-delay: 0s; }
.services-grid .card:nth-child(2) { transition-delay: 0.1s; }
.services-grid .card:nth-child(3) { transition-delay: 0.2s; }
.services-grid .card:nth-child(4) { transition-delay: 0.3s; }

/* ── How It Works Timeline ────────────────── */
.timeline {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    padding-left: 60px;
}

.timeline-line {
    position: absolute;
    left: 22px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--gradient-1), var(--gradient-3), transparent);
}

.timeline-step {
    position: relative;
    padding-bottom: 48px;
}

.timeline-step:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -60px;
    top: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--gradient-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--gradient-3);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.timeline-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Staggered timeline steps */
.timeline-step:nth-child(2) { transition-delay: 0s; }
.timeline-step:nth-child(3) { transition-delay: 0.15s; }
.timeline-step:nth-child(4) { transition-delay: 0.3s; }

/* ── Testimonials Carousel ────────────────── */
.carousel {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.carousel-track {
    position: relative;
    min-height: 200px;
}

.testimonial {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.testimonial.active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
    pointer-events: auto;
}

.testimonial-text {
    font-size: 1.15rem;
    line-height: 1.75;
    color: var(--text);
    font-style: italic;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
}

.testimonial-text::before {
    content: '\201C';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    line-height: 1;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.3;
    font-style: normal;
}

.testimonial-author {
    text-align: center;
}

.testimonial-author strong {
    display: block;
    color: var(--text-heading);
    font-size: 1rem;
    margin-bottom: 2px;
}

.testimonial-author span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    padding: 0;
}

.dot.active {
    background: var(--gradient-2);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.3);
}

/* ── Contact Form ─────────────────────────── */
.contact {
    background: radial-gradient(ellipse at 50% 100%, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
}

.contact-form {
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group--full {
    margin-bottom: 20px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-family: var(--font);
    font-size: 1rem;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23a1a1aa' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group select option {
    background: #1a1a2e;
    color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gradient-2);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

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

/* Form message */
.form-message {
    text-align: center;
    padding: 14px;
    border-radius: var(--radius-sm);
    margin-top: 16px;
    font-size: 0.95rem;
    font-weight: 500;
}

.form-message--success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.form-message--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* Spinner */
.spinner {
    width: 22px;
    height: 22px;
    animation: spin 0.8s linear infinite;
}

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

/* ── Footer ───────────────────────────────── */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-brand {
    margin-bottom: 16px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.85rem;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 768px) {
    .section {
        padding: 72px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .contact-form {
        padding: 28px 20px;
    }

    .timeline {
        padding-left: 50px;
    }

    .timeline-marker {
        left: -50px;
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    .timeline-line {
        left: 18px;
    }

    .hero-glow--1 {
        width: 300px;
        height: 300px;
    }

    .hero-glow--2 {
        width: 250px;
        height: 250px;
    }

    .hero-glow--3 {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .card {
        padding: 28px 24px;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .btn {
        padding: 14px 28px;
        font-size: 1rem;
    }
}
