/* SunPeak Solar Advisors — crisp, bright, sunny */

:root {
  --amber: #F59E0B;
  --amber-dark: #B45309;
  --navy: #1E293B;
  --navy-deep: #0F172A;
  --cream: #FFFBEB;
  --white: #FFFFFF;
  --ink: #1E293B;
  --muted: #57534E;
  --line: #FDE68A;
  --radius: 4px;
  --font-head: "Zilla Slab", serif;
  --font-body: "Raleway", arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

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

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; }

img, svg { max-width: 100%; }

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

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

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

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

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.7rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-solid {
  background: var(--amber);
  color: var(--navy-deep);
  border-color: var(--amber);
}
.btn-solid:hover { background: var(--amber-dark); border-color: var(--amber-dark); color: var(--white); }

.btn-light {
  background: var(--cream);
  color: var(--navy);
  border-color: var(--cream);
}
.btn-light:hover { background: transparent; color: var(--cream); }

/* Sticky nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 3px solid var(--amber);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  gap: 1rem;
}

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--amber);
  text-decoration: none;
  white-space: nowrap;
}
.logo span { color: var(--white); font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links a:not(.btn) {
  color: #E2E8F0;
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0;
}
.nav-links a:not(.btn):hover { color: var(--amber); }
.nav-cta { padding: 0.5rem 1.1rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Hero — full-bleed photo with brand-tinted scrim */
.hero {
  background:
    linear-gradient(180deg,
      rgba(15, 23, 42, 0.82) 0%,
      rgba(30, 41, 59, 0.62) 45%,
      rgba(124, 45, 18, 0.55) 78%,
      rgba(180, 83, 9, 0.55) 100%),
    url("https://images.unsplash.com/flagged/photo-1566838616631-f2618f74a6a2?auto=format&fit=crop&w=1600&q=80")
      center 35% / cover no-repeat;
  color: var(--cream);
  text-align: center;
  min-height: 76vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 0;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(15, 23, 42, 0.45);
}

.hero .tagline {
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 500;
  color: #FDE68A;
  margin-top: 0.75rem;
}

.hero .subline {
  max-width: 620px;
  margin: 1.25rem auto 2rem;
  font-size: 1.1rem;
  color: #FEF3C7;
  text-shadow: 0 1px 8px rgba(15, 23, 42, 0.5);
}

/* Sections */
.section { padding: 5rem 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section h2 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.section h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--amber);
  margin-top: 0.6rem;
}

.section-intro { color: var(--muted); margin-bottom: 2.5rem; max-width: 640px; }

#about p + p { margin-top: 1rem; }

/* About — text beside photo */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-photo {
  margin: 0;
  border: 1px solid var(--line);
  border-top: 4px solid var(--amber);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Full-width photo bands */
.photo-band { margin: 0; }
.photo-band img {
  display: block;
  width: 100%;
  height: clamp(220px, 34vw, 380px);
  object-fit: cover;
}
.photo-band-thin img { height: clamp(140px, 20vw, 220px); }

/* Process supporting photo */
.process-photo {
  margin: 3rem 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  border-top: 4px solid var(--amber);
}
.process-photo img {
  display: block;
  width: 100%;
  height: clamp(220px, 30vw, 340px);
  object-fit: cover;
}

/* Contact side photo */
.contact-photo {
  margin: 1.75rem 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.contact-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Service cards — sharp corners, amber top accent */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-top: 4px solid var(--amber);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(30, 41, 59, 0.08);
}

.card-icon {
  width: 44px;
  height: 44px;
  color: var(--amber-dark);
  margin-bottom: 1rem;
}

.card h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.6rem; }
.card p { font-size: 0.95rem; color: var(--muted); }

/* Process steps */
.process { background: var(--navy); color: var(--cream); }
.process h2 { color: var(--white); }
.process .section-intro { color: #CBD5E1; }

.process-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  counter-reset: step;
}

.process-step { position: relative; padding-top: 0.5rem; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--amber);
  color: var(--navy-deep);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.process-step h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; color: #FDE68A; }
.process-step p { font-size: 0.93rem; color: #E2E8F0; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.field { margin-bottom: 1.15rem; }

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.85rem; }

.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #D6D3D1;
  border-radius: var(--radius);
}
.field input:focus,
.field textarea:focus {
  border-color: var(--amber);
  outline: 2px solid var(--amber);
  outline-offset: 0;
}

.field input[type="file"] { font-size: 0.9rem; }

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.field-check input { margin-top: 0.3rem; accent-color: var(--amber); }
.field-check label { font-weight: 400; font-size: 0.9rem; color: var(--muted); margin: 0; }

.form-msg {
  margin-top: 0.9rem;
  font-weight: 600;
  min-height: 1.4em;
}
.form-msg.ok { color: #166534; }
.form-msg.err { color: #B91C1C; }

.contact-info-col h3 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.contact-info-col h3 + address, .contact-line { margin-bottom: 0.5rem; }
.contact-info-col address { font-style: normal; margin-bottom: 0.75rem; }
.contact-info-col h3:nth-of-type(2) { margin-top: 1.75rem; }

.hours { border-collapse: collapse; width: 100%; max-width: 320px; }
.hours th, .hours td {
  text-align: left;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.hours th { font-weight: 600; padding-right: 1.5rem; }

/* Newsletter band */
.newsletter {
  background: var(--amber);
  color: var(--navy-deep);
  padding: 3rem 0;
  text-align: center;
}

.newsletter-pitch {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
  font: inherit;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  min-width: 260px;
}

.newsletter .btn-solid {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
}
.newsletter .btn-solid:hover { background: var(--navy-deep); border-color: var(--navy-deep); }

.newsletter .form-msg.ok { color: var(--navy-deep); }
.newsletter .form-msg.err { color: #7F1D1D; }

.microcopy { font-size: 0.85rem; margin-top: 0.5rem; }

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: #CBD5E1;
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-logo {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--amber);
  font-size: 1.1rem;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-links a { color: #CBD5E1; text-decoration: none; font-size: 0.95rem; }
.footer-links a:hover { color: var(--amber); }

.footer-copy { font-size: 0.85rem; width: 100%; }

/* Legal pages */
.legal { padding: 3.5rem 0 4.5rem; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); margin-bottom: 0.5rem; }
.legal .updated { color: var(--muted); margin-bottom: 2rem; }
.legal h2 { font-size: 1.3rem; margin: 2rem 0 0.6rem; }
.legal p + p, .legal ul { margin-top: 0.75rem; }
.legal ul { padding-left: 1.4rem; }

/* Responsive */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--navy);
    border-bottom: 3px solid var(--amber);
    padding: 0.5rem 1.25rem 1.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 0.75rem 0; width: 100%; }
  .nav-cta { margin-top: 0.75rem; }

  .cards { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero { min-height: 60vh; padding: 4.5rem 0; }
  .section { padding: 3.5rem 0; }
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
}
