/* WattWise — Home Electrification Savings Calculators
   Clean, fast, mobile-first. Single stylesheet, zero dependencies. */

:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #5eead4;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --text: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-accent: #f0fdfa;
  --border: #e2e8f0;
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* HEADER */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 8px;
  font-weight: 900;
  font-size: 16px;
}
.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
}
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; font-size: 24px; color: var(--text); }

/* HERO */
.hero {
  background: linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 100%);
  padding: 72px 0 56px;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  max-width: 820px;
}
.hero p.lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 28px;
}
.hero-ctas {
  display: flex; gap: 12px; flex-wrap: wrap;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--bg-soft); color: var(--text); }
.btn-block { width: 100%; }

/* SECTIONS */
section { padding: 56px 0; }
section.tight { padding: 32px 0; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }
h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
p { margin-bottom: 14px; color: var(--text); }
.section-intro { color: var(--text-muted); font-size: 1.05rem; max-width: 680px; margin-bottom: 32px; }

/* CALCULATOR GRID */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.calc-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  color: inherit;
}
.calc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
  text-decoration: none;
  color: inherit;
}
.calc-card .emoji { font-size: 32px; margin-bottom: 12px; }
.calc-card h3 { color: var(--text); margin-bottom: 6px; }
.calc-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 14px; flex: 1; }
.calc-card .tag {
  display: inline-block;
  font-size: 12px;
  color: var(--primary-dark);
  background: var(--bg-accent);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  margin-bottom: 10px;
  width: fit-content;
}
.calc-card .arrow { color: var(--primary); font-weight: 600; font-size: 0.9rem; }

/* CALCULATOR LAYOUT */
.calc-wrap {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .calc-wrap { grid-template-columns: 1fr; }
}

.calc-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.calc-form .field { margin-bottom: 18px; }
.calc-form label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text);
}
.calc-form label .hint {
  font-weight: 400;
  color: var(--text-light);
  font-size: 13px;
  margin-left: 6px;
}
.calc-form input[type="number"],
.calc-form input[type="text"],
.calc-form input[type="email"],
.calc-form select,
.calc-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.calc-form input:focus,
.calc-form select:focus,
.calc-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.calc-results {
  background: var(--bg-accent);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: sticky;
  top: 80px;
}
.calc-results h3 { color: var(--primary-dark); margin-bottom: 16px; font-size: 1.1rem; }
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(15, 118, 110, 0.2);
}
.result-row:last-of-type { border-bottom: 0; }
.result-row .label { color: var(--text-muted); font-size: 14px; }
.result-row .value { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.result-row .value.big { font-size: 1.4rem; color: var(--primary-dark); }
.result-highlight {
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
  text-align: center;
}
.result-highlight .label { color: rgba(255,255,255,0.85); font-size: 13px; letter-spacing: 0.02em; text-transform: uppercase; }
.result-highlight .value { color: #fff; font-size: 2rem; font-weight: 800; display: block; margin-top: 4px; }
.result-note { font-size: 13px; color: var(--text-light); margin-top: 12px; line-height: 1.5; }

/* AD SLOTS */
.ad-slot {
  margin: 32px auto;
  padding: 20px;
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-slot[data-ad-format="leaderboard"] { max-width: 728px; min-height: 90px; }
.ad-slot[data-ad-format="rectangle"] { max-width: 336px; min-height: 280px; }
.ad-slot[data-ad-format="sidebar"] { min-height: 250px; }

/* LEAD-CAPTURE CARD */
.lead-card {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 28px 0;
}
.lead-card h3 { color: #9a3412; }
.lead-card p { color: #7c2d12; font-size: 0.95rem; }
.lead-card .btn-accent { margin-top: 8px; }

/* AFFILIATE / REFERRAL CALLOUT */
.affiliate-box {
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 6px;
  font-size: 0.95rem;
}
.affiliate-box strong { display: block; margin-bottom: 4px; }

/* ARTICLE PROSE */
.prose { max-width: 720px; margin: 0 auto; }
.prose h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; }
.prose h2 { margin-top: 36px; }
.prose h3 { margin-top: 24px; }
.prose p, .prose ul, .prose ol { margin-bottom: 16px; font-size: 1.05rem; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose blockquote {
  border-left: 4px solid var(--primary);
  padding: 6px 16px;
  background: var(--bg-accent);
  color: var(--text-muted);
  font-style: italic;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
}
.prose code {
  font-family: var(--font-mono);
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}
.byline { color: var(--text-light); font-size: 0.9rem; margin-bottom: 28px; }

/* FOOTER */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: 56px;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: var(--text); margin-bottom: 10px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a { color: var(--text-muted); }
.footer-grid a:hover { color: var(--primary); }
.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.85rem; color: var(--text-light);
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 400;
  transition: transform 0.15s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin-top: 10px; color: var(--text-muted); }

/* RESPONSIVE NAV */
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 14px 24px;
    border: 1px solid var(--border);
    border-radius: 0 0 0 var(--radius);
    box-shadow: var(--shadow);
    min-width: 200px;
  }
  .nav-links.open { display: flex; }
}

/* UTILITIES */
.muted { color: var(--text-muted); }
.small { font-size: 0.88rem; }
.center { text-align: center; }
.mt-4 { margin-top: 20px; }
.mb-4 { margin-bottom: 20px; }
.disclaimer { font-size: 0.82rem; color: var(--text-light); line-height: 1.5; margin-top: 16px; padding: 12px; background: var(--bg-soft); border-radius: 6px; }

/* Accessibility */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
