/*
  Energo Tanzania Ltd — www.energotz.com
  Brand colors taken from the company logo (deep royal blue + leaf green).
*/

:root {
  --blue: #1f2c9c;
  --blue-dark: #161f6e;
  --blue-deep: #10173f;
  --night: #0b1030;
  --green: #17a63b;
  --green-dark: #0e8a2f;
  --green-glow: #7ce69a;
  --whatsapp: #25d366;
  --ink: #1b1f2c;
  --muted: #5a6172;
  --line: #e3e6f0;
  --bg: #ffffff;
  --bg-soft: #f4f6fb;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(16, 23, 63, 0.08);
  --shadow-lg: 0 14px 40px rgba(16, 23, 63, 0.16);
  --container: 1200px;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Page transitions: content fades/slides in on load, whole page fades out
     before navigating (class added by main.js). */
  body { transition: opacity 0.22s ease; }
  body.page-exit { opacity: 0; }
  main { animation: page-in 0.5s ease both; }
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

body {
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--green-dark); }

h1, h2, h3, h4, h5 { line-height: 1.2; color: var(--blue-deep); font-weight: 800; }
h1, .section-head h2, .split h2, .calculator h2, .cta-band h2 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

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

.section { padding: 76px 0; }
.section.soft { background: var(--bg-soft); }

.section-head { max-width: 720px; margin: 0 auto 46px; text-align: center; }
.section-head .eyebrow,
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: 12px; }
.section-head p { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); color: #fff; }
.btn-outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-outline-light { border-color: rgba(255,255,255,0.7); color: #fff; background: transparent; }
.btn-outline-light:hover { background: #fff; color: var(--blue); }

/* ---------- Header (overlaid, logo centered between menus) ---------- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  column-gap: 30px;
}
.nav { display: flex; align-items: center; gap: 6px; }
.nav-left { justify-self: end; }
.nav-right { justify-self: start; }
.nav a {
  padding: 9px 13px;
  color: #eef0fb;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--green-glow); }
.nav a.active { color: var(--green-glow); border-bottom-color: var(--green-glow); }

.brand { display: block; justify-self: center; }
.brand img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.lang-toggle {
  justify-self: end;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.08em;
}
.lang-toggle:hover { background: #fff; color: var(--blue); border-color: #fff; }

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  color: #fff;
}
.nav-toggle svg { width: 28px; height: 28px; }

/* ---------- Hero (home, full-screen cinematic) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(rgba(11, 16, 48, 0.92), rgba(16, 23, 63, 0.88) 55%, rgba(13, 18, 52, 0.94)),
    url("../img/industrial-cylinders.webp") center / cover no-repeat;
  padding: 130px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 32px 34px;
  background: rgba(8, 12, 36, 0.38);
  backdrop-filter: blur(3px);
  max-width: 540px;
}
.hero-copy::before,
.hero-copy::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--green-glow);
  border-style: solid;
}
.hero-copy::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.hero-copy::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.hero .eyebrow { font-size: 0.72rem; color: var(--green-glow); }
.hero h1 {
  color: #fff;
  font-size: clamp(1.7rem, 3.3vw, 2.55rem);
  margin-bottom: 14px;
}
.hero .lead { font-size: 0.98rem; color: #d5daf2; margin-bottom: 24px; max-width: 470px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual { position: relative; text-align: center; }
.hero-visual::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 110%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(23, 166, 59, 0.30), rgba(42, 60, 196, 0.22) 45%, transparent 68%);
  filter: blur(14px);
}
.hero-visual img {
  position: relative;
  width: min(600px, 100%);
  margin: 0 auto;
  filter: drop-shadow(0 34px 34px rgba(0, 0, 0, 0.55));
}
.hero-visual::after {
  content: "";
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 72%;
  height: 40px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.6), transparent 68%);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 64px;
}
.stat {
  padding: 8px 26px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}
.stat b { display: block; font-size: 1.7rem; color: var(--green-glow); font-family: "Fraunces", Georgia, serif; font-weight: 600; }
.stat span { font-size: 0.85rem; color: #c9cfec; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background:
    linear-gradient(rgba(11, 16, 48, 0.9), rgba(22, 31, 110, 0.86)),
    url("../img/industrial-cylinders.webp") center / cover no-repeat;
  color: #fff;
  padding: 158px 0 72px;
}
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 10px; }
.page-hero p { color: #d5daf2; max-width: 640px; }
.page-hero .eyebrow { color: var(--green-glow); }

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

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card .icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #e9f7ee;
  color: var(--green-dark);
  margin-bottom: 18px;
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.95rem; }

.feature-list { list-style: none; margin-top: 14px; }
.feature-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  font-size: 0.93rem;
  color: var(--ink);
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--green) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="white"><path d="M12.7 4.7a1 1 0 0 0-1.4-1.4L6.5 8.1 4.7 6.3a1 1 0 1 0-1.4 1.4l2.5 2.5a1 1 0 0 0 1.4 0z"/></svg>') center/11px no-repeat;
}

/* ---------- Split rows (image + text) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; height: 100%; max-height: 420px; object-fit: cover; }
.split h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 16px; }
.split p { color: var(--muted); margin-bottom: 14px; }

/* ---------- Calculator ---------- */
.calculator {
  background: linear-gradient(115deg, var(--blue-deep), var(--blue-dark));
  border-radius: 20px;
  color: #fff;
  padding: 44px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  box-shadow: var(--shadow-lg);
}
.calculator h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 10px; }
.calculator .calc-note { font-size: 0.8rem; color: #aab2dd; margin-top: 16px; }
.calc-panel { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius); padding: 26px; }
.calc-panel label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; color: #dfe3f5; }
.calc-panel input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.95);
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.calc-panel input[type="range"] { width: 100%; accent-color: var(--green); margin: 6px 0 18px; }
.calc-results { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc-box { background: rgba(255,255,255,0.1); border-radius: 10px; padding: 12px 14px; }
.calc-box span { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #aab2dd; }
.calc-box b { font-size: 1.25rem; color: var(--green-glow); }
.calc-box.total { grid-column: 1 / -1; background: var(--green); }
.calc-box.total span { color: #eafff0; }
.calc-box.total b { font-size: 1.5rem; color: #fff; }

/* ---------- Projects / gallery ---------- */
.project-card { overflow: hidden; padding: 0; }
.project-card img { height: 230px; width: 100%; object-fit: cover; }
.project-card .body { padding: 24px; }
.project-card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  background: #e8ebfb;
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge {
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--muted);
}

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery button {
  border: 0;
  padding: 0;
  cursor: zoom-in;
  border-radius: 12px;
  overflow: hidden;
  background: none;
  box-shadow: var(--shadow);
}
.gallery img { width: 100%; height: 190px; object-fit: cover; transition: transform 0.25s; }
.gallery button:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 12, 30, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1000px, 92vw); max-height: 78vh; object-fit: contain; border-radius: 10px; }
.lightbox .lb-caption { color: #cfd4ee; margin-top: 14px; font-size: 0.9rem; }
.lightbox button {
  position: absolute;
  border: 0;
  background: rgba(255,255,255,0.12);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.lightbox button:hover { background: rgba(255,255,255,0.25); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }

/* ---------- Safety ---------- */
.compliance-banner {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: #e9f7ee;
  border: 1px solid #bfe7cc;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 40px;
}
.compliance-banner .icon { color: var(--green-dark); flex-shrink: 0; }
.compliance-banner .icon svg { width: 40px; height: 40px; }
.compliance-banner h3 { margin-bottom: 6px; }
.compliance-banner p { color: var(--muted); font-size: 0.95rem; }

.ewura-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 40px;
}
.ewura-strip img { height: 74px; width: auto; }
.ewura-strip p { color: var(--muted); font-size: 0.9rem; max-width: 420px; }

/* ---------- Testimonials ---------- */
.testimonial { display: flex; flex-direction: column; }
.stars { color: #f5a623; letter-spacing: 2px; margin-bottom: 12px; font-size: 0.95rem; }
.testimonial blockquote { color: var(--ink); font-size: 0.97rem; margin-bottom: 16px; flex-grow: 1; }
.testimonial .who b { display: block; color: var(--blue-deep); }
.testimonial .who span { color: var(--muted); font-size: 0.85rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 800;
  color: var(--blue-deep);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--green-dark);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(115deg, var(--green-dark), var(--green));
  border-radius: 20px;
  color: #fff;
  padding: 48px;
  text-align: center;
}
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 10px; }
.cta-band p { color: #eafff0; max-width: 560px; margin: 0 auto 26px; }
.cta-band .btn-primary { background: #fff; color: var(--green-dark); }
.cta-band .btn-primary:hover { background: var(--blue-deep); color: #fff; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: start; }
.info-row { display: flex; gap: 14px; margin-bottom: 18px; }
.info-row .icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 11px;
  background: #e8ebfb;
  color: var(--blue);
  display: grid;
  place-items: center;
}
.info-row .icon svg { width: 20px; height: 20px; }
.info-row b { display: block; color: var(--blue-deep); font-size: 0.95rem; }
.info-row p, .info-row a { color: var(--muted); font-size: 0.95rem; }
.info-row a:hover { color: var(--green-dark); }

.hours-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.hours-table td { padding: 6px 0; color: var(--muted); }
.hours-table td:last-child { text-align: right; color: var(--ink); font-weight: 700; }

form .field { margin-bottom: 16px; }
form label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; color: var(--blue-deep); }
form input, form select, form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
form input:focus, form select:focus, form textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}
.form-msg { display: none; padding: 12px 16px; border-radius: 10px; font-weight: 700; font-size: 0.92rem; margin-bottom: 16px; }
.form-msg.show { display: block; }
.form-msg.loading { background: #e8ebfb; color: var(--blue); }
.form-msg.error { background: #fdecec; color: #c0392b; }
.form-msg.success { background: #e9f7ee; color: var(--green-dark); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-top: 48px; }
.map-wrap iframe { width: 100%; height: 380px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #b9c0e2; margin-top: 72px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding: 56px 0 36px;
}
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer a { color: #b9c0e2; }
.site-footer a:hover { color: var(--green-glow); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; font-size: 0.93rem; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { width: 42px; height: 42px; border-radius: 9px; background: #fff; }
.footer-brand b { color: #fff; }
.site-footer .small { font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--whatsapp);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- Utilities ---------- */
.center { text-align: center; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 36px; }
.note { font-size: 0.85rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav a { padding: 9px 9px; font-size: 0.74rem; letter-spacing: 0.1em; }
}

@media (max-width: 980px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; gap: 64px; }
  .hero { padding-top: 120px; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; }
  .split, .calculator, .contact-layout { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .site-header { padding: 12px 0; }
  .header-inner { grid-template-columns: auto 1fr auto; row-gap: 4px; }
  .nav-toggle { display: block; grid-column: 1; grid-row: 1; }
  .brand { grid-column: 2; grid-row: 1; }
  .brand img { width: 54px; height: 54px; }
  .lang-toggle { grid-column: 3; grid-row: 1; }
  .nav-left, .nav-right { display: none; }
  .site-header.menu-open { background: var(--night); box-shadow: var(--shadow-lg); }
  .site-header.menu-open .nav-left,
  .site-header.menu-open .nav-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    grid-column: 1 / -1;
    justify-self: stretch;
    margin-top: 6px;
  }
  .site-header.menu-open .nav-left { grid-row: 2; }
  .site-header.menu-open .nav-right { grid-row: 3; }
  .site-header.menu-open .nav a { padding: 13px 10px; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; }
  .site-header.menu-open .nav a.active { border-bottom-color: var(--green-glow); }
}

@media (max-width: 720px) {
  .section { padding: 54px 0; }
  .hero { padding: 110px 0 54px; min-height: 0; }
  .hero-copy { padding: 30px 24px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .calculator { padding: 28px; }
  .cta-band { padding: 36px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { margin-top: 44px; }
  .stat { padding: 6px 18px; }
  .page-hero { padding: 130px 0 56px; }
}
