/*
Theme Name: Sustainable Energy
Theme URI: https://sustainable-energy.ai
Author: Sustainable Energy
Description: Custom theme for Sustainable Energy — ported from the original static design. Provides editable Pages for Insights, Overview, About, Services, Projects and Contact, plus a clean default template for any new content page.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: sustainable-energy
*/

/* ==========================================================================
   Sustainable Energy — main stylesheet
   ========================================================================== */

:root {
  --color-primary: #1b6e4a;      /* deep leaf green */
  --color-primary-dark: #124a32;
  --color-primary-light: #2f9463;
  --color-accent: #e8a13c;       /* solar amber */
  --color-sky: #2f8fb0;          /* wind/sky teal */
  --color-ink: #142118;
  --color-body: #3c4a43;
  --color-muted: #6b786f;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f8f5;
  --color-border: #e1e8e2;
  --radius: 14px;
  --shadow-sm: 0 2px 8px rgba(20, 33, 24, 0.06);
  --shadow-md: 0 12px 32px rgba(20, 33, 24, 0.10);
  --container: 1160px;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head: 'Fraunces', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-body);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--color-ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--color-accent);
  display: inline-block;
}

.lede {
  font-size: 1.15rem;
  color: var(--color-muted);
  max-width: 62ch;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-ink);
}
.btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-on-dark {
  background: var(--color-accent);
  color: var(--color-ink);
}
.btn-on-dark:hover { background: #f2b356; transform: translateY(-1px); }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-ink);
}
.brand svg { width: 34px; height: 34px; }
.brand span.dot { color: var(--color-accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav li { list-style: none; margin: 0; padding: 0; }
.nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-body);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav a:hover, .nav a.active { color: var(--color-primary); border-color: var(--color-primary); }

.nav-actions { display: flex; align-items: center; gap: 18px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-ink);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(232, 161, 60, 0.16), transparent 60%),
    linear-gradient(180deg, #f4f8f5 0%, #ffffff 100%);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding-top: 84px;
  padding-bottom: 84px;
}
.hero-copy .lede { margin-bottom: 30px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-stats {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
}
.hero-stats .stat b {
  display: block;
  font-family: var(--font-head);
  font-size: 1.7rem;
  color: var(--color-primary-dark);
}
.hero-stats .stat span {
  font-size: 0.82rem;
  color: var(--color-muted);
}

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art svg { width: 100%; height: 100%; }

/* ---------------- Sections ---------------- */
.section { padding: 88px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head {
  max-width: 700px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head.left { margin-left: 0; text-align: left; }

/* ---------------- Cards / grids ---------------- */
.grid {
  display: grid;
  gap: 28px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }

.icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  color: var(--color-primary);
  margin-bottom: 20px;
}
.icon-badge svg { width: 26px; height: 26px; }

.card ul {
  padding-left: 18px;
  margin: 14px 0 0;
  color: var(--color-muted);
  font-size: 0.94rem;
}
.card ul li { margin-bottom: 6px; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-primary);
  text-decoration: none;
}

/* ---------------- Process steps ---------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step { position: relative; padding-top: 8px; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--color-accent);
  display: block;
  margin-bottom: 10px;
}

/* ---------------- CTA band ---------------- */
.cta-band {
  background: linear-gradient(120deg, var(--color-primary-dark), var(--color-primary));
  color: #fff;
  border-radius: 24px;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,0.82); margin-bottom: 0; }
.cta-band .cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------------- Stat strip ---------------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 48px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.stat-strip .stat { text-align: center; }
.stat-strip .stat b {
  display: block;
  font-family: var(--font-head);
  font-size: 2.1rem;
  color: var(--color-primary-dark);
}
.stat-strip .stat span { color: var(--color-muted); font-size: 0.88rem; }

/* ---------------- Team ---------------- */
.team-card { text-align: left; }
.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.role { color: var(--color-primary); font-size: 0.85rem; font-weight: 700; margin-bottom: 10px; }

/* ---------------- Values list ---------------- */
.values-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.value-item {
  display: flex;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--color-bg-alt);
}
.value-item .icon-badge { flex-shrink: 0; margin-bottom: 0; background: #fff; }

/* ---------------- Timeline ---------------- */
.timeline { position: relative; padding-left: 32px; border-left: 2px solid var(--color-border); }
.timeline-item { position: relative; padding-bottom: 36px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -39px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--color-accent);
}
.timeline-year { font-weight: 700; color: var(--color-primary); font-size: 0.85rem; letter-spacing: 0.04em; }

/* ---------------- Project cards ---------------- */
.project-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.project-thumb {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.project-thumb svg { width: 60%; height: 60%; }
.project-body { padding: 26px; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  color: var(--color-primary);
  margin-bottom: 12px;
}
.project-stats {
  display: flex;
  gap: 22px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}
.project-stats div b { display: block; color: var(--color-ink); font-family: var(--font-head); }
.project-stats div span { font-size: 0.78rem; color: var(--color-muted); }

.placeholder-note {
  background: #fff8ea;
  border: 1px dashed #e8c07c;
  color: #6b5122;
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 0.92rem;
  margin-bottom: 48px;
}
.placeholder-note strong { color: #4a3a13; }

/* ---------------- Testimonial ---------------- */
.testimonial {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 40px;
}
.testimonial p.quote {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--color-ink);
  margin-bottom: 20px;
}
.testimonial .who { font-weight: 700; font-size: 0.9rem; }
.testimonial .who span { color: var(--color-muted); font-weight: 500; display: block; font-size: 0.82rem; }

/* ---------------- Forms ---------------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 8px;
  color: var(--color-ink);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--color-ink);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(27, 110, 74, 0.14);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: 0.82rem; color: var(--color-muted); margin-top: 10px; }

.contact-info-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 20px;
}
.contact-info-row {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.contact-info-row:last-child { border-bottom: none; }
.contact-info-row .icon-badge { margin-bottom: 0; flex-shrink: 0; background: #fff; }
.contact-info-row h4 { margin-bottom: 4px; font-size: 0.95rem; }
.contact-info-row p { margin: 0; color: var(--color-muted); font-size: 0.9rem; }

#form-status {
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
}
#form-status.visible { display: block; }
#form-status.ok { color: var(--color-primary); }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--color-ink);
  color: rgba(255,255,255,0.72);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { max-width: 32ch; font-size: 0.9rem; }
.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col a { text-decoration: none; color: rgba(255,255,255,0.72); font-size: 0.9rem; transition: color 0.15s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 12px;
}
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.social-row a:hover { background: var(--color-primary); }
.social-row svg { width: 16px; height: 16px; }

/* ---------------- Page hero (inner pages) ---------------- */
.page-hero {
  padding: 64px 0 56px;
  background: linear-gradient(180deg, #f4f8f5 0%, #ffffff 100%);
  text-align: center;
}
.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 18px;
}
.breadcrumb a { text-decoration: none; color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-primary); }

/* ---------------- Utilities ---------------- */
.mt-0 { margin-top: 0; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-art { max-width: 420px; margin: 0 auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav, .nav-actions .btn { display: none; }
  .nav-toggle { display: block; }
  body.nav-open .nav {
    display: flex;
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px 24px 28px;
    gap: 16px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .cta-band { padding: 36px 28px; flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section { padding: 60px 0; }
  .form-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Insights hub — content roadmap with glowing topic pills
   ========================================================================== */

.hub-section {
  background: radial-gradient(1200px 500px at 20% -10%, rgba(47, 143, 176, 0.16), transparent 55%),
              radial-gradient(900px 500px at 90% 10%, rgba(232, 161, 60, 0.10), transparent 55%),
              linear-gradient(180deg, #0f1a14 0%, #0b1310 100%);
  padding: 88px 0;
}
.hub-section .section-head h2,
.hub-section .section-head .lede { color: #fff; }
.hub-section .section-head .lede { color: rgba(255,255,255,0.68); }
.hub-section .eyebrow { color: var(--color-accent); }
.hub-section .eyebrow::before { background: var(--color-accent); }

.strategy-map-frame {
  max-width: 880px;
  margin: 0 auto 64px;
  padding: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02), 0 30px 80px rgba(0,0,0,0.45);
}
.strategy-map-frame img {
  width: 100%;
  border-radius: 12px;
  display: block;
}
.strategy-map-caption {
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  margin-top: 16px;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pillar-card {
  --pillar-color: #3b82f6;
  position: relative;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.pillar-card::before {
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 2px;
  background: var(--pillar-color);
  box-shadow: 0 0 12px 1px var(--pillar-color);
  border-radius: 2px;
}
.pillar-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--pillar-color) 50%, transparent);
  box-shadow: 0 16px 40px -12px color-mix(in srgb, var(--pillar-color) 55%, transparent);
}
.pillar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pillar-color);
  box-shadow: 0 0 10px 2px var(--pillar-color), 0 0 24px 6px color-mix(in srgb, var(--pillar-color) 60%, transparent);
  display: inline-block;
  margin-bottom: 14px;
  animation: pillar-pulse 2.6s ease-in-out infinite;
}
.pillar-card h3 {
  color: #fff;
  font-size: 1.12rem;
  margin-bottom: 16px;
  line-height: 1.3;
}
.topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.topic-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: color-mix(in srgb, var(--pillar-color) 22%, #0b1310);
  border: 1px solid color-mix(in srgb, var(--pillar-color) 55%, transparent);
  padding: 7px 13px;
  border-radius: 999px;
  box-shadow: 0 0 8px -1px color-mix(in srgb, var(--pillar-color) 65%, transparent);
  transition: box-shadow 0.2s ease, background 0.2s ease, transform 0.15s ease;
  cursor: default;
}
.topic-pill:hover {
  background: color-mix(in srgb, var(--pillar-color) 38%, #0b1310);
  box-shadow: 0 0 18px 2px color-mix(in srgb, var(--pillar-color) 80%, transparent);
  transform: translateY(-1px);
}

@keyframes pillar-pulse {
  0%, 100% { box-shadow: 0 0 10px 2px var(--pillar-color), 0 0 24px 6px color-mix(in srgb, var(--pillar-color) 60%, transparent); }
  50% { box-shadow: 0 0 6px 1px var(--pillar-color), 0 0 14px 3px color-mix(in srgb, var(--pillar-color) 45%, transparent); }
}

.hub-cta {
  margin-top: 56px;
  text-align: center;
}
.hub-cta p { color: rgba(255,255,255,0.6); margin-bottom: 20px; }

@media (max-width: 980px) {
  .pillar-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .pillar-grid { grid-template-columns: 1fr; }
  .strategy-map-frame { padding: 10px; }
}

/* ==========================================================================
   WordPress integration — admin bar, menu states, generic entry content
   ========================================================================== */

body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

.nav a.current-menu-item,
.nav a.current_page_item {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Generic content page (default template for new Pages) */
.generic-page .entry-content {
  max-width: 760px;
  margin: 0 auto;
}
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content p { margin-bottom: 1.2em; }
.entry-content ul,
.entry-content ol { margin: 0 0 1.2em; padding-left: 1.3em; color: var(--color-body); }
.entry-content li { margin-bottom: 0.4em; }
.entry-content a { color: var(--color-primary); text-decoration: underline; }
.entry-content img { border-radius: var(--radius); margin: 1.5em 0; }
.entry-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 20px;
  margin: 1.6em 0;
  color: var(--color-muted);
  font-style: italic;
}
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-size: 0.85rem; color: var(--color-muted); text-align: center; margin-top: 8px; }
