/*
  Home page (the demo page also uses its browser frame, buttons and timeline). Uses the tokens in tq.css.
  One loud thing: the live quote tool in the hero. Everything else is quiet paper, ink and rules.
  The fence-line yellow only appears where the product would draw a fence.
*/
.home { font-size: 17px; line-height: 1.6; }
.home .wrap { max-width: 1240px; }
.home .nav-links a { font-weight: 500; }

/* ---------- buttons on dark bands ---------- */
.btn-trace { background: var(--trace); color: var(--trace-ink); }
.btn-trace:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(255, 210, 74, 0.22); }
.btn-line-light { background: transparent; color: var(--aerial-ink); border-color: rgba(232, 239, 233, 0.38); }
.btn-line-light:hover { border-color: var(--aerial-ink); }
.btn-lg { padding: 15px 26px; font-size: 15.5px; }

/* ---------- hero: the headline across the page, then the live tool, big ---------- */
.h-hero { padding-block: clamp(36px, 5vw, 76px) clamp(56px, 7vw, 100px); }
.h-hero h1 { font-size: clamp(36px, 5vw, 68px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 700; font-stretch: 100%; max-width: 16em; }
.h-hero-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: end; margin-top: clamp(24px, 3vw, 40px); }
.h-hero-sub { margin: 0; font-size: clamp(17.5px, 1.45vw, 20px); line-height: 1.6; color: var(--muted); max-width: 36em; }
.h-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.h-hero-offer { margin: 18px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--ink); max-width: 30em; }
.h-hero-note { margin: 10px 0 0; font-size: 15px; color: var(--faint); max-width: 30em; }
@media (max-width: 960px) { .h-hero-row { grid-template-columns: minmax(0, 1fr); align-items: start; } }

.h-frame {
  margin-top: clamp(32px, 4.5vw, 64px); border-radius: 20px; overflow: hidden; background: var(--aerial);
  box-shadow: 0 40px 90px -36px rgba(16, 38, 29, 0.6), 0 0 0 1px rgba(16, 38, 29, 0.22);
}
.h-frame-bar { display: flex; align-items: center; gap: 12px; padding: 12px 18px; color: var(--aerial-muted); font-size: 13px; }
.h-frame-dots { display: flex; gap: 6px; flex: none; }
.h-frame-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(232, 239, 233, 0.22); }
.h-frame-url { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--aerial-ink); opacity: 0.82; }
.h-frame-live { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 8px; color: var(--trace); font-weight: 600; font-size: 12.5px; }
.h-frame-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--trace); box-shadow: 0 0 0 3px rgba(255, 210, 74, 0.22); }
.h-frame-foot { margin: 0; padding: 11px 18px 13px; font-size: 12.5px; color: var(--aerial-muted); }
.h-frame .tq, .h-frame .tq--full { border: 0; border-radius: 0; box-shadow: none; }

/* ---------- statement ---------- */
.h-statement { padding-block: clamp(56px, 7vw, 108px); border-top: 1px solid var(--line); }
.h-statement-big { margin: 0; max-width: 22em; font-size: clamp(28px, 3.5vw, 48px); line-height: 1.1; font-weight: 550; letter-spacing: -0.03em; text-wrap: balance; }
.h-statement-small { margin: 24px 0 0; max-width: 38em; font-size: 18.5px; color: var(--muted); }

/* ---------- sections ---------- */
.h-sec { padding-block: clamp(64px, 8vw, 124px); }
.h-sec--alt { background: var(--bg-alt); }
.h-head { max-width: 48em; margin-bottom: clamp(32px, 4.5vw, 60px); }
.h-head h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 650; }
.h-head p { margin: 18px 0 0; max-width: 38em; font-size: 18.5px; color: var(--muted); }

/* ---------- how homeowners use it (a real sequence) ---------- */
.h-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.h-steps > li { display: flex; flex-direction: column; padding: 22px 24px 4px 0; }
.h-steps > li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.h-step-n { font-weight: 700; font-size: 15px; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.h-steps h3 { margin: 6px 0 8px; font-size: 22px; line-height: 1.2; letter-spacing: -0.015em; }
.h-steps p { margin: 0; color: var(--muted); font-size: 16px; }
.h-fig { margin-top: auto; padding-top: 22px; }
.h-fig-box { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 12px; font-size: 13.5px; }
.h-fig-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 11px; color: var(--ink); }
.h-fig-search svg { width: 15px; height: 15px; flex: none; color: var(--faint); }
.h-fig-sugg { margin: 6px 0 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.h-fig-sugg li { padding: 8px 11px; color: var(--muted); }
.h-fig-sugg li:first-child { background: var(--accent-soft); color: var(--ink); }
.h-fig-sugg li + li { border-top: 1px solid var(--line); }
.h-fig-map { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--stage); }
.h-fig-map svg { display: block; width: 100%; height: 100%; }
.h-fig-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 2px; }
.h-fig-row + .h-fig-row { border-top: 1px solid var(--line); }
.h-fig-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.h-fig-field { display: block; border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 10px; color: var(--muted); }
.h-fig-field + .h-fig-field { margin-top: 6px; }
.h-fig-btn { display: block; margin-top: 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); text-align: center; padding: 8px 10px; font-weight: 700; }
.h-aside { display: flex; gap: 14px; align-items: flex-start; margin: clamp(32px, 4vw, 48px) 0 0; max-width: 46em; color: var(--muted); font-size: 16px; }
.h-aside svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--accent-text); }
.h-aside b { color: var(--ink); }

@media (max-width: 1080px) {
  .h-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-steps > li:nth-child(3) { padding-left: 0; border-left: 0; }
  .h-steps > li:nth-child(n + 3) { border-top: 1px solid var(--line); margin-top: 28px; }
}
@media (max-width: 620px) {
  .h-steps { grid-template-columns: minmax(0, 1fr); }
  .h-steps > li, .h-steps > li + li { padding: 22px 0 4px; border-left: 0; }
  .h-steps > li + li { border-top: 1px solid var(--line); margin-top: 24px; }
}

/* ---------- what lands in your inbox (the one dark band besides the closing call) ---------- */
.h-inbox { background: var(--aerial); color: var(--aerial-ink); }
.h-inbox .h-head h2 { color: var(--aerial-ink); }
.h-inbox .h-head p { color: var(--aerial-muted); }
.h-inbox-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.h-inbox .h-head { margin-bottom: 0; }
.h-points { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 20px; max-width: 30em; }
.h-points li { position: relative; padding-left: 40px; color: var(--aerial-muted); font-size: 16.5px; }
.h-points li b { display: block; color: var(--aerial-ink); font-size: 17.5px; margin-bottom: 2px; }
/* A short run of fence, as the product draws it: yellow line, posts at the ends */
.h-points li::before { content: ""; position: absolute; left: 0; top: 11px; width: 26px; height: 4px; border-radius: 2px; background: var(--trace); box-shadow: 0 0 0 1.5px rgba(8, 19, 14, 0.6); }
.h-points li::after { content: ""; position: absolute; left: 22px; top: 9px; width: 6px; height: 8px; border-radius: 1px; background: var(--aerial-ink); }

.h-mail { background: var(--card); color: var(--ink); border-radius: 16px; overflow: hidden; box-shadow: 0 34px 80px -30px rgba(0, 0, 0, 0.6); }
.h-mail-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--faint); }
.h-mail-tag { font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; }
.h-mail-subject { margin: 0; padding: 16px 20px 4px; font-size: 17px; line-height: 1.38; font-weight: 700; }
.h-mail-to { margin: 0; padding: 0 20px 14px; font-size: 13.5px; color: var(--faint); border-bottom: 1px solid var(--line); }
.h-mail-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 210px); gap: 22px; padding: 10px 20px 22px; }
.h-mail-rows { margin: 0; }
.h-mail-rows div { display: grid; grid-template-columns: 10.2em minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.h-mail-rows div:last-child { border-bottom: 0; }
.h-mail-rows dt { color: var(--faint); }
.h-mail-rows dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.h-mail-rows a { color: var(--accent-text); text-underline-offset: 3px; }
.h-mail-pic { margin: 12px 0 0; }
.h-mail-pic .h-fig-map { aspect-ratio: 4 / 3; }
.h-mail-pic figcaption { margin-top: 8px; font-size: 12.5px; color: var(--faint); }
@media (max-width: 1080px) { .h-inbox-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) {
  .h-mail-body { grid-template-columns: minmax(0, 1fr); }
  .h-mail-pic { order: -1; }
  .h-mail-rows div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ---------- set up for you (a real sequence, joined by a fence line) ---------- */
.h-timeline { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.h-timeline::before {
  content: ""; position: absolute; top: 19px; left: 21px; right: calc(25% - 42px); height: 4px; border-radius: 2px;
  background: var(--trace); box-shadow: 0 0 0 1.5px var(--ink);
}
.h-timeline li { position: relative; }
.h-timeline .n {
  position: relative; z-index: 1; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: 16px;
}
.h-timeline h3 { margin: 18px 0 8px; font-size: 21px; line-height: 1.2; letter-spacing: -0.015em; }
.h-timeline p { margin: 0; color: var(--muted); font-size: 16px; }
.h-after { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: clamp(36px, 4.5vw, 56px); }
.h-after div { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: var(--card); }
.h-after b { display: block; font-size: 17px; margin-bottom: 4px; }
.h-after span { color: var(--muted); font-size: 15.5px; }
@media (max-width: 1080px) {
  .h-timeline { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .h-timeline::before { top: 21px; bottom: 21px; left: 19px; right: auto; width: 4px; height: auto; }
  .h-timeline li { padding-left: 64px; }
  .h-timeline .n { position: absolute; left: 0; top: 0; }
  .h-timeline h3 { margin-top: 8px; }
}
@media (max-width: 620px) { .h-after { grid-template-columns: minmax(0, 1fr); } }

/* ---------- contact form vs TraceQuote ---------- */
.h-cmp { border-top: 2px solid var(--ink); }
.h-cmp-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 4fr); }
.h-cmp-row > * { padding: 18px 20px 18px 0; border-bottom: 1px solid var(--line); margin: 0; }
.h-cmp-row > :nth-child(3) { padding-left: 20px; background: var(--card); border-left: 1px solid var(--line); }
.h-cmp-head > * { font-weight: 700; font-size: 15px; padding-block: 14px; }
.h-cmp-head > :nth-child(3) { color: var(--accent-text); }
.h-cmp-k { font-weight: 600; }
.h-cmp-row > :nth-child(2) { color: var(--muted); }
@media (max-width: 760px) {
  .h-cmp-head { display: none; }
  .h-cmp-row { grid-template-columns: minmax(0, 1fr); padding: 16px 0; border-bottom: 1px solid var(--line); }
  .h-cmp-row > * { border: 0; padding: 2px 0; background: none; }
  .h-cmp-row > :nth-child(3) { padding: 2px 0 0; border: 0; background: none; }
  .h-cmp-row > :nth-child(2)::before { content: "Contact form: "; font-weight: 600; color: var(--faint); }
  .h-cmp-row > :nth-child(3)::before { content: "TraceQuote: "; font-weight: 600; color: var(--accent-text); }
}

/* ---------- pricing ---------- */
.h-plans { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: start; }
.h-plan { border-radius: 18px; border: 1px solid var(--line); background: var(--card); padding: clamp(24px, 3vw, 38px); }
.h-plan--main { border: 2px solid var(--ink); }
.h-plan h3 { font-size: 24px; letter-spacing: -0.02em; }
.h-plan-for { margin: 6px 0 0; color: var(--muted); font-size: 15.5px; max-width: 30em; }
.h-price { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 2px; }
.h-price b { font-size: clamp(46px, 4.6vw, 60px); line-height: 1; font-weight: 700; font-stretch: 100%; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.h-price span { color: var(--muted); font-size: 16px; }
.h-price-note { margin: 0; color: var(--muted); font-size: 15px; }
.h-plan ul { list-style: none; margin: 24px 0 28px; padding: 0; display: grid; gap: 11px; }
.h-plan li { position: relative; padding-left: 28px; font-size: 16px; }
.h-plan li::before {
  content: ""; position: absolute; left: 2px; top: 0.42em; width: 11px; height: 6px;
  border-left: 2.2px solid var(--accent-text); border-bottom: 2.2px solid var(--accent-text); transform: rotate(-45deg);
}
.h-founding { margin: 0 0 16px; padding: 14px 16px 14px 18px; border-left: 4px solid var(--trace); background: var(--bg-alt); border-radius: 0 12px 12px 0; font-size: 15.5px; }
.h-founding b { display: block; font-size: 16px; margin-bottom: 2px; }
/* The three ways to pay, then the guarantee: plain rows, so the price above stays the loud thing. */
.h-terms { margin: 0 0 22px; border-top: 1px solid var(--line); }
.h-terms div { display: grid; grid-template-columns: 8.2em minmax(0, 1fr); gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.h-terms dt { font-weight: 700; font-size: 15.5px; }
.h-terms dd { margin: 0; color: var(--muted); font-size: 15.5px; }
.h-anchor { margin: 0 0 18px; font-size: 14.5px; color: var(--muted); }
.h-guarantee { margin: 0 0 28px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; font-size: 15.5px; }
.h-guarantee b { display: block; font-size: 16px; margin-bottom: 2px; }
.h-agree { margin: -14px 0 24px; font-size: 14.5px; color: var(--muted); }
@media (max-width: 900px) { .h-plans { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .h-terms div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ---------- questions ---------- */
.h-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.h-faq details { border-top: 1px solid var(--line-strong); padding: 18px 0 20px; }
.h-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 18px; font-weight: 700; font-size: 18px; line-height: 1.35; }
.h-faq summary::-webkit-details-marker { display: none; }
.h-faq summary::after { content: "+"; flex: none; font-weight: 500; font-size: 24px; line-height: 1; color: var(--accent-text); transition: transform 0.2s ease; }
.h-faq details[open] summary::after { transform: rotate(45deg); }
.h-faq p { margin: 10px 0 0; color: var(--muted); font-size: 16.5px; max-width: 34em; }
@media (prefers-reduced-motion: reduce) { .h-faq summary::after { transition: none; } }
@media (max-width: 860px) { .h-faq { grid-template-columns: minmax(0, 1fr); } }

/* ---------- closing call ---------- */
.h-final { background: var(--aerial); color: var(--aerial-ink); padding-block: clamp(64px, 8vw, 116px); }
.h-final h2 { color: var(--aerial-ink); font-size: clamp(30px, 4vw, 52px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 650; max-width: 16em; }
.h-final p { margin: 22px 0 0; color: var(--aerial-muted); font-size: 18.5px; max-width: 36em; }
.h-final-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- footer on this page ---------- */
.home .footer h4, .home .footer h3 { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); }
.home .footer-base a { margin-left: 12px; }

/* Dark theme: the frame needs an edge, since its shadow disappears on a dark page. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .h-frame { box-shadow: 0 0 0 1px rgba(232, 239, 233, 0.12), 0 40px 90px -36px rgba(0, 0, 0, 0.8); }
}
:root[data-theme="dark"] .h-frame { box-shadow: 0 0 0 1px rgba(232, 239, 233, 0.12), 0 40px 90px -36px rgba(0, 0, 0, 0.8); }

/* ---------- phones: shorter page, tighter type, demo and call buttons first ---------- */
@media (max-width: 700px) {
  .h-hero { padding-block: 24px 36px; }
  .h-hero h1 { font-size: 30px; line-height: 1.1; letter-spacing: -0.025em; }
  .h-hero-row { margin-top: 16px; gap: 18px; }
  .h-hero-sub { font-size: 16px; line-height: 1.5; }
  .h-hero-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .h-hero-cta .btn { box-sizing: border-box; justify-content: center; text-align: center; }
  .h-hero-offer { margin-top: 14px; font-size: 15px; }
  .h-hero-note { display: none; }
  .h-frame { margin-top: 24px; border-radius: 16px; }
  /* The opening statement repeats the headline, and the comparison repeats the inbox section. */
  .h-statement, #compare { display: none; }
  .h-sec { padding-block: 44px; }
  .h-head { margin-bottom: 24px; }
  .h-head h2 { font-size: 26px; }
  /* The four-step illustrations are decorative (aria-hidden) and repeat the live demo above. */
  .h-fig { display: none; }
  .h-final { padding-block: 44px; }
  .h-final h2 { font-size: 28px; }
}


/* ---------- opening (design pass): offer bar, one big headline, one line, two buttons, the live map ---------- */
.h-bar { background: var(--aerial); color: var(--aerial-ink); font-size: 13.5px; line-height: 1.35; text-align: center; }
.h-bar a { display: block; padding: 9px 16px; color: inherit; text-decoration: none; }
.h-bar i { font-style: normal; }
.h-bar span { text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; opacity: 0.85; }
.h-bar:hover span { opacity: 1; }

.h-hero { padding-block: clamp(28px, 4.2vw, 64px) clamp(40px, 5vw, 72px); }
.h-hero h1 {
  font-size: clamp(33px, 4.7vw, 68px); line-height: 1.02; letter-spacing: -0.032em;
  font-weight: 720; font-stretch: 116%; max-width: 15em; text-wrap: balance;
}
.h-hero-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(20px, 4vw, 64px); align-items: end; margin-top: clamp(18px, 2.2vw, 30px); }
.h-hero-sub { margin: 0; max-width: 40em; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; color: var(--muted); }
.h-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.h-hero .btn { border-radius: 12px; padding: 16px 26px; font-size: 15.5px; }
.h-hero .btn-ghost { border-width: 1.5px; }
.h-frame { margin-top: clamp(24px, 3vw, 44px); border-radius: 18px; }
.nav .btn { border-radius: 10px; }

@media (max-width: 960px) {
  .h-hero-row { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (max-width: 700px) {
  .h-bar { font-size: 12.5px; }
  .h-bar .h-bar-long, .h-bar span { display: none; }
  .nav-cta .btn { display: none; }
  .h-hero { padding-block: 22px 0; }
  .h-hero h1 { font-size: 33px; }
  .h-hero-row { margin-top: 14px; gap: 18px; }
  .h-hero-sub { font-size: 15.5px; line-height: 1.5; }
  .h-hero-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .h-hero-cta .btn { box-sizing: border-box; justify-content: center; text-align: center; }
  /* the map sits right below, so a "try it" button would only point at it */
  .h-hero-cta .btn-ghost { display: none; }
  /* edge to edge, so the map takes the whole screen width */
  .h-frame { margin: 22px calc(50% - 50vw) 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line-strong); }
  .h-frame-foot { padding-inline: 16px; }
}

/* Scan-to-try QR beside the buttons on wide screens; phones already have the demo one tap away. */
.h-hero-qr { display: none; }
@media (min-width: 961px) {
  .h-hero-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .h-hero-qr { display: flex; align-items: center; gap: 14px; max-width: 15em; }
  .h-qr-code { flex: none; width: 84px; line-height: 0; background: #fff; border-radius: 8px; padding: 5px; }
  .h-qr-code svg { width: 100%; height: auto; display: block; }
  .h-hero-qr p { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
  .h-hero-qr b { color: var(--ink); }
}
