/* ===========================================================
   EnerFour — shared stylesheet
   Brand palette derived from logo:
   forest green / mid green / orange / amber
   =========================================================== */

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

:root {
  --forest:    #14532D;   /* deep forest green - logo wordmark */
  --forest-dk: #0E3A20;
  --green:     #3A9D4B;   /* mid green bar */
  --green-lt:  #5BBF6A;
  --orange:    #E0701F;   /* orange bar */
  --amber:     #F2A91B;   /* amber bar */
  --cream:     #F7F5EF;   /* warm page background */
  --paper:     #FFFFFF;
  --ink:       #1A2B1F;   /* near-black green-tinted text */
  --slate:     #5B6B60;   /* muted body text */
  --line:      #E2E0D6;   /* hairline borders */
  --line-dk:   rgba(20,83,45,0.14);

  --serif: 'Hanken Grotesque', system-ui, sans-serif;
  --sans:  'Hanken Grotesque', system-ui, sans-serif;

  --maxw: 1180px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--forest); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 5%; }

/* ── HEADER / NAV ─────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,245,239,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px; max-width: var(--maxw); margin: 0 auto; padding: 0 5%;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 40px; width: auto; max-width: 220px; display: block; object-fit: contain; }

.nav-links {
  display: flex; align-items: center; gap: 2.2rem; list-style: none;
}
.nav-links a {
  color: var(--ink); text-decoration: none;
  font-size: 0.86rem; font-weight: 500; letter-spacing: 0.01em;
  position: relative; transition: color 0.2s;
}
.nav-links a::after {
  content:''; position:absolute; left:0; bottom:-6px;
  width:0; height:2px; background: var(--green); transition: width 0.25s;
}
.nav-links a:hover { color: var(--green); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--green); }

.nav-cta {
  background: var(--forest); color: #fff !important;
  padding: 0.55rem 1.2rem; border-radius: 4px;
  font-weight: 600 !important; transition: background 0.2s;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--green) !important; }

/* mobile nav toggle */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--forest); transition: 0.3s; }

/* ── BUTTONS ──────────────────────────────────────── */
.btn-primary {
  display: inline-block; background: var(--forest); color: #fff;
  padding: 0.9rem 2rem; font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.01em; text-decoration: none; border-radius: 4px;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--green); transform: translateY(-1px); }

.btn-ghost {
  display: inline-block; border: 1.5px solid var(--forest); color: var(--forest);
  padding: calc(0.9rem - 1.5px) calc(2rem - 1.5px);
  font-size: 0.9rem; font-weight: 600; text-decoration: none; border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.btn-ghost:hover { background: var(--forest); color: #fff; }

/* ── TYPE / SECTION HELPERS ───────────────────────── */
section { padding: 92px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--green); margin-bottom: 1.1rem;
}
.eyebrow::before { content:''; width: 26px; height: 2px; background: var(--amber); }

h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.4rem, 4.8vw, 3.7rem); line-height: 1.13;
  color: var(--forest); letter-spacing: -0.02em;
}
h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.85rem, 3.3vw, 2.7rem); line-height: 1.18;
  color: var(--forest); letter-spacing: -0.018em;
}
h3 { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; color: var(--forest); letter-spacing: -0.012em; }

.lead { color: var(--slate); font-size: 1.08rem; line-height: 1.75; }

/* ── PAGE HERO (interior pages) ───────────────────── */
.page-hero {
  background: var(--forest);
  color: #fff; padding: 130px 0 70px;
  position: relative; overflow: hidden;
}
.page-hero::after {
  content:''; position:absolute; right:-60px; bottom:-60px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242,169,27,0.18), transparent 70%);
}
.page-hero h1 { color: #fff; position: relative; z-index: 2; }
.page-hero .eyebrow { color: var(--amber); }
.page-hero .eyebrow::before { background: var(--amber); }
.page-hero p { color: rgba(255,255,255,0.8); max-width: 620px; margin-top: 1rem; position: relative; z-index: 2; }

/* ── FOOTER ───────────────────────────────────────── */
.site-footer { background: var(--forest-dk); color: rgba(255,255,255,0.75); padding: 64px 0 32px; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 3rem;
  padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand img { height: 34px; width: auto; max-width: 220px; margin-bottom: 1rem; filter: brightness(0) invert(1); opacity: 0.95; object-fit: contain; }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; max-width: 320px; }
.footer-col h4 {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--amber); margin-bottom: 1.1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding-top: 2rem; font-size: 0.8rem; color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }

/* ── REVEAL ANIM ──────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; gap: 0; align-items: stretch;
    background: var(--cream); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 420px; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 1rem 5%; }
  .nav-links a::after { display: none; }
  .nav-cta { margin: 0.8rem 5%; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  #pulse-canvas { display: none; }
}
