/* ============================================================
   SunGenius HQ — global stylesheet
   Brand: orange #E29434 (from logo), ink black, warm cream
   ============================================================ */

:root {
  --orange: #e29434;
  --orange-dark: #c57c1e;
  --orange-soft: #f6dcb4;
  --ink: #16130d;
  --charcoal: #211d15;
  --cream: #faf6ee;
  --cream-dark: #f1eadd;
  --white: #ffffff;
  --muted: #6d675b;
  --line: #e5ddcc;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(22, 19, 13, 0.10);
  --font-display: "Archivo", sans-serif;
  --font-body: "Inter", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
}

img { max-width: 100%; display: block; }

a { color: var(--orange-dark); }

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* ---------- typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.25rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin-bottom: 0.9rem;
}

.section-sub {
  color: var(--muted);
  max-width: 46rem;
  margin: 0.9rem auto 0;
}

.center { text-align: center; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.95rem 2.1rem;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--orange);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(226, 148, 52, 0.35);
}

.btn-primary:hover {
  background: var(--orange-dark);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 246, 238, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 0;
}

.brand img { height: 44px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 1.6rem; }

.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--ink);
}

.main-nav a:hover { color: var(--orange-dark); }

.main-nav a.nav-cta {
  background: var(--orange);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
}

.main-nav a.nav-cta:hover { background: var(--orange-dark); color: var(--white); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--ink);
  margin: 5px 0;
  border-radius: 2px;
}

/* ---------- hero ---------- */

.hero {
  background:
    radial-gradient(ellipse 80% 65% at 78% -10%, rgba(226, 148, 52, 0.35), transparent 60%),
    linear-gradient(rgba(22, 19, 13, 0.62), rgba(22, 19, 13, 0.82)),
    url("../assets/photos/hero-sunset.jpg") center / cover no-repeat var(--charcoal);
  color: var(--white);
  padding: 6.5rem 0 6rem;
  overflow: hidden;
  position: relative;
}

.hero .eyebrow { color: var(--orange); }

.hero h1 { color: var(--white); max-width: 15ch; }

.hero p.lead {
  font-size: 1.18rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 34rem;
  margin: 1.4rem 0 2.2rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-sun {
  position: absolute;
  right: -120px;
  top: -120px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226,148,52,0.55) 0%, rgba(226,148,52,0.12) 55%, transparent 72%);
  pointer-events: none;
}

/* page hero (subpages) */
.page-hero {
  background:
    radial-gradient(ellipse 70% 90% at 85% -20%, rgba(226, 148, 52, 0.4), transparent 60%),
    var(--charcoal);
  color: var(--white);
  padding: 4.2rem 0 3.6rem;
}

.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4.2vw, 3rem); }

.page-hero p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 40rem;
  margin-top: 1rem;
}

/* ---------- stat band ---------- */

.stat-band { background: var(--orange); padding: 2.4rem 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-grid strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.1rem;
  color: var(--ink);
}

.stat-grid span { font-size: 0.95rem; color: rgba(22, 19, 13, 0.8); }

/* ---------- sections & cards ---------- */

.section { padding: 5rem 0; }

.section-alt { background: var(--white); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.6rem;
  margin-top: 3rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow);
}

.section-alt .card { background: var(--cream); }

.card .card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--orange-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
}

.card h3 { margin-bottom: 0.6rem; }

.card p { color: var(--muted); font-size: 0.98rem; }

.card .source {
  display: block;
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.85;
}

/* numbered steps */
.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
  margin-top: 3rem;
  counter-reset: step;
}

.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  position: relative;
}

.step .step-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 0.8rem;
}

.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.97rem; }

/* photos */
.photo {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.split .photo { margin-top: 1.8rem; }

/* two-column feature rows */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  margin-top: 3rem;
}

.split h3 { font-size: 1.5rem; margin-bottom: 0.7rem; }
.split p { color: var(--muted); }

.check-list { list-style: none; margin-top: 1.2rem; }

.check-list li {
  padding-left: 2rem;
  position: relative;
  margin-bottom: 0.8rem;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- FAQ accordion ---------- */

.faq-list { max-width: 50rem; margin: 3rem auto 0; }

.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1.2rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--orange-dark);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item .faq-body {
  padding: 0 1.5rem 1.3rem;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- quote form ---------- */

.quote-section {
  background:
    radial-gradient(ellipse 75% 80% at 50% -30%, rgba(226, 148, 52, 0.35), transparent 65%),
    var(--charcoal);
  color: var(--white);
  padding: 5rem 0;
}

.quote-section h2 { color: var(--white); }

.quote-section .section-sub { color: rgba(255, 255, 255, 0.78); }

.quote-form-wrap {
  max-width: 620px;
  margin: 2.6rem auto 0;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 2.4rem 2.2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

/* compact variant: lighter band on subpages */
.quote-section.compact { padding: 3.5rem 0; }

.quote-section.compact .quote-form-wrap {
  max-width: 560px;
  padding: 1.8rem 1.7rem;
}

.quote-form .field { margin-bottom: 1.1rem; }

.quote-form label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.quote-form input[type="text"],
.quote-form input[type="tel"],
.quote-form input[type="email"],
.quote-form select {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: var(--font-body);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
}

.quote-form input:focus, .quote-form select:focus {
  outline: 2px solid var(--orange);
  border-color: var(--orange);
}

.quote-form .field.error input { border-color: #c0392b; }

.field-error {
  color: #c0392b;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  display: none;
}

.field.error .field-error { display: block; }

.consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 1.2rem 0 1.4rem;
}

.consent input {
  margin-top: 0.3rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--orange-dark);
  flex-shrink: 0;
}

.consent label {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 400;
}

.form-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.9rem;
}

/* ---------- modal (step 2 popup) ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 19, 13, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 460px;
  width: 100%;
  padding: 2.3rem 2.1rem;
  position: relative;
  animation: modal-in 0.25s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal .step-tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange-dark);
}

.modal h3 { font-size: 1.45rem; margin: 0.5rem 0 0.4rem; }

.modal .modal-sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.4rem; }

.modal .skip-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  width: 100%;
  font-family: var(--font-body);
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  padding: 4rem 0 2rem;
  font-size: 0.93rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand img { height: 40px; width: auto; margin-bottom: 1rem; }

.footer-brand p { max-width: 26rem; font-size: 0.88rem; }

.site-footer h4 {
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.site-footer ul { list-style: none; }

.site-footer li { margin-bottom: 0.55rem; }

.site-footer a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }

.site-footer a:hover { color: var(--orange); }

.footer-legal {
  padding-top: 1.6rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

.footer-legal p { margin-bottom: 0.6rem; }

/* ---------- utility / misc ---------- */

.text-page .container { max-width: 800px; }

.text-page h1 { font-size: 2.2rem; margin-bottom: 0.4rem; }

.text-page h2 { font-size: 1.35rem; margin: 2.2rem 0 0.7rem; }

.text-page p, .text-page li { color: #3c382f; font-size: 0.98rem; margin-bottom: 0.9rem; }

.text-page ul { padding-left: 1.4rem; }

.updated-date { color: var(--muted); font-size: 0.85rem; margin-bottom: 2rem; }

/* thank-you page */
.thanks-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  text-align: center;
}

.thanks-hero .big-check {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
  font-size: 2.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.6rem;
}

/* ---------- funnel pages ---------- */

.funnel-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}

.funnel-header .header-inner { justify-content: center; }

.funnel-hero {
  background:
    radial-gradient(ellipse 80% 65% at 78% -10%, rgba(226, 148, 52, 0.35), transparent 60%),
    linear-gradient(rgba(22, 19, 13, 0.68), rgba(22, 19, 13, 0.85)),
    url("../assets/photos/hero-sunset.jpg") center / cover no-repeat var(--charcoal);
  color: var(--white);
  padding: 3.5rem 0 4.5rem;
  text-align: center;
}

.funnel-hero h1 {
  color: var(--white);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  max-width: 22ch;
  margin: 0.6rem auto 0;
}

.funnel-hero .lead {
  color: rgba(255, 255, 255, 0.82);
  max-width: 36rem;
  margin: 1rem auto 0;
  font-size: 1.08rem;
}

.funnel-card {
  max-width: 560px;
  margin: -2.6rem auto 0;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(22, 19, 13, 0.22);
  padding: 2rem 1.9rem 2.2rem;
  position: relative;
  z-index: 5;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--cream-dark);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--orange);
  transition: width 0.35s ease;
}

.progress-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.step-panel { display: none; }
.step-panel.active { display: block; animation: modal-in 0.3s ease; }

.step-panel h2 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.step-panel .step-sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.4rem; }

.bill-readout {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.4rem;
  color: var(--orange-dark);
  margin: 0.6rem 0 0.2rem;
}

.bill-readout small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--muted);
}

input[type="range"].bill-slider {
  width: 100%;
  margin: 1.2rem 0 1.6rem;
  accent-color: var(--orange-dark);
  cursor: pointer;
}

.calc-anim { text-align: center; padding: 2.5rem 0; }

.calc-anim .sun-spin {
  font-size: 3.4rem;
  display: inline-block;
  animation: spin 2.2s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.calc-anim p {
  color: var(--muted);
  margin-top: 1rem;
  font-size: 0.98rem;
  min-height: 1.6em;
}

.funnel-trust { padding: 3.5rem 0 1rem; }

.funnel-steps { padding: 1rem 0 4rem; }

.back-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 0.9rem;
  font-family: var(--font-body);
  display: inline-block;
}

.funnel-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  padding: 2rem 0;
  font-size: 0.78rem;
}

.funnel-footer a { color: rgba(255, 255, 255, 0.7); }

.funnel-footer p { max-width: 52rem; margin: 0 auto 0.6rem; }

/* funnel #2: split hero with inline qualification card */

.funnel-hero.split-hero {
  text-align: left;
  padding: 4rem 0;
}

.funnel-hero.split-hero .split-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.funnel-hero.split-hero h1 { margin: 0.6rem 0 0; }

.funnel-hero.split-hero .lead { margin: 1rem 0 0; }

.hero-bullets {
  list-style: none;
  margin-top: 1.6rem;
  padding: 0;
}

.hero-bullets li {
  padding-left: 2rem;
  position: relative;
  margin-bottom: 0.7rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.98rem;
}

.hero-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.funnel-hero.split-hero .funnel-card {
  margin: 0;
  max-width: none;
}

.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 0.3rem;
}

.choice-btn {
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.choice-btn:hover { border-color: var(--orange); }

.choice-btn.selected {
  border-color: var(--orange-dark);
  background: var(--orange-soft);
}

.choice-row.three { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 480px) {
  .choice-row.three { grid-template-columns: 1fr; }
}

.qualify-note {
  background: var(--orange-soft);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 1.1rem;
}

@media (max-width: 900px) {
  .funnel-hero.split-hero .split-inner { grid-template-columns: 1fr; gap: 2.2rem; }
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem 4%;
    gap: 1.1rem;
  }

  .main-nav.open { display: flex; }

  .nav-toggle { display: block; }

  .split { grid-template-columns: 1fr; gap: 2rem; }

  .stat-grid { grid-template-columns: 1fr; gap: 1.2rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .hero { padding: 4.5rem 0 4rem; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}
