/* Rust Busters homepage (loaded on the front page only).
   Builds on main.css tokens; every rule is scoped to hp- classes or body.home
   so no other page is affected. */

/* ---------- Header: narrow-phone fix (homepage only) ---------- */
@media (max-width: 359px) {
  body.home .site-header__logo img { width: 128px; }
  body.home .site-header__actions { gap: 4px; }
  body.home .site-header__actions .text-btn { padding: 0; width: 44px; justify-content: center; }
  body.home .site-header__actions .text-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (max-width: 359px) {
  body.home .action-bar { gap: 6px; padding-inline: 12px; }
  body.home .action-bar .btn { font-size: .75rem; padding: 0 6px; }
}

/* ---------- Header: small laptops (homepage only; the same crowding exists site-wide) ---------- */
@media (min-width: 1024px) and (max-width: 1199px) {
  body.home .site-header__bar { gap: 16px; }
  body.home .nav__link, body.home .nav__trigger { padding: 0 8px; white-space: nowrap; }
  body.home .header-text { display: none; }
}

/* ---------- Hero ---------- */
.hp-hero { background: var(--navy); color: var(--text-on-navy); position: relative; }
.hp-hero__grid {
  display: grid; gap: 40px;
  grid-template-areas: "copy" "work" "form";
  padding-block: clamp(28px, 4vw, 56px) clamp(40px, 5vw, 72px);
}
.hp-hero__copy { grid-area: copy; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hp-work { grid-area: work; min-width: 0; }
.hp-estimate { grid-area: form; min-width: 0; }

.hp-hero__geo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-head); font-weight: 500; font-size: 1rem; color: var(--orange-on-navy); line-height: 1.3;
}
.hp-hero__geo svg { width: 18px; height: 18px; flex: none; }
.hp-hero h1 {
  color: #fff; font-size: clamp(2.375rem, 1.6rem + 3.6vw, 4rem);
  line-height: 1.02; letter-spacing: -.02em; max-width: 13ch;
}
.hp-hero__sub { font-size: clamp(1.125rem, 1.06rem + .3vw, 1.3125rem); line-height: 1.55; color: #DADDE6; max-width: 38ch; }

.hp-hero__actions { display: flex; flex-direction: column; gap: 18px; margin-top: 6px; }
.hp-hero__main { width: 100%; min-height: 56px; font-size: 1rem; }
.hp-reach { display: flex; flex-direction: column; gap: 8px; }
.hp-reach__label { font-family: var(--f-head); font-weight: 500; font-size: .9375rem; color: var(--text-on-navy); }
.hp-reach__label a { color: #fff; font-weight: 600; text-decoration: none; margin-left: 4px; white-space: nowrap; }
.hp-reach__label a:hover { text-decoration: underline; }
.hp-reach__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hp-reach__btns .btn { min-height: 52px; padding: 0 12px; text-transform: none; letter-spacing: 0; font-size: 1rem; font-weight: 600; }
.hp-reach__btns .btn svg { color: var(--orange-on-navy); }
.hp-reach__alt { font-size: .9375rem; color: var(--text-on-navy); }
.hp-reach__alt a { color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.hp-reach__alt a:hover { text-decoration: underline; }

.hp-trust { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--line-navy); }
.hp-trust li { display: flex; align-items: center; gap: 10px; font-family: var(--f-head); font-weight: 500; font-size: .9375rem; line-height: 1.25; color: #fff; }
.hp-trust svg { width: 20px; height: 20px; flex: none; color: var(--orange-on-navy); }

@media (min-width: 560px) {
  .hp-hero__actions { flex-direction: row; flex-wrap: wrap; align-items: flex-start; column-gap: 24px; }
  .hp-hero__main { width: auto; padding: 0 30px; }
  .hp-reach { flex: 1 1 280px; }
}

/* ---------- Before / after slider ---------- */
.hp-work { display: flex; flex-direction: column; gap: 16px; }
.hp-work__head { display: flex; flex-direction: column; gap: 6px; }
.hp-work__head h2 { color: #fff; font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }
.hp-work__head p { font-size: 1rem; color: var(--text-on-navy); }

.hp-work__picker { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--navy-2); border-radius: var(--r-m); align-self: flex-start; width: 100%; max-width: 480px; }
.hp-work__picker button {
  min-width: 0; min-height: 44px; padding: 0 8px; border: 0; border-radius: 6px; cursor: pointer; line-height: 1.15;
  background: transparent; color: var(--text-on-navy); font-family: var(--f-head); font-weight: 500; font-size: .9375rem;
}
.hp-work__picker button:hover { color: #fff; }
.hp-work__picker button[aria-pressed="true"] { background: #fff; color: var(--navy); }

.hp-ba { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.hp-ba__frame {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--navy-2);
  border-radius: var(--r-l); box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
@media (max-width: 559px) {
  .hp-ba__frame { margin-inline: calc(var(--gutter) * -1); border-radius: 0; box-shadow: none; }
}
.hp-ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; transition: opacity .25s; }
.hp-ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.hp-ba.is-loading .hp-ba__img { opacity: .55; }

.hp-ba__tag {
  position: absolute; top: 14px; padding: 7px 11px; border-radius: 4px; line-height: 1;
  font-family: var(--f-head); font-weight: 600; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  transition: opacity .2s; pointer-events: none;
}
.hp-ba__tag--before { left: 14px; background: var(--navy); color: #fff; }
.hp-ba__tag--after { right: 14px; background: var(--orange); color: var(--navy); }
.hp-ba[data-edge="before"] .hp-ba__tag--after, .hp-ba[data-edge="after"] .hp-ba__tag--before { opacity: 0; }

/* Without JavaScript: a fixed 50/50 split with a plain divider */
.hp-ba__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.hp-ba__grip { display: none; }
.hp-ba.is-ready .hp-ba__frame { cursor: ew-resize; }
.hp-ba.is-ready .hp-ba__grip {
  display: grid; place-items: center; position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px;
  border-radius: 50%; background: #fff; color: var(--navy); box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  transition: transform .15s;
}
.hp-ba__grip svg { width: 24px; height: 24px; }
.hp-ba.is-dragging .hp-ba__grip { transform: scale(1.08); }
.hp-ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.hp-ba__range:focus-visible ~ .hp-ba__handle .hp-ba__grip { outline: 3px solid var(--orange); outline-offset: 3px; }

.hp-ba__facts { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .9375rem; color: var(--text-on-navy); }
.hp-ba__facts b { font-family: var(--f-head); font-weight: 600; color: #fff; margin-right: 4px; }

.hp-work__foot { display: flex; flex-direction: column; gap: 16px; margin-top: 4px; }
.hp-quote { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: baseline; padding: 16px 18px; background: var(--navy-2); border-radius: var(--r-m); }
.hp-quote .stars { grid-row: span 2; font-size: .9375rem; letter-spacing: 1px; }
.hp-quote blockquote { margin: 0; }
.hp-quote p { color: #fff; font-size: 1rem; line-height: 1.5; }
.hp-quote figcaption { font-size: .875rem; color: var(--text-on-navy); }
.hp-quote figcaption b { color: #fff; font-family: var(--f-head); font-weight: 600; margin-right: 4px; }
.hp-work__more { color: #fff; align-self: flex-start; }
.hp-work__more:hover { color: var(--orange-on-navy); }
@media (max-width: 479px) { .hp-quote { grid-template-columns: 1fr; } .hp-quote .stars { grid-row: auto; } }

/* ---------- Estimate card ---------- */
.hp-estimate { scroll-margin-top: calc(var(--header-h) + 12px); }
.hp-estimate > p { margin-top: -6px; }
.hp-next { border-top: 1px solid var(--line); padding-top: 16px; }
.hp-next h3 { font-size: 1rem; margin-bottom: 10px; }
.hp-next ol { list-style: none; counter-reset: n; display: flex; flex-direction: column; gap: 10px; }
.hp-next li { counter-increment: n; display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: .9375rem; line-height: 1.45; color: var(--body); }
.hp-next li::before {
  content: counter(n); width: 24px; height: 24px; border-radius: 50%; background: var(--light); color: var(--navy);
  display: grid; place-items: center; font-family: var(--f-head); font-weight: 600; font-size: .8125rem;
}

/* ---------- Desktop hero layout ---------- */
@media (min-width: 1024px) {
  .hp-hero__grid {
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-areas: "copy form" "work form";
    grid-template-rows: auto 1fr;
    column-gap: clamp(40px, 5vw, 72px); row-gap: 48px;
  }
  .hp-estimate { align-self: start; }
  .hp-hero__copy { gap: 20px; }
  .hp-trust { grid-template-columns: repeat(4, auto); justify-content: start; column-gap: 28px; }
  .hp-work__foot { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
  .hp-quote { flex: 1; }
  .hp-work__more { align-self: center; flex: none; }
}
@media (min-width: 1024px) and (min-height: 860px) {
  .hp-estimate { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ---------- Services ---------- */
.hp-services__head { display: grid; gap: 20px; margin-bottom: clamp(28px, 3vw, 44px); }
.hp-services__head > div { display: flex; flex-direction: column; gap: 16px; }
.hp-services__head h2 { max-width: 20ch; }
.hp-services__intro { font-size: 1rem; }
.hp-services__intro .text-link { margin-left: 4px; }
@media (min-width: 960px) { .hp-services__head { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 64px; align-items: end; } }

.hp-svc { display: grid; gap: 24px; }
@media (min-width: 900px) { .hp-svc { grid-template-columns: 1fr 1fr; } }
.hp-svc__panel { --accent: var(--orange); --accent-text: var(--orange-text); position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.hp-svc__panel--prevention { --accent: var(--blue); --accent-text: var(--blue); }
.hp-svc__media { aspect-ratio: 16 / 10; background: var(--light); border-bottom: 4px solid var(--accent); }
.hp-svc__media img { width: 100%; height: 100%; object-fit: cover; }
.hp-svc__body { padding: clamp(20px, 2.5vw, 32px); display: flex; flex-direction: column; gap: 14px; flex: 1; }
.hp-svc__fixes { font-family: var(--f-head); font-weight: 600; font-size: .9375rem; color: var(--accent-text); }
.hp-svc__body h3 { font-size: clamp(1.375rem, 1.2rem + .7vw, 1.75rem); margin-top: -6px; }
.hp-svc__body h3 a { color: var(--navy); text-decoration: none; }
.hp-svc__body h3 a:hover { color: var(--accent-text); }
.hp-svc__body > p { font-size: 1rem; }
.hp-svc__facts { margin: 4px 0 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.hp-svc__facts div { display: grid; gap: 2px 20px; padding-block: 12px; border-bottom: 1px solid var(--line); }
@media (min-width: 560px) { .hp-svc__facts div { grid-template-columns: 150px 1fr; } }
.hp-svc__facts dt { font-family: var(--f-head); font-weight: 600; font-size: .9375rem; color: var(--navy); }
.hp-svc__facts dd { margin: 0; font-size: .9375rem; }
.hp-svc__body .text-link { margin-top: auto; padding-top: 6px; color: var(--accent-text); }

.hp-both { margin-top: 24px; }

/* "Not sure where to start?" chooser: native radios, works without JavaScript */
.hp-needs { margin: 40px 0 0; padding: 0; border: 0; min-width: 0; }
.hp-needs legend { padding: 0; font-family: var(--f-head); font-weight: 700; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); color: var(--navy); line-height: 1.25; }
.hp-needs__hint { margin-top: 6px; font-size: 1rem; }
.hp-needs__options { display: grid; gap: 10px; margin-top: 16px; }
@media (min-width: 700px) { .hp-needs__options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .hp-needs__options { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hp-needs input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.hp-needs label {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 16px; cursor: pointer;
  border: 1px solid #C9CCD3; border-radius: var(--r-m); background: #fff;
  font-family: var(--f-head); font-weight: 500; font-size: 1rem; color: var(--navy); line-height: 1.3;
}
.hp-needs label::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid #9AA0AC; background: #fff; }
.hp-needs label:hover { border-color: var(--navy); }
.hp-needs input:checked + label { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.hp-needs input:checked + label::before { border-color: var(--navy); background: radial-gradient(circle, var(--navy) 0 4px, #fff 5px); }
.hp-needs input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 2px; }
.hp-needs__answer { display: none; grid-column: 1 / -1; background: var(--light); border-radius: var(--r-m); padding: 18px 20px; flex-direction: column; gap: 14px; }
.hp-needs__answer p { font-size: 1rem; max-width: 72ch; }
.hp-needs__answer b { color: var(--navy); font-family: var(--f-head); font-weight: 600; }
.hp-needs__links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
#need-remove:checked ~ [data-need="remove"],
#need-prevent:checked ~ [data-need="prevent"],
#need-both:checked ~ [data-need="both"],
#need-hoa:checked ~ [data-need="hoa"] { display: flex; }

.hp-more { margin-top: 32px; }
@media (min-width: 1100px) { .hp-more { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Process ---------- */
.hp-steps { list-style: none; counter-reset: s; display: grid; gap: 0; }
.hp-steps li { counter-increment: s; position: relative; display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; row-gap: 4px; padding-bottom: 28px; }
.hp-steps li::before {
  content: counter(s); grid-row: span 2; width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: #fff; display: grid; place-items: center;
  font-family: var(--f-head); font-weight: 600; font-size: 1rem; position: relative; z-index: 1;
}
.hp-steps li::after { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: #D7DAE0; }
.hp-steps li:last-child { padding-bottom: 0; }
.hp-steps li:last-child::after { display: none; }
.hp-steps li:last-child::before { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.hp-steps h3 { font-size: 1.125rem; line-height: 1.3; padding-top: 8px; }
.hp-steps p { font-size: 1rem; }
.hp-steps__opt {
  display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 3px 8px; border-radius: 4px;
  background: #fff; border: 1px solid #C9CCD3; color: var(--muted);
  font-family: var(--f-head); font-weight: 500; font-size: .75rem; line-height: 1.2;
}
@media (min-width: 1024px) {
  .hp-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 24px; }
  .hp-steps li { grid-template-columns: 1fr; padding-bottom: 0; row-gap: 10px; }
  .hp-steps li::before { grid-row: auto; }
  .hp-steps li::after { left: 48px; right: -20px; top: 19px; bottom: auto; width: auto; height: 2px; }
  .hp-steps h3 { padding-top: 6px; }
}

/* ---------- More before and after (gallery) ---------- */
.hp-pairs { list-style: none; display: grid; gap: 28px 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .hp-pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .hp-pairs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hp-pair figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hp-pair__imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: var(--navy); border-radius: var(--r-l); overflow: hidden; }
.hp-pair__img { position: relative; aspect-ratio: 3 / 4; background: #E3E5EA; }
.hp-pair__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hp-pair__tag {
  position: absolute; top: 10px; left: 10px; padding: 6px 9px; border-radius: 4px; line-height: 1;
  font-family: var(--f-head); font-weight: 600; font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase;
  background: var(--navy); color: #fff;
}
.hp-pair__tag--after { background: var(--orange); color: var(--navy); }
.hp-pair figcaption { font-size: .9375rem; color: var(--body); }
.hp-pair figcaption b { font-family: var(--f-head); font-weight: 600; color: var(--navy); margin-right: 6px; }
.hp-pair--cta { background: var(--navy); color: var(--text-on-navy); border-radius: var(--r-l); padding: clamp(24px, 3vw, 32px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; }
.hp-pair--cta h3 { color: #fff; font-size: clamp(1.375rem, 1.2rem + .7vw, 1.75rem); }
.hp-pair--cta p { font-size: 1rem; }

/* ---------- Final CTA: no eyebrow on the homepage ---------- */
body.home .cta-band__inner { gap: 18px; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hp-ba__img, .hp-ba__tag, .hp-ba__grip { transition: none; }
}
