/* ==========================================================
   hero.css — Homepage hero
   ========================================================== */

#hero {
    position: relative;
    background: linear-gradient(155deg, var(--color-navy) 0%, #101c34 55%, #0a1220 100%);
    color: var(--color-white);
    overflow: hidden;
    padding-block: clamp(4rem, 10vw, 7rem);
}

/* Schematic grid overlay — faint blueprint-style lines, ties the
   hero to the subject (engineering drawings / panel schematics) */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 90% 70% at 30% 30%, black 40%, transparent 85%);
    pointer-events: none;
}

/* Diagonal red accent sweep */
#hero::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 55%;
    height: 140%;
    background: linear-gradient(135deg, rgba(215, 25, 32, 0.22), rgba(215, 25, 32, 0) 60%);
    pointer-events: none;
}

#hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    align-items: center;
    gap: var(--space-lg);
}

#hero h1 {
    color: var(--color-white);
    margin-bottom: var(--space-sm);
}

#hero .hero-lede {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.1rem;
    max-width: 52ch;
    margin-bottom: var(--space-md);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: var(--space-md);
}

/* ---- Trust stat strip ---- */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    list-style: none;
    margin: var(--space-md) 0 0;
    padding: var(--space-sm) 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-stats li {
    font-family: var(--font-display);
}

.hero-stats .stat-value {
    display: block;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--color-white);
}

.hero-stats .stat-label {
    display: block;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.02em;
}

/* ---- Hero visual: rotating photo carousel ---- */
.hero-visual {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-carousel-slide.is-active {
    opacity: 1;
}

.hero-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(200deg, rgba(15, 23, 42, 0.05) 30%, rgba(10, 15, 26, 0.55) 100%);
    pointer-events: none;
}

.hero-carousel-dots {
    position: absolute;
    z-index: 2;
    bottom: var(--space-sm);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.hero-carousel-dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.hero-carousel-dots button.is-active {
    background: var(--color-white);
    transform: scale(1.2);
}

.hero-carousel-dots button:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Respect reduced-motion: show first slide only, no auto-rotation
   (also gated in JS, this is a visual fallback) */
@media (prefers-reduced-motion: reduce) {
    .hero-carousel-slide {
        transition: none;
    }
}

@media (max-width: 860px) {
    #hero .container {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        aspect-ratio: 16 / 10;
        order: -1;
    }

    .hero-stats {
        gap: var(--space-sm) var(--space-lg);
    }
}
