/* ============================================================
   Utilify — Shared Styles
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fafafa;
  --fg: #111;
  --muted: #666;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e5e5e5;
  --card-bg: #fff;
  --green: #16a34a;
  --orange: #ea580c;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */
header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.logo span { color: var(--accent); }
header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  margin-left: 24px;
}
header nav a:hover { color: var(--fg); }

/* ---- Hero ---- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}
.hero h1 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.hero p {
  font-size: 18px;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 32px;
}
.badge {
  display: inline-block;
  background: #dbeafe;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
}

/* ---- Search Form ---- */
.search-form {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
}
.search-form input[type="text"] {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 17px;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--fg);
  transition: border-color 0.2s;
}
.search-form input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}
.search-form button {
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.search-form button:hover { background: var(--accent-hover); }
.search-error {
  color: #dc2626;
  font-size: 14px;
  text-align: center;
  margin-top: 8px;
  display: none;
}

/* ---- Steps ---- */
.steps {
  padding: 60px 0;
  border-top: 1px solid var(--border);
}
.steps h2 {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 40px;
  letter-spacing: -0.5px;
}
.steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}
.step { text-align: center; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 12px;
}
.step h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}
.step p {
  font-size: 14px;
  color: var(--muted);
}

/* ---- Trust Stats ---- */
.trust {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  text-align: center;
}
.trust-stat {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}
.trust-label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  padding: 16px 0;
  font-size: 14px;
  color: var(--muted);
}
.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }

/* ---- FTC Disclosure Banner ---- */
.ftc-disclosure {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #92400e;
  line-height: 1.5;
  margin-bottom: 32px;
}

/* ---- Page Heading ---- */
.page-heading {
  margin-bottom: 8px;
}
.page-heading h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.page-summary {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ---- Utility Group ---- */
.utility-group {
  margin-bottom: 48px;
}
.utility-group__header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--fg);
}
.utility-group__header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.utility-group__count {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
}
.deregulated-badge {
  display: inline-block;
  background: #dcfce7;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

/* ---- Plan Cards ---- */
.plan-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.plan-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 24px;
  align-items: start;
}
.plan-card__info {
  min-width: 0;
}
.plan-card__provider {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 2px;
}
.plan-card__name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.plan-card__rate {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}
.plan-card__rate-unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.plan-card__monthly {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}
.plan-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.plan-card__tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  background: #f3f4f6;
  color: var(--muted);
}
.plan-card__tag--green {
  background: #dcfce7;
  color: var(--green);
}
.plan-card__tag--orange {
  background: #fff7ed;
  color: var(--orange);
}
.plan-card__features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.plan-card__feature {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #eff6ff;
  color: var(--accent);
}
.plan-card__action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}
.btn-signup {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 24px;
  border-radius: 8px;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-signup:hover { background: var(--accent-hover); }

/* Regulated provider card (no signup button) */
.plan-card--regulated {
  grid-template-columns: 1fr;
}
.plan-card--regulated .plan-card__contact {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}
.plan-card--regulated .plan-card__contact a {
  color: var(--accent);
  text-decoration: none;
}

/* ---- ZIP Intro ---- */
.zip-intro {
  margin-bottom: 20px;
}
.zip-intro p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
}

/* ---- Nearby ZIPs ---- */
.nearby-zips {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.nearby-zips h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 16px;
}
.nearby-zips__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.nearby-zip-link {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.nearby-zip-link:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}
.nearby-zip-link__name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 2px;
}
.nearby-zip-link__zip {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

/* ---- Not Supported ---- */
.not-supported {
  text-align: center;
  padding: 80px 0;
}
.not-supported h1 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 16px;
}
.not-supported p {
  font-size: 16px;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 24px;
}
.not-supported a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.not-supported a:hover { text-decoration: underline; }

/* ---- Contact Form ---- */
.cta {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.cta h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.cta p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 24px;
}
.contact-form {
  max-width: 420px;
  margin: 0 auto;
  text-align: left;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 12px;
  background: var(--card-bg);
  color: var(--fg);
}
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form button {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.contact-form button:hover { background: var(--accent-hover); }

/* ---- Footer ---- */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
footer a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 12px;
}
footer a:hover { color: var(--fg); }
.disclosure {
  max-width: 520px;
  margin: 16px auto 0;
  font-size: 12px;
  color: #999;
  line-height: 1.5;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  .search-form { flex-direction: column; }
  .search-form button { width: 100%; }
  .steps-grid { grid-template-columns: 1fr; gap: 32px; }
  .trust-grid { grid-template-columns: 1fr; gap: 24px; }
  .plan-card {
    grid-template-columns: 1fr;
  }
  .plan-card__action {
    align-items: stretch;
    flex-direction: row;
  }
  .btn-signup { text-align: center; width: 100%; }
  .page-heading h1 { font-size: 24px; }
  .utility-group__header { flex-wrap: wrap; }
  .nearby-zips__grid { grid-template-columns: 1fr 1fr; }
}
