/* =================================================================
   SUB-PAGE THEME  ·  About / Pricing / Partners / County (CAD) pages
   Re-skins the legacy components in styles.css to match the home page
   (home.css): dark green hero, cream page, mint accents, kicker labels,
   rounded white cards, dark CTA card. Scoped to body.page-sub (set in
   index.html from the route), so the home page is never affected.
   Loaded after styles.css and home.css.
   ================================================================= */

body.page-sub {
  /* Point the legacy tokens at the home palette so everything that
     already uses them picks up the new colors automatically. */
  --color-background: #f7f6f2;
  --color-border: #e4e6e1;
  --color-text: #14201c;
  --color-text-muted: #56615c;
  --color-text-light: #7b857f;

  /* --hv-* design tokens are defined once on :root in styles.css */
  background: var(--hv-cream);
}

.page-sub .section { padding: var(--hv-section) 0; }

/* ----------------------------- Not found (404) ----------------------------- */
.page-sub .not-found {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) 0;
  text-align: center;
}
.page-sub .not-found .section-label { color: var(--hv-mint); }
.page-sub .not-found h1 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #fff;
}
.page-sub .not-found p {
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--hv-on-dark-muted);
}
.page-sub .not-found-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

/* ----------------------------- Labels & type ----------------------------- */
.page-sub .section-label {
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  font-weight: 700;
}
.page-sub .section-label::before { content: none; }
.page-sub .section-title { letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
.page-sub .section-subtitle { line-height: 1.65; text-wrap: pretty; }

/* ================================ HERO ================================ */
.page-sub .hero {
  position: relative;
  min-height: 0;
  padding: clamp(128px, 15vh, 168px) 0 clamp(64px, 8vw, 104px);
  color: var(--hv-on-dark);
  background:
    radial-gradient(900px 560px at 82% 18%, rgba(111, 216, 173, 0.13), transparent 62%),
    radial-gradient(700px 480px at 0% 100%, rgba(232, 168, 56, 0.08), transparent 60%),
    linear-gradient(180deg, var(--hv-ink) 0%, var(--hv-ink-2) 100%);
  overflow: hidden;
  /* inline styles in the templates use these; make them read on dark */
  --color-text: #fff;
  --color-text-muted: var(--hv-on-dark-muted);
}
/* dot texture (replaces the legacy glow blobs) */
.page-sub .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  top: 0; right: 0; bottom: 0; left: 0;
  width: auto; height: auto;
  border-radius: 0;
  background: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  pointer-events: none;
}
.page-sub .hero::after { content: none; }
.page-sub .hero .container { position: relative; z-index: 1; }
.page-sub .hero-content { margin-top: 0; }

.page-sub .hero-title {
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: #fff;
}
.page-sub .hero-title .highlight { color: var(--hv-mint); }
.page-sub .hero-title .highlight::after { content: none; }
.page-sub .hero-description { color: var(--hv-on-dark-muted); font-size: clamp(17px, 1.4vw, 19px); }

.page-sub .hero-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hv-hairline);
  color: var(--hv-on-dark);
  box-shadow: none;
}
.page-sub .hero-badge svg { color: var(--hv-mint); }

/* White card sitting in / under the dark hero (About team photo, CAD info card) */
.page-sub .hero-search-card {
  border-radius: 22px;
  box-shadow: 0 40px 90px -36px rgba(0, 0, 0, 0.7);
  /* restore page text colors inside the card */
  --color-text: #14201c;
  --color-text-muted: #56615c;
  color: var(--color-text);
}
.page-sub .hero-search-card .section-title { color: var(--color-text); }

/* Pricing hero: the big 35% */
.page-sub .pricing-big-number {
  background: linear-gradient(120deg, #fff, var(--hv-mint));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-sub .pricing-big-text { color: var(--hv-on-dark-muted); }

/* Primary buttons inside the dark hero would be green-on-green; use gold. */
.page-sub .hero .btn-primary {
  background: var(--color-accent);
  color: var(--color-primary-dark);
}
.page-sub .hero .btn-primary:hover { background: var(--color-accent-light); }

/* Partners hero: the clip-art crowd behind the copy */
.page-sub .hero > div[style*="opacity"] img { filter: grayscale(1) brightness(1.6); }

/* ============================== CARDS ============================== */
.page-sub .feature-card {
  border-radius: var(--hv-radius);
  padding: 30px 28px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.page-sub .feature-card:hover {
  border-color: rgba(27, 77, 62, 0.3);
  box-shadow: 0 24px 48px -32px rgba(15, 44, 36, 0.45);
  transform: translateY(-4px);
}
.page-sub .feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #e9f3ee;
}
.page-sub .feature-title { font-family: var(--font-body); font-size: 18px; }
.page-sub .feature-description,
.page-sub .leadership-description,
.page-sub .pricing-explainer-content,
.page-sub .pricing-definition-text { text-align: left; }

.page-sub .leadership-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--hv-radius);
}
.page-sub .leadership-card:hover { box-shadow: 0 24px 48px -32px rgba(15, 44, 36, 0.45); transform: translateY(-4px); }
.page-sub .leadership-avatar { border: 3px solid #e9f3ee; }
.page-sub .leadership-title { color: var(--hv-green); font-weight: 600; }

.page-sub .pricing-explainer,
.page-sub .pricing-definition-card { border-radius: var(--hv-radius); }
.page-sub .pricing-cards .feature-title,
.page-sub .pricing-example .feature-title { font-family: var(--font-display); }

/* County tags (About "Counties we cover", CAD "Nearby appraisal districts") */
.page-sub .county-tag {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--color-text);
}
.page-sub .county-tag:hover { border-color: var(--hv-green); }

/* Texas flag card on About */
.page-sub .texas-illustration { border: 1px solid var(--color-border); border-radius: 22px; }

/* ========================= PROCESS STEPS (Pricing) =========================
   Same horizontal timeline as the home page. */
.page-sub .how-it-works { background: #fff; }
.page-sub .process-steps { gap: 0; margin-top: clamp(40px, 5vw, 56px); }
.page-sub .process-step { padding: 0 20px; }
.page-sub .process-step:not(:last-child)::after {
  display: block; /* styles.css hides it at ≤1024px; we restyle it instead */
  top: 27px;
  left: 50%;
  right: -50%;
  width: auto;
  height: 2px;
  background: var(--hv-green);
  opacity: 0.3;
}
.page-sub .step-number {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  font-size: 20px;
  box-shadow: 0 0 0 6px #fff, 0 14px 28px -14px rgba(27, 77, 62, 0.6);
}
.page-sub .process-step:hover .step-number { animation: none; }
.page-sub .step-title { font-family: var(--font-body); font-size: 18px; margin-bottom: 8px; }
.page-sub .step-description { font-size: 15px; }

/* ================================ CTA ================================
   Legacy markup is .cta-section > .container > title/subtitle/buttons.
   The container becomes the dark rounded card (as on the home page). */
.page-sub .cta-section {
  background: var(--hv-cream);
  padding: 0 24px var(--hv-section);
  overflow: visible;
}
.page-sub .cta-section::before,
.page-sub .cta-section::after { content: none; }
.page-sub .cta-section .container {
  max-width: 1200px;
  padding: clamp(48px, 7vw, 84px) clamp(24px, 5vw, 64px);
  border-radius: 28px;
  color: var(--hv-on-dark);
  background:
    radial-gradient(560px circle at 12% -20%, rgba(111, 216, 173, 0.2), transparent 60%),
    radial-gradient(560px circle at 90% 120%, rgba(232, 168, 56, 0.16), transparent 60%),
    linear-gradient(135deg, var(--hv-ink) 0%, var(--hv-ink-2) 100%);
  overflow: hidden;
}
.page-sub .cta-title { color: #fff; letter-spacing: -0.02em; line-height: 1.1; }
.page-sub .cta-subtitle { color: var(--hv-on-dark-muted); opacity: 1; font-size: 18px; margin-bottom: 32px; }
.page-sub .cta-guarantee { color: var(--hv-on-dark-muted); opacity: 1; font-size: 14px; margin-top: 22px; }
.page-sub .cta-guarantee svg { color: var(--hv-gold); }

/* ============================== RESPONSIVE ============================== */
@media (max-width: 1024px) {
  /* vertical timeline, as on the home page (styles.css goes single-column here) */
  .page-sub .process-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .page-sub .process-step {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 18px;
    padding: 0 0 32px;
    text-align: left;
  }
  .page-sub .process-step:last-child { padding-bottom: 0; }
  .page-sub .process-step:not(:last-child)::after {
    top: 24px;
    bottom: -24px;
    left: 23px;
    right: auto;
    width: 2px;
    height: auto;
  }
  .page-sub .step-number { grid-row: 1 / span 2; width: 48px; height: 48px; margin: 0; font-size: 18px; }
  .page-sub .step-title,
  .page-sub .step-description { grid-column: 2; }
  .page-sub .step-title { margin-top: 10px; }
}

@media (max-width: 768px) {
  .page-sub .hero { padding: 112px 0 56px; }
  .page-sub .hero-title { font-size: clamp(32px, 9vw, 40px); }
}

@media (max-width: 640px) {
  .page-sub .cta-section { padding-left: 16px; padding-right: 16px; }
}
