/* Homepage (Pages/Index.cshtml) — approved design. Classes are prefixed hm-. */

:root {
    --hm-blue: #0a63c9;
    --hm-blue-dark: #084fa3;
    --hm-navy: #0b2a5b;
    --hm-text: #1f2937;
    --hm-tint: #e8f3fc;
}

.hm-wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.hm-hero h1, .hm-water-type h2, .hm-trust h2, .hm-easy h2, .hm-closing h2 { color: var(--hm-navy); }
.hm-water-type h2, .hm-trust h2, .hm-easy h2, .hm-closing h2,
.hm-type-body h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 700; }

.hm-sub { color: var(--hm-text); margin: 6px 0 0; font-size: 16px; }

/* ---------- buttons ---------- */
.hm-btn, .hm-btn-light {
    display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
    font-weight: 700; border-radius: 999px; min-height: 44px; transition: background .2s ease;
}
.hm-btn { background: var(--hm-blue); color: #fff; padding: 14px 30px; font-size: 15px; letter-spacing: .02em; text-transform: uppercase; }
.hm-btn:hover { background: var(--hm-blue-dark); color: #fff; }
.hm-btn-sm { padding: 11px 24px; font-size: 13px; }
.hm-btn-light { background: #fff; color: var(--hm-navy); padding: 9px 20px; font-size: 14px; }
.hm-btn-light:hover { background: var(--hm-tint); color: var(--hm-navy); }
.hm-btn:focus-visible, .hm-btn-light:focus-visible, .hm-arrow:focus-visible, .hm-dot:focus-visible { outline: 3px solid #0a9fe6; outline-offset: 2px; }

/* ---------- hero ---------- */
.hm-hero { position: relative; min-height: 440px; overflow: hidden; background: #f4f8fc; display: flex; align-items: center; }
.hm-slides, .hm-slide { position: absolute; inset: 0; }
.hm-slide { opacity: 0; transition: opacity .8s ease; touch-action: pan-y; }
.hm-slide.is-active { opacity: 1; }
.hm-slide img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; display: block; }
/* white scrim so the text stays readable on any replacement photo */
.hm-slides::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.7) 38%, rgba(255,255,255,0) 68%); pointer-events: none; }

.hm-hero-copy { position: relative; z-index: 2; max-width: 1100px; width: 100%; margin: 0 auto; padding: 48px 20px 64px; }
.hm-hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.08; margin: 0 0 16px; font-weight: 800; letter-spacing: -.01em; }
.hm-hero-copy p { max-width: 380px; font-size: 18px; line-height: 1.45; color: #111827; margin: 0 0 24px; }

.hm-arrow { position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: var(--hm-navy); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.hm-arrow:hover { background: #fff; }
.hm-prev { left: 14px; } .hm-next { right: 14px; }

.hm-dots { position: absolute; z-index: 3; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 2px; }
.hm-dot { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.hm-dot::after { content: ""; position: absolute; left: 7px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: rgba(11,42,91,.35); }
.hm-dot.is-active::after { background: var(--hm-blue); }

/* ---------- water type ---------- */
.hm-water-type { background: var(--hm-tint); padding: 36px 0 40px; text-align: center; }
.hm-water-type h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 0; }
.hm-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; } /* always side by side */
.hm-type-card { position: relative; border-radius: 12px; overflow: hidden; min-height: 260px; text-align: left; color: #fff; display: flex; align-items: flex-end; }
.hm-type-card img { object-position: 62% 0%; /* top-anchored: keeps the child's mouth and the hands in view */ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hm-type-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,30,60,0) 30%, rgba(8,30,60,.78) 100%); }
.hm-type-body { position: relative; z-index: 1; padding: 20px 22px; }
.hm-type-body h3 { margin: 0 0 6px; font-size: 28px; color: #fff; }
.hm-type-body p { margin: 0 0 14px; font-size: 15px; line-height: 1.4; color: #fff; }

/* Well Water: photo card like City Water, but "Coming Soon" with no button */
.hm-type-soon img { object-position: 65% 60%; }
.hm-type-soon .hm-type-body p { margin-bottom: 0; }
.hm-soon-badge { display: inline-block; background: var(--hm-tint); color: var(--hm-blue); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 5px 12px; margin-bottom: 12px; }

/* ---------- trust ---------- */
.hm-trust { background: #fff; padding: 36px 0; }
.hm-trust-inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; }
.hm-trust h2 { font-size: 28px; margin: 0 0 8px; }
.hm-trust-copy p { margin: 0; color: #4b5563; line-height: 1.55; }
.hm-trust-icons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.hm-trust-icons li { text-align: center; padding: 6px 10px; font-weight: 700; font-size: 14px; line-height: 1.3; color: var(--hm-navy); border-left: 1px solid #dfe6ee; }
.hm-trust-icons li:first-child { border-left: 0; }
.hm-trust-icons svg { display: block; width: 44px; height: 44px; margin: 0 auto 8px; }
.hm-trust svg, .hm-easy svg { fill: none; stroke: var(--hm-blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- why test (swipe) ---------- */
.hm-why { background: var(--hm-tint); padding: 36px 0 40px; text-align: center; }
.hm-why h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 0; color: var(--hm-navy); font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.hm-swipe { margin-top: 24px; }
.hm-swipe-track { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.hm-swipe-track::-webkit-scrollbar { display: none; }
.hm-swipe-track:focus-visible { outline: 3px solid #0a9fe6; outline-offset: 4px; }
.hm-why-card { flex: 0 0 calc((100% - 48px) / 4); scroll-snap-align: start; background: #fff; border: 1px solid #c9dcee; border-top: 3px solid var(--hm-blue); border-radius: 10px; padding: 22px 20px; text-align: left; }
.hm-why-card h3 { margin: 0 0 8px; font-size: 17px; color: var(--hm-navy); line-height: 1.25; }
.hm-why-card p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--hm-text); }
.hm-swipe-dots { display: none; justify-content: center; gap: 2px; margin-top: 14px; }
.hm-swipe.is-scrollable .hm-swipe-dots { display: flex; }
.hm-swipe-dots button { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.hm-swipe-dots button::after { content: ""; position: absolute; left: 7px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: rgba(11,42,91,.28); }
.hm-swipe-dots button.is-active::after { background: var(--hm-blue); }

/* ---------- testing is easy ---------- */
/* photo on the left (swap images/home/water-testing-*.webp), steps on the right */
.hm-easy { position: relative; background: #fbfaf8; display: grid; grid-template-columns: 40% 1fr; align-items: center; min-height: 340px; }
.hm-easy-media { position: absolute; inset: 0 auto 0 0; width: 40%; display: block; overflow: hidden; background: #dfe9f2; }
.hm-easy-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.hm-easy-body { position: relative; grid-column: 2; padding: 28px 28px 32px; text-align: center; }
.hm-easy h2 { font-size: 28px; margin: 0; }
.hm-steps { list-style: none; margin: 22px 0 22px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hm-steps li { padding: 0 8px; }
.hm-step-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--hm-tint); display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.hm-step-icon svg { width: 30px; height: 30px; }
.hm-steps h3 { font-size: 15px; margin: 0 0 4px; color: var(--hm-navy); }
.hm-steps p { font-size: 13px; line-height: 1.4; color: #4b5563; margin: 0; }

/* ---------- closing ---------- */
.hm-closing { position: relative; min-height: 190px; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; background: var(--hm-tint); }
.hm-closing img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 52%; }
.hm-closing::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.62) 0%, rgba(255,255,255,.5) 60%, rgba(255,255,255,.3) 100%); z-index: 1; }
.hm-closing-copy { position: relative; z-index: 2; padding: 28px 20px; }
.hm-closing h2 { font-size: 28px; margin: 0 0 4px; }
.hm-closing p { margin: 0 0 14px; color: var(--hm-navy); font-weight: 600; }
.hm-closing h2, .hm-closing p { text-shadow: 0 0 3px #fff, 0 0 8px rgba(255,255,255,.95), 0 0 16px rgba(255,255,255,.85); }

/* ---------- tablet ---------- */
@media (max-width: 1000px) { .hm-why-card { flex-basis: calc((100% - 16px) / 2.2); } }
@media (max-width: 900px) {
    .hm-trust-inner { grid-template-columns: 1fr; }
    /* photo on the left, heading on the right, steps underneath */
    .hm-easy { grid-template-columns: 1fr; min-height: 0; }
    .hm-easy-media { inset: 0 auto auto 0; width: 38%; height: 47vw; }
    .hm-easy-body { grid-column: 1; padding: 0 14px 28px; }
    .hm-easy-head { min-height: 47vw; box-sizing: border-box; padding: 12px 0 12px 42%; text-align: left; display: flex; flex-direction: column; justify-content: center; }
    .hm-easy-head .hm-sub { margin-top: 6px; font-size: 13px; line-height: 1.4; }
    .hm-easy h2 { font-size: clamp(20px, 5.6vw, 30px); line-height: 1.15; }
    .hm-easy-body > .hm-btn { margin-top: 4px; }
}

/* ---------- mobile ---------- */
@media (max-width: 760px) {
    .hm-why { padding: 22px 0 24px; }
    .hm-why h2 { font-size: 21px; }
    .hm-swipe { margin-top: 16px; }
    .hm-swipe-track { gap: 10px; margin: 0 -14px; padding: 0 14px; scroll-padding-left: 14px; }
    .hm-why-card { flex-basis: 78%; padding: 18px 16px; }
    .hm-why-card h3 { font-size: 16px; }
    .hm-why-card p { font-size: 14px; }
    .hm-type-soon .hm-type-body { padding: 14px 12px; }
    .hm-type-soon .hm-type-body p { font-size: 12px; }
    .hm-soon-badge { font-size: 10.5px; padding: 4px 9px; margin-bottom: 8px; }
    .hm-hero { min-height: 300px; align-items: flex-start; }
    .hm-slide img { object-position: 78% center; }
    .hm-slides::after { background: linear-gradient(90deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.55) 55%, rgba(255,255,255,0) 90%); }
    .hm-hero-copy { padding: 22px 20px 40px; }
    .hm-hero h1 { font-size: 30px; margin-bottom: 10px; }
    .hm-hero-copy p { font-size: 14px; max-width: 260px; margin-bottom: 14px; }
    .hm-hero .hm-btn { padding: 10px 22px; font-size: 13px; min-height: 40px; }
    .hm-dots { bottom: 6px; }
    .hm-arrow { display: none; } /* swipe + dots on touch */

    .hm-water-type { padding: 20px 0 22px; }
    .hm-water-type h2 { font-size: 21px; }
    .hm-sub { font-size: 14px; }
    .hm-type-grid { margin-top: 16px; }
    .hm-wrap { padding: 0 14px; }
    .hm-type-grid { gap: 10px; }
    .hm-type-card { min-height: 225px; }
    /* the phone card shows only about half the photo's width: anchor it toward the right so the child's face is in it */
    .hm-type-card img { object-position: 88% 0%; }
    .hm-type-soon img { object-position: 72% 60%; }
    .hm-type-body { padding: 12px 12px 14px; }
    .hm-type-body h3 { font-size: 18px; margin-bottom: 4px; }
    .hm-type-body p { font-size: 12px; line-height: 1.3; margin-bottom: 8px; }
    .hm-btn-light { padding: 8px 12px; font-size: 12.5px; gap: 6px; }

    .hm-trust { padding: 24px 0; }
    .hm-trust h2 { font-size: 21px; }
    .hm-trust-copy p { font-size: 13.5px; line-height: 1.5; }
    .hm-trust-inner { gap: 20px; }
    .hm-trust-icons li { font-size: 11.5px; padding: 4px 2px; line-height: 1.3; }
    .hm-trust-icons li span { display: block; min-height: 2.6em; }
    .hm-trust-icons svg { width: 36px; height: 36px; }
    .hm-steps { gap: 4px; }
    .hm-steps li { padding: 0 2px; }
    .hm-step-icon { width: 52px; height: 52px; }
    .hm-step-icon svg { width: 24px; height: 24px; }
    .hm-steps h3 { font-size: 13px; }
    .hm-steps p { font-size: 12px; }
    .hm-closing h2 { font-size: 22px; }
    /* phone: keep the lake and green treeline visible; the text stays readable through a soft white glow
       behind the letters (a light overlay alone would leave it hard to read over the trees) */
    .hm-closing::before { background: linear-gradient(180deg, rgba(255,255,255,.62) 0%, rgba(255,255,255,.5) 60%, rgba(255,255,255,.3) 100%); }
    .hm-closing h2, .hm-closing p { text-shadow: 0 0 3px #fff, 0 0 8px rgba(255,255,255,.95), 0 0 16px rgba(255,255,255,.85); }
    .hm-closing p { color: var(--hm-navy); font-weight: 600; }
}

@media (prefers-reduced-motion: reduce) { .hm-slide { transition: none; } }
