/* ============================================================
   RA Solar — mymarylandsolar.com
   Design system + page styles
   Palette: sun gold + Maryland forest green + deep ink navy
   ============================================================ */

:root {
  /* Brand */
  --gold: #F5A623;
  --gold-deep: #E2870B;
  --gold-soft: #FFF4DE;
  --green: #1E7A46;
  --green-deep: #155C34;
  --green-soft: #E7F3EC;
  --ink: #10222F;      /* headings / dark bg */
  --ink-2: #1B3242;
  --slate: #45596B;    /* body text */
  --slate-light: #6B7C8A;
  --cream: #FCFAF5;
  --sand: #FBF3E4;
  --line: #E7E2D7;
  --white: #ffffff;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(16,34,47,.06);
  --shadow: 0 14px 40px rgba(16,34,47,.10);
  --shadow-lg: 0 30px 70px rgba(16,34,47,.16);

  --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--slate);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1rem; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-deep); }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--gold-deep);
  margin: 0 0 .6rem;
}

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-sub { font-size: 1.08rem; color: var(--slate); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .98rem;
  padding: .72em 1.35em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn-lg { padding: .9em 1.7em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(245,166,35,.35);
}
.btn-primary:hover { background: var(--gold-deep); color: #fff; transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,.5);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; transform: translateY(-2px); }

/* On light sections the ghost needs dark text */
.how .btn-ghost, .signup .btn-ghost { border-color: var(--ink); color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252,250,245,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-family: var(--font-head); font-weight: 800; }
.brand:hover { color: var(--ink); }
.brand-text { font-size: 1.3rem; letter-spacing: -.02em; }
.brand-mark { display: block; }

.main-nav { display: flex; align-items: center; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: .97rem; }
.nav-links a:hover { color: var(--green-deep); }
.nav-links .nav-cta a { color: var(--ink); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero-media {
  position: absolute; inset: 0;
  background: url("assets/img/hero-solar-farm.jpg") center 40% / cover no-repeat;
}
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(16,34,47,.90) 0%, rgba(16,34,47,.66) 46%, rgba(16,34,47,.30) 100%),
    linear-gradient(to top, rgba(16,34,47,.55), transparent 40%);
}
.hero-inner { position: relative; padding: clamp(70px, 11vw, 140px) 0 clamp(64px, 9vw, 120px); }
.hero-copy { max-width: 640px; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero .lead { font-size: 1.18rem; color: rgba(255,255,255,.9); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 26px; }
.hero-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 22px; padding: 0; margin: 0; font-weight: 500; font-size: .95rem; color: rgba(255,255,255,.92); }
.hero-badges li { display: inline-flex; align-items: center; gap: .5rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); flex: none; box-shadow: 0 0 0 4px rgba(245,166,35,.22); }

/* ---------- Value props ---------- */
.valueprops { margin-top: -58px; position: relative; z-index: 5; padding-bottom: 8px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.vp-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 28px;
  box-shadow: var(--shadow);
}
.vp-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: var(--gold-soft); color: var(--gold-deep);
}
.vp-icon svg { width: 26px; height: 26px; }
.vp-card h3 { margin-bottom: .4rem; }
.vp-card p { margin: 0; font-size: .98rem; }

/* ---------- How it works ---------- */
.steps {
  list-style: none; margin: 0 0 48px; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.step { position: relative; padding-top: 8px; }
.step-num {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--green); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem;
  display: grid; place-items: center; margin-bottom: 16px;
}
.step h3 { margin-bottom: .35rem; }
.step p { margin: 0; }
.how-figure { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.how-figure img { width: 100%; height: clamp(240px, 34vw, 440px); object-fit: cover; }

/* ---------- Split sections ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.split-media img { width: 100%; height: clamp(300px, 42vw, 520px); object-fit: cover; }
.split-copy h2 { margin-bottom: .6em; }
.benefit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.benefit-list h3 { margin-bottom: .2rem; display: flex; align-items: center; gap: .55rem; }
.benefit-list h3::before {
  content: ""; width: 22px; height: 22px; flex: none; border-radius: 6px;
  background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E7A46' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/14px no-repeat;
}
.benefit-list p { margin: 0; padding-left: calc(22px + .55rem); }

.benefits { background: var(--sand); }
.about { background: var(--green-soft); }
.about-meta { font-weight: 600; color: var(--green-deep); margin-top: 1.2rem; }

/* ---------- Impact band ---------- */
.impact {
  background:
    linear-gradient(180deg, rgba(16,34,47,.86), rgba(16,34,47,.92)),
    url("assets/img/clean-energy-sunset.jpg") center/cover no-repeat fixed;
  color: #fff; padding: clamp(52px, 7vw, 84px) 0;
}
.impact-grid { gap: 20px; }
.impact-stat { text-align: center; padding: 8px; }
.impact-num {
  display: block; font-family: var(--font-head); font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--gold); line-height: 1;
  margin-bottom: .35rem;
}
.impact-label { color: rgba(255,255,255,.86); font-size: 1rem; }
.impact-disclaimer { text-align: center; color: rgba(255,255,255,.62); font-size: .82rem; margin: 26px auto 0; }

/* ---------- Who / cards ---------- */
.who-card, .who-card * { }
.who-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow-sm);
}
.who-card h3 { margin-bottom: .4rem; }
.who-card p { margin: 0; font-size: .98rem; }
.who-card { position: relative; padding-top: 30px; }
.who-card::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--gold); margin-bottom: 16px; }

/* ---------- FAQ ---------- */
.accordion { display: grid; gap: 12px; }
.accordion details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.accordion summary {
  cursor: pointer; list-style: none; padding: 18px 22px;
  font-family: var(--font-head); font-weight: 600; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+"; font-size: 1.5rem; color: var(--gold-deep); font-weight: 400;
  transition: transform .2s ease; line-height: 1;
}
.accordion details[open] summary::after { transform: rotate(45deg); }
.acc-body { padding: 0 22px 20px; }
.acc-body p { margin: 0; }

/* ---------- Sign up ---------- */
.signup { background: var(--gold-soft); padding: clamp(56px, 8vw, 100px) 0; }
.signup-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.signup-copy h2 { margin-bottom: .5em; }
.signup-points { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 10px; font-weight: 500; color: var(--ink-2); }
.signup-points li { display: flex; align-items: center; gap: .6rem; }

.signup-form {
  background: #fff; border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: .88rem; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245,166,35,.22);
}
.field input:user-invalid { border-color: #d9534f; }
.form-note { margin: 12px 0 0; font-weight: 600; min-height: 1.2em; }
.form-note.ok { color: var(--green-deep); }
.form-note.err { color: #c0392b; }
.form-fineprint { margin: 12px 0 0; font-size: .78rem; color: var(--slate-light); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding: 60px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 36px; }
.site-footer .brand, .site-footer .brand-text { color: #fff; }
.footer-tag { margin: 14px 0 8px; max-width: 320px; }
.footer-loc { font-weight: 600; color: var(--gold); }
.footer-col h4 { color: #fff; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a, .footer-col span { color: rgba(255,255,255,.72); font-size: .95rem; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px;
  font-size: .82rem; color: rgba(255,255,255,.5);
}
.footer-bottom p { margin: 0; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .impact { background-attachment: scroll; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .grid-3, .steps { grid-template-columns: 1fr 1fr; }
  .split, .signup-inner { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .impact { background-attachment: scroll; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav { position: static; }
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
    max-height: 0; overflow: hidden; transition: max-height .28s ease; box-shadow: var(--shadow);
  }
  .nav-links.open { max-height: 520px; }
  .nav-links li { padding: 6px 0; }
  .nav-links .nav-cta { margin-top: 6px; }
  .nav-links .nav-cta a { width: 100%; }
  .valueprops { margin-top: -30px; }
}

@media (max-width: 560px) {
  .grid-3, .steps, .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
}
