/* North Texas Home Costs — lean cost-data publication look.
   White background, navy/teal accents, striped tables, generous whitespace. */

:root {
  --navy: #16324f;
  --navy-dark: #0e2236;
  --teal: #0e7c7b;
  --teal-tint: #eef7f7;
  --ink: #1f2933;
  --muted: #5d6b79;
  --line: #dde3e9;
  --stripe: #f4f7f9;
  --bg: #ffffff;
  --max: 60rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Topbar ---------- */

.topbar {
  background: var(--navy);
  border-bottom: 3px solid var(--teal);
}

.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand span { color: #7fd1d0; font-weight: 600; }

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.topbar nav a {
  color: #d7e3ee;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.15rem 0;
  border-bottom: 2px solid transparent;
}

.topbar nav a:hover {
  color: #fff;
  border-bottom-color: var(--teal);
}

/* ---------- Main ---------- */

main.wrap {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

h1 {
  color: var(--navy);
  font-size: 2rem;
  line-height: 1.25;
  margin: 0.25rem 0 1rem;
}

h2 {
  color: var(--navy);
  font-size: 1.4rem;
  margin: 2.5rem 0 0.75rem;
}

h3 { color: var(--navy-dark); margin: 1.5rem 0 0.4rem; }

a { color: var(--teal); }
a:hover { color: var(--navy); }

.lede { color: var(--muted); font-size: 1.1rem; max-width: 44rem; }

.empty-note { color: var(--muted); }

/* ---------- Hero (text only, no stock photos) ---------- */

.hero {
  padding: 1rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}

.hero h1 { font-size: 2.3rem; max-width: 46rem; }

.hero p {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 44rem;
  margin: 0.75rem 0;
}

.hero-links { font-size: 1rem; }

/* ---------- Updated stamp ---------- */

.updated {
  display: inline-block;
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

article.guide > .updated { margin-bottom: 0; }

/* ---------- Direct-answer callout ---------- */

.answer-box {
  background: var(--teal-tint);
  border-left: 5px solid var(--teal);
  border-radius: 0 6px 6px 0;
  padding: 1.1rem 1.4rem;
  margin: 1.25rem 0 2rem;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--navy-dark);
}

/* ---------- Tables: the centerpiece ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
}

th, td {
  text-align: left;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

tbody tr:nth-child(even) { background: var(--stripe); }

tbody tr:hover { background: var(--teal-tint); }

/* Mobile: let wide tables scroll instead of breaking the page */
@media (max-width: 640px) {
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.table-wrap { overflow-x: auto; }

/* ---------- FAQ ---------- */

.faq { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 0.5rem; }

.faq h3 {
  margin: 1.75rem 0 0.35rem;
  font-size: 1.08rem;
}

.faq p { margin: 0 0 0.5rem; color: var(--ink); }

/* ---------- Sources ---------- */

.sources {
  margin-top: 3rem;
  padding: 1.25rem 1.5rem;
  background: var(--stripe);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.sources h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }

.sources ul { margin: 0.25rem 0 0.75rem; padding-left: 1.25rem; }

.sources li { margin: 0.25rem 0; }

.sources-note { margin: 0; }

/* ---------- Cards (home + guides listing) ---------- */

.cat-group { margin-bottom: 1rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.card {
  display: block;
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  border-radius: 8px;
  padding: 1.1rem 1.2rem 1rem;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 14px rgba(22, 50, 79, 0.10);
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.08rem;
  color: var(--navy);
}

.card p {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  background: var(--teal-tint);
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
}

/* ---------- Footer ---------- */

.botbar {
  border-top: 1px solid var(--line);
  background: var(--stripe);
  margin-top: 2rem;
}

.botbar .wrap {
  padding-top: 1.5rem;
  padding-bottom: 1.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.botbar a { color: var(--teal); }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  h1 { font-size: 1.6rem; }
  .hero h1 { font-size: 1.75rem; }
  .topbar .wrap { flex-direction: column; align-items: flex-start; }
  main.wrap { padding-top: 1.75rem; }
}

/* ================= Homepage helpers ================= */
.section-divider { border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 3rem; }
.cat-head { color: var(--navy); margin: 1.75rem 0 0.6rem; font-size: 1.15rem; }

/* ================= Best-HVAC review pages ================= */
.rv-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--teal); margin: 0 0 .3rem; }
.rv-lead { font-size: 1.12rem; line-height: 1.65; color: var(--ink); max-width: 46rem; }
.rv-lead strong { color: var(--navy); }

.rv-pick { background: var(--teal-tint); border: 1px solid #bfe3e2; border-left: 5px solid var(--teal); border-radius: 12px; padding: 1.2rem 1.35rem; margin: 1.6rem 0; }
.rv-pick-badge { display: inline-block; background: var(--teal); color: #fff; font-weight: 700; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 999px; }
.rv-pick h2 { margin: .7rem 0 .2rem; }
.rv-pick-meta { font-weight: 600; color: var(--navy); margin: .15rem 0 .55rem; }
.rv-pick ul { margin: .4rem 0 .8rem; padding-left: 1.15rem; }
.rv-pick li { margin: .25rem 0; }
.rv-cta-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: .7rem 0 .3rem; }

.btn { display: inline-block; font-weight: 700; text-decoration: none; padding: .6rem 1.05rem; border-radius: 8px; font-size: .95rem; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--teal); }
.btn-navy { background: var(--navy); color: #fff; }

.rv-method { background: var(--stripe); border-radius: 10px; padding: 1rem 1.15rem; margin: 1.6rem 0; }
.rv-method h2 { margin-top: .2rem; }
.rv-weights { font-size: .9rem; color: var(--muted); }

.rv-award-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.rv-award { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .8rem .85rem; }
.rv-award-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--teal); }
.rv-award-co { font-weight: 700; color: var(--navy); margin-top: .2rem; line-height: 1.25; }
.rv-award-note { font-size: .82rem; color: var(--muted); margin-top: .15rem; }

.rv-card { display: flex; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.05rem 1.1rem; margin: .8rem 0; }
.rv-card-pick { border-color: var(--teal); border-width: 2px; background: var(--teal-tint); }
.rv-rank { font-size: 1.35rem; font-weight: 800; color: var(--teal); min-width: 2.3rem; }
.rv-card-body { flex: 1; }
.rv-card-body h3 { margin: 0 0 .3rem; }
.rv-pick-tag { display: inline-block; background: var(--teal); color: #fff; font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .15rem .5rem; border-radius: 999px; vertical-align: middle; margin-left: .4rem; }
.rv-meta { color: var(--muted); font-size: .92rem; margin: .1rem 0 .45rem; }
.rv-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .35rem 0; }
.rv-tag { background: var(--stripe); color: var(--ink); font-size: .76rem; padding: .2rem .55rem; border-radius: 6px; }
.rv-chip { background: var(--navy); color: #fff; font-size: .76rem; font-weight: 600; padding: .2rem .55rem; border-radius: 6px; }
.rv-pros { margin: .45rem 0 .35rem; padding-left: 1.1rem; font-size: .92rem; }
.rv-pros li { margin: .2rem 0; }
.rv-tel { font-weight: 700; color: var(--teal); text-decoration: none; }

.rv-cta { background: var(--navy); color: #fff; border-radius: 12px; padding: 1.3rem 1.35rem; margin: 2rem 0; }
.rv-cta h2 { color: #fff; margin-top: 0; }
.rv-cta p { color: #d7e3ee; }
.rv-cta .btn-primary { background: #fff; color: var(--navy); }

.rv-also ul { list-style: none; padding: 0; }
.rv-also li { padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .94rem; }
.rv-also .pro { color: var(--muted); font-size: .87rem; }

.rv-q { margin: .85rem 0; }
.rv-q h3 { margin: 0 0 .2rem; }
.rv-byline { margin-top: 2.2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }

/* ================= AC cost calculator ================= */
.calc { background: var(--stripe); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem 1.4rem; margin: 1.6rem 0; }
.calc-row { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; }
.calc-field { flex: 1; min-width: 13rem; }
.calc-field label { display: block; font-weight: 700; color: var(--navy); margin-bottom: .35rem; font-size: .92rem; }
.calc-field select, .calc-field input { width: 100%; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; background: #fff; }
.calc-result { margin-top: 1.3rem; background: #fff; border: 2px solid var(--teal); border-radius: 12px; padding: 1.1rem 1.2rem; text-align: center; }
.calc-range { font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1.1; font-variant-numeric: tabular-nums; }
.calc-range.pulse { animation: rangePulse .45s cubic-bezier(.2,.7,.3,1.2); }
@keyframes rangePulse { 0% { transform: scale(.94); opacity: .55; } 100% { transform: scale(1); opacity: 1; } }
.calc-sub { color: var(--muted); font-size: .92rem; margin-top: .3rem; }
.calc-cta { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }

/* ================= Homepage redesign ================= */
.hero-band { background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--teal) 170%); color: #fff; border-radius: 16px; padding: 3rem 2.2rem; margin: 0 0 2.5rem; }
.hero-inner { max-width: 42rem; }
.hero-eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: .8rem; font-weight: 700; color: #8fd6d4; margin: 0 0 .6rem; }
.hero-band h1 { color: #fff; font-size: 2.5rem; line-height: 1.12; margin: 0 0 1rem; }
.hero-sub { color: #d7e6ee; font-size: 1.15rem; line-height: 1.6; margin: 0 0 1.5rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; }
.btn { display: inline-block; font-weight: 700; text-decoration: none; padding: .7rem 1.3rem; border-radius: 9px; font-size: 1rem; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: #0a6362; color: #fff; }
.btn-ghost-light { background: rgba(255,255,255,.12); color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.btn-ghost-light:hover { background: rgba(255,255,255,.2); color: #fff; }

.sec-title { color: var(--navy); font-size: 1.55rem; margin: 2.6rem 0 .4rem; }
.sec-sub { color: var(--muted); margin: 0 0 1.2rem; max-width: 44rem; }
.see-all { margin-top: 1rem; font-weight: 600; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; margin-top: 1.2rem; }
.cat-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; background: #fff; transition: transform .12s ease, box-shadow .12s ease; }
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(22,50,79,.12); }
.cat-img { height: 124px; display: flex; align-items: flex-end; padding: .85rem 1rem; background-size: cover; background-position: center; position: relative; }
.cat-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.45) 100%); }
.cat-img span { position: relative; z-index: 1; color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: .01em; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.cat-body { padding: .9rem 1.1rem 1.1rem; }
.cat-blurb { color: var(--ink); font-size: .95rem; margin: 0 0 .7rem; }
.cat-count { color: var(--teal); font-weight: 700; font-size: .92rem; }

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; background: var(--teal-tint); border: 1px solid #bfe3e2; border-radius: 14px; padding: 1.6rem 1.8rem; margin: 3rem 0 1rem; }
.cta-band h2 { color: var(--navy); margin: 0 0 .3rem; font-size: 1.5rem; }
.guide-hero { width: 100%; height: auto; max-height: 340px; object-fit: cover; border-radius: 12px; margin: .4rem 0 1.5rem; display: block; }
.cta-band p { color: var(--ink); margin: 0; max-width: 34rem; }

@media (max-width: 640px) {
  .hero-band { padding: 2.2rem 1.4rem; }
  .hero-band h1 { font-size: 1.9rem; }
}

/* ================= Polish pass 1 — typography, glass, motion ================= */
@view-transition { navigation: auto; }
html { scroll-behavior: smooth; }

body { font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
h1, h2, .sec-title, .hero-band h1, .cta-band h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -0.015em; }
.hero-band h1 { font-size: 2.7rem; line-height: 1.08; }
.hero-sub { font-weight: 400; }
table { font-variant-numeric: tabular-nums; }

::selection { background: var(--teal); color: #fff; }
a:focus-visible, .btn:focus-visible, button:focus-visible, select:focus-visible { outline: 3px solid rgba(14,124,123,.45); outline-offset: 2px; border-radius: 6px; }

/* glass sticky header */
.topbar { position: sticky; top: 0; z-index: 60; background: rgba(14,34,54,.82); -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px); }

/* springy interactive physics */
.btn, .card, .cat-card, .rv-card, .topbar nav a { transition: transform .22s cubic-bezier(.2,.7,.2,1.2), box-shadow .22s ease, background .18s ease, border-color .18s ease, color .18s ease; }
.btn:hover { transform: translateY(-1.5px); }
.btn:active { transform: translateY(0) scale(.97); }
.card { display: block; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(22,50,79,.13); border-color: var(--teal); }
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(22,50,79,.16); }
.rv-card:hover { box-shadow: 0 8px 20px rgba(22,50,79,.10); }

/* scroll reveal (JS adds .reveal; no-JS users see everything) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .65s cubic-bezier(.2,.7,.2,1), transform .65s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
