/* The homepage hero and its system check. Home page only, so it lives apart from
   styles.css and the other twenty-odd pages do not pay for it. triage.js writes
   the steps; everything here is the look. */

.hero-triage {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 44px 0 150px;
  background: linear-gradient(175deg, #0a1f33 0%, var(--navy) 40%, var(--navy-2) 78%, #245a8c 100%);
}

/* The sky reacts to the answer: warm for heat, ice for cooling, red for danger.
   Three stacked layers cross-fading, because a gradient itself cannot transition. */
.hero-sky { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.hero-sky i { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.hero-sky .sky-heat { background: radial-gradient(90% 75% at 30% 100%, rgba(242, 118, 46, .62), transparent 70%); }
.hero-sky .sky-cool { background: radial-gradient(90% 75% at 30% 100%, rgba(115, 205, 255, .55), transparent 70%); }
.hero-sky .sky-danger { background: radial-gradient(100% 90% at 50% 100%, rgba(214, 48, 38, .6), transparent 72%); }
.hero-triage[data-mood="heat"] .sky-heat,
.hero-triage[data-mood="cool"] .sky-cool,
.hero-triage[data-mood="danger"] .sky-danger { opacity: 1; }

.hero-stars {
  position: absolute; top: 0; left: 0; right: 0; height: 60%; z-index: -2; pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 8% 22%, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1px 1px at 18% 58%, rgba(255, 255, 255, .5), transparent),
    radial-gradient(1.4px 1.4px at 31% 12%, rgba(255, 255, 255, .6), transparent),
    radial-gradient(1px 1px at 44% 40%, rgba(255, 255, 255, .45), transparent),
    radial-gradient(1.5px 1.5px at 57% 16%, rgba(255, 255, 255, .6), transparent),
    radial-gradient(1px 1px at 72% 30%, rgba(255, 255, 255, .45), transparent),
    radial-gradient(1.4px 1.4px at 88% 12%, rgba(255, 255, 255, .6), transparent),
    radial-gradient(1px 1px at 95% 46%, rgba(255, 255, 255, .4), transparent);
}

/* The ridge is the same navy as the trust bar, so the mountains run straight into
   it. Sliced rather than stretched, so the peaks keep their shape on a phone. */
.hero-ridge {
  position: absolute; left: 0; right: 0; bottom: -1px; z-index: -1;
  width: 100%; height: 170px; display: block; pointer-events: none;
}
.hero-star {
  position: absolute; left: calc(50% - 150px); bottom: 142px; width: 34px; height: 34px; z-index: -1;
  filter: drop-shadow(0 0 10px rgba(242, 118, 46, .9));
  animation: star-glow 4.5s ease-in-out infinite;
}
@keyframes star-glow {
  50% { filter: drop-shadow(0 0 20px rgba(255, 170, 110, 1)); transform: scale(1.12); }
}

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 44px; align-items: start;
}
.hero-triage h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); max-width: 16ch; }
.hero-triage .sub { max-width: 40ch; margin-bottom: 22px; }
.hero-copy { padding-top: 22px; position: sticky; top: 76px; }

/* The card */
.triage {
  background: #fff; color: var(--ink); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(4, 16, 28, .5);
  padding: 16px 22px 18px; scroll-margin-top: 76px;
}
.tri-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 30px; margin-bottom: 8px;
}
.tri-step {
  font-size: .85rem; font-weight: 700;
  color: var(--orange-text);
}
.tri-back {
  border: 0; background: none; font: inherit; font-size: .88rem; font-weight: 700;
  color: var(--muted); cursor: pointer; padding: 4px 6px; margin-right: -6px; border-radius: 6px;
}
.tri-back:hover { color: var(--navy); }
.tri-body.is-in { animation: tri-in .28s cubic-bezier(.2, .7, .3, 1); }
/* Movement only, never opacity: an interrupted fade would leave a blank card, and
   this card is how somebody with no heat reaches us. */
@keyframes tri-in { from { transform: translateY(8px); } }

.tri-title {
  font-family: var(--font-display); font-weight: 700; color: var(--navy);
  font-size: clamp(1.32rem, 2.6vw, 1.55rem); line-height: 1.18; margin: 0 0 6px; outline: none;
}
.tri-sub { color: var(--muted); font-size: .95rem; margin: 0 0 14px; text-wrap: pretty; }
.tri-body h3 { margin: 0 0 10px; }

/* Step 1 */
.tri-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tri-tile {
  display: flex; align-items: center; gap: 10px; min-height: 66px; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg);
  text-decoration: none; color: var(--navy); font-weight: 700; font-size: .96rem; line-height: 1.2;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.tri-tile svg { width: 26px; height: 26px; flex: none; }
.tri-tile:hover { border-color: var(--orange); background: #fff7f1; color: var(--navy); }
.tri-tile:active { transform: scale(.98); }
.tri-tile-wide { grid-column: 1 / -1; min-height: 54px; }
.tri-tile-danger { grid-column: 1 / -1; min-height: 46px; border-color: #f0c8c4; background: #fdf1f0; color: #9c1f16; font-size: .9rem; }
.tri-tile-danger:hover { border-color: #c5352a; background: #fbe6e4; color: #9c1f16; }
.tri-promise { font-size: .82rem; color: var(--muted); margin: 12px 0 0; text-align: center; }

/* Step 2 */
.tri-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tri-chip {
  font: inherit; font-size: .93rem; font-weight: 600; color: var(--navy); cursor: pointer;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 22px; padding: 9px 14px;
  transition: border-color .15s ease, background .15s ease;
}
.tri-chip:hover { border-color: var(--orange); background: #fff7f1; }
.tri-chip-other { background: none; border-style: dashed; color: var(--muted); }

/* Step 3 */
.tri-coverage {
  display: inline-block; font-size: .84rem; font-weight: 700; color: #1d6b3a;
  background: #e8f6ee; border-radius: 20px; padding: 4px 12px; margin: 0 0 10px;
}
.tri-coverage::before { content: "\2713\00a0"; }
.tri-coverage.is-maybe { color: #7a4a0a; background: #fdf3e0; border-radius: 10px; padding: 8px 12px; }
.tri-coverage.is-maybe::before { content: none; }

.tri-likely { font-size: .9rem; color: var(--ink); margin: 0 0 10px; text-wrap: pretty; }
.tri-checks { list-style: none; margin: 0 0 10px; }
.tri-checks li + li { margin-top: 6px; }
.tri-checks label {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 10px; font-size: .92rem; line-height: 1.35;
}
.tri-checks label:has(input:checked) { border-color: #57b27c; background: #f0faf4; }
.tri-checks input { width: 19px; height: 19px; margin-top: 1px; flex: none; accent-color: #2a8a52; }
.tri-checks strong { color: var(--navy); }
.tri-note { font-size: .88rem; color: var(--muted); margin: 0 0 12px; }
.tri-note a { color: #9c1f16; font-weight: 700; }
.tri-note a.tri-link { color: var(--navy-2); }

.tri-offer { margin: 0 0 14px; border-top: 1px solid var(--line); }
.tri-offer > div {
  display: grid; grid-template-columns: 92px 1fr; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.tri-offer dt { font-family: var(--font-display); font-weight: 700; color: var(--orange-text); font-size: .95rem; }
.tri-offer dd { font-size: .9rem; color: var(--ink); line-height: 1.4; }

.tri-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tri-actions .btn { flex: 1 1 170px; border-width: 0; cursor: pointer; font-family: inherit; }
.tri-actions .btn-ghost { border: 2px solid var(--navy); }

.tri-form { margin-top: 16px; padding-top: 14px; border-top: 1px dashed #c8d3de; }
.tri-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tri-form .field { margin-bottom: 10px; }
.tri-form .field label { font-size: .86rem; margin-bottom: 4px; }
.tri-submit { width: 100%; border: 0; cursor: pointer; font-family: inherit; }
.tri-submit:disabled { opacity: .7; cursor: default; }
.tri-form .form-legal { font-size: .72rem; line-height: 1.4; margin-top: 10px; }

.tri-kinds { border: 0; margin: 0 0 10px; }
.tri-kinds legend { font-weight: 700; font-size: .86rem; margin-bottom: 6px; }
.tri-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.tri-kinds legend { width: 100%; }
.tri-kinds label { cursor: pointer; }
.tri-kinds input { position: absolute; opacity: 0; }
.tri-kinds span {
  display: block; padding: 7px 14px; border: 1.5px solid var(--line); border-radius: 20px;
  font-size: .9rem; font-weight: 600; color: var(--navy);
}
.tri-kinds input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.tri-kinds input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }

.tri-danger { background: #fdf1f0; border: 1.5px solid #e9b1ab; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.tri-danger .tri-title { color: #9c1f16; }
.tri-danger ul { margin: 8px 0 0 18px; font-size: .93rem; }
.tri-danger li + li { margin-top: 6px; }
.tri-after { font-size: .9rem; color: var(--muted); margin: 12px 0 0; }

/* Service and city pages: same hero, longer headlines. */
.hero-landing h1 { font-size: clamp(1.7rem, 3.2vw, 2.35rem); max-width: 22ch; }
.hero-landing .sub { max-width: 46ch; }
.hero-triage .note { color: #d8e4ef; }
.hero-triage .note a { color: #fff; }

@media (max-width: 900px) {
  .hero-triage { padding: 22px 0 112px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hero-copy { padding-top: 0; position: static; }
  .hero-triage h1, .hero-landing h1 { font-size: clamp(1.5rem, 6vw, 2.2rem); max-width: none; }
  .hero-triage .sub { margin: 8px 0 0; font-size: .98rem; max-width: none; }
  .hero-ridge { height: 118px; }
  .hero-star { left: 18%; bottom: 96px; width: 26px; height: 26px; }
}
/* The fixed call bar already carries both buttons on a phone. Repeating them here
   would push the check below the fold. */
@media (max-width: 700px) {
  .hero-triage .hero-ctas { display: none; }
}
@media (max-width: 420px) {
  .triage { padding: 12px 15px 15px; }
  .tri-fields { grid-template-columns: 1fr; gap: 0; }
  .tri-offer > div { grid-template-columns: 80px 1fr; }
  .tri-tiles { gap: 8px; }
  .tri-tile { gap: 8px; min-height: 58px; padding: 8px 10px; font-size: .9rem; }
  .tri-tile svg { width: 22px; height: 22px; }
  .tri-tile-wide { min-height: 46px; }
  .tri-tile-danger { min-height: 42px; font-size: .86rem; }
}

/* Texting works on phones only, so the button stays out of the way on a desktop. */
.tri-actions .tri-text { flex-basis: 100%; border: 2px solid var(--navy); }
@media (hover: hover) and (pointer: fine) { .tri-text { display: none; } }

/* Pages with no Finder: the same sky and ridge, one column. */
.hero-solo h1 { max-width: 26ch; font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
.hero-solo .sub { max-width: 60ch; margin: 12px 0 22px; }
.hero-solo .hero-star { left: auto; right: 14%; bottom: 128px; }
@media (max-width: 900px) {
  .hero-solo h1 { max-width: none; }
  .hero-solo .sub { margin: 8px 0 16px; max-width: none; }
  .hero-solo .hero-star { right: 10%; bottom: 92px; }
}
/* These pages lean on their hero button, so it stays on a phone. */
@media (max-width: 700px) {
  .hero-triage.hero-solo .hero-ctas { display: flex; }
}

/* Callback page: a shorter hero, then the form. */
.hero-quote { padding-bottom: 120px; }
.hero-quote h1 { max-width: none; }
.quote-more { margin: 2px 0 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.quote-more summary { cursor: pointer; font-weight: 700; color: var(--navy-2); min-height: 28px; }
.quote-more[open] summary { margin-bottom: 14px; }
.next-steps { counter-reset: nx; list-style: none; margin: 14px 0; }
.next-steps li { counter-increment: nx; position: relative; padding: 0 0 14px 42px; color: var(--muted); }
.next-steps li::before {
  content: counter(nx); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; font-weight: 800; font-size: .9rem;
}
.next-steps strong { display: block; color: var(--ink); }
.done-call { font-weight: 600; margin: 0; }
.quote-thanks .quote-form-card { max-width: 620px; margin: 28px auto 0; }
/* The form is the point of this page, so on a phone the hero gets out of its way. */
@media (max-width: 900px) {
  .hero-quote { padding-bottom: 58px; }
  .hero-quote .hero-ridge { height: 62px; }
  .hero-quote .hero-star { display: none; }
  .hero-quote + .trustbar li:not(.tb-google) { display: none; }
}
