/* ============ RESET & TOKENS ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Brand palette sampled from the TrueLine Solar logo:
   amber #F09C00 · charcoal-navy #242430 / #182430 · panel blue #303C60 */
:root {
  --navy: #1b2230;
  --navy-2: #262f40;
  --ink: #232a38;
  --slate: #5f6a7d;
  --line: #e5e9ef;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --amber: #f09c00;
  --amber-2: #e07e00;
  --grad: linear-gradient(100deg, #f5ac1c, #e07e00);
  --radius: 16px;
  --shadow: 0 10px 40px rgba(11, 31, 58, 0.10);
  --shadow-sm: 0 4px 16px rgba(11, 31, 58, 0.07);
  --container: 1160px;
}

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); color: var(--navy); }
h3 { font-size: 1.12rem; font-weight: 700; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-2);
  margin-bottom: 10px;
}
.eyebrow.light { color: #ffc46b; }

.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--navy); color: #d7e1ee; }
.section-dark h2 { color: #fff; }

.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-sub { margin-top: 14px; color: var(--slate); font-size: 1.05rem; }
.section-dark .section-sub { color: #aebccf; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 138, 61, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255, 138, 61, 0.45); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.22); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ============ NAV ============ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }

.brand { display: block; position: relative; line-height: 0; }
.brand-logo {
  height: 52px; width: auto;
  transition: height 0.25s ease, opacity 0.25s ease;
}
.nav.scrolled .brand-logo { height: 44px; }
/* Light-on-dark logo over the hero, full-colour once the nav turns white */
.brand-logo.on-light { position: absolute; inset: 0; opacity: 0; }
.nav.scrolled .brand-logo.on-dark { opacity: 0; }
.nav.scrolled .brand-logo.on-light { opacity: 1; }

.brand-text { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.brand-text em { font-style: normal; color: var(--amber); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { font-weight: 600; font-size: 0.92rem; color: rgba(255,255,255,0.9); transition: color 0.2s; }
.nav-links a:not(.btn):hover { color: var(--amber); }
.nav.scrolled .nav-links a:not(.btn) { color: var(--ink); }
.nav.scrolled .nav-links a:not(.btn):hover { color: var(--amber-2); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; border-radius: 2px; background: #fff; margin: 5px 0; transition: background 0.25s; }
.nav.scrolled .nav-toggle span { background: var(--navy); }

/* ============ HERO ============ */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.03); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 20, 40, 0.55) 0%, rgba(8, 20, 40, 0.35) 45%, rgba(8, 20, 40, 0.75) 100%);
}
.hero-content { position: relative; padding-top: 120px; padding-bottom: 80px; }
.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  margin-bottom: 22px;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { max-width: 560px; margin-top: 20px; font-size: 1.1rem; color: rgba(255, 255, 255, 0.88); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 48px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  width: fit-content;
}
.stat-num, .stat-plus { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-plus { color: var(--amber); }
.stat-label { display: block; font-size: 0.82rem; color: rgba(255, 255, 255, 0.75); margin-top: 2px; }

/* ============ TRUST BAR ============ */
.trustbar { background: var(--navy); color: #b9c6d8; padding: 16px 0; }
.trustbar-inner {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; flex-wrap: wrap;
  font-size: 0.85rem; font-weight: 500;
}
.trustbar strong { color: #fff; letter-spacing: 0.18em; font-weight: 800; }
.trustbar .dot { color: var(--amber); }

/* ============ PRODUCTS ============ */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product-img {
  border-radius: 12px;
  background: var(--bg-alt);
  aspect-ratio: 1 / 0.85;
  display: grid; place-items: center;
  overflow: hidden;
  margin-bottom: 18px;
}
.product-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transform: scale(1.28); }
.product-card h3 { margin-bottom: 8px; color: var(--navy); }
.product-card p { font-size: 0.92rem; color: var(--slate); }

/* ============ SPLIT SECTIONS ============ */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.split-rev { grid-template-columns: 1.1fr 1fr; }
.split-rev .split-text { order: 2; }
.split-rev .split-img { order: 1; }
.split-text h2 { margin-bottom: 16px; }
.split-text > p { color: var(--slate); margin-bottom: 22px; }
.split-img img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: auto; }

.check-list { list-style: none; margin: 0 0 28px; }
.check-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
  font-weight: 500;
}
.check-list li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(245, 166, 35, 0.15);
  color: var(--amber-2);
  font-size: 0.8rem; font-weight: 800;
  display: grid; place-items: center;
}
.check-list.light li::before { background: rgba(245, 166, 35, 0.25); color: var(--amber); }

/* ============ CALCULATOR ============ */
.calc {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 44px;
}
.calc-field { margin-bottom: 28px; }
.calc-field label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--slate); margin-bottom: 4px; }
.calc-value { font-size: 1.5rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.calc-note { font-size: 0.78rem; color: var(--slate); margin-top: 6px; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%; height: 6px;
  border-radius: 999px;
  background: var(--line);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--grad);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(255, 138, 61, 0.5);
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--amber-2);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(255, 138, 61, 0.5);
}

/* retailer segmented control */
.seg { display: flex; gap: 8px; margin: 6px 0 2px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.seg label:hover { border-color: var(--amber); color: var(--ink); }
.seg input:checked + label {
  border-color: var(--amber);
  background: rgba(240, 156, 0, 0.1);
  color: var(--navy);
}
.seg input:focus-visible + label { outline: 2px solid var(--amber); outline-offset: 2px; }

/* battery toggle */
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.95rem; font-weight: 600; color: var(--navy); }
.switch input { width: 20px; height: 20px; accent-color: var(--amber); cursor: pointer; }

/* rebate breakdown */
.rebate-breakdown { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rebate-breakdown li {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 0.86rem; color: var(--slate);
  padding: 7px 12px; background: var(--bg-alt); border-radius: 8px;
}
.rebate-breakdown li span:last-child { font-weight: 700; color: var(--amber-2); font-variant-numeric: tabular-nums; }

.calc-results { display: flex; flex-direction: column; gap: 18px; }
.calc-result-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.result-num { font-variant-numeric: tabular-nums; }
.result-tile {
  background: var(--bg-alt);
  border-radius: 14px;
  padding: 16px 18px;
}
.result-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--slate); text-transform: uppercase; letter-spacing: 0.06em; }
.result-num { font-size: 1.45rem; font-weight: 800; color: var(--navy); }
.result-num.accent { color: var(--amber-2); }

.result-hero {
  background: var(--navy);
  color: #fff;
  border-radius: 14px;
  padding: 20px 22px;
}
.result-hero .result-label { color: #9fb0c6; }
.result-big {
  font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.calc-chart { margin-top: 4px; }
.chart-bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; }
.chart-bars .bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #ffb545, #ff8a3d);
  opacity: 0.85;
  min-height: 3px;
  transition: height 0.35s ease;
}
.chart-bars .bar.neg { background: #d6deea; }
.chart-caption { font-size: 0.75rem; color: var(--slate); margin-top: 10px; }
.calc-disclaimer { font-size: 0.75rem; color: var(--slate); text-align: center; }

/* ============ INCENTIVES ============ */
.incentive-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.incentive-card {
  background: var(--navy-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.incentive-card:hover { transform: translateY(-4px); border-color: rgba(245, 166, 35, 0.4); }
.incentive-icon { font-size: 1.9rem; margin-bottom: 14px; }
.incentive-card h3 { color: #fff; margin-bottom: 10px; }
.incentive-card p { font-size: 0.93rem; color: #aebccf; }
.incentive-disclaimer { margin-top: 32px; text-align: center; font-size: 0.78rem; color: #7f90a8; }

/* ============ PROCESS ============ */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.process-step {
  position: relative;
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 56px 24px 28px;
}
.step-num {
  position: absolute; top: -18px; left: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 800; font-size: 1.1rem;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(255, 138, 61, 0.4);
}
.process-step h3 { color: var(--navy); margin-bottom: 8px; }
.process-step p { font-size: 0.9rem; color: var(--slate); }

/* ============ TESTIMONIALS ============ */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quote-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.stars { color: var(--amber); letter-spacing: 3px; margin-bottom: 14px; }
.quote-card p { font-size: 0.98rem; margin-bottom: 16px; }
.quote-card footer { font-size: 0.82rem; color: var(--slate); font-weight: 600; }

/* ============ CONTACT ============ */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.contact-text h2 { margin-bottom: 16px; }
.contact-text > p { color: #aebccf; margin-bottom: 24px; }

.contact-form {
  background: #fff;
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--shadow);
  color: var(--ink);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; color: var(--slate); }
.form-field input, .form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18);
}
.form-note { font-size: 0.74rem; color: var(--slate); text-align: center; margin-top: 12px; }

/* ============ FOOTER ============ */
.footer { background: #071527; color: #90a2ba; padding: 64px 0 32px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-logo { height: 62px; width: auto; }
.footer-brand p { margin-top: 16px; font-size: 0.9rem; max-width: 300px; }
.footer-col h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 0.9rem; margin-bottom: 10px; transition: color 0.15s; }
.footer-col a:hover { color: var(--amber); }
.footer-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer-legal p { font-size: 0.75rem; color: #64778f; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1000px) {
  .product-grid, .process-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-grid { grid-template-columns: 1fr; }
  .split, .split-rev, .contact-wrap, .calc { grid-template-columns: 1fr; }
  .split-rev .split-text { order: 1; }
  .split-rev .split-img { order: 2; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 28px; width: 100%; }
  .process-grid { row-gap: 44px; }
}

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .product-grid, .process-grid, .incentive-grid, .footer-inner, .form-row { grid-template-columns: 1fr; }
  .process-grid { row-gap: 44px; }
  .calc { padding: 28px 20px; }

  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    box-shadow: var(--shadow);
    padding: 12px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { color: var(--ink) !important; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 14px; text-align: center; }
  .nav.scrolled, .nav:has(.nav-links.open) { background: #fff; }
  .nav:has(.nav-links.open) .brand-logo.on-dark { opacity: 0; }
  .nav:has(.nav-links.open) .brand-logo.on-light { opacity: 1; }
  .nav:has(.nav-links.open) .nav-toggle span { background: var(--navy); }
  .brand-logo, .nav.scrolled .brand-logo { height: 40px; }
}
