/*
 * Solaxay — homepage-only sections (index.php). Loaded after css/base.css.
 * Shared chrome (nav/footer/buttons/cards/mobile bar/quote modal shell)
 * lives in base.css; this file only covers hero, trust strip, services,
 * handyman grid, process, work gallery, FAQ, coverage, and the CTA band.
 */

/* ---------- Hero ---------- */

.hero {
    position: relative;
    padding-block: clamp(48px, 7vw, 96px);
    background:
        radial-gradient(circle at 10% 15%, rgba(232, 68, 46, 0.14), transparent 30%),
        radial-gradient(circle at 90% 0%, rgba(15, 23, 42, 0.06), transparent 32%),
        var(--bg);
}

/* Signature moment: a steel-truss lattice settles in behind the hero on
   load - the one deliberate animated flourish on the page ("Bridge City
   Modern" identity, see base.css's trussSettle keyframe + .divider-span).
   Positioned behind the hero's own content via z-index, not markup changes. */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        repeating-linear-gradient(45deg, var(--line-blueprint) 0 1px, transparent 1px 46px),
        repeating-linear-gradient(-45deg, var(--line-blueprint) 0 1px, transparent 1px 46px);
    opacity: 0;
    animation: trussSettle 1.4s var(--ease) 0.2s forwards;
}

.hero > .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    max-width: 720px;
    margin: 0.9rem 0 0.9rem;
    font-size: clamp(2.3rem, 4.6vw, 3.6rem);
    line-height: 1.06;
    color: var(--ink);
}

.hero-sub {
    max-width: 60ch;
    color: var(--muted);
    font-size: clamp(1rem, 1.3vw, 1.12rem);
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1.6rem;
}

.hero-quote-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.2rem;
    border: none;
    background: none;
    color: var(--accent-strong);
    font-weight: 700;
    cursor: pointer;
}

.hero-quote-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.hero-confidence {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.2rem;
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.hero-confidence span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-confidence i {
    color: var(--accent-strong);
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.3rem;
}

.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: #ffffff;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.86rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.badge-chip:hover {
    border-color: rgba(232, 68, 46, 0.5);
    transform: translateY(-2px);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.7rem;
    margin-top: 1.3rem;
}

.hero-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.hero-card i {
    color: var(--accent-strong);
    font-size: 1.2rem;
}

.stat-title {
    font-weight: 700;
    color: var(--ink);
}

.stat-sub {
    color: var(--muted);
    font-size: 0.85rem;
}

.hero-showcase {
    position: relative;
}

.hero-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

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

.hero-media::after {
    content: "";
    position: absolute;
    inset: 40% 0 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent);
    pointer-events: none;
}

.hero-media-copy {
    position: absolute;
    z-index: 1;
    inset: auto 1.4rem 1.4rem;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-media-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.76rem;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.hero-media-copy h3 {
    font-size: 1.15rem;
    margin-bottom: 0.3rem;
}

.hero-media-copy p {
    font-size: 0.88rem;
    opacity: 0.9;
}

.floating-trust {
    position: absolute;
    z-index: 2;
    max-width: 230px;
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-lg);
}

.floating-trust.top {
    top: -18px;
    left: -22px;
}

.floating-trust.bottom {
    right: -18px;
    bottom: -18px;
}

.floating-trust .mini {
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.floating-trust h4 {
    margin: 0.3rem 0 0.25rem;
    font-size: 0.94rem;
}

.floating-trust p {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* ---------- Trust strip ---------- */

.trust-strip {
    padding-bottom: clamp(34px, 4vw, 52px);
}

.trust-strip-inner {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.trust-card {
    padding: 1.1rem;
    border-radius: var(--radius);
}

.trust-card i {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.7rem;
    border-radius: 13px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 1.1rem;
}

.trust-card h3 {
    margin-bottom: 0.35rem;
    font-size: 1rem;
}

.trust-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* ---------- Shared section basics ---------- */

.section-padding {
    padding-block: clamp(56px, 7vw, 92px);
}

.section-title {
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    color: var(--ink);
    margin-bottom: 0.7rem;
}

.section-sub {
    max-width: 720px;
    margin-inline: auto;
    color: var(--muted);
    line-height: 1.75;
}

.section-text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1rem;
    color: var(--accent-strong);
    font-weight: 700;
}

.section-text-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ---------- Service cards ---------- */

.card-surface {
    display: block;
    height: 100%;
    padding: 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-surface:hover {
    transform: translateY(-4px);
    border-color: rgba(232, 68, 46, 0.4);
    box-shadow: var(--shadow);
}

.card-surface h3,
.card-surface h4 {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    color: var(--ink);
}

.card-surface p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.icon-circle {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 1.2rem;
}

/* ---------- Handyman section ---------- */

.handyman-section {
    background: #f2f4f9;
}

.service-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2rem;
}

.service-heading-cta {
    white-space: nowrap;
}

.handyman-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.handyman-card {
    position: relative;
    display: block;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.handyman-card:hover {
    border-color: var(--steel);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.handyman-card-accent {
    background: linear-gradient(150deg, var(--accent-soft), #ffffff 60%);
    border-color: rgba(232, 68, 46, 0.3);
}

.handyman-icon {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.9rem;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 1.2rem;
}

.handyman-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.02rem;
    color: var(--ink);
}

.handyman-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.scope-note {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    color: var(--muted);
}

.scope-note i {
    color: var(--accent-strong);
    font-size: 1.1rem;
}

.scope-note p {
    margin: 0;
}

/* ---------- Why Solaxay ---------- */

.featured-panel {
    padding: 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.featured-panel.dark {
    padding: 2rem;
    background: var(--surface-dark);
    border-color: var(--line-dark);
    color: var(--on-dark-muted);
}

.featured-panel.dark h2 {
    color: #ffffff;
}

.featured-service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.featured-panel h3 {
    margin-bottom: 0.4rem;
    font-size: 1rem;
    color: var(--ink);
}

.featured-panel p {
    color: var(--muted);
    line-height: 1.6;
}

.feature-list {
    display: grid;
    gap: 0.65rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    display: flex;
    gap: 0.6rem;
    line-height: 1.55;
}

.feature-list i {
    flex: none;
    margin-top: 0.2rem;
    color: var(--accent);
}

.featured-panel.dark .feature-list i {
    color: var(--accent);
}

/* ---------- Process ---------- */

.process-line {
    position: relative;
    padding-left: 64px;
    counter-reset: steps;
}

.process-line::before {
    content: "";
    position: absolute;
    left: 19px;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: var(--line-blueprint);
}

.process-step {
    position: relative;
    margin-bottom: 1.6rem;
    counter-increment: steps;
}

.process-step:last-child {
    margin-bottom: 0;
}

.process-dot {
    position: absolute;
    left: -64px;
    top: -2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2rem;
    padding-inline: 0.4rem;
    border: 1px solid var(--steel);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--steel-strong);
}

.process-dot::before {
    content: "[ " counter(steps, decimal-leading-zero) " ]";
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
}

.process-title {
    margin-bottom: 0.3rem;
    font-size: 1rem;
    color: var(--ink);
}

/* ---------- Work gallery ---------- */

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.9rem;
}

.work-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.work-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--steel);
}

/* Scroll-reveal: hidden only once js/ui-refresh.js confirms it's running
   (html.js-reveal), so cards stay fully visible if JS fails/is disabled.
   Uses the standalone `translate` property (not `transform`) so it doesn't
   fight with the :hover/:active transform rules on these same cards. */
html.js-reveal .card-surface,
html.js-reveal .handyman-card,
html.js-reveal .work-card {
    opacity: 0;
    translate: 0 16px;
    transition: opacity 0.5s var(--ease), translate 0.5s var(--ease);
}

html.js-reveal .card-surface.is-visible,
html.js-reveal .handyman-card.is-visible,
html.js-reveal .work-card.is-visible {
    opacity: 1;
    translate: 0 0;
}

.work-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

/* ---------- Standards ---------- */

.review-card {
    height: 100%;
    padding: 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.review-card .stars {
    color: var(--accent-strong);
    font-size: 1.2rem;
}

.review-card h3 {
    margin-bottom: 0.4rem;
    font-size: 1rem;
    color: var(--ink);
}

.review-card p {
    color: var(--muted);
    line-height: 1.6;
}

/* ---------- FAQ (Bootstrap accordion) ---------- */

.faq .accordion-item {
    margin-bottom: 0.65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm) !important;
    background: #ffffff;
    overflow: hidden;
}

.faq .accordion-button {
    padding: 1.05rem 1.2rem;
    background: #ffffff;
    color: var(--ink);
    font-weight: 700;
    box-shadow: none;
}

.faq .accordion-button:not(.collapsed) {
    color: var(--accent-strong);
    background: var(--accent-soft);
    box-shadow: none;
}

.faq .accordion-button:focus {
    box-shadow: none;
    outline: 3px solid rgba(232, 68, 46, 0.35);
    outline-offset: -2px;
}

.faq .accordion-button::after {
    filter: none;
}

.faq .accordion-body {
    padding: 0 1.2rem 1.1rem;
    color: var(--muted);
    line-height: 1.65;
}

/* ---------- Coverage ---------- */

.coverage-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.coverage-badges .badge {
    padding: 0.6rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: #ffffff;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.84rem;
}

.coverage-panel {
    padding: 1.4rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
}

/* ---------- CTA band ---------- */

.cta-band {
    padding-bottom: clamp(56px, 7vw, 92px);
}

.cta-panel {
    padding: 2.2rem;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at top right, rgba(232, 68, 46, 0.25), transparent 32%),
        var(--surface-dark);
    color: var(--on-dark-muted);
    box-shadow: var(--shadow-dark);
}

.cta-panel-title {
    color: #ffffff;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
    .hero-showcase {
        margin-top: 1.5rem;
    }

    .floating-trust {
        display: none;
    }

    .trust-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-heading-row {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 1.2rem;
    }

    .handyman-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .featured-service-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .trust-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .trust-card p {
        display: none;
    }

    .handyman-grid {
        grid-template-columns: 1fr;
    }

    .service-heading-cta {
        width: 100%;
    }

    .cta-panel .row > div:last-child {
        margin-top: 1rem;
    }

    .badge-chip {
        min-height: 44px;
        padding-block: 0.7rem;
    }

    .hero-title {
        font-size: clamp(2rem, 9vw, 2.7rem);
    }

    .hero-media {
        aspect-ratio: 4 / 3.2;
    }

    .work-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .work-card img {
        height: 140px;
    }
}

@media (max-width: 480px) {
    .work-grid {
        grid-template-columns: 1fr;
    }

    .handyman-icon,
    .icon-circle {
        width: 42px;
        height: 42px;
    }
}
