/* ==========================================================================
   MLPA homepage redesign — scoped styles (enqueued only on the front page).
   Everything is namespaced under .mlpa-home so it can't leak into, or be
   clobbered by, the petsitter parent theme's global CSS.

   Signature: the broadcast "signal" from the logo — concentric arcs that
   radiate a lost pet's alert outward to the neighborhood.
   ========================================================================== */

.mlpa-home {
    /* Brand, evolved ------------------------------------------------------ */
    --green:        #7ab02f;
    --green-bright: #8fbf3e;
    --green-soft:   #eef6e1;
    --orange:       #e89145;
    --orange-deep:  #cc7a2b;
    --orange-soft:  #fdeede;
    --red:          #e0432a;
    --red-deep:     #c1351f;

    --ink:      #211d1a;   /* warm near-black text            */
    --charcoal: #241f1b;   /* hero / dark band background      */
    --muted:    #6c655e;   /* secondary text                   */
    --paper:    #ffffff;
    --paper-2:  #f8f6f2;   /* warm off-white alternating band  */
    --line:     #ece6dd;   /* warm hairline                    */

    --f-disp: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
    --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    --r-lg: 26px;
    --r-md: 18px;
    --r-sm: 12px;

    --shadow-sm: 0 2px 10px rgba(40, 30, 20, .06);
    --shadow-md: 0 14px 34px -18px rgba(40, 30, 20, .30);
    --shadow-lg: 0 40px 80px -40px rgba(30, 20, 12, .55);

    --wrap: 1180px;

    /* The petsitter parent theme sets html{font-size:62.5%} (a 10px root), which
       would shrink every em to 62.5%. Re-establish a real 16px base here and
       size everything below in em (relative to this base) so the scale is stable
       regardless of the parent's root. */
    font-size: 16px;
    font-family: var(--f-body);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

/* Local reset so parent-theme element rules don't bleed in ---------------- */
.mlpa-home *,
.mlpa-home *::before,
.mlpa-home *::after { box-sizing: border-box; }

.mlpa-home h1,
.mlpa-home h2,
.mlpa-home h3,
.mlpa-home h4 {
    font-family: var(--f-disp);
    margin: 0;
    color: inherit;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.mlpa-home p            { margin: 0; }
.mlpa-home ul,
.mlpa-home ol           { margin: 0; padding: 0; list-style: none; }
/* :where() keeps this reset at specificity 0,0,1 so any .mh-* component class
   (0,1,0) reliably wins its own link/button color without an !important war. */
:where(.mlpa-home) a    { color: inherit; text-decoration: none; }
.mlpa-home img          { display: block; max-width: 100%; height: auto; }
.mlpa-home blockquote   { margin: 0; }

.mlpa-home :focus-visible {
    outline: 3px solid var(--green-bright);
    outline-offset: 3px;
    border-radius: 4px;
}

.mlpa-wrap {
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: clamp(20px, 5vw, 44px);
}

/* Shared bits ------------------------------------------------------------- */
.mh-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55em;
    font-family: var(--f-body);
    font-weight: 700;
    font-size: .78em;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--orange-deep);
    margin: 0 0 .9em;
}
.mh-eyebrow::before {
    /* a small radiating "signal" dot */
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(122, 176, 47, .22), 0 0 0 9px rgba(122, 176, 47, .10);
}
.mh-eyebrow--ondark        { color: var(--green-bright); }
.mh-eyebrow--onred         { color: rgba(255,255,255,.85); }
.mh-eyebrow--onred::before { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.28), 0 0 0 9px rgba(255,255,255,.12); }

.mh-sec-title {
    font-size: clamp(1.85em, 3.4vw, 2.8em);
    font-weight: 900;
    letter-spacing: -0.02em;
}
.mh-sec-sub {
    color: var(--muted);
    font-size: 1.075em;
    max-width: 46ch;
    margin-top: .85em;
}

/* Buttons ----------------------------------------------------------------- */
.mh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6em;
    font-family: var(--f-disp);
    font-weight: 800;
    font-size: 1.02em;
    letter-spacing: .005em;
    line-height: 1;
    padding: 1.05em 1.7em;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
    will-change: transform;
}
.mh-btn i { font-size: .95em; }
.mh-btn--alert {
    color: #fff;
    background: linear-gradient(180deg, var(--red) 0%, var(--red-deep) 100%);
    box-shadow: 0 14px 26px -12px rgba(224, 67, 42, .8), inset 0 1px 0 rgba(255,255,255,.22);
}
.mh-btn--alert:hover { transform: translateY(-2px); box-shadow: 0 20px 32px -12px rgba(224, 67, 42, .9), inset 0 1px 0 rgba(255,255,255,.22); }
.mh-btn--ghost {
    color: #fff;
    border-color: rgba(255,255,255,.28);
    background: rgba(255,255,255,.04);
}
.mh-btn--ghost:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); transform: translateY(-2px); }
.mh-btn--light {
    color: var(--red-deep);
    background: #fff;
    box-shadow: 0 16px 30px -14px rgba(0,0,0,.5);
}
.mh-btn--light:hover { transform: translateY(-2px); }

/* ==========================================================================
   HERO
   ========================================================================== */
.mh-hero {
    position: relative;
    background:
        radial-gradient(120% 120% at 82% 8%, #332c25 0%, rgba(51,44,37,0) 55%),
        linear-gradient(160deg, #2b251f 0%, #201b17 60%, #1b1713 100%);
    color: #fff;
    overflow: clip;
    isolation: isolate;
}
/* radiating arcs behind the media, echoing the logo's broadcast mark */
.mh-hero__radar {
    position: absolute;
    top: 50%;
    right: -6%;
    translate: 0 -50%;
    width: min(760px, 62vw);
    aspect-ratio: 1;
    pointer-events: none;
    z-index: 0;
    opacity: .9;
}
.mh-hero__radar span {
    position: absolute;
    inset: 0;
    margin: auto;
    border-radius: 50%;
    border: 1.5px solid rgba(143, 191, 62, .30);
}
.mh-hero__radar span:nth-child(1) { width: 26%; height: 26%; border-color: rgba(143,191,62,.55); }
.mh-hero__radar span:nth-child(2) { width: 46%; height: 46%; border-color: rgba(143,191,62,.38); }
.mh-hero__radar span:nth-child(3) { width: 68%; height: 68%; border-color: rgba(143,191,62,.24); }
.mh-hero__radar span:nth-child(4) { width: 90%; height: 90%; border-color: rgba(232,145,69,.16); }
.mh-hero__radar::before {
    /* soft green glow core */
    content: "";
    position: absolute;
    inset: 32% 32%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(143,191,62,.28), rgba(143,191,62,0) 70%);
}
/* one pulsing ring */
.mh-hero__radar::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 26%;
    height: 26%;
    border-radius: 50%;
    border: 2px solid rgba(143, 191, 62, .5);
    animation: mh-pulse 3.4s ease-out infinite;
}
@keyframes mh-pulse {
    0%   { transform: scale(1);   opacity: .7; }
    70%  { transform: scale(3.4); opacity: 0;  }
    100% { transform: scale(3.4); opacity: 0;  }
}

.mh-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    padding-block: clamp(52px, 6.5vw, 92px);
}
.mh-hero__title {
    font-size: clamp(2.7em, 6.2vw, 4.6em);
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -0.035em;
}
.mh-hero__title em {
    font-style: normal;
    color: var(--green-bright);
    position: relative;
    white-space: nowrap;
}
.mh-hero__sub {
    margin-top: 1.35em;
    font-size: clamp(1.05em, 1.4vw, 1.24em);
    line-height: 1.55;
    color: rgba(255,255,255,.82);
    max-width: 44ch;
}
.mh-hero__sub .mh-hl {
    color: var(--green-bright);
    font-weight: 800;
    white-space: nowrap;
}
.mh-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: .85em;
    margin-top: 2em;
}
.mh-trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5em 1.4em;
    margin-top: 2.4em;
    padding-top: 1.5em;
    border-top: 1px solid rgba(255,255,255,.12);
    font-size: .92em;
    color: rgba(255,255,255,.62);
}
.mh-trust li { display: inline-flex; align-items: center; gap: .5em; }
.mh-trust strong { color: #fff; font-family: var(--f-disp); font-weight: 800; }
.mh-trust li::before {
    content: "";
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--green-bright);
}
.mh-trust li:first-child::before { display: none; }

/* hero media / video */
.mh-hero__media { position: relative; z-index: 1; }
.mh-video {
    position: relative;
    margin: 0;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.08);
    aspect-ratio: 16 / 11;
}
.mh-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mh-video__tag {
    position: absolute;
    left: 14px;
    top: 14px;              /* top-left, clear of the native control bar + play button */
    display: inline-flex;
    align-items: center;
    gap: .5em;
    background: rgba(20,16,12,.72);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: .82em;
    font-weight: 600;
    padding: .5em .85em;
    border-radius: 999px;
    pointer-events: none;
}
.mh-video__tag i { color: var(--green-bright); }

/* ==========================================================================
   RECENT LOST PETS
   ========================================================================== */
.mh-recent { background: var(--paper); padding-block: clamp(48px, 5.5vw, 78px); }

.mh-sec-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5em;
    flex-wrap: wrap;
    margin-bottom: 2.2em;
}
.mh-sec-head--center {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2.2em;
}
.mh-link {
    font-family: var(--f-disp);
    font-weight: 800;
    color: var(--green);
    display: inline-flex;
    align-items: center;
    gap: .5em;
    white-space: nowrap;
    transition: gap .18s ease, color .18s ease;
}
.mh-link:hover { gap: .8em; color: var(--orange-deep); }

.mh-pets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2em;
}
.mh-pet {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--paper);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.mh-pet:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #ddd4c7;
}
.mh-pet__photo {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--green-soft), var(--orange-soft));
    overflow: hidden;
}
.mh-pet__photo::after {
    /* paw fallback shown when the image is missing (FA4 is already loaded) */
    content: "\f1b0";
    font-family: FontAwesome;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 2.4em;
    color: rgba(122, 176, 47, .5);
    z-index: 0;
}
.mh-pet__photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
.mh-pet__badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    background: rgba(33, 29, 26, .78);
    backdrop-filter: blur(5px);
    color: #fff;
    font-size: .72em;
    font-weight: 600;
    letter-spacing: .01em;
    padding: .38em .7em;
    border-radius: 999px;
}
.mh-pet__badge i { color: var(--orange); margin-right: .35em; }
.mh-pet__body { padding: .9em 1em 1.1em; }
.mh-pet__name {
    font-size: 1.2em;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.mh-pet__loc {
    margin-top: .25em;
    color: var(--muted);
    font-size: .9em;
    display: flex;
    align-items: center;
    gap: .4em;
}
.mh-pet__loc i { color: var(--orange); }

/* ==========================================================================
   HOW IT WORKS  — the alert travels outward (real 01→04 sequence)
   ========================================================================== */
.mh-how { background: var(--paper-2); padding-block: clamp(48px, 5.5vw, 78px); border-block: 1px solid var(--line); }
.mh-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.4em;
}
.mh-step {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 1.7em 1.5em 1.8em;
    box-shadow: var(--shadow-sm);
}
/* signal connector between steps (desktop) */
.mh-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 3.05em;
    right: -1.4em;
    width: 1.4em;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--green) 0 6px, transparent 6px 11px);
    z-index: 1;
}
.mh-step__num {
    font-family: var(--f-disp);
    font-weight: 900;
    font-size: .95em;
    color: var(--green);
    letter-spacing: .05em;
}
.mh-step__ic {
    margin: 1em 0 1.1em;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 1.35em;
}
.mh-step:nth-child(2) .mh-step__ic { background: var(--orange-soft); color: var(--orange-deep); }
.mh-step:nth-child(3) .mh-step__ic { background: #e9f0fb; color: #3b6ec2; }
.mh-step:nth-child(4) .mh-step__ic { background: #fde7e3; color: var(--red); }
.mh-step h3 { font-size: 1.22em; font-weight: 800; }
.mh-step p  { margin-top: .5em; color: var(--muted); font-size: .96em; }

/* ==========================================================================
   REACH — one alert, every channel
   ========================================================================== */
.mh-reach { background: var(--paper); padding-block: clamp(48px, 5.5vw, 78px); }
.mh-channels {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2em;
}
.mh-channel {
    text-align: left;
    padding: 1.9em 1.7em 2em;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--paper);
    transition: transform .2s ease, box-shadow .2s ease;
}
.mh-channel:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.mh-channel__ic {
    width: 54px; height: 54px;
    display: grid; place-items: center;
    border-radius: 15px;
    font-size: 1.45em;
    margin-bottom: 1.1em;
    background: var(--green-soft);
    color: var(--green);
}
.mh-channel:nth-child(2) .mh-channel__ic { background: var(--orange-soft); color: var(--orange-deep); }
.mh-channel:nth-child(3) .mh-channel__ic { background: #e9f0fb; color: #3b6ec2; }
.mh-channel:nth-child(4) .mh-channel__ic { background: #fde7e3; color: var(--red); }
.mh-channel h3 { font-size: 1.1em; font-weight: 800; }
.mh-channel p  { margin-top: .4em; color: var(--muted); font-size: .92em; }

/* ==========================================================================
   HAPPY ENDINGS — real found-pet testimonials
   ========================================================================== */
.mh-endings { background: var(--paper-2); padding-block: clamp(48px, 5.5vw, 78px); border-top: 1px solid var(--line); }
.mh-testis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: start;   /* natural card heights — no stretched gaps */
    gap: 1.4em;
}
.mh-testi {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 1.6em 1.6em 1.4em;
    box-shadow: var(--shadow-sm);
}
.mh-testi__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1em;
}
.mh-testi__date { font-family: var(--f-disp); font-weight: 800; color: var(--muted); font-size: .92em; }
.mh-chip {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    background: var(--green-soft);
    color: var(--green);
    font-weight: 700;
    font-size: .74em;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .35em .7em;
    border-radius: 999px;
}
.mh-testi blockquote {
    font-size: 1.02em;
    line-height: 1.55;
    color: var(--ink);
    /* Cap long reunion notes so cards stay comparable in height. */
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mh-testi blockquote::before { content: "\201C"; color: var(--orange); font-family: var(--f-disp); font-weight: 900; }
.mh-testi__by {
    display: flex;
    align-items: center;
    gap: .8em;
    margin-top: 1.3em;
    padding-top: 1.1em;
    border-top: 1px solid var(--line);
}
.mh-avatar {
    position: relative;
    width: 46px; height: 46px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--green-soft), var(--orange-soft));
}
.mh-avatar::after {
    content: "\f1b0";
    font-family: FontAwesome;
    position: absolute; inset: 0;
    display: grid; place-items: center;
    color: rgba(122,176,47,.55);
    font-size: 1.05em;
}
.mh-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.mh-testi__by strong { font-family: var(--f-disp); font-weight: 800; display: block; font-size: .98em; }
.mh-testi__by small  { color: var(--muted); font-size: .82em; }

/* ==========================================================================
   FINAL CTA
   ========================================================================== */
.mh-cta {
    position: relative;
    overflow: clip;
    isolation: isolate;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 70%, #a82c19 100%);
    color: #fff;
    text-align: center;
    padding-block: clamp(56px, 8vw, 92px);
}
.mh-cta::before {
    /* faint radiating arcs, tying back to the hero */
    content: "";
    position: absolute;
    inset: -40% -10% auto auto;
    width: 60vw; height: 60vw;
    background:
        radial-gradient(circle, transparent 0 30%, rgba(255,255,255,.08) 30% 31%, transparent 31%),
        radial-gradient(circle, transparent 0 46%, rgba(255,255,255,.06) 46% 47%, transparent 47%),
        radial-gradient(circle, transparent 0 62%, rgba(255,255,255,.05) 62% 63%, transparent 63%);
    z-index: -1;
}
.mh-cta__title {
    font-size: clamp(1.9em, 4vw, 3em);
    font-weight: 900;
    letter-spacing: -0.02em;
    max-width: 18ch;
    margin-inline: auto;
}
.mh-cta__act {
    margin-top: 2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
}
.mh-cta__phone { font-size: 1em; color: rgba(255,255,255,.9); }
.mh-cta__phone a { font-weight: 800; font-family: var(--f-disp); border-bottom: 2px solid rgba(255,255,255,.5); }
.mh-cta__phone a:hover { border-color: #fff; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
    .mh-hero__inner { grid-template-columns: 1fr; }
    .mh-hero__media { order: -1; max-width: 520px; }
    .mh-hero__radar { right: -30%; opacity: .5; }
    .mh-pets     { grid-template-columns: repeat(2, 1fr); }
    .mh-steps    { grid-template-columns: repeat(2, 1fr); }
    .mh-step:nth-child(2)::after { display: none; }
    .mh-channels { grid-template-columns: repeat(2, 1fr); }
    .mh-testis   { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
    .mh-step::after { display: none !important; }
    .mh-pets     { grid-template-columns: 1fr 1fr; gap: .9em; }
    .mh-steps    { grid-template-columns: 1fr; }
    .mh-channels { grid-template-columns: 1fr; }
    .mh-testis   { grid-template-columns: 1fr; }
    .mh-sec-head { align-items: flex-start; }
}

/* ==========================================================================
   MOTION
   ========================================================================== */
.mh-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.mh-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .mlpa-home * { animation: none !important; transition: none !important; }
    .mh-reveal { opacity: 1; transform: none; }
    .mh-hero__radar::after { display: none; }
}
