/**
 * piimarket — Homepage template styles.
 * Loaded only on pages using the "Homepage" template.
 */

:root {
    --hp-blue: #6499ff;
    --hp-dark: #111111;
}

/*--------------------------------------------------------------
  First section — heading row + full-bleed hero
--------------------------------------------------------------*/
.hp-first-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2.5rem;
    padding: 3rem 0 3.5rem;
}

.hp-first-title {
    margin: 0;
    max-width: 60%;
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    line-height: 1.1;
    font-weight: 400;
    color: var(--color-text);
}

.hp-first-note {
    max-width: 22rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text);
}

/* Full-bleed hero image */
.hp-hero {
    width: 100%;
}

.hp-hero img {
    display: block;
    width: 100%;
    height: auto;
}

/*--------------------------------------------------------------
  Second section — full-bleed blue band
--------------------------------------------------------------*/
.hp-second {
    background: var(--hp-blue);
}

.hp-second-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3.5rem;
    padding: 4rem 0;
}

.hp-second-left {
    flex: 1 1 55%;
    max-width: 55%;
}

.hp-second-right {
    flex: 1 1 40%;
    max-width: 40%;
}

.hp-second-title {
    margin: 0 0 2rem;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.1;
    font-weight: 400;
    color: var(--hp-dark);
}

.hp-button {
    display: inline-block;
    padding: 0.85rem 1.5rem;
    background: var(--hp-dark);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
}

.hp-button:hover,
.hp-button:focus {
    background: #000;
    color: #fff;
    text-decoration: none;
}

.hp-second-right p {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.55;
    color: var(--hp-dark);
}

/*--------------------------------------------------------------
  Third section — service steps + info boxes
--------------------------------------------------------------*/
.hp-third {
    padding: 4.5rem 0 5rem;
}

.hp-third-title {
    margin: 0 0 3.5rem;
    text-align: center;
    font-size: clamp(2.25rem, 4.5vw, 3.25rem);
    line-height: 1.1;
    font-weight: 400;
    color: var(--color-text);
}

/* Service steps */
.hp-services {
    display: flex;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.hp-service {
    position: relative;
    flex: 1 1 0;
    padding: 0 1.5rem;
    text-align: center;
}

.hp-service-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 280px;
    margin-bottom: 1.5rem;
}

.hp-service-media img {
    position: relative;
    z-index: 1;
    max-height: 100%;
    width: auto;
}

/* Dashed connector between steps (sits behind the icons) */
.hp-service:not(:last-child) .hp-service-media::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 50%;
    left: 50%;
    width: calc(100% + 3rem);
    border-top: 2px dashed #b9caf0;
}

.hp-service-title {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

.hp-service-desc {
    margin: 0 auto;
    max-width: 22rem;
    color: #4b5563;
    line-height: 1.6;
}

/* Centered navy action button */
.hp-third-action {
    margin-bottom: 3.5rem;
    text-align: center;
}

.hp-button--navy {
    padding: 1rem 2rem;
    background: #000097;
    border-radius: 7px;
}

.hp-button--navy:hover,
.hp-button--navy:focus {
    background: #000070;
}

/* Info boxes */
.hp-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.hp-info-box {
    padding: 2rem 2.25rem;
    background: #f1f1f3;
    border-radius: 8px;
}

.hp-info-label {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.hp-info-desc {
    color: #4b5563;
    line-height: 1.6;
}

.hp-info-desc p {
    margin: 0;
}

.hp-info-desc a {
    color: var(--color-accent);
    font-weight: 600;
}

/*--------------------------------------------------------------
  Responsive
--------------------------------------------------------------*/
@media (max-width: 782px) {
    .hp-first-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 2rem 0 2.5rem;
    }

    .hp-first-title {
        max-width: 100%;
    }

    .hp-second-inner {
        flex-direction: column;
        gap: 2rem;
        padding: 3rem 0;
    }

    .hp-second-left,
    .hp-second-right {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .hp-services {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
        margin-bottom: 2.5rem;
    }

    .hp-service {
        padding: 0;
    }

    .hp-service-media {
        height: auto;
        margin-bottom: 1.25rem;
    }

    .hp-service-media img {
        max-height: 180px;
    }

    .hp-service:not(:last-child) .hp-service-media::after {
        display: none;
    }

    .hp-info {
        grid-template-columns: 1fr;
    }
}
