/* ==========================================================================
   Homepage Hero — "four ways we work"
   Markup + content: /components/hero-home.php
   Tweak the look from the variables on .hero-lines.
   ========================================================================== */

.hero-lines {
    --scrim: 8, 22, 12;        /* rgb of the dark green overlay */
    --honey: #ebb042;          /* active line + progress */
    --mist: #f1f5ec;           /* headline */
    --mist-soft: #d3dfd1;      /* body copy */

    position: relative;
    min-height: calc(min(100svh, 880px) - 82px); /* 82px = white navbar (body-interior padding) */
    display: flex;
    color: var(--mist);
    background: #12291a;
    overflow: hidden;
    isolation: isolate;
}

/* --- Photos --- */

.hero-lines-media {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-lines-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(var(--scrim), 0.86) 0%, rgba(var(--scrim), 0.55) 45%, rgba(var(--scrim), 0.12) 100%),
        linear-gradient(0deg, rgba(var(--scrim), 0.85) 0%, rgba(var(--scrim), 0) 38%);
}

.hero-lines-photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 1000ms ease, transform 7000ms ease-out;
}

.hero-lines-photo.is-active {
    opacity: 1;
    transform: scale(1);
}

/* --- Layout --- */

.hero-lines-inner {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 72px 24px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
}

.hero-lines-copy {
    max-width: 620px;
}

.hero-lines-title {
    font-family: 'Means', Georgia, serif;
    font-weight: 300;
    font-size: clamp(42px, 5.2vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.015em;
    color: var(--mist);
    margin-bottom: 28px;
    text-wrap: balance;
}

.hero-lines-desc {
    font-size: 18px;
    line-height: 1.65;
    color: var(--mist-soft);
    max-width: 34em;
    margin-bottom: 38px;
}

.hero-lines-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* --- Business line tabs --- */

.hero-lines-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-lines-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 0 32px;
    color: rgba(255, 255, 255, 0.62);
    transition: color 250ms ease;
}

/* Progress line sits on the shared top border */
.hero-lines-tab::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--honey);
    transform: scaleX(0);
    transform-origin: left;
}

.hero-lines-tab.is-active {
    color: #ffffff;
}

.hero-lines-tab.is-active::before {
    animation: hero-lines-progress var(--hero-interval) linear forwards;
}

.hero-lines.is-paused .hero-lines-tab.is-active::before {
    animation: none;
    transform: scaleX(1);
}

.hero-lines-tab:hover {
    color: #ffffff;
}

.hero-lines-tab:focus-visible {
    outline: 2px solid var(--honey);
    outline-offset: 6px;
    border-radius: 2px;
}

.hero-lines-tab-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.005em;
}

.hero-lines-tab-desc {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.85;
}

.hero-lines-actions a:focus-visible {
    outline: 3px solid var(--honey);
    outline-offset: 3px;
}

@keyframes hero-lines-progress {
    to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-lines-photo {
        transition: opacity 200ms linear;
        transform: none;
    }
}

/* --- Responsive --- */

@media (max-width: 960px) {
    .hero-lines-inner {
        padding: 64px 20px 0;
        gap: 56px;
    }
    .hero-lines-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 24px;
    }
    .hero-lines-tab {
        padding: 18px 0 22px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    .hero-lines-tabs {
        border-top: 0;
    }
    .hero-lines-tab-desc {
        display: none;
    }
    .hero-lines-media::after {
        background:
            linear-gradient(0deg, rgba(var(--scrim), 0.92) 0%, rgba(var(--scrim), 0.6) 55%, rgba(var(--scrim), 0.45) 100%);
    }
}

@media (max-width: 640px) {
    .hero-lines {
        min-height: 0;
    }
    .hero-lines-inner {
        padding-top: 48px;
        gap: 44px;
    }
    .hero-lines-title {
        margin-bottom: 20px;
    }
    .hero-lines-desc {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .hero-lines-actions a {
        flex: 1 1 0;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
    }
    .hero-lines-tab-title {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .hero-lines-inner {
        padding-left: 16px;
        padding-right: 16px;
    }
}
