/* ENERGROUP landing — layout + components */

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  background: var(--dark);
  color: var(--white);
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  border-radius: var(--radius-pill);
  padding: 14px 32px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  white-space: nowrap;
}
.btn--amber { background: var(--amber); color: var(--dark); }
.btn--amber:hover { background: var(--amber-dark); }
.btn--lg { font-size: 25px; padding: 18px 44px; }

/* Get a Quote — spotlight that follows the cursor within the button */
.btn--quote {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn--quote::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle 60px at var(--spot-x, 50%) var(--spot-y, 50%), rgba(255,255,255,0.45), transparent 70%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}
.btn--quote:hover::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .btn--quote::after { display: none; }
}

.amber { color: var(--amber); }

/* ---------- Reveal animation ---------- */
/* Only hide reveals when JS is active, so content is never lost if JS fails / is disabled */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Placeholder for missing client images */
.img--placeholder {
  background: repeating-linear-gradient(45deg, #2a2a2a, #2a2a2a 12px, #242424 12px, #242424 24px);
  min-height: 240px;
  width: 100%;
}

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  padding-block: 18px;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.nav.is-stuck { background: rgba(20,20,20,0.92); backdrop-filter: blur(8px); box-shadow: 0 4px 24px rgba(0,0,0,0.4); }
.nav__inner { display: flex; align-items: center; gap: var(--sp-lg); }
.nav__logo img { height: 64px; width: auto; }
.nav__links { display: flex; gap: 36px; margin-inline: auto; }
.nav__links a { font-size: var(--fs-body); transition: color var(--dur) var(--ease); }
.nav__links a:hover { color: var(--amber); }
.nav__actions { display: flex; align-items: center; gap: var(--sp-md); }
.nav__lang { font-family: var(--font-display); transition: color var(--dur) var(--ease); }
.nav__lang:hover { color: var(--amber); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__toggle span { width: 26px; height: 2px; background: var(--white); transition: transform var(--dur) var(--ease), opacity var(--dur); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__mobile {
  display: none;
  flex-direction: column;
  gap: var(--sp-md);
  padding: var(--sp-lg) var(--gutter);
  background: rgba(20,20,20,0.98);
}
.nav__mobile a:not(.btn) { font-size: 20px; }
.nav__mobile a:not(.btn):hover { color: var(--amber); }
.nav__mobile-social { margin-top: auto; align-self: flex-start; }

/* ============ HERO ============ */
.hero { background: var(--light); color: var(--dark); }
.hero__inner { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; min-height: 560px; }
.hero__content { background: var(--light); padding-block: var(--sp-xl); display: flex; flex-direction: column; justify-content: center; }
.hero__title { font-family: var(--font-display); font-size: var(--fs-hero); line-height: 0.98; display: flex; flex-direction: column; color: var(--dark); }
.hero__title-accent { color: var(--amber); }
.hero__body { color: var(--text-muted-light); font-size: var(--fs-body-lg); max-width: 40ch; margin-top: var(--sp-md); line-height: 1.55; }
.hero__body + .hero__body { margin-top: var(--sp-md); }
.hero__body--alt { display: none; }
.hero__content .btn { margin-top: var(--sp-lg); align-self: flex-start; }
.hero__media { overflow: hidden; border-left: 2px solid var(--amber); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* ============ FEATURE BANNER ============ */
.feature-banner { background: var(--dark); margin-top: var(--sp-2xl); border-block: 1px solid var(--border); }
.feature-banner__inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2xl); padding-block: var(--sp-xl); }
.feature-col { --accent: var(--amber); display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-md); }
.feature-col--core { --accent: var(--purple); }
.feature-col--trust { --accent: var(--blue); }
.feature-col__logo { width: 260px; max-width: 70%; height: auto; }
.feature-col__rule { width: 100%; height: 1px; background: var(--accent); }
.feature-col h2 { font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.1; }
.feature-col__accent { color: var(--accent); }
.feature-col p { color: var(--text-muted-dark); line-height: 1.55; }

/* Offset sticky nav when jumping to anchor sections */
section[id] { scroll-margin-top: 104px; }

/* ============ SECTION TITLE ============ */
.section-title { font-family: var(--font-display); font-size: var(--fs-h1); text-align: center; margin-bottom: var(--sp-xl); }
.section-title::after { content: ""; display: block; width: 72px; height: 3px; background: var(--amber); margin: var(--sp-sm) auto 0; }
.section-title--dark { color: var(--dark); }

/* ============ JOURNEY ============ */
.journey { padding-block: var(--sp-2xl); background: var(--white); color: var(--dark); }
.journey .section-title { white-space: nowrap; }
.journey .section-title::after { display: none; }
.journey__steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-lg); }
.js .journey__line.reveal { opacity: 1; transform: none; transition: none; }
.journey__line-base { stroke: var(--text-muted-light); stroke-width: 2; opacity: 0.35; }
.journey__line-spark {
  stroke: var(--amber);
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0;
  filter: drop-shadow(0 0 4px var(--amber));
}
.journey__line--h { position: absolute; top: 32px; left: 12.5%; width: 75%; height: 3px; overflow: visible; }
.journey__line--v { display: none; }
.journey__step { display: flex; flex-direction: column; align-items: center; text-align: center; }
.journey__num {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--amber); color: var(--dark);
  font-family: var(--font-display); font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2;
  margin-bottom: var(--sp-md);
}
.journey__dot { display: none; }
.journey__step h3 { font-family: var(--font-display); font-size: var(--fs-h4); margin-bottom: var(--sp-xs); color: var(--dark); }
.journey__step p { color: var(--text-muted-light); font-size: var(--fs-body); max-width: 24ch; }

/* ============ WHY US ============ */
.why-us { padding-block: var(--sp-2xl); background: var(--white); color: var(--dark); }
.why-us__panel { background: var(--light); border-radius: var(--radius-md); padding: var(--sp-2xl) var(--sp-lg); padding-block: var(--sp-xl); }
.why-us__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.why-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--sp-sm); padding-inline: var(--sp-lg); color: var(--amber); }
.why-card + .why-card { border-left: 1px solid var(--border-light, rgba(0,0,0,0.12)); }
.why-card svg { width: 72px; height: 72px; }
.why-card h3 { font-family: var(--font-display); font-size: var(--fs-h4); color: var(--dark); }
.why-card p { color: var(--text-muted-light); }

/* ============ SERVICES ============ */
.services { padding-block: var(--sp-2xl); background: var(--white); overflow-x: hidden; }
.services .section-title { color: var(--dark); }
.services__viewport {
  overflow-x: auto;
  scrollbar-width: none;
  cursor: grab;
}
.services__viewport::-webkit-scrollbar { display: none; }
.services__viewport:active { cursor: grabbing; }
.services__track {
  display: flex; gap: var(--sp-md); width: max-content;
}
.service-card {
  position: relative;
  overflow: hidden;
  flex: 0 0 280px;
  background: var(--dark); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding-inline: var(--sp-md);
  min-height: 300px;
  display: grid;
  grid-template-rows: 1fr auto;
  color: var(--amber);
}
.service-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--accent, var(--amber));
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.service-card:hover::after { opacity: 1; }
.service-card svg { width: 100px; height: 100px; align-self: center; justify-self: center; }
.service-card h3 { font-family: var(--font-display); font-size: var(--fs-h4); text-align: center; padding-bottom: var(--sp-lg); }

/* Arrow controls */
.services__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--dark);
  border: 1px solid var(--border);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.services__nav:hover { background: var(--amber); color: var(--dark); }
.services__nav svg { width: 20px; height: 20px; }
.services__nav--prev { left: -22px; }
.services__nav--next { right: -22px; }
.services__viewport-wrap { position: relative; }


/* ============ PROJECTS ============ */
.projects { padding-block: var(--sp-2xl); background: var(--light); }
.projects__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md); }
.project-card { position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16 / 10; padding: 0; cursor: pointer; display: block; width: 100%; text-align: left; }
.project-card--tall { grid-row: span 2; aspect-ratio: 3 / 4; }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.project-card:hover img { transform: scale(1.04); }
.project-card:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.project-card__label { position: absolute; left: var(--sp-md); bottom: var(--sp-md); font-size: var(--fs-body); padding: 10px 24px; pointer-events: none; }
.project-card__tag { position: absolute; left: var(--sp-md); top: var(--sp-md); font-family: var(--font-display); font-size: 14px; letter-spacing: 0.04em; padding: 6px 16px; border-radius: var(--radius-pill); background: rgba(20,20,20,0.72); color: var(--white); pointer-events: none; }

/* ============ PROJECT LIGHTBOX ============ */
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: var(--sp-lg); }
.lightbox[hidden] { display: none; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(2px); }
.lightbox__panel {
  position: relative; z-index: 1; max-width: 880px; width: 100%; max-height: 90vh; overflow: auto;
  background: var(--dark); border: 1px solid var(--border); border-radius: var(--radius-md);
  opacity: 0; transform: scale(0.96); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.lightbox.is-open .lightbox__panel { opacity: 1; transform: none; }
.lightbox__close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; background: var(--amber); color: var(--dark); font-size: 28px; line-height: 1; display: grid; place-items: center; }
.lightbox__close:hover { background: var(--amber-dark); }
.lightbox__media { aspect-ratio: 16 / 9; background: var(--card-dark); }
.lightbox__img { width: 100%; height: 100%; object-fit: cover; }
.lightbox__body { padding: var(--sp-lg); }
.lightbox__title { font-family: var(--font-display); font-size: var(--fs-h3); margin-bottom: var(--sp-sm); }
.lightbox__desc { color: var(--text-muted-dark); line-height: 1.6; }
body.no-scroll { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .lightbox__panel { transition: none; opacity: 1; transform: none; }
}

/* ============ TESTIMONIALS ============ */
.testimonials { padding-block: var(--sp-2xl); background: var(--light-alt); }
.testimonials__list { display: flex; flex-direction: column; gap: var(--sp-md); max-width: 900px; margin-inline: auto; }
.testimonial { background: var(--light); border-radius: var(--radius-md); padding: var(--sp-lg); color: var(--dark); }
.testimonial p { font-size: var(--fs-body-lg); line-height: 1.6; }
.testimonial footer { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); margin-top: var(--sp-md); }
.testimonial__stars { order: 1; flex: 0 0 auto; color: var(--amber); font-size: 22px; letter-spacing: 2px; white-space: nowrap; }
.testimonial cite { order: 0; flex: 1 1 auto; min-width: 0; font-style: normal; color: var(--text-muted-light); font-size: var(--fs-body); }

/* ============ FAQ ============ */
.faq { padding-block: var(--sp-2xl); background: var(--light-alt); }
.faq__list { display: flex; flex-direction: column; gap: var(--sp-sm); max-width: 1100px; margin-inline: auto; }
.faq__item { background: transparent; border-radius: var(--radius-sm); color: var(--dark); }
.faq__item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-md); padding: var(--sp-md) var(--sp-lg); font-family: var(--font-display); font-size: var(--fs-h4); color: var(--dark); background: var(--light); border-radius: var(--radius-sm); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__arrow { width: 12px; height: 12px; border-right: 2px solid var(--amber); border-bottom: 2px solid var(--amber); transform: rotate(45deg); transition: transform var(--dur) var(--ease); flex: none; }
.faq__item[open] .faq__arrow { transform: rotate(-135deg); }
.faq__answer { overflow: hidden; transition: height var(--dur) var(--ease); }
.faq__answer > p { margin: var(--sp-sm) 0 0; padding: var(--sp-lg); background: var(--dark); border-radius: var(--radius-sm); color: var(--text-muted-dark); line-height: 1.55; }

/* ============ CONTACT ============ */
.contact { background: var(--white); padding-block: var(--sp-2xl); }
.contact .section-title { color: var(--dark); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-xl); align-items: start; max-width: 1100px; margin-inline: auto; }
.contact__grid > * { min-width: 0; }
.contact__detail a, .contact__detail span { overflow-wrap: break-word; word-break: break-word; }
.contact__intro { font-size: var(--fs-body-lg); line-height: 1.6; color: var(--text-muted-light); margin-bottom: var(--sp-lg); }
.contact__details { list-style: none; display: flex; flex-direction: column; gap: var(--sp-md); }
.contact__detail { display: flex; align-items: center; gap: var(--sp-sm); }
.contact__detail-icon { width: 22px; height: 22px; color: var(--amber); flex: none; }
.contact__detail a, .contact__detail span { color: var(--text-muted-light); font-size: var(--fs-body-lg); text-decoration: none; transition: color var(--dur) var(--ease); }
.contact__detail a:hover { color: var(--amber); }
.contact__form { display: flex; flex-direction: column; gap: var(--sp-md); }
.form-group { display: flex; flex-direction: column; gap: var(--sp-xs); }
.form-group--honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-group label { font-family: var(--font-display); font-size: var(--fs-h4); color: var(--dark); }
.form-group input,
.form-group textarea { background: var(--light-alt); border: 1px solid rgba(0,0,0,0.14); border-radius: var(--radius-sm); padding: 14px var(--sp-md); color: var(--dark); font-family: var(--font-body); font-size: var(--fs-body); width: 100%; transition: border-color var(--dur) var(--ease); }
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--amber); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted-light); }
.form-group textarea { resize: vertical; min-height: 120px; }
.toast { position: fixed; top: 80px; right: 16px; z-index: 200; padding: 14px 20px; border-radius: var(--radius-sm); color: #fff; font-family: var(--font-body); font-size: var(--fs-body); max-width: 320px; box-shadow: 0 4px 20px rgba(0,0,0,0.3); transform: translateX(calc(100% + 20px)); transition: transform 300ms var(--ease); }
.toast.is-visible { transform: none; }
.toast--success { background: #22c55e; }
.toast--error { background: #ef4444; }

/* ============ CTA ============ */
.cta { background: var(--dark); padding-block: var(--sp-2xl); }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-lg); flex-wrap: wrap; }
.cta h2 { font-family: var(--font-display); font-size: var(--fs-h2); max-width: 18ch; }

/* ============ WHATSAPP FAB ============ */
.whatsapp-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 150;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.whatsapp-fab:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(0,0,0,0.4); }
.whatsapp-fab svg { width: 28px; height: 28px; }

/* ============ FOOTER ============ */
.footer { background: var(--black); padding-block: var(--sp-xl) var(--sp-md); }
.footer__brands { display: none; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-lg); flex-wrap: wrap; }
.footer__logo img { height: 60px; width: auto; }
.footer__nav { display: flex; gap: var(--sp-lg); }
.footer__nav a:hover { color: var(--amber); }
.footer__social { display: flex; gap: var(--sp-md); }
.footer__social-link { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; transition: background var(--dur), color var(--dur); }
.footer__social-link svg { width: 18px; height: 18px; }
.footer__social-link:hover { background: var(--amber); color: var(--dark); }
.footer__bottom { display: flex; justify-content: space-between; gap: var(--sp-md); margin-top: var(--sp-lg); padding-top: var(--sp-md); border-top: 1px solid var(--border); color: var(--text-muted-dark); font-size: 14px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1023px) {
  .nav__links, .nav__actions { display: none; }
  .nav__toggle { display: flex; margin-left: auto; z-index: 101; position: relative; }
  .nav__mobile {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 99;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
  }
  .nav__mobile.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear 0s;
  }
  /* backdrop-filter on .is-stuck creates a containing block that would trap
     the fixed-position overlay inside the header's own height */
  .nav:has(.nav__mobile.is-open) { backdrop-filter: none; }
  .hero__inner { grid-template-columns: 1fr; gap: var(--sp-lg); }
  .hero__body { max-width: none; }
  .hero__media { order: -1; height: 280px; }
  .feature-banner__inner { grid-template-columns: 1fr; gap: var(--sp-lg); }
  .why-us__grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--sp-xl) var(--sp-md); }
  .why-card { min-width: 0; }
  .why-card + .why-card { border-left: none; }
  .cta__inner { flex-direction: column; align-items: flex-start; }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  /* Hero → full-bleed photo band with dark card overlapping */
  .hero { background: var(--dark); color: var(--white); }
  .hero__inner { display: flex; flex-direction: column; min-height: 0; padding-inline: 0; }
  .hero__media { order: -1; height: 220px; border-left: none; }
  .hero__content {
    background: var(--card-dark);
    margin-top: -28px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: var(--sp-lg) var(--gutter) var(--sp-xl);
    position: relative; z-index: 1;
  }
  .hero__title { color: var(--white); }
  .hero__body { color: var(--text-muted-dark); }
  .hero__body:not(.hero__body--alt) { display: none; }
  .hero__body--alt { display: block; }
  .hero__content .btn--lg {
    width: auto;
    align-self: flex-start;
    font-size: var(--fs-body);
    padding: 14px 32px;
  }

  .why-us__panel { padding-inline: var(--sp-sm); }
  .why-card { padding-inline: var(--sp-sm); }
  .projects__grid { grid-template-columns: 1fr; }
  .project-card--tall { grid-row: auto; aspect-ratio: 16 / 10; }
  .btn--lg { width: 100%; }
  /* Journey → 2×2 grid (matches Figma mobile) */
  .journey .section-title { white-space: normal; display: block; text-align: center; }
  .journey .section-title::after { display: block; width: 72px; height: 3px; background: var(--dark); margin: var(--sp-sm) auto 0; }
  .journey__steps { grid-template-columns: 1fr 1fr; gap: var(--sp-lg) var(--sp-md); position: relative; }
  .journey__line--h { display: none; }
  .journey__line--v {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 0;
  }
  .journey__line--v .journey__line-base,
  .journey__line--v .journey__line-spark {
    fill: none;
  }
  /* Footer → per Figma phone design: 3 brand logos, then socials, then nav */
  .footer__brands {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--sp-lg);
    margin-bottom: var(--sp-lg);
  }
  .footer__brands img { height: 32px; width: auto; }
  .footer__logo { display: none; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__social { order: 0; }
  .footer__nav { order: 1; flex-wrap: wrap; gap: var(--sp-sm); }
  .footer__bottom { flex-direction: column; }

  /* Testimonials → stacked list on mobile (per Figma), compact footer row */
  .testimonial { padding: var(--sp-md); }
  .testimonial footer { flex-wrap: nowrap; }
  .testimonial__stars { font-size: 15px; letter-spacing: 1px; }
  .testimonial cite { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
