/* Homepage layout. Loaded after mrig-style.css so these rules win. */

.home-hero .container,
.home-trust .container,
.home-section .container,
.home-final-cta .container,
.site-footer .container {
    max-width: 1200px;
}

.home-section {
    padding: 4.25rem 0;
}

.home-section-head {
    max-width: 40rem;
    margin-bottom: 1.75rem;
}

.home-section-head--center {
    max-width: 40rem;
}

.home-hero-title {
    max-width: 12.5em;
    margin: 0 0 1rem;
    font-size: clamp(2.15rem, 3.5vw, 3.25rem);
    line-height: 1.08;
}

.home-section-title {
    margin: 0 0 0.7rem;
    font-size: clamp(1.7rem, 2.6vw, 2.35rem);
    line-height: 1.15;
}

.home-section-text,
.home-hero-text,
.home-lead,
.home-body-text {
    text-wrap: pretty;
}

/* Hero */

.home-hero {
    overflow: hidden;
    padding: 2.25rem 0 2.5rem;
    background: var(--ivory);
}

.home-hero::before,
.home-hero-frame::after,
.home-hero-accent,
.home-about-visual::before,
.home-final-cta::before,
.home-final-cta::after {
    content: none;
    display: none;
}

.home-hero-grid,
.home-split {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(1.5rem, 4vw, 3.25rem);
    align-items: center;
}

.home-hero-copy,
.home-about-copy,
.home-why-copy {
    max-width: none;
}

.home-hero-text {
    max-width: 38rem;
    margin: 0 0 1.35rem;
    font-size: 1.05rem;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1.15rem;
}

.home-hero-actions .btn {
    min-height: 2.75rem;
    padding: 0.7rem 1.15rem;
}

.home-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.85rem;
    align-items: center;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.home-hero-visual {
    padding: 0;
}

.home-hero-frame {
    margin: 0;
    overflow: hidden;
    aspect-ratio: 5 / 4;
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    background: var(--charcoal);
    box-shadow: 0 18px 40px rgba(32, 37, 34, 0.08);
}

.home-hero-image,
.home-hero-fallback {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero-note {
    position: static;
    display: flex;
    max-width: none;
    gap: 0.75rem;
    align-items: flex-start;
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    background: var(--white);
    box-shadow: none;
}

.home-hero-note p {
    margin: 0.15rem 0 0;
}

/* Trust */

.home-trust {
    padding: 1.35rem 0 1.5rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: var(--white);
}

.home-trust-head {
    display: flex;
    gap: 1rem 2rem;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.95rem;
}

.home-trust-title {
    margin: 0;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.home-trust-text {
    max-width: 36rem;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
    text-align: right;
}

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

.home-trust-item {
    display: flex;
    min-height: 4.75rem;
    gap: 0.75rem;
    align-items: center;
    margin: 0;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    background: var(--ivory);
}

.home-trust-item:hover {
    border-color: var(--taupe);
}

.home-trust-icon {
    display: grid;
    flex: 0 0 auto;
    width: 2.4rem;
    height: 2.4rem;
    place-items: center;
    border-radius: 0.7rem;
    background: var(--white);
    color: var(--sage-deep);
    font-size: 1.05rem;
}

.home-trust-item h3 {
    margin: 0;
    color: var(--charcoal);
    font-family: 'Poppins', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

/* About and why */

.home-about {
    background: var(--ivory);
}

.home-about-visual,
.home-why-visual {
    position: relative;
    padding: 0;
    margin: 0;
}

.home-about-visual img,
.home-about-fallback,
.home-why-visual img {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 5 / 4;
    border: 0;
    border-radius: 1.25rem;
    object-fit: cover;
    box-shadow: none;
}

.home-why-visual img {
    aspect-ratio: 4 / 5;
}

.home-about-caption {
    position: static;
    display: flex;
    max-width: none;
    gap: 0.6rem;
    align-items: flex-start;
    margin: 0.85rem 0 0;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    background: var(--white);
    box-shadow: none;
    color: var(--charcoal);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.45;
}

.home-about-copy .btn {
    margin-top: 0.35rem;
}

.home-why {
    background: var(--white);
}

.home-split--why {
    align-items: start;
}

.home-why-copy .home-body-text {
    margin-bottom: 1.15rem;
}

.home-why-points {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
}

.home-point {
    display: grid;
    grid-template-columns: 2.35rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    margin: 0;
    padding: 0;
}

.home-point:last-child:nth-child(odd) {
    grid-column: auto;
}

.home-point-icon {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border-radius: 0.7rem;
    background: var(--ivory);
    color: var(--sage-deep);
}

.home-point h3 {
    margin: 0.15rem 0 0.15rem;
    font-size: 0.98rem;
}

.home-point p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* Cards */

.home-services {
    background: var(--white);
}

.home-products {
    background: var(--ivory);
}

.home-blog {
    background: var(--white);
}

.home-card-grid {
    display: grid;
    gap: 1.15rem;
    align-items: stretch;
}

.home-card-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-card-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.home-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: var(--white);
    box-shadow: none;
}

.home-card:hover {
    transform: translateY(-4px);
    border-color: #ddd8cf;
    box-shadow: 0 16px 36px rgba(32, 37, 34, 0.08);
}

.home-card-media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--ivory);
}

.home-card-media img,
.home-product-card .home-card-media img,
.home-blog-card .home-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.home-card:hover .home-card-media img {
    transform: scale(1.04);
}

.home-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 1.05rem 1.05rem 1.15rem;
}

.home-card-tag {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.55rem;
    align-items: center;
    margin: 0 0 0.45rem;
    color: var(--sage-deep);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.home-card-title {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.home-card-title a {
    color: var(--charcoal);
    text-decoration: none;
}

.home-card-title,
.home-card-text,
.home-trust-item h3,
.home-process-step h3,
.home-process-step p {
    overflow-wrap: anywhere;
}

.home-card-text {
    display: -webkit-box;
    margin: 0 0 1rem;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.home-card-link,
.home-card-button {
    margin-top: auto;
}

.home-card-link {
    align-self: flex-start;
    font-size: 0.88rem;
}

.home-card-button {
    width: 100%;
    min-height: 2.6rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.86rem;
}

.home-section-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.75rem;
}

/* Process */

.home-process {
    background: var(--ivory);
}

.home-process-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-process-grid::before {
    content: "";
    position: absolute;
    top: 1.45rem;
    right: 6%;
    left: 6%;
    height: 1px;
    background: #ddd8cf;
}

.home-process-step {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 0 0.35rem;
}

.home-process-number {
    position: relative;
    z-index: 1;
    display: grid;
    width: 2.9rem;
    height: 2.9rem;
    margin: 0 0 0.9rem;
    place-items: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--white);
    color: var(--charcoal);
    font-size: 0.82rem;
}

.home-process-step h3 {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    line-height: 1.35;
}

.home-process-step p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

/* Testimonials */

.home-testimonials {
    background: var(--white);
}

.home-testimonial-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    margin: 0;
}

.home-testimonial-text {
    flex: 1 1 auto;
}

/* Contact */

.home-contact {
    background: var(--ivory);
}

.home-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.home-contact-info,
.home-contact-form-card {
    min-width: 0;
}

.home-contact-form-card {
    padding: 1.35rem 1.35rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 1.15rem;
    background: var(--white);
    box-shadow: none;
}

.home-contact-item a,
.home-contact-item span {
    overflow-wrap: anywhere;
}

.home-contact-form .form-control,
.home-contact-form .form-select {
    min-height: 2.75rem;
}

.home-contact-form textarea.form-control {
    min-height: 7.5rem;
}

/* Final CTA */

.home-final-cta {
    padding: 2.4rem 0;
    background: var(--charcoal);
}

.home-final-cta-inner {
    display: flex;
    gap: 1.5rem 2rem;
    align-items: center;
    justify-content: space-between;
}

.home-final-cta h2 {
    margin: 0 0 0.35rem;
    color: var(--white);
    font-size: clamp(1.55rem, 2.4vw, 2.05rem);
}

.home-final-cta p:not(.home-eyebrow) {
    max-width: 36rem;
    margin: 0;
    color: rgba(247, 245, 240, 0.78);
}

.home-final-cta-button {
    min-height: 2.75rem;
}

/* Responsive */

@media (max-width: 1199.98px) {
    .home-card-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .home-trust-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.3rem;
    }

    .home-trust-text {
        text-align: left;
    }

    .home-trust-title {
        white-space: normal;
    }
}

@media (max-width: 991.98px) {
    .site-navbar .nav-link.active {
        border-radius: 0.65rem;
        background: var(--ivory);
        font-weight: 600;
    }

    .home-hero {
        padding-top: 1.75rem;
    }

    .home-hero-grid,
    .home-split,
    .home-contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-hero-visual,
    .home-about-visual,
    .home-why-visual,
    .home-contact-form-card {
        max-width: 40rem;
    }

    .home-split--why .home-why-visual {
        order: -1;
    }

    .home-why-visual img {
        aspect-ratio: 16 / 10;
    }

    .home-card-grid--3,
    .home-process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-process-grid::before {
        display: none;
    }

    .home-final-cta-inner {
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {
    .home-section {
        padding: 3rem 0;
    }

    .home-hero {
        padding-bottom: 2.25rem;
    }

    .home-card-grid--2,
    .home-card-grid--3,
    .home-card-grid--4,
    .home-process-grid,
    .home-trust-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-process-step {
        display: grid;
        grid-template-columns: 2.75rem minmax(0, 1fr);
        gap: 0 0.85rem;
        align-items: start;
        padding: 0;
    }

    .home-process-number {
        width: 2.75rem;
        height: 2.75rem;
        margin: 0;
        grid-row: 1 / span 2;
    }

    .home-process-step h3 {
        margin-top: 0.25rem;
    }

    .home-final-cta-inner {
        flex-direction: column;
    }

    .home-final-cta-button,
    .home-section-actions .btn,
    .home-about-copy .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .home-hero-title {
        font-size: clamp(1.95rem, 9vw, 2.45rem);
    }

    .home-hero-actions {
        flex-direction: column;
    }

    .home-hero-actions .btn {
        width: 100%;
    }

    .home-hero-meta-divider {
        display: none;
    }

    .home-contact-form-card {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-card,
    .home-card-media img {
        transition: none;
    }

    .home-card:hover,
    .home-card:hover .home-card-media img {
        transform: none;
    }
}
