/* ============================================================================
   LONESTAR ELECTRIC CO — Custom Demo Site CSS
   "Powering Austin's Future" — Dark, Tech-Forward Electrical
   ============================================================================ */

/* ---- Typography & Custom Properties ---- */
:root {
    --le-font-heading: 'Space Grotesk', sans-serif;
    --le-font-body: 'IBM Plex Sans', sans-serif;
    --le-radius: 4px;
    --le-dark: #0f172a;
    --le-dark-alt: #1e293b;
    --le-dark-deep: #020617;
    --le-yellow: #eab308;
    --le-yellow-light: #facc15;
    --le-yellow-pale: #fefce8;
    --le-text-light: #f1f5f9;
    --le-text-muted: #94a3b8;
    --le-border-dark: #334155;
    --le-yellow-glow: rgba(234, 179, 8, 0.25);
    --le-yellow-glow-strong: rgba(234, 179, 8, 0.4);
}

body {
    font-family: var(--le-font-body);
    background: var(--le-dark);
    color: #cbd5e1;
}

h1, h2, h3, h4, h5, h6,
.demo-logo__name,
.demo-stats-bar__number,
.demo-process__number {
    font-family: var(--le-font-heading);
    color: #fff;
}

h1 { font-weight: 700; letter-spacing: -0.02em; }
h2 { font-weight: 700; letter-spacing: -0.01em; }
h3 { font-weight: 600; }

/* ---- Links ---- */
a { color: var(--le-yellow); }
a:hover { color: var(--le-yellow-light); }

.demo-link { color: var(--le-yellow); font-weight: 600; }
.demo-link:hover { color: var(--le-yellow-light); }

/* ---- Header / Nav — Dark ---- */
.demo-header {
    background: var(--le-dark-deep);
    border-bottom: 1px solid var(--le-border-dark);
}

.demo-header--scrolled {
    background: rgba(2, 6, 23, 0.97);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.demo-logo__name {
    color: var(--le-yellow);
    font-weight: 700;
    font-size: 1.375rem;
    letter-spacing: -0.01em;
}

.demo-nav a,
.demo-nav__trigger {
    color: #cbd5e1;
    font-family: var(--le-font-body);
}

.demo-nav a:hover,
.demo-nav__trigger:hover {
    color: var(--le-yellow);
    background: rgba(234, 179, 8, 0.08);
}

.demo-nav__menu {
    background: var(--le-dark-alt);
    border: 1px solid var(--le-border-dark);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.demo-nav__menu a {
    color: #cbd5e1;
}

.demo-nav__menu a:hover {
    background: rgba(234, 179, 8, 0.1);
    color: var(--le-yellow);
}

.demo-menu-toggle span {
    background: #cbd5e1;
}

/* ---- Buttons — Yellow Primary, Dark Secondary ---- */
.demo-btn {
    font-family: var(--le-font-body);
    border-radius: var(--le-radius);
    font-weight: 600;
}

.demo-btn--primary {
    background: var(--le-yellow);
    color: var(--le-dark);
}

.demo-btn--primary:hover {
    background: var(--le-yellow-light);
    color: var(--le-dark);
    box-shadow: 0 4px 24px var(--le-yellow-glow);
}

.demo-btn--secondary {
    background: transparent;
    color: var(--le-yellow);
    border: 1px solid var(--le-yellow);
}

.demo-btn--secondary:hover {
    background: rgba(234, 179, 8, 0.1);
    color: var(--le-yellow-light);
    border-color: var(--le-yellow-light);
}

/* Header phone button */
.demo-header__actions .demo-btn--phone {
    background: var(--le-yellow);
    color: var(--le-dark);
    font-weight: 700;
}

.demo-header__actions .demo-btn--phone:hover {
    background: var(--le-yellow-light);
    color: var(--le-dark);
}

/* ---- Hero — Dark Asymmetric ---- */
.demo-hero {
    background: var(--le-dark);
    padding: 120px 0 100px;
    text-align: left;
    overflow: hidden;
}

.demo-hero__overlay {
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.78) 100%);
}

.demo-hero h1 {
    font-size: clamp(2.25rem, 5.5vw, 3.5rem);
    line-height: 1.08;
    margin-bottom: 20px;
    color: #fff;
}

.demo-hero p {
    font-family: var(--le-font-body);
    font-size: 1.1875rem;
    color: #cbd5e1;
    text-align: left;
    margin: 0 0 36px;
    max-width: 560px;
    opacity: 1;
}

.demo-hero__actions {
    justify-content: flex-start;
    margin-bottom: 40px;
}

.demo-hero__actions .demo-btn--primary {
    background: var(--le-yellow);
    color: var(--le-dark);
    font-weight: 700;
    font-size: 1.0625rem;
}

.demo-hero__actions .demo-btn--primary:hover {
    background: var(--le-yellow-light);
    color: var(--le-dark);
    box-shadow: 0 4px 32px var(--le-yellow-glow-strong);
}

.demo-hero__actions .demo-btn--secondary {
    border-color: rgba(234, 179, 8, 0.5);
    color: var(--le-yellow);
}

.demo-hero__actions .demo-btn--secondary:hover {
    background: rgba(234, 179, 8, 0.1);
    border-color: var(--le-yellow);
    color: var(--le-yellow-light);
}

.demo-hero__trust {
    justify-content: flex-start;
    color: #94a3b8;
    opacity: 1;
    font-weight: 500;
}

.demo-hero__trust span {
    color: #94a3b8;
}

/* Hero geometric accent line */
.le-hero__accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--le-yellow), transparent);
    z-index: 3;
}

/* ---- Page Hero (interior) — Dark ---- */
.demo-page-hero {
    background: var(--le-dark-alt);
    border-bottom: 1px solid var(--le-border-dark);
}

.demo-page-hero h1 { color: #fff; }
.demo-page-hero p { color: #94a3b8; }

.demo-page-hero--image {
    background: var(--le-dark-deep);
}

.demo-page-hero--image .demo-page-hero__overlay,
.demo-page-hero__overlay {
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.78));
}

/* ---- Breadcrumbs — Dark ---- */
.demo-breadcrumbs { color: var(--le-text-muted); }
.demo-breadcrumbs a { color: var(--le-yellow); }

.demo-page-hero--image .demo-breadcrumbs,
.demo-page-hero--image .demo-breadcrumbs a {
    color: rgba(234, 179, 8, 0.8);
}

/* ---- Sections — Dark Alternation ---- */
.demo-section {
    padding: 72px 0;
    background: var(--le-dark);
}

.demo-section--alt {
    background: var(--le-dark-alt);
}

.demo-section h2 {
    color: #fff;
    letter-spacing: -0.01em;
}

.demo-section__subtitle {
    color: var(--le-text-muted);
}

.demo-section__cta {
    margin-top: 36px;
}

/* Remove light-on-light divider — dark sections don't need it */
.demo-section + .demo-section:not(.demo-section--alt) {
    border-top: 1px solid var(--le-border-dark);
}

/* ---- Card Radius Override — Sharp Geometric ---- */
.demo-service-card,
.demo-why-card,
.demo-testimonial,
.demo-area-card {
    border-radius: var(--le-radius);
}

.demo-service-card__image {
    border-radius: var(--le-radius) var(--le-radius) 0 0;
}

/* ---- Service Cards — Dark with Yellow Left Border Hover ---- */
.demo-service-card {
    background: var(--le-dark-alt);
    border: 1px solid var(--le-border-dark);
    border-left: 3px solid transparent;
    transition: transform var(--demo-transition), box-shadow var(--demo-transition), border-color 0.3s;
}

.demo-service-card:hover {
    border-left-color: var(--le-yellow);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(234, 179, 8, 0.1);
    transform: translateY(-4px);
}

.demo-service-card h3 { color: #fff; }
.demo-service-card h3 a { color: #fff; }
.demo-service-card h3 a:hover { color: var(--le-yellow); }
.demo-service-card p { color: #94a3b8; }

/* Remove the padding-box gradient trick from base CSS on dark cards */
@supports (background-clip: padding-box) {
    .demo-service-card {
        background: var(--le-dark-alt);
    }
    .demo-service-card:hover {
        background: var(--le-dark-alt);
    }
}

/* ---- Trust Cards — Dark with Yellow Icon Glow ---- */
.le-trust-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--le-dark-alt);
    border-radius: var(--le-radius);
    border: 1px solid var(--le-border-dark);
    transition: transform var(--demo-transition), box-shadow var(--demo-transition);
}

.le-trust-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.le-trust-card__icon {
    width: 64px;
    height: 64px;
    border-radius: var(--le-radius);
    background: rgba(234, 179, 8, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.75rem;
    box-shadow: 0 0 24px var(--le-yellow-glow);
    transition: box-shadow 0.3s;
}

.le-trust-card:hover .le-trust-card__icon {
    box-shadow: 0 0 40px var(--le-yellow-glow-strong);
}

.le-trust-card h3 {
    font-family: var(--le-font-heading);
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: #fff;
}

.le-trust-card p {
    font-size: 0.9375rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* ---- Animated Timeline — Horizontal 4-Step ---- */
.le-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin-top: 48px;
    position: relative;
}

.le-timeline__step {
    text-align: center;
    flex: 1;
    max-width: 260px;
    padding: 0 16px;
    position: relative;
}

.le-timeline__number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--le-dark-deep);
    border: 3px solid var(--le-yellow);
    color: var(--le-yellow);
    font-family: var(--le-font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 20px var(--le-yellow-glow);
}

.le-timeline__step h3 {
    font-family: var(--le-font-heading);
    font-size: 1.125rem;
    margin-bottom: 8px;
    color: #fff;
}

.le-timeline__step p {
    font-size: 0.9375rem;
    color: #94a3b8;
    line-height: 1.5;
}

.le-timeline__connector {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--le-yellow), var(--le-yellow-light));
    margin-top: 28px;
    flex-shrink: 0;
    position: relative;
    opacity: 0.5;
    border-radius: 2px;
}

.le-timeline__connector::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -4px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid var(--le-yellow);
}

/* Timeline scroll animation */
.le-timeline__step {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.le-timeline.visible .le-timeline__step { opacity: 1; transform: translateY(0); }
.le-timeline.visible .le-timeline__step:nth-child(1) { transition-delay: 0s; }
.le-timeline.visible .le-timeline__step:nth-child(3) { transition-delay: 0.15s; }
.le-timeline.visible .le-timeline__step:nth-child(5) { transition-delay: 0.3s; }
.le-timeline.visible .le-timeline__step:nth-child(7) { transition-delay: 0.45s; }

.le-timeline__connector {
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.le-timeline.visible .le-timeline__connector { opacity: 0.5; transform: scaleX(1); }
.le-timeline.visible .le-timeline__connector:nth-child(2) { transition-delay: 0.1s; }
.le-timeline.visible .le-timeline__connector:nth-child(4) { transition-delay: 0.25s; }
.le-timeline.visible .le-timeline__connector:nth-child(6) { transition-delay: 0.4s; }

/* ---- Testimonials — Dark Cards with Yellow Stars ---- */
.demo-testimonial {
    background: var(--le-dark-alt);
    border: 1px solid var(--le-border-dark);
    border-radius: var(--le-radius);
}

.demo-testimonial:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(-3px);
}

.demo-testimonial__icon {
    color: var(--le-yellow);
    opacity: 0.2;
}

.demo-testimonial__stars { margin-bottom: 8px; }
.demo-star { color: var(--le-yellow); }

.demo-testimonial__quote {
    color: #cbd5e1;
}

.demo-testimonial__author strong {
    color: #fff;
}

.demo-testimonial__author span {
    color: var(--le-text-muted);
}

.demo-testimonial__avatar {
    background: var(--le-yellow);
    color: var(--le-dark);
    font-weight: 700;
}

/* ---- Area Tags — Dark Tags, Yellow Hover ---- */
.demo-area-tag {
    background: var(--le-dark-alt);
    border: 1px solid var(--le-border-dark);
    color: #cbd5e1;
    border-radius: var(--le-radius);
}

a.demo-area-tag:hover,
.demo-area-tag:hover {
    border-color: var(--le-yellow);
    background: rgba(234, 179, 8, 0.1);
    color: var(--le-yellow);
    transform: translateY(-2px);
}

/* ---- Area Card — Dark ---- */
.demo-area-card {
    background: var(--le-dark-alt);
    border: 1px solid var(--le-border-dark);
}

.demo-area-card h3 a { color: #fff; }
.demo-area-card h3 a:hover { color: var(--le-yellow); }
.demo-area-card p { color: #94a3b8; }
.demo-area-card__zip { color: var(--le-text-muted); }

/* ---- Stats Bar — Dark with Yellow Numbers ---- */
.demo-stats-bar {
    background: var(--le-dark-deep);
    padding: 56px 0;
}

.demo-stats-bar__number {
    font-family: var(--le-font-heading);
    font-weight: 700;
    color: var(--le-yellow);
}

.demo-stats-bar__label {
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.8125rem;
}

/* ---- CTA Bar — Dark with Yellow Accent Stripe ---- */
.demo-cta-bar {
    background: var(--le-dark-alt);
    position: relative;
}

.demo-cta-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--le-yellow), var(--le-yellow-light), var(--le-yellow));
}

.demo-cta-bar--image .demo-cta-bar__overlay {
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.demo-cta-bar__content h2 {
    font-family: var(--le-font-heading);
    color: #fff;
}

.demo-cta-bar__content p {
    color: #94a3b8;
}

.demo-cta-bar__actions .demo-btn--primary {
    background: var(--le-yellow);
    color: var(--le-dark);
    font-weight: 700;
}

.demo-cta-bar__actions .demo-btn--primary:hover {
    background: var(--le-yellow-light);
    color: var(--le-dark);
    box-shadow: 0 4px 24px var(--le-yellow-glow);
}

.demo-cta-bar__actions .demo-btn--secondary {
    border-color: rgba(234, 179, 8, 0.5);
    color: var(--le-yellow);
}

.demo-cta-bar__actions .demo-btn--secondary:hover {
    background: rgba(234, 179, 8, 0.1);
    border-color: var(--le-yellow);
    color: var(--le-yellow-light);
}

/* ---- Content Sections — Dark ---- */
.demo-content h2 { color: #fff; }
.demo-content h3 { color: #fff; }
.demo-content p { color: #cbd5e1; }

.demo-content li::before { color: var(--le-yellow); }
.demo-checklist li::before { color: var(--le-yellow); }

/* ---- FAQ — Dark ---- */
.demo-faq__item {
    border-bottom: 1px solid var(--le-border-dark);
}

.demo-faq__item h3 { color: #fff; }
.demo-faq__item p { color: #94a3b8; }

/* ---- Contact — Dark ---- */
.demo-contact-info h3 { color: #fff; }
.demo-contact-info p { color: #cbd5e1; }
.demo-contact-form h3 { color: #fff; }

.demo-form input,
.demo-form select,
.demo-form textarea {
    background: var(--le-dark-alt);
    border: 1px solid var(--le-border-dark);
    color: #f1f5f9;
    border-radius: var(--le-radius);
}

.demo-form input::placeholder,
.demo-form select::placeholder,
.demo-form textarea::placeholder {
    color: #64748b;
}

.demo-form input:focus,
.demo-form select:focus,
.demo-form textarea:focus {
    border-color: var(--le-yellow);
    box-shadow: 0 0 0 3px var(--le-yellow-glow);
    outline: none;
}

.demo-form-success {
    color: var(--le-yellow);
}

/* ---- Why Choose Us Cards — Dark ---- */
.demo-why-card {
    background: var(--le-dark-alt);
    border: 1px solid var(--le-border-dark);
    box-shadow: none;
}

.demo-why-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.demo-why-card__body h3 { color: #fff; }
.demo-why-card__body p { color: #94a3b8; }

/* ---- Process / How It Works — Dark Override ---- */
.demo-process__number {
    background: var(--le-dark-deep);
    border: 3px solid var(--le-yellow);
    color: var(--le-yellow);
    font-family: var(--le-font-heading);
    box-shadow: 0 4px 16px var(--le-yellow-glow);
}

.demo-process__step h3 {
    font-family: var(--le-font-heading);
    color: #fff;
}

.demo-process__step p { color: #94a3b8; }

.demo-process__connector {
    background: var(--le-yellow);
    opacity: 0.4;
}

.demo-process__connector::after {
    border-left-color: var(--le-yellow);
}

/* ---- Footer — Very Dark ---- */
.demo-footer {
    background: var(--le-dark-deep);
    color: #94a3b8;
}

.demo-footer::before {
    background: linear-gradient(90deg, var(--le-yellow), var(--le-yellow-light), var(--le-yellow));
    height: 3px;
}

.demo-footer__logo { color: var(--le-yellow); }
.demo-footer h4 { color: #fff; }
.demo-footer a { color: #64748b; }
.demo-footer a:hover { color: var(--le-yellow); }
.demo-footer__license { color: #475569; }
.demo-footer__bottom {
    border-top: 1px solid var(--le-border-dark);
    color: #475569;
}
.demo-footer__bottom a { color: #64748b; }
.demo-footer__bottom a:hover { color: var(--le-yellow); }

/* ---- Service Detail — Dark ---- */
.demo-service-detail__sidebar img {
    border-radius: var(--le-radius);
}

/* ---- Yellow Pulse Animation on CTA Buttons ---- */
@keyframes le-yellow-pulse {
    0%, 85%, 100% { box-shadow: none; }
    90% { box-shadow: 0 0 0 6px rgba(234, 179, 8, 0.25); }
    95% { box-shadow: 0 0 0 12px rgba(234, 179, 8, 0); }
}

.le-cta-pulse {
    animation: le-yellow-pulse 8s ease-in-out infinite;
}

/* ---- Geometric Clip-Path Sections ---- */
.le-angled {
    position: relative;
    clip-path: polygon(0 0, 100% 2%, 100% 98%, 0 100%);
    padding-top: 80px;
    padding-bottom: 80px;
}

.le-angled--reverse {
    clip-path: polygon(0 2%, 100% 0, 100% 100%, 0 98%);
}

/* ---- Scroll Animations — Dark Theme ---- */
.animate-in.visible .le-trust-card,
.animate-in.visible .le-timeline__step {
    animation: fadeInUp 0.5s ease-out both;
}

.animate-in.visible .le-trust-card:nth-child(2) { animation-delay: 0.1s; }
.animate-in.visible .le-trust-card:nth-child(3) { animation-delay: 0.2s; }

/* ---- Section Divider Override ---- */
.demo-section + .demo-section:not(.demo-section--alt) {
    border-top-color: var(--le-border-dark);
}

/* ---- Demo Banner on Dark Theme ---- */
.demo-banner {
    background: var(--le-dark-deep);
    border-top: 1px solid var(--le-border-dark);
}

/* ---- Mobile Nav — Dark ---- */
@media (max-width: 768px) {
    .demo-nav.open {
        background: var(--le-dark-alt);
        border-bottom: 1px solid var(--le-border-dark);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    }

    .demo-nav.open .demo-nav__menu {
        background: var(--le-dark-alt);
    }

    .demo-hero {
        padding: 80px 0 64px;
        text-align: center;
    }

    .demo-hero h1 {
        font-size: 2rem;
    }

    .demo-hero p {
        text-align: center;
        margin: 0 auto 32px;
    }

    .demo-hero__actions {
        justify-content: center;
    }

    .demo-hero__trust {
        justify-content: center;
    }

    /* Timeline goes vertical on mobile */
    .le-timeline {
        flex-direction: column;
        align-items: center;
    }

    .le-timeline__step {
        max-width: 320px;
    }

    .le-timeline__connector {
        width: 3px;
        height: 40px;
        margin: 8px 0;
        background: linear-gradient(180deg, var(--le-yellow), var(--le-yellow-light));
    }

    .le-timeline__connector::after {
        right: auto;
        top: auto;
        bottom: -4px;
        left: -4px;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 8px solid var(--le-yellow);
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .le-timeline__step {
        padding: 0 8px;
    }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    .le-cta-pulse {
        animation: none;
    }

    .le-timeline__step {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .le-timeline__connector {
        opacity: 0.5;
        transform: none;
        transition: none;
    }
}
