/* TreeScan Pro — mobile-first, no external assets */
:root {
  --bark: #2b2118;
  --bark-2: #3a2d22;
  --soil: #5a4636;
  --moss: #4f6b3a;
  --moss-dark: #3d5530;
  --cream: #f7f3ec;
  --sand: #ece4d6;
  --ink: #221b15;
  --muted: #5e5246;
  --heat-1: #2a1a5e;
  --heat-2: #8a1f6b;
  --heat-3: #d8432c;
  --heat-4: #f08a24;
  --heat-5: #f7d046;
  --warn-bg: #fff4e0;
  --warn-border: #d8432c;
  --radius: 10px;
  --max: 1100px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}
img { max-width: 100%; height: auto; }
a { color: var(--moss-dark); }
a:hover { color: var(--heat-3); }
:focus-visible { outline: 3px solid var(--heat-4); outline-offset: 2px; }
section[id] { scroll-margin-top: 64px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: .5rem; z-index: 100;
  background: var(--heat-5); color: var(--ink); padding: .5rem 1rem; border-radius: 6px;
}
.skip-link:focus { left: .5rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bark); color: var(--cream);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--cream); text-decoration: none; font-weight: 700; font-size: 1.2rem; }
.brand:hover { color: var(--cream); }
.brand-mark {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--heat-5), var(--heat-4) 30%, var(--heat-3) 55%, var(--heat-2) 78%, var(--heat-1));
  box-shadow: 0 0 0 2px rgba(255,255,255,.15);
}
.nav-toggle {
  display: none; background: transparent; border: 1px solid rgba(255,255,255,.3);
  border-radius: 6px; width: 44px; height: 40px; cursor: pointer; position: relative;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 11px; width: 20px; height: 2px; background: var(--cream); content: "";
}
.nav-toggle-bar { top: 19px; }
.nav-toggle-bar::before { top: -6px; left: 0; }
.nav-toggle-bar::after { top: 6px; left: 0; }
.js .nav-toggle { display: block; }

.site-nav { width: 100%; }
.site-nav ul { list-style: none; margin: 0; padding: .25rem 0 .75rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.js .site-nav { display: none; }
.js .site-nav.is-open { display: block; }
.js .site-nav ul { flex-direction: column; gap: 0; }
.site-nav a { display: block; color: var(--cream); text-decoration: none; padding: .55rem 0; }
.site-nav a:hover { color: var(--heat-5); }
.nav-cta { font-weight: 700; color: var(--heat-5) !important; }

/* Buttons */
.btn {
  display: inline-block; padding: .8rem 1.3rem; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--heat-4); color: var(--bark); }
.btn-primary:hover { background: var(--heat-5); color: var(--bark); }
.btn-ghost { border-color: rgba(247,243,236,.6); color: var(--cream); }
.btn-ghost:hover { border-color: var(--heat-5); color: var(--heat-5); }
.btn-large { font-size: 1.05rem; word-break: break-all; }

/* Hero */
.hero {
  position: relative; color: var(--cream);
  background:
    radial-gradient(ellipse at 85% 20%, rgba(216,67,44,.35), transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(79,107,58,.45), transparent 60%),
    linear-gradient(160deg, var(--bark) 0%, var(--bark-2) 60%, var(--soil) 100%);
  padding: 3.5rem 0 0;
}
.hero-inner { padding-bottom: 3rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--heat-5); margin-bottom: .75rem; }
.hero h1 { font-size: clamp(1.9rem, 6vw, 3.1rem); max-width: 18ch; }
.lead { font-size: 1.15rem; max-width: 46ch; color: #e9e1d4; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1.25rem; }
.hero-note { font-size: .92rem; color: #d6ccbd; }
.hero-note a { color: var(--heat-5); }
.thermal-band {
  height: 10px;
  background: linear-gradient(90deg, var(--heat-1), var(--heat-2), var(--heat-3), var(--heat-4), var(--heat-5));
}

/* Sections */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--sand); }
.section-intro { color: var(--muted); margin-top: -.25rem; }

.steps { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.25rem; }
.step {
  background: #fff; border-radius: var(--radius); padding: 1.5rem;
  border-top: 5px solid var(--heat-3); box-shadow: 0 1px 3px rgba(43,33,24,.08);
}
.step:nth-child(1) { border-top-color: var(--heat-2); }
.step:nth-child(2) { border-top-color: var(--heat-3); }
.step:nth-child(3) { border-top-color: var(--heat-4); }
.step-num {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--bark); color: var(--heat-5); font-weight: 800; margin-bottom: .75rem;
}
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 1.5rem; margin: .3rem 0; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: .7rem; height: .7rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--heat-3), var(--heat-5));
}

.two-col { display: grid; gap: 2rem; align-items: center; }

.placeholder {
  margin: 0; aspect-ratio: 8.5 / 11; max-height: 520px; width: 100%;
  border: 3px dashed var(--soil); border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, #f3ece0, #f3ece0 12px, #ebe2d3 12px, #ebe2d3 24px);
  display: grid; place-items: center; text-align: center; padding: 1.5rem;
}
.placeholder-small { aspect-ratio: 4 / 3; }
.placeholder-tag {
  display: inline-block; background: var(--bark); color: var(--heat-5); font-size: .75rem;
  font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 4px;
}
.placeholder-text { font-size: 1.3rem; font-weight: 700; margin: .75rem 0 .25rem; color: var(--bark); }
.placeholder-sub { font-size: .9rem; color: var(--muted); margin: 0; }

.cards { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.card { background: #fff; border-radius: var(--radius); padding: 1.5rem; border-left: 5px solid var(--moss); box-shadow: 0 1px 3px rgba(43,33,24,.08); }
.card p { margin: 0; color: var(--muted); }

.limits {
  background: var(--warn-bg); border: 2px solid var(--warn-border); border-left-width: 8px;
  border-radius: var(--radius); padding: 1.5rem 1.5rem .75rem;
}
.limits h2 { display: flex; align-items: center; gap: .6rem; color: #8a2a1a; }
.limits-icon {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--warn-border); color: #fff; font-size: 1.1rem; font-weight: 900; flex: none;
}
.limits ul { padding-left: 1.2rem; margin: 0 0 .75rem; }
.limits li { margin: .5rem 0; }

.section-contact { background: var(--bark); color: var(--cream); text-align: center; }
.contact-inner p { color: #e2d9cb; }
.contact-meta { margin-top: 1rem; font-size: .95rem; }

.site-footer { background: #1d1610; color: #cfc4b4; font-size: .9rem; padding: 2rem 0; }
.site-footer p { margin: .3rem 0; }
.site-footer a { color: var(--heat-5); }

/* Tablet / desktop */
@media (min-width: 760px) {
  .js .nav-toggle { display: none; }
  .site-nav, .js .site-nav { display: block; width: auto; }
  .site-nav ul, .js .site-nav ul { flex-direction: row; padding: 0; gap: 1.5rem; align-items: center; }
  .header-inner { flex-wrap: nowrap; }
  .hero { padding-top: 5.5rem; }
  .hero-inner { padding-bottom: 4.5rem; }
  .section { padding: 5rem 0; }
  h2 { font-size: 2.1rem; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .two-col { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .limits { padding: 2rem 2.5rem 1.25rem; }
}

/* Pricing */
.section-pricing { background: #fff; }
.plans { display: grid; gap: 1rem; margin-top: 1.5rem; }
.plan {
  display: flex; flex-direction: column; background: var(--cream); border-radius: var(--radius);
  padding: 1.4rem; border: 1px solid #e2d8c7; border-top: 5px solid var(--heat-4);
}
.plan-name { margin-bottom: .3rem; }
.plan-price { margin: 0 0 .9rem; }
.plan-price .amount { font-size: 2rem; font-weight: 800; color: var(--bark); }
.plan-price .per { color: var(--muted); font-weight: 600; }
.plan .ticks { flex: 1; }
.btn-buy { text-align: center; margin-top: auto; }
.pricing-fine { margin: 1.25rem 0 .5rem; font-size: .9rem; color: var(--muted); text-align: center; }
.pricing-limits {
  display: flex; gap: .6rem; align-items: center; justify-content: center; flex-wrap: wrap; text-align: center;
  margin: 0; padding: .75rem 1rem; background: var(--warn-bg); border: 1px solid var(--warn-border);
  border-radius: var(--radius); font-size: .95rem;
}
.limits-icon-sm { width: 22px; height: 22px; font-size: .8rem; }

/* Thanks page */
.thanks-inner { max-width: 720px; }
.thanks h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.thanks h2 { font-size: 1.4rem; margin-top: 1.5rem; }
.thanks .eyebrow { color: var(--heat-3); }
.lead-dark { font-size: 1.1rem; color: var(--muted); }
.placeholder-note { aspect-ratio: auto; min-height: 140px; margin-bottom: 1rem; }

@media (min-width: 640px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 760px) and (max-width: 940px) { .site-nav ul, .js .site-nav ul { gap: 1rem; font-size: .95rem; } }
@media (min-width: 1000px) { .plans { grid-template-columns: repeat(4, 1fr); } .plan { padding: 1.25rem 1rem; } .plan-price .amount { font-size: 1.7rem; } }
.plan-price .per { white-space: nowrap; }
.btn-buy { white-space: nowrap; }

/* Standard disclaimer */
.report-figure { margin: 0; }
.report-figure .placeholder { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.disclaimer {
  margin: 0; padding: .85rem 1rem; background: var(--warn-bg); border: 2px solid var(--warn-border);
  border-top: 0; border-radius: 0 0 var(--radius) var(--radius); font-size: .92rem; line-height: 1.45; color: var(--ink);
}
.disclaimer-line { margin: 1.5rem 0 0; font-size: .95rem; color: var(--muted); border-left: 4px solid var(--warn-border); padding-left: .85rem; }
.limits-lead { font-size: 1.08rem; margin-bottom: .5rem; }

/* Rollover policy under pricing */
.rollover { margin-top: 1.5rem; padding: 1rem 1.25rem; border: 1px solid rgba(0,0,0,.12); border-radius: 10px; background: rgba(0,0,0,.02); }
.rollover h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.rollover ul { margin: 0; padding-left: 1.2rem; }
.rollover li { margin: .35rem 0; line-height: 1.5; }

/* Homeowner referral offer */
.referral { margin: .75rem 0 1rem; padding: .6rem .75rem; border-radius: 8px; background: rgba(0,0,0,.035); font-size: .88rem; line-height: 1.45; }
.referral p { margin: .25rem 0; }
.referral-how { font-size: .82rem; opacity: .85; word-break: break-word; }

/* Referral tracking */
.referral-fallback { font-size: .78rem; opacity: .8; word-break: break-word; }
.ref-note { margin: 0 0 1rem; padding: .5rem .85rem; display: inline-block; border-radius: 999px; background: #e8f0df; border: 1px solid var(--moss); color: var(--moss-dark); font-weight: 600; font-size: .92rem; }
.ref-note[hidden], .ref-card[hidden] { display: none; }
.ref-card { margin: 1.5rem 0; padding: 1.25rem; border: 2px solid var(--moss); border-radius: var(--radius); background: #f3f7ee; }
.ref-card h2 { margin-top: 0; }
.ref-code-line strong { font-size: 1.2rem; letter-spacing: .05em; }
.ref-link-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.ref-link-row input { flex: 1 1 220px; min-width: 0; padding: .7rem .8rem; font: inherit; border: 1px solid #b9ad9a; border-radius: 8px; background: #fff; }
.ref-link-row .btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.ref-small { font-size: .9rem; color: var(--muted); }
.test-banner { position: relative; background: #7a1fa2; color: #fff; text-align: center; font-weight: 700; font-size: .9rem; padding: .45rem 1rem; }
