/* ============================================================
   Hart Beat Energy — Design System
   Production CSS (no build step required)
   ============================================================ */

:root {
  /* Brand colors — Texas solar: sunburst gold, deep sky, earth */
  --hb-navy: #0b1f3a;
  --hb-navy-dark: #061226;
  --hb-sun: #f5a623;
  --hb-sun-dark: #d88a0a;
  --hb-sky: #1a7fb8;
  --hb-sky-light: #e8f4fb;
  --hb-accent: #00b894;
  --hb-text: #16213e;
  --hb-text-muted: #5a6578;
  --hb-bg: #ffffff;
  --hb-bg-alt: #f7f9fc;
  --hb-bg-section: #eef3f9;
  --hb-border: #e0e6ef;
  --hb-success: #10b981;
  --hb-warn: #f59e0b;
  --hb-error: #ef4444;

  --hb-radius-sm: 6px;
  --hb-radius: 12px;
  --hb-radius-lg: 20px;
  --hb-shadow-sm: 0 1px 2px rgba(11,31,58,.06);
  --hb-shadow: 0 4px 14px rgba(11,31,58,.08);
  --hb-shadow-lg: 0 20px 48px rgba(11,31,58,.12);

  --hb-container: 1200px;
  --hb-gap: 24px;

  --hb-font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hb-font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--hb-font-sans);
  color: var(--hb-text);
  background: var(--hb-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--hb-sky); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--hb-navy); }
button { font-family: inherit; cursor: pointer; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--hb-font-display);
  color: var(--hb-navy);
  line-height: 1.15;
  margin: 0 0 .6em;
  font-weight: 800;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--hb-text); }
.lede { font-size: 1.15rem; color: var(--hb-text-muted); max-width: 64ch; }
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--hb-sky);
  margin-bottom: .8em;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--hb-container);
  margin-inline: auto;
  padding-inline: 20px;
}
.section {
  padding: clamp(48px, 7vw, 96px) 0;
}
.section--alt { background: var(--hb-bg-alt); }
.section--navy { background: var(--hb-navy); color: #fff; }
.section--navy h1, .section--navy h2, .section--navy h3, .section--navy h4 { color: #fff; }
.section--navy p { color: rgba(255,255,255,.82); }
.section--sky { background: var(--hb-sky-light); }

.grid { display: grid; gap: var(--hb-gap); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.flex { display: flex; gap: var(--hb-gap); flex-wrap: wrap; align-items: center; }
.split { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.1fr .9fr; } }
.split--reverse { direction: ltr; }
@media (min-width: 900px) { .split--reverse > :first-child { order: 2; } }

.text-center { text-align: center; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 14px 26px;
  border-radius: var(--hb-radius);
  font-weight: 700;
  font-size: .98rem;
  border: 2px solid transparent;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
}
.btn-primary { background: var(--hb-sun); color: var(--hb-navy); box-shadow: var(--hb-shadow); }
.btn-primary:hover { background: var(--hb-sun-dark); color: var(--hb-navy); transform: translateY(-2px); box-shadow: var(--hb-shadow-lg); }
.btn-secondary { background: var(--hb-navy); color: #fff; }
.btn-secondary:hover { background: var(--hb-navy-dark); color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--hb-navy); border-color: var(--hb-navy); }
.btn-outline:hover { background: var(--hb-navy); color: #fff; }
.btn-ghost { background: transparent; color: var(--hb-navy); border-color: transparent; padding: 14px 18px; }
.btn-ghost:hover { color: var(--hb-sky); }
.btn-lg { padding: 18px 34px; font-size: 1.05rem; }
.btn-sm { padding: 10px 18px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--hb-border);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
}
.nav__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.nav__logo-mark { width: 52px; height: 52px; object-fit: contain; display: block; flex-shrink: 0; }
.nav__logo-text { font-weight: 800; color: var(--hb-navy); font-size: .92rem; line-height: 1.1; letter-spacing: .02em; white-space: nowrap; text-transform: uppercase; }
@media (max-width: 640px) { .nav__logo-mark { width: 42px; height: 42px; } .nav__logo-text { font-size: .8rem; } }
.footer__brand img { width: 44px; height: 44px; object-fit: contain; }
.nav__links { display: none; list-style: none; margin: 0; padding: 0; gap: 4px; flex: 1; justify-content: center; }
.nav__links li { position: relative; }
.nav__links a {
  display: block; padding: 10px 10px;
  color: var(--hb-navy); font-weight: 600; font-size: .95rem;
  border-radius: var(--hb-radius-sm);
}
.nav__links a:hover { background: var(--hb-bg-alt); color: var(--hb-sky); }
.nav__cta { display: none; }
@media (min-width: 1024px) {
  .nav__links { display: flex; }
  .nav__cta { display: flex; gap: 10px; align-items: center; white-space: nowrap; flex-shrink: 0; }
  .nav__cta a, .nav__cta .btn { white-space: nowrap; }
}
.nav__dropdown {
  position: absolute; top: 100%; left: 0;
  background: #fff; border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius); box-shadow: var(--hb-shadow-lg);
  padding: 10px; min-width: 260px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all .18s ease; z-index: 10;
}
.nav__links li:hover .nav__dropdown,
.nav__links li:focus-within .nav__dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__dropdown a { padding: 10px 12px; font-size: .92rem; border-radius: 8px; }
.nav__dropdown a small { display: block; color: var(--hb-text-muted); font-weight: 400; margin-top: 2px; font-size: .8rem; }

.nav__toggle { display: inline-flex; background: none; border: 0; padding: 8px; border-radius: 8px; }
.nav__toggle svg { width: 28px; height: 28px; color: var(--hb-navy); }
@media (min-width: 1024px) { .nav__toggle { display: none; } }

.nav__mobile {
  display: none;
  position: fixed; top: 66px; left: 0; right: 0; bottom: 0;
  background: #fff; z-index: 99; overflow-y: auto; padding: 20px;
}
.nav__mobile.is-open { display: block; }
.nav__mobile a { display: block; padding: 14px 12px; font-weight: 600; color: var(--hb-navy); border-bottom: 1px solid var(--hb-border); }
.nav__mobile .btn { margin-top: 16px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(64px, 9vw, 128px) 0;
  background: linear-gradient(135deg, var(--hb-navy) 0%, var(--hb-navy-dark) 100%);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(245,166,35,.18), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(26,127,184,.22), transparent 60%);
  pointer-events: none;
}
.hero--bg { background-size: cover; background-position: center; background-repeat: no-repeat; }
.hero--bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(6,18,38,.94) 0%, rgba(6,18,38,.88) 45%, rgba(6,18,38,.78) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero--bg .hero__inner { position: relative; z-index: 2; }
.hero--bg h1, .hero--bg p.lede, .hero--bg .post-title, .hero--bg .post-meta { text-shadow: 0 2px 18px rgba(0,0,0,.75), 0 1px 3px rgba(0,0,0,.5); }
.hero--bg .hero__inner { z-index: 2; }

/* Blog post hero — make title + meta sit above the overlay with strong contrast */
.hero--bg .post-title,
.hero--bg .post-meta { position: relative; z-index: 2; }
.hero--bg .post-title { font-weight: 800; line-height: 1.15; }
.hero--bg .post-meta { margin-bottom: 14px; font-size: .95rem; }
.hero--bg .post-meta .tag { background: rgba(245,166,35,.22); color: var(--hb-sun); padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: .78rem; letter-spacing: .02em; }
.hero__inner { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 22ch; }
.hero h1 .hl { color: var(--hb-sun); }
.hero p.lede { color: rgba(255,255,255,.85); max-width: 56ch; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; max-width: 640px; }
.hero__stat .n { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--hb-sun); }
.hero__stat .l { color: rgba(255,255,255,.7); font-size: .86rem; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: rgba(245,166,35,.15); color: var(--hb-sun); border: 1px solid rgba(245,166,35,.3); border-radius: 999px; font-size: .82rem; font-weight: 600; margin-bottom: 20px; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius);
  padding: 28px;
  transition: transform .15s ease, box-shadow .18s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--hb-shadow-lg); border-color: transparent; }
.card__icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--hb-sky-light); color: var(--hb-sky);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 16px;
}
.card__title { margin-bottom: 8px; font-size: 1.2rem; }
.card__desc { color: var(--hb-text-muted); font-size: .95rem; margin-bottom: 14px; }
.card__link { font-weight: 700; color: var(--hb-sky); font-size: .92rem; }
.card--feature { border-top: 4px solid var(--hb-sun); }
.card--dark { background: var(--hb-navy); color: #fff; border-color: transparent; }
.card--dark h3 { color: #fff; }
.card--dark p { color: rgba(255,255,255,.75); }

/* ---------- Stats strip ---------- */
.stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  padding: 32px; background: #fff; border-radius: var(--hb-radius);
  box-shadow: var(--hb-shadow);
}
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat__n { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--hb-navy); }
.stat__l { color: var(--hb-text-muted); font-size: .88rem; }

/* ---------- Pricing table ---------- */
.pricing { display: grid; gap: 20px; }
@media (min-width: 900px) { .pricing { grid-template-columns: repeat(3, 1fr); } }
.plan {
  background: #fff; border: 2px solid var(--hb-border); border-radius: var(--hb-radius);
  padding: 28px; position: relative;
}
.plan--featured { border-color: var(--hb-sun); box-shadow: var(--hb-shadow-lg); }
.plan__badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--hb-sun); color: var(--hb-navy); font-size: .78rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.plan__name { font-size: 1.1rem; font-weight: 700; color: var(--hb-navy); }
.plan__sub { color: var(--hb-text-muted); font-size: .88rem; margin-bottom: 16px; }
.plan__price { font-size: 2.4rem; font-weight: 800; color: var(--hb-navy); }
.plan__price small { font-size: .85rem; font-weight: 500; color: var(--hb-text-muted); }
.plan__features { list-style: none; padding: 0; margin: 20px 0; }
.plan__features li { padding: 8px 0; border-bottom: 1px dashed var(--hb-border); font-size: .93rem; }
.plan__features li:last-child { border: 0; }
.plan__features li::before { content: "✓ "; color: var(--hb-success); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  background: #fff; border: 1px solid var(--hb-border); border-radius: var(--hb-radius);
  margin-bottom: 12px; padding: 0; transition: box-shadow .2s ease;
}
.faq details[open] { box-shadow: var(--hb-shadow); }
.faq summary {
  padding: 20px 24px; cursor: pointer; font-weight: 700; color: var(--hb-navy);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.6rem; color: var(--hb-sky); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 24px 20px; color: var(--hb-text-muted); }

/* ---------- Testimonials ---------- */
.testimonial {
  background: #fff; border-radius: var(--hb-radius); padding: 28px;
  border-left: 4px solid var(--hb-sun); box-shadow: var(--hb-shadow-sm);
}
.testimonial__stars { color: var(--hb-sun); font-size: 1.1rem; margin-bottom: 12px; }
.testimonial__quote { font-style: italic; margin-bottom: 16px; font-size: 1rem; }
.testimonial__author { font-weight: 700; color: var(--hb-navy); }
.testimonial__location { color: var(--hb-text-muted); font-size: .88rem; }

/* ---------- Form ---------- */
.form { display: grid; gap: 16px; }
.form__row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }
.form__label { display: block; font-weight: 600; color: var(--hb-navy); font-size: .9rem; margin-bottom: 6px; }
.form__input, .form__select, .form__textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--hb-border); border-radius: var(--hb-radius-sm);
  font-family: inherit; font-size: 1rem; background: #fff; color: var(--hb-text); transition: border-color .15s ease, box-shadow .15s ease;
}
.form__input:focus, .form__select:focus, .form__textarea:focus {
  outline: none; border-color: var(--hb-sky); box-shadow: 0 0 0 3px rgba(26,127,184,.15);
}
.form__textarea { min-height: 120px; resize: vertical; }
.form__hint { color: var(--hb-text-muted); font-size: .82rem; margin-top: 4px; }
.form__note { font-size: .82rem; color: var(--hb-text-muted); }

/* ---------- Footer ---------- */
.footer {
  background: var(--hb-navy-dark); color: rgba(255,255,255,.75);
  padding: 64px 0 24px; font-size: .92rem;
}
.footer a { color: rgba(255,255,255,.75); }
.footer a:hover { color: var(--hb-sun); }
.footer__grid {
  display: grid; gap: 32px; grid-template-columns: 1fr;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1);
}
@media (min-width: 700px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer h4 { color: #fff; font-size: .88rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer__brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.15rem; margin-bottom: 12px; }
.footer__brand svg { width: 36px; height: 36px; }
.footer__about { max-width: 360px; font-size: .92rem; line-height: 1.6; }
.footer__social { display: flex; gap: 10px; margin-top: 16px; }
.footer__social a {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
  transition: background .15s ease, transform .15s ease;
}
.footer__social a:hover { background: var(--hb-sun); color: var(--hb-navy); transform: translateY(-2px); }
.footer__social svg { width: 18px; height: 18px; }
.footer__bottom {
  padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .82rem; color: rgba(255,255,255,.5);
}
.footer__bottom a { margin-left: 14px; }

/* ---------- Utilities ---------- */
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--hb-sky-light); color: var(--hb-sky); }
.badge--sun { background: rgba(245,166,35,.15); color: var(--hb-sun-dark); }
.badge--green { background: rgba(16,185,129,.12); color: var(--hb-success); }
.badge--warn { background: rgba(245,158,11,.12); color: #b45309; }

.callout {
  background: var(--hb-sky-light); border-left: 4px solid var(--hb-sky);
  padding: 20px 24px; border-radius: var(--hb-radius);
}
.callout--warn { background: #fff8ea; border-color: var(--hb-warn); }
.callout--sun { background: #fff7e6; border-color: var(--hb-sun); }

.breadcrumb { font-size: .85rem; color: var(--hb-text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--hb-text-muted); }
.breadcrumb a:hover { color: var(--hb-sky); }
.breadcrumb span { margin: 0 6px; }

.check-list { list-style: none; padding: 0; margin: 20px 0; }
.check-list li { padding: 8px 0 8px 30px; position: relative; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 8px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--hb-success); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700;
}

.kicker-bar { padding: 10px 0; background: var(--hb-navy); color: #fff; text-align: center; font-size: .88rem; }
.kicker-bar a { color: var(--hb-sun); font-weight: 700; }

.cta-section { background: linear-gradient(135deg, var(--hb-sun) 0%, var(--hb-sun-dark) 100%); color: var(--hb-navy); padding: 64px 0; }
.cta-section h2 { color: var(--hb-navy); }

/* ---------- Accessibility ---------- */
:focus-visible { outline: 3px solid var(--hb-sky); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ============================================================
   Image components
   ============================================================ */
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-split--reverse .feature-split__media { order: 2; }
.feature-split--reverse .feature-split__body { order: 1; }
.feature-split__media img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--hb-radius-lg); box-shadow: var(--hb-shadow-lg); display: block; }
.feature-split__body h2 { margin: 8px 0 16px; }
.feature-split__body p { color: var(--hb-text-muted); margin-bottom: 12px; }
@media (max-width: 768px) {
  .feature-split { grid-template-columns: 1fr; gap: 32px; }
  .feature-split--reverse .feature-split__media,
  .feature-split--reverse .feature-split__body { order: initial; }
}

.image-band { position: relative; height: clamp(220px, 30vw, 360px); overflow: hidden; }
.image-band img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-band__overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; background: linear-gradient(180deg, rgba(11,31,58,.3) 0%, rgba(11,31,58,.6) 100%); color: #fff; padding: 24px; }
.image-band__overlay h2 { color: #fff; max-width: 800px; font-size: clamp(1.5rem, 3.5vw, 2.4rem); }

.card--with-image { padding: 0; overflow: hidden; }
.card--with-image img { width: 100%; height: 220px; object-fit: cover; display: block; }
.card--with-image .card__body { padding: 24px; }
.card--with-image .card__title { margin: 0 0 8px; }
