﻿/*
 * Industries We Serve — Homepage Section + Card Component
 * Scoped to .industries-section and .ind-card
 */

/* ═══════════════════════════════════════════════════════════════
   SECTION SHELL
   ═══════════════════════════════════════════════════════════════ */

.industries-section {
    position: relative;
    background: #ffffff;
    padding: 5rem 0 6rem;
    overflow: hidden;
}

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

/* ═══════════════════════════════════════════════════════════════
   SECTION HEADER
   ═══════════════════════════════════════════════════════════════ */

.industries-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3.5rem;
}

@media (min-width: 1024px) {
    .industries-header {
        grid-template-columns: 1fr 1fr;
        align-items: flex-end;
        gap: 4rem;
        margin-bottom: 4.5rem;
    }
}

.industries-heading {
    font-family: var(--font-heading, 'Barlow Condensed', sans-serif);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 0.95;
    letter-spacing: -0.02em;
    color: #0f172a;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    margin: 0.75rem 0 1.25rem;
}

.industries-heading-line2 {
    display: block;
    color: #f97316;
    font-size: 0.85em;
}

/* Orange rule under heading */
.industries-rule {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.industries-rule-line {
    display: block;
    height: 2px;
    width: 2.5rem;
    background: #f97316;
}

.industries-rule-faint {
    width: 4rem;
    background: rgba(249,115,22,0.2);
}

.industries-rule-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f97316;
    flex-shrink: 0;
}

/* Right column */
.industries-header-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 1.25rem;
}

.industries-intro {
    font-size: 0.9375rem;
    color: #0f172a;
    line-height: 1.8;
    max-width: 480px;
}

.industries-header-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f97316;
    text-decoration: none;
    transition: gap 200ms ease, color 200ms ease;
}

.industries-header-link:hover {
    gap: 0.875rem;
    color: #fb923c;
}

/* ═══════════════════════════════════════════════════════════════
   CARD GRID
   ═══════════════════════════════════════════════════════════════ */

.industries-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;               /* 1px gap creates the "gap as border" trick */
    background: rgba(15,23,42,0.1);
}

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

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

/* ═══════════════════════════════════════════════════════════════
   INDUSTRY CARD
   ═══════════════════════════════════════════════════════════════ */

.ind-card {
    --ind-accent: #f97316;   /* overridable per-card for fallback cards */

    position: relative;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition:
        transform 350ms cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 350ms cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Lift + shadow on hover */
.ind-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 0 0 1px rgba(249,115,22,0.25),
        0 20px 60px rgba(0,0,0,0.1),
        0 4px 16px rgba(249,115,22,0.08);
    z-index: 2;
}

/* Full-card clickable overlay (for CPT links) */
.ind-card-overlay-link {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: block;
}

/* ── Background image ────────────────────────────────────────── */

.ind-card-bg-image {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.ind-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.06;
    transform: scale(1.04);
    transition:
        opacity  400ms ease,
        transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(60%);
}

.ind-card:hover .ind-bg-img {
    opacity: 0.15;
    transform: scale(1);
    filter: grayscale(0%);
}

/* ── Gradient overlay ────────────────────────────────────────── */

.ind-card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(255,255,255,0.0) 0%,
        rgba(255,255,255,0.5) 50%,
        rgba(255,255,255,0.9) 100%
    );
    transition: opacity 350ms ease;
    pointer-events: none;
}

/* ── Bottom accent bar (slides in from left on hover) ─────────── */

.ind-card-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--ind-accent, #f97316);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.ind-card:hover .ind-card-bar {
    transform: scaleX(1);
}

/* ── Card body ───────────────────────────────────────────────── */

.ind-card-body {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.75rem;
    gap: 0;
}

/* ── Icon ────────────────────────────────────────────────────── */

.ind-icon-wrap {
    width: 48px;
    height: 48px;
    background: rgba(249,115,22,0.1);
    border: 1px solid rgba(249,115,22,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f97316;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
    transition:
        background 300ms ease,
        border-color 300ms ease,
        color 300ms ease;
}

.ind-card:hover .ind-icon-wrap {
    background: #f97316;
    border-color: #f97316;
    color: #fff;
}

.ind-icon-emoji {
    font-size: 1.375rem;
    line-height: 1;
}

/* ── Title ───────────────────────────────────────────────────── */

.ind-card-title {
    font-family: var(--font-heading, 'Barlow Condensed', sans-serif);
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0f172a;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    transition: color 250ms ease;
}

.ind-card-title a {
    color: inherit;
    text-decoration: none;
    position: relative;
    z-index: 6;
}

.ind-card:hover .ind-card-title {
    color: var(--ind-accent, #f97316);
}

/* ── Excerpt ─────────────────────────────────────────────────── */

.ind-card-excerpt {
    font-size: 0.8125rem;
    color: #0f172a;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    transition: color 250ms ease;
}

.ind-card:hover .ind-card-excerpt {
    color: #0f172a;
}

/* ── Footer link ─────────────────────────────────────────────── */

.ind-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(15,23,42,0.09);
    transition: border-color 250ms ease;
    margin-top: auto;
}

.ind-card:hover .ind-card-footer {
    border-color: rgba(249,115,22,0.15);
}

.ind-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0f172a;
    text-decoration: none;
    transition: color 200ms ease;
    position: relative;
    z-index: 6;
}

.ind-card:hover .ind-card-link {
    color: var(--ind-accent, #f97316);
}

/* Arrow slides right on hover */
.ind-card-link-arrow {
    display: flex;
    align-items: center;
    transform: translateX(0);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.ind-card:hover .ind-card-link-arrow {
    transform: translateX(5px);
}

.ind-card-sector-label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #0f172a;
    padding: 0.25rem 0.5rem;
    border: 1px solid rgba(15,23,42,0.1);
    transition: border-color 250ms ease, color 250ms ease;
}

.ind-card:hover .ind-card-sector-label {
    border-color: rgba(249,115,22,0.2);
    color: rgba(249,115,22,0.6);
}

/* ── Number label on each card (nth child counters) ──────────── */

.ind-card::before {
    content: '0' counter(industry-card);
    counter-increment: industry-card;
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-family: var(--font-heading, 'Barlow Condensed', sans-serif);
    font-size: 0.625rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: rgba(15,23,42,0.1);
    z-index: 4;
    transition: color 250ms ease;
}

.ind-card:hover::before {
    color: rgba(249,115,22,0.2);
}

.industries-grid {
    counter-reset: industry-card;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION FOOTER
   ═══════════════════════════════════════════════════════════════ */

.industries-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    margin-top: 3.5rem;
    text-align: center;
}

@media (min-width: 640px) {
    .industries-footer {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.industries-footer-text {
    font-size: 0.9375rem;
    color: #0f172a;
    max-width: 480px;
    line-height: 1.6;
}

.industries-footer-ctas {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 640px) {
    .industries-footer-ctas { justify-content: flex-end; }
}

/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .ind-card,
    .ind-bg-img,
    .ind-card-bar,
    .ind-icon-wrap,
    .ind-card-link-arrow {
        transition: none;
    }

    .ind-card:hover {
        transform: none;
    }
}
