/* Energy Heroes — landing page styles. Mobile-first; wider layouts at the bottom. */

:root {
  --navy: #0F2A3D;
  --orange: #C2410C;
  --orange-dark: #9A3412;
  --orange-light: #F59E5B;
  --bg: #F6F5F0;
  --gray: #3E4F5B;
  --white: #FFFFFF;
  --line: #D9D6CC;
  --error: #B42318;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 42, 61, .06), 0 6px 20px rgba(15, 42, 61, .08);
  --focus: 0 0 0 3px var(--white), 0 0 0 6px var(--navy);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); }
p { margin: 0 0 1em; }
a { color: var(--orange-dark); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 12px 16px; border-radius: 8px;
}
.skip-link:focus { top: 8px; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
/* Wraps the call button onto a second line if the phone's text size leaves no room. */
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.wordmark { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: clamp(1.05rem, 4.6vw, 1.25rem); color: var(--navy); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.wordmark-bolt { width: 26px; height: 26px; fill: var(--orange); }
.call-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px;
  border: 2px solid var(--navy); border-radius: 999px; color: var(--navy);
  font-weight: 700; text-decoration: none; white-space: nowrap;
}
.call-link svg { width: 18px; height: 18px; fill: currentColor; }
.call-link:hover { background: var(--navy); color: var(--white); }
@media (max-width: 479px) {
  .header-inner { column-gap: 8px; }
  .call-link { min-height: 44px; padding: 0 10px; gap: 5px; font-size: .9rem; }
  .call-link svg { width: 16px; height: 16px; }
}

/* Hero */
.hero { padding: 28px 0 40px; }
.hero-grid { display: grid; gap: 28px; }
.eyebrow { font-size: .875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--orange-dark); margin-bottom: .75em; }
h1 { font-size: clamp(2rem, 7vw, 3.1rem); letter-spacing: -.02em; }
.subhead { color: var(--gray); font-size: 1.125rem; }

.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 24px; }
.badges li {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  font-weight: 700; font-size: .95rem;
}
.badges li::before {
  content: ""; width: 16px; height: 16px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/100% no-repeat;
  background: var(--orange);
}

.rate-graphic { margin: 0; background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.rate-graphic svg { display: block; width: 100%; height: auto; }
.rate-graphic .axis { stroke: var(--line); stroke-width: 2; }
.line-variable { fill: none; stroke: var(--orange-light); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.line-fixed { stroke: var(--navy); stroke-width: 5; stroke-linecap: round; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; font-size: .95rem; color: var(--gray); font-weight: 600; }
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 22px; height: 5px; border-radius: 3px; display: inline-block; }
.swatch-variable { background: var(--orange-light); }
.swatch-fixed { background: var(--navy); }

/* Form */
.form-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 18px; scroll-margin-top: 80px; }
.form-card h2 { font-size: 1.45rem; }
.field { margin-bottom: 18px; }
.field > label, .label { display: block; font-weight: 700; margin-bottom: 6px; }
.req, .opt { font-weight: 400; color: var(--gray); font-size: .9rem; }
.hint { color: var(--gray); font-size: .95rem; margin: -2px 0 10px; }

input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%; min-height: 52px; padding: 12px 14px; font: inherit; color: var(--navy);
  background: var(--white); border: 2px solid #8A969E; border-radius: 10px;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15, 42, 61, .25); }
input[aria-invalid="true"] { border-color: var(--error); }

.upload-buttons { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.upload-btn { position: relative; }
.upload-btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.file-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 0; }
.upload-btn:focus-within { box-shadow: var(--focus); }
.upload-buttons.invalid .upload-btn { border-color: var(--error); }

.file-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.file-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 8px 8px 12px; background: var(--bg); border-radius: 10px; font-size: .95rem;
}
.file-list .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-remove {
  flex: none; min-width: 44px; min-height: 44px; border: 0; border-radius: 8px; background: transparent;
  color: var(--orange-dark); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline;
}

.check { display: flex; gap: 12px; align-items: flex-start; }
.check input { flex: none; width: 26px; height: 26px; margin: 2px 0 0; accent-color: var(--orange); cursor: pointer; }
.check label { font-weight: 400; font-size: .98rem; margin: 0; cursor: pointer; }
.check-error { margin: -10px 0 16px 38px; }

.error { color: var(--error); font-weight: 600; font-size: .95rem; margin: 6px 0 0; }
.error-summary { border: 2px solid var(--error); background: #FEF3F2; color: var(--error); border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-weight: 600; }
.error-summary:focus { outline: none; box-shadow: var(--focus); }
.error-summary ul { margin: 6px 0 0; padding-left: 20px; }
.error-summary a { color: var(--error); }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-note { color: var(--gray); font-size: .9rem; margin: 14px 0 0; text-align: center; }

.thank-you { text-align: center; padding: 24px 6px; }
.thank-you:focus { outline: none; }
.thank-icon { width: 64px; height: 64px; fill: var(--orange); margin-bottom: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 22px; border-radius: 10px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center;
}
.btn-primary { background: var(--orange); color: var(--white); font-size: 1.125rem; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-primary:disabled { opacity: .7; cursor: progress; }
.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--navy); font-size: 1rem; padding: 12px 10px; }
.btn-secondary:hover { background: var(--bg); }
.btn-block { width: 100%; min-height: 58px; }

/* Sections */
.section { padding: 48px 0; }
.section-alt { background: var(--white); }
.section-title { font-size: clamp(1.6rem, 5vw, 2.1rem); text-align: center; margin-bottom: 28px; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.step { padding: 22px 20px; }
.step h3 { font-size: 1.2rem; margin-bottom: .3em; }
.step p { color: var(--gray); margin: 0; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 50%; background: var(--orange); color: var(--white); font-weight: 800; margin-bottom: 12px;
}

.testimonial { margin: 0 auto; max-width: 780px; padding: 28px 22px; background: var(--bg); box-shadow: none; border-left: 6px solid var(--orange-light); }
.testimonial blockquote { margin: 0; }
.testimonial blockquote p { font-size: 1.15rem; line-height: 1.6; }
.testimonial figcaption { font-weight: 700; color: var(--gray); }

.faq details { background: var(--white); border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 12px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 52px 18px 18px; min-height: 56px;
  font-weight: 700; font-size: 1.05rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; font-weight: 400; color: var(--orange);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 18px 18px; margin: 0; color: var(--gray); }

.closing { background: var(--navy); color: var(--white); }
.closing h2 { color: var(--white); font-size: clamp(1.7rem, 5vw, 2.3rem); }
.closing p { color: #DCE3E8; font-size: 1.1rem; }
.closing .btn:focus-visible { box-shadow: 0 0 0 3px var(--navy), 0 0 0 6px var(--white); }

/* Footer */
.site-footer { padding: 28px 0 36px; color: var(--gray); font-size: .92rem; text-align: center; }
.site-footer p { margin: 0 0 8px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; }
.footer-links a { display: inline-block; padding: 10px 2px; color: var(--navy); }

/* Privacy page */
.policy { padding: 36px 0 48px; }
.policy h1 { font-size: clamp(1.9rem, 6vw, 2.5rem); }
.policy h2 { font-size: 1.3rem; margin-top: 1.6em; }
.policy ul { padding-left: 22px; }
.policy li { margin-bottom: .4em; }

/* Tiny phones: stack the two upload buttons */
@media (max-width: 359px) {
  .upload-buttons { grid-template-columns: 1fr; }
  .wordmark-bolt { display: none; }
}

/* Tablets and up */
@media (min-width: 720px) {
  .hero { padding: 48px 0 56px; }
  .form-card { padding: 28px 26px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .section { padding: 64px 0; }
}

/* Desktop: copy on the left, form on the right */
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: start; }
  .form-card { position: sticky; top: 88px; }
}
