/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sun:    #f59e0b;
  --sun2:   #fbbf24;
  --dark:   #0f172a;
  --dark2:  #1e293b;
  --text:   #334155;
  --light:  #f8fafc;
  --muted:  #64748b;
  --white:  #ffffff;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
}

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

.container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

.section { padding: 80px 0; }
.bg-dark  { background: var(--dark); }
.bg-accent { background: linear-gradient(135deg, #0f3460 0%, #16213e 100%); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--sun);
  color: var(--dark);
  font-weight: 700;
  padding: .75rem 1.75rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--sun2); transform: translateY(-2px); }
.btn-primary.full  { width: 100%; text-align: center; }

.btn-outline {
  display: inline-block;
  border: 2px solid var(--white);
  color: var(--white);
  font-weight: 600;
  padding: .72rem 1.75rem;
  border-radius: 50px;
  transition: background .2s;
}
.btn-outline:hover { background: rgba(255,255,255,.15); }

/* ── Nav ─────────────────────────────────────────────────── */
header {
  position: fixed;
  inset-block-start: 0;
  width: 100%;
  z-index: 100;
  background: rgba(15,23,42,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--white);
  font-size: 1.15rem;
  white-space: nowrap;
}
.logo-icon { font-size: 1.6rem; color: var(--sun); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-tagline { font-size: .6rem; color: var(--sun); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; opacity: .85; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.75rem;
  align-items: center;
}
.nav-links a { color: rgba(255,255,255,.8); font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--sun); }

.btn-nav {
  background: var(--sun);
  color: var(--dark) !important;
  font-weight: 700;
  padding: .45rem 1.25rem;
  border-radius: 50px;
}
.btn-nav:hover { background: var(--sun2) !important; color: var(--dark) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f3460 0%, #0f172a 60%, #1a1a2e 100%);
  display: flex;
  flex-direction: column;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-main {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding-block: 48px;
}

.hero-tag {
  display: inline-block;
  background: rgba(245,158,11,.15);
  color: var(--sun);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: 50px;
  padding: .3rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1.25rem;
  font-weight: 800;
}
.accent { color: var(--sun); }

.hero-sub {
  color: rgba(255,255,255,.72);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 560px;
}

.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

.hero-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 1.75rem; color: var(--sun); font-weight: 800; }
.stat span   { font-size: .82rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .05em; }

/* ── Hero Partners Strip ─────────────────────────────────── */
.hero-partners {
  position: relative;
  z-index: 2;
  background: var(--white);
  border-top: 3px solid var(--sun);
  padding: 1.4rem 0 1.8rem;
}

.hp-eyebrow {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hp-section { margin-bottom: 1.1rem; }
.hp-section:last-child { margin-bottom: 0; }

.hp-group-label {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: .55rem;
}

.hp-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: stretch;
}

/* ── Every card: fixed 136×60px box, overflow hidden ── */
.hp-logo-card {
  width: 136px;
  height: 60px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.hp-logo-card:hover {
  border-color: var(--sun);
  box-shadow: 0 3px 14px rgba(245,158,11,.2);
  transform: translateY(-2px);
}

/* Force all imgs to exact same display area regardless of SVG viewBox */
.hp-logo-card img {
  display: block;
  width: 108px;
  height: 44px;
  object-fit: contain;
}

/* Enphase white logo needs dark card */
.hp-dark-card { background: #1a1a2e; border-color: #1a1a2e; }
.hp-dark-card:hover { border-color: var(--sun); }

/* Text-only fallback — same size, same border */
.hp-text-logo {
  font-size: .72rem;
  font-weight: 800;
  color: var(--dark);
  text-align: center;
  line-height: 1.3;
  letter-spacing: .01em;
  padding: 0 .5rem;
}
.hp-text-logo:hover { color: var(--dark); }

/* Decorative sun */
.hero-graphic {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 480px;
  height: 480px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sun-ring {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 60px solid rgba(245,158,11,.06);
  animation: pulse 4s ease-in-out infinite;
}
.sun-core {
  font-size: 180px;
  opacity: .06;
  animation: spin 40s linear infinite;
  user-select: none;
}
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }
@keyframes spin  { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

/* ── Section headings ────────────────────────────────────── */
.section-tag {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--sun);
  margin-bottom: .5rem;
}
.section-tag.light { color: var(--sun2); }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 3rem;
  color: var(--dark);
}
.section-title.light { color: var(--white); }

/* ── Service Cards ───────────────────────────────────────── */
.services { background: var(--light); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }

.card-icon { font-size: 2.2rem; margin-bottom: 1rem; }
.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .6rem; color: var(--dark); }
.card p  { font-size: .9rem; color: var(--muted); margin-bottom: .75rem; }
.card ul { padding-left: 1.1rem; }
.card ul li { font-size: .85rem; color: var(--muted); margin-bottom: .2rem; }

/* ── Why Us ──────────────────────────────────────────────── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.why-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.why-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--sun);
  color: var(--dark);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: .9rem;
  margin-top: .15rem;
}
.why-item h4 { color: var(--white); font-size: 1rem; margin-bottom: .3rem; }
.why-item p  { color: rgba(255,255,255,.6); font-size: .875rem; }

/* ── About ───────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: center;
}

.about-box {
  background: linear-gradient(135deg, #0f3460, #16213e);
  border-radius: var(--radius);
  padding: 2.5rem;
  position: relative;
}
.about-badge {
  display: inline-block;
  background: var(--sun);
  color: var(--dark);
  font-weight: 800;
  font-size: .8rem;
  padding: .3rem .9rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
}
.about-quote {
  color: var(--white);
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.7;
}

.about-text .section-tag { display: block; }
.about-text h2 { font-size: 2rem; font-weight: 800; color: var(--dark); margin-bottom: 1rem; }
.about-text p  { color: var(--muted); margin-bottom: 1rem; font-size: .95rem; }

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.5rem;
}
.about-tags span {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 50px;
  padding: .3rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--dark2);
}

/* ── Contact ─────────────────────────────────────────────── */
.contact .section-title { margin-bottom: 2.5rem; }

.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: var(--white);
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border .2s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,.4); }
.contact-form select { color: rgba(255,255,255,.7); }
.contact-form select option { background: #16213e; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: var(--sun); }
.contact-form textarea { resize: vertical; }

.form-note { font-size: .85rem; color: var(--sun2); min-height: 1.2em; }

.contact-info { display: flex; flex-direction: column; gap: 1.75rem; }

.info-item { display: flex; gap: 1rem; align-items: flex-start; }
.info-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: .1rem; }
.info-item strong { display: block; color: var(--white); margin-bottom: .25rem; font-size: .95rem; }
.info-item p, .info-item a { color: rgba(255,255,255,.65); font-size: .9rem; }
.info-item a:hover { color: var(--sun); }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 1.75rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy { color: rgba(255,255,255,.4); font-size: .82rem; }
.back-top {
  color: var(--sun);
  font-size: .9rem;
  font-weight: 700;
  transition: opacity .2s;
}
.back-top:hover { opacity: .7; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(15,23,42,.97);
    padding: 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .nav-links.open { display: flex; }

  .hero-graphic { display: none; }
  .hero-stats { gap: 1.5rem; }

  .about-grid      { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid    { grid-template-columns: 1fr; }
  .form-row        { grid-template-columns: 1fr; }
  .footer-inner    { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .section { padding: 56px 0; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn-outline, .hero-btns .btn-primary { text-align: center; }
}
