/*
 * Home page refinements, layered on top of assets/css/home.css.
 * File: /wp-content/themes/smc/assets/css/home-refined.css
 * Home-only parts (hero, owners, steps, reviews). Shared look and motion: assets/css/smc-ui.css + assets/js/smc-ui.js.
 */

.smc-hr ::selection {
    background: #bfe8ff;
    color: #0b1220;
}

.smc-hr h1,
.smc-hr h2,
.smc-hr h3 {
    text-wrap: balance;
}

/* Hero */
.smc-hr .smc-hero {
    position: relative;
    padding: 5.2rem 0 4.6rem;
    /* Plain white: the cleaner photo has a white, feathered edge and must blend into it. */
    background: #ffffff;
    overflow: hidden;
}

.smc-hr .smc-hero-inner {
    position: relative;
    background-image: none;
}

/* The same cleaner photo, moved onto its own layer so it can animate in. */
.smc-hr .smc-hero-inner::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 50%;
    height: 420px;
    transform: translateY(-50%);
    background-image: url('../img/hero-cleaner-22-14.png?v=20261018e');
    background-image: image-set(url('../img/hero-cleaner-22-14.webp?v=20261018e') type('image/webp'), url('../img/hero-cleaner-22-14.png?v=20261018e') type('image/png'));
    background-repeat: no-repeat;
    background-position: right center;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
}

.smc-hr .smc-hero-text {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.smc-hr .smc-hero-title {
    font-size: clamp(2.2rem, 3.1vw, 2.75rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 1rem;
    color: #0b1220;
}

.smc-hr .smc-hero-subtitle {
    font-size: 1.02rem;
    line-height: 1.7;
    max-width: 29em;
    margin: 0 0 1.6rem;
    color: #556070;
}

.smc-hr .smc-hero-actions {
    flex-wrap: wrap;
    gap: 0.9rem 1.4rem;
}

.smc-hr .smc-hero-actions .smc-btn-primary {
    box-shadow: 0 10px 22px rgba(45, 182, 255, 0.26);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
}

.smc-hr .smc-link-arrow.smc-hr-call {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.92rem;
    font-weight: 500;
    color: #556070;
    text-decoration: none;
}

.smc-hr-call-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(140deg, #5ccbff 0%, #2db6ff 100%);
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(45, 182, 255, 0.28);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.smc-hr-call-icon svg {
    width: 15px;
    height: 15px;
}

.smc-hr-trust {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.1rem;
    margin: 1.6rem 0 0;
    padding: 0;
    font-size: 0.82rem;
    color: #6b7686;
}

.smc-hr-trust li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.smc-hr-stars {
    display: inline-flex;
    gap: 2px;
    color: #f5a524;
}

.smc-hr-stars svg {
    width: 13px;
    height: 13px;
}

.smc-hr-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #e1f1ff;
    color: #2db6ff;
}

.smc-hr-tick svg {
    width: 9px;
    height: 9px;
}

/* The single color accent of the hero: the key word with a hand-drawn underline. */
.smc-hr-accent {
    position: relative;
    display: inline-block;
    color: #2db6ff;
}

.smc-hr-underline {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.16em;
    width: 100%;
    height: 0.28em;
    color: #9fdcff;
    overflow: visible;
}

.smc-hr-underline path {
    stroke-dasharray: 240;
    stroke-dashoffset: 0;
}

/* Hero entrance: the page's one orchestrated moment */
@media (prefers-reduced-motion: no-preference) {
    .smc-hr .smc-hr-eyebrow,
    .smc-hr .smc-hero-title,
    .smc-hr .smc-hero-subtitle,
    .smc-hr .smc-hero-actions,
    .smc-hr .smc-hr-trust {
        animation: smc-hr-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .smc-hr .smc-hero-title    { animation-delay: 0.05s; }
    .smc-hr .smc-hero-subtitle { animation-delay: 0.12s; }
    .smc-hr .smc-hero-actions  { animation-delay: 0.2s; }
    .smc-hr .smc-hr-trust      { animation-delay: 0.3s; }

    .smc-hr .smc-hero-inner::after {
        animation: smc-hr-photo 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
    }

    .smc-hr .smc-hero-card .smc-hero-img {
        animation: smc-hr-photo-m 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .smc-hr-underline path {
        stroke-dashoffset: 240;
        animation: smc-hr-draw 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.55s forwards;
    }

    .smc-hr-trust .smc-hr-stars svg {
        animation: smc-hr-star 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    }

    .smc-hr-trust .smc-hr-stars svg:nth-child(1) { animation-delay: 0.55s; }
    .smc-hr-trust .smc-hr-stars svg:nth-child(2) { animation-delay: 0.63s; }
    .smc-hr-trust .smc-hr-stars svg:nth-child(3) { animation-delay: 0.71s; }
    .smc-hr-trust .smc-hr-stars svg:nth-child(4) { animation-delay: 0.79s; }
    .smc-hr-trust .smc-hr-stars svg:nth-child(5) { animation-delay: 0.87s; }
}

@keyframes smc-hr-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes smc-hr-star {
    from { opacity: 0.15; transform: scale(0.4) rotate(-30deg); }
    to   { opacity: 1; transform: none; }
}

@keyframes smc-hr-pop {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

@keyframes smc-hr-rise {
    from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
    to   { opacity: 1; transform: none; filter: none; }
}

@keyframes smc-hr-photo {
    from { opacity: 0; transform: translate(28px, -50%) scale(0.98); }
    to   { opacity: 1; transform: translate(0, -50%); }
}

@keyframes smc-hr-photo-m {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

/* Welcome keeps the site's original centered 880px column */
body.home .smc-hr .smc-home-welcome .smc-section-subtitle {
    color: #556070;
}

/* Section rhythm and headings */
.smc-hr .smc-section {
    padding: 4.4rem 0 4.4rem;
}

/* Home cards: roomier padding; surface, icon and hover come from smc-ui.css */
.smc-hr .smc-card {
    padding: 1.9rem 1.6rem 1.7rem;
}

.smc-hr .smc-card-service-link .smc-link-arrow {
    margin-top: 1rem;
}

/* Also available row under the service cards */
.smc-hr-also {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem 1.4rem;
    margin-top: 1.8rem;
    font-size: 0.92rem;
    color: #6b7686;
}

.smc-hr .smc-hr-also .smc-link-arrow {
    margin: 0;
}

/* Reviews */
.smc-hr .smc-review-card {
    text-align: left;
}

.smc-hr .smc-review-stars {
    display: inline-flex;
    gap: 2px;
    color: #f5a524;
}

.smc-hr .smc-review-stars svg {
    width: 16px;
    height: 16px;
}

.smc-hr .smc-section-subtitle .smc-hr-stars {
    vertical-align: -2px;
    margin-right: 0.35rem;
}

.smc-hr .smc-link-arrow.smc-hr-call-light {
    color: #ffffff;
}

/* On the blue block the icon flips: white disc, blue phone */
.smc-hr .smc-hr-call-light .smc-hr-call-icon {
    background: #ffffff;
    color: #2db6ff;
    box-shadow: 0 6px 16px rgba(6, 60, 120, 0.2);
}

/* Hover only where a real pointer exists */
@media (hover: hover) {
    .smc-hr .smc-hero-actions .smc-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 32px rgba(45, 182, 255, 0.34);
    }

    .smc-hr .smc-hr-call:hover .smc-hr-call-icon {
        transform: rotate(-12deg) scale(1.06);
    }
}

/* Eyebrow: where we are, before what we do */
.smc-hr-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.15rem;
    padding: 0.32rem 0.85rem 0.32rem 0.36rem;
    border-radius: 999px;
    background: #f2f8ff;
    border: 1px solid #dcecff;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    color: #2a4a6b;
}

.smc-hr-eyebrow-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    color: #2db6ff;
    box-shadow: 0 1px 3px rgba(15, 50, 90, 0.12);
}

.smc-hr-eyebrow-icon svg {
    width: 12px;
    height: 12px;
}

/* Owners: real faces behind the business */
.smc-hr-owners {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid #e6edf5;
}

.smc-hr-owners-faces {
    display: inline-flex;
}

.smc-hr-owners-faces img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 12px rgba(15, 50, 90, 0.14);
}

.smc-hr-owners-faces img + img {
    margin-left: -12px;
}

.smc-hr-owners-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.smc-hr-owners-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0b1220;
}

.smc-hr-owners-role {
    font-size: 0.8rem;
    color: #6b7686;
}

.smc-hr .smc-hr-owners-link {
    margin: 0 0 0 auto;
    font-size: 0.92rem;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* How it works */
.smc-hr .smc-hr-steps-section {
    padding-top: 1rem;
}

.smc-hr-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.smc-hr-step {
    position: relative;
    text-align: left;
}

.smc-hr-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 21px;
    left: 58px;
    right: calc(-2rem + 12px);
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #8fd8ff, #e3f3ff);
    transform-origin: left center;
}

.smc-hr-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: linear-gradient(140deg, #5ccbff 0%, #2db6ff 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(45, 182, 255, 0.26);
}

.smc-hr-step-title {
    margin: 0 0 0.35rem;
    font-size: 1.02rem;
    font-weight: 700;
    color: #0b1220;
}

.smc-hr-step-text {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.6;
    color: #556070;
}

/* Desktop: How it works reads from the center, like the Welcome column */
@media (min-width: 961px) {
    .smc-hr-steps-section .smc-section-header {
        max-width: 640px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .smc-hr-steps {
        max-width: 980px;
        margin: 0 auto;
    }

    .smc-hr-step {
        text-align: center;
        padding: 0 0.5rem;
    }

    .smc-hr-step-num {
        margin-left: auto;
        margin-right: auto;
    }

    .smc-hr-step:not(:last-child)::after {
        left: calc(50% + 32px);
        right: calc(-50% - 2rem + 32px);
    }
}

/* Reviews: a face for every name */
.smc-hr .smc-review-footer {
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
}

.smc-hr-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(140deg, #e8f6ff 0%, #cfe9ff 100%);
    color: #2db6ff;
    font-size: 0.95rem;
    font-weight: 700;
}

.smc-hr-review-who {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

@media (prefers-reduced-motion: no-preference) {
    .smc-ui-anim .smc-hr .smc-hr-step:not(:last-child)::after {
        transform: scaleX(0);
        transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1);
    }

    .smc-ui-anim .smc-hr .smc-hr-steps.is-in .smc-hr-step:nth-child(1)::after { transform: none; transition-delay: 0.35s; }
    .smc-ui-anim .smc-hr .smc-hr-steps.is-in .smc-hr-step:nth-child(2)::after { transform: none; transition-delay: 0.6s; }

    .smc-ui-anim .smc-hr .smc-hr-steps.is-in .smc-hr-step-num {
        animation: smc-hr-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    }

    .smc-ui-anim .smc-hr .smc-hr-steps.is-in .smc-hr-step:nth-child(2) .smc-hr-step-num { animation-delay: 0.25s; }
    .smc-ui-anim .smc-hr .smc-hr-steps.is-in .smc-hr-step:nth-child(3) .smc-hr-step-num { animation-delay: 0.5s; }
}

@media (max-width: 1024px) {
    .smc-hr .smc-hero-inner::after {
        width: 46%;
        height: 360px;
    }
}

@media (max-width: 960px) {
    .smc-hr .smc-hero {
        padding: 3.2rem 0 2.8rem;
    }

    .smc-hr .smc-hero-inner::after {
        display: none;
    }

    .smc-hr .smc-hero-title {
        font-size: 2rem;
        line-height: 1.14;
    }

    .smc-hr .smc-hero-card .smc-hero-img {
        border-radius: 22px;
    }

    .smc-hr-steps {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Mobile: a vertical timeline, numbers on one line with the left edge */
    .smc-hr-step {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        column-gap: 1rem;
        padding-bottom: 1.5rem;
    }

    .smc-hr-step:last-child {
        padding-bottom: 0;
    }

    .smc-hr-step-num {
        grid-row: 1 / span 2;
        margin: 0;
    }

    .smc-hr-step-title {
        margin-top: 0.6rem;
    }

    .smc-hr-step:not(:last-child)::after {
        top: 52px;
        bottom: 6px;
        left: 21px;
        right: auto;
        width: 2px;
        height: auto;
        background: linear-gradient(180deg, #8fd8ff, #e3f3ff);
        transform-origin: center top;
    }

    .smc-hr .smc-section {
        padding: 3.2rem 0;
    }

}

@media (max-width: 960px) and (prefers-reduced-motion: no-preference) {
    .smc-ui-anim .smc-hr .smc-hr-step:not(:last-child)::after {
        transform: scaleY(0);
    }
}

@media (max-width: 640px) {

    .smc-hr .smc-hero {
        padding: 2.2rem 0 2.4rem;
    }

    .smc-hr .smc-hero-title {
        font-size: 1.95rem;
    }

    .smc-hr .smc-section {
        padding: 2.6rem 0;
    }

    .smc-hr .smc-section-header {
        margin-bottom: 1.3rem;
    }

    .smc-hr .smc-section-title,
    body.home .smc-hr .smc-home-welcome .smc-section-title {
        font-size: 1.45rem;
        line-height: 1.25;
    }

    .smc-hr .smc-grid {
        gap: 0.8rem;
    }

    .smc-hr .smc-hero-actions .smc-btn-primary {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    /* Cards become rows: icon on the left edge, text left aligned next to it */
    .smc-hr .smc-card:not(.smc-review-card) {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        column-gap: 1rem;
        align-items: start;
        padding: 1.1rem 1.15rem;
        text-align: left;
    }

    .smc-hr .smc-card:not(.smc-review-card) .smc-card-icon {
        grid-row: 1 / span 3;
        width: 48px;
        height: 48px;
        margin: 0;
        border-radius: 14px;
    }

    .smc-hr .smc-card:not(.smc-review-card) .smc-card-icon::after {
        -webkit-mask-size: 24px 24px;
        mask-size: 24px 24px;
    }

    .smc-hr .smc-card:not(.smc-review-card) .smc-card-title {
        margin: 0.1rem 0 0.25rem;
        text-wrap: pretty;
    }

    .smc-hr .smc-card-service-link .smc-link-arrow {
        margin-top: 0.55rem;
    }

    .smc-hr .smc-review-card {
        padding: 1.3rem 1.2rem;
    }

    .smc-hr .smc-reviews-actions {
        width: 100%;
    }

    .smc-hr .smc-reviews-actions .smc-btn {
        flex: 1 1 0;
        justify-content: center;
        text-align: center;
    }

    .smc-hr .smc-hr-owners-link {
        flex-basis: 100%;
        margin: 0;
    }

    .smc-hr-also {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
    }

    .smc-hr .smc-section-accent .smc-hr-call-light {
        justify-content: flex-start;
    }

    .smc-hr-trust {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1.4rem;
        font-size: 0.88rem;
    }

    .smc-hr-also {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .smc-hr *,
    .smc-hr *::after {
        animation: none !important;
        transition: none !important;
    }
}
