/* ============================================================
   KM Infra and Envirocare — style.css
   Palette drawn from the KMIE logo:
   leaf green, deep green, sky cyan, diya orange
   ============================================================ */

:root {
  --green:       #2E8B4F;
  --green-dark:  #1C6238;
  --green-deep:  #0B3A24;
  --ink:         #08251A;
  --cyan:        #29C5E6;
  --cyan-dark:   #0E9DBD;
  --orange:      #F28C1E;
  --orange-dark: #D9760A;
  --paper:       #F5FAF6;
  --white:       #FFFFFF;
  --text:        #1E312A;
  --muted:       #5A6E64;
  --line:        #DCE8DF;

  --font-display: "Archivo", "Segoe UI", sans-serif;
  --font-body:    "Inter", "Segoe UI", sans-serif;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(8, 37, 26, 0.10);
  --maxw: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 16.5px;
}

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

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

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

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.18; }
h1 { font-size: clamp(2rem, 4.5vw, 3.3rem); font-weight: 800; letter-spacing: -0.5px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 750; letter-spacing: -0.3px; }
h3 { font-size: 1.25rem; font-weight: 700; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin-bottom: 10px;
}

/* Tri-colour rule — echoes the logo underline */
.tri-rule {
  display: flex; width: 96px; height: 4px; border-radius: 2px;
  overflow: hidden; margin: 16px 0 22px;
}
.tri-rule span:nth-child(1) { flex: 2; background: var(--green); }
.tri-rule span:nth-child(2) { flex: 1; background: var(--cyan); }
.tri-rule span:nth-child(3) { flex: 1; background: var(--orange); }
.tri-rule.center { margin-left: auto; margin-right: auto; }

.section { padding: 84px 0; }
.section.tint { background: var(--paper); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); margin-top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 30px;
  border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 18px rgba(242,140,30,0.35); }
.btn-primary:hover { background: var(--orange-dark); color: #fff; }
.btn-secondary { background: var(--green); color: #fff; }
.btn-secondary:hover { background: var(--green-dark); color: #fff; }
.btn-outline { border-color: #fff; color: #fff; background: transparent; }
.btn-outline:hover { background: #fff; color: var(--green-deep); }
.btn-outline-dark { border-color: var(--green); color: var(--green-dark); background: transparent; }
.btn-outline-dark:hover { background: var(--green); color: #fff; }

/* ---------- Header ---------- */
.topbar {
  background: var(--green-deep);
  color: #CFE8D8;
  font-size: 0.83rem;
  padding: 7px 0;
}
.topbar .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topbar a { color: #CFE8D8; }
.topbar a:hover { color: var(--cyan); }
.topbar .tb-item { display: inline-flex; align-items: center; gap: 6px; margin-right: 18px; }

header.site {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; max-width: var(--maxw); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 52px; width: auto; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; color: var(--green-dark); line-height: 1.1; }
.brand-name small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.68rem; color: var(--orange-dark); letter-spacing: 0.4px; }

nav.main ul { display: flex; gap: 6px; list-style: none; align-items: center; }
nav.main a {
  display: block; padding: 10px 14px; border-radius: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.93rem; color: var(--ink);
}
nav.main a:hover { background: var(--paper); color: var(--green-dark); }
nav.main a.active { color: var(--green-dark); box-shadow: inset 0 -3px 0 var(--cyan); border-radius: 8px 8px 0 0; }
nav.main .nav-cta { background: var(--orange); color: #fff !important; border-radius: 999px; padding: 10px 22px; margin-left: 8px; }
nav.main .nav-cta:hover { background: var(--orange-dark); }

/* dropdown */
.has-drop { position: relative; }
.has-drop > a::after { content: " ▾"; font-size: 0.7em; }
nav.main ul.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 8px; list-style: none;
  display: none; flex-direction: column; gap: 0; align-items: stretch;
}
nav.main .has-drop:hover ul.dropdown,
nav.main .has-drop:focus-within ul.dropdown { display: flex; }
nav.main ul.dropdown a { padding: 10px 14px; font-weight: 500; border-radius: 8px; white-space: nowrap; }

/* mobile nav */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; border-radius: 8px;
}
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--ink); margin: 5px auto; border-radius: 2px; transition: 0.25s; }

/* ---------- Hero slider ---------- */
.hero { position: relative; height: min(88vh, 720px); min-height: 520px; overflow: hidden; background: var(--green-deep); }
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s ease;
  background-size: cover; background-position: center;
}
.slide.active { opacity: 1; }
.slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(8,37,26,0.88) 0%, rgba(11,58,36,0.62) 45%, rgba(8,37,26,0.15) 100%);
}
.hero-content {
  position: relative; z-index: 5; height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px; color: #fff;
}
.hero-content .eyebrow { color: var(--cyan); }
.hero-content h1 { color: #fff; max-width: 680px; }
.hero-content p { max-width: 560px; margin: 18px 0 30px; font-size: 1.08rem; color: #E4F2E8; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-dots { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; gap: 10px; }
.hero-dots button {
  width: 11px; height: 11px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.45); transition: 0.2s;
}
.hero-dots button.active { background: var(--orange); transform: scale(1.25); }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.16); color: #fff; font-size: 1.2rem;
  transition: 0.2s; backdrop-filter: blur(4px);
}
.hero-arrow:hover { background: var(--orange); }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }

/* ---------- Stats ---------- */
.stats-band { background: var(--green-deep); color: #fff; padding: 54px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; text-align: center; }
.stat .num { font-family: var(--font-display); font-size: 2.7rem; font-weight: 800; color: var(--cyan); line-height: 1; }
.stat .num sup { font-size: 1.4rem; color: var(--orange); }
.stat .lbl { margin-top: 8px; font-size: 0.92rem; color: #CFE8D8; }

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

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card .icon {
  width: 58px; height: 58px; border-radius: 14px;
  background: linear-gradient(135deg, var(--green) 60%, var(--green-dark));
  display: grid; place-items: center; margin-bottom: 18px;
}
.card:nth-child(3n+2) .icon { background: linear-gradient(135deg, var(--cyan) 60%, var(--cyan-dark)); }
.card:nth-child(3n) .icon { background: linear-gradient(135deg, var(--orange) 60%, var(--orange-dark)); }
.card .icon svg { width: 30px; height: 30px; stroke: #fff; }
.card p { color: var(--muted); font-size: 0.95rem; margin: 10px 0 16px; flex: 1; }
.card .more { font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; }
.card .more::after { content: " →"; transition: 0.2s; }
.card:hover .more::after { padding-left: 4px; }

/* ---------- Hexagon photos (brochure motif) ---------- */
.hex {
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%);
  aspect-ratio: 1 / 1.05; object-fit: cover; width: 100%;
}
.hex-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.hex-stack .hex:first-child { transform: translateY(24px); }

/* ---------- Split sections ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.split ul.ticks { list-style: none; margin-top: 18px; }
.split ul.ticks li { padding: 7px 0 7px 32px; position: relative; }
.split ul.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 7px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper); color: var(--green); font-weight: 800; font-size: 0.8rem;
  display: grid; place-items: center; border: 1px solid var(--line);
}
.img-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: relative; }
.img-frame img { width: 100%; height: 100%; object-fit: cover; }
.img-frame .badge {
  position: absolute; bottom: 16px; left: 16px;
  background: rgba(8,37,26,0.85); color: #fff; backdrop-filter: blur(4px);
  padding: 10px 18px; border-radius: 10px; font-family: var(--font-display);
  font-weight: 700; font-size: 0.85rem; border-left: 4px solid var(--orange);
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative; padding: 110px 0 90px; color: #fff;
  background-size: cover; background-position: center;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(8,37,26,0.92), rgba(11,58,36,0.55));
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; }
.page-hero p { color: #DCEFE2; max-width: 640px; margin-top: 14px; }
.crumbs { font-size: 0.85rem; color: var(--cyan); margin-bottom: 14px; font-family: var(--font-display); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.crumbs a { color: #BFE9F4; }

/* ---------- Service detail list ---------- */
.svc-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.svc-item {
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--green);
  border-radius: 10px; padding: 16px 20px; font-weight: 600; color: var(--ink);
  display: flex; gap: 12px; align-items: center; transition: 0.2s;
}
.svc-item:nth-child(3n+2) { border-left-color: var(--cyan); }
.svc-item:nth-child(3n) { border-left-color: var(--orange); }
.svc-item:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.svc-item svg { width: 20px; height: 20px; stroke: var(--green); flex-shrink: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(115deg, var(--green-deep), var(--green-dark));
  color: #fff; padding: 68px 0; position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px;
  border-radius: 50%; border: 40px solid rgba(41,197,230,0.12);
}
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; position: relative; z-index: 2; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #CFE8D8; margin-top: 8px; max-width: 560px; }
.cta-band .actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Gallery ---------- */
.gallery-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; justify-content: center; }
.gallery-filters button {
  border: 1.5px solid var(--line); background: #fff; padding: 9px 20px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.88rem; cursor: pointer; color: var(--muted); transition: 0.2s;
}
.gallery-filters button.active, .gallery-filters button:hover { background: var(--green); border-color: var(--green); color: #fff; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.g-item { border-radius: var(--radius); overflow: hidden; position: relative; aspect-ratio: 4/3; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.g-item:hover img { transform: scale(1.06); }
.g-item .cap {
  position: absolute; inset: auto 0 0 0; padding: 34px 16px 14px;
  background: linear-gradient(transparent, rgba(8,37,26,0.9));
  color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 0.92rem;
}
.g-item .cap small { display: block; color: var(--cyan); font-family: var(--font-body); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 44px; align-items: start; }
.info-card { background: var(--green-deep); color: #fff; border-radius: var(--radius); padding: 36px 30px; }
.info-card h3 { color: #fff; margin-bottom: 6px; }
.info-card .ic-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.info-card .ic-row:last-of-type { border-bottom: none; }
.info-card .ic-row svg { width: 22px; height: 22px; stroke: var(--cyan); flex-shrink: 0; margin-top: 3px; }
.info-card a { color: #CFE8D8; }
.info-card a:hover { color: var(--cyan); }
.info-card .lbl { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: var(--orange); text-transform: uppercase; letter-spacing: 1px; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 32px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--font-display); font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: var(--font-body); font-size: 0.95rem; background: var(--paper); transition: 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan); background: #fff; box-shadow: 0 0 0 3px rgba(41,197,230,0.18);
}
.form-note { font-size: 0.83rem; color: var(--muted); margin-top: 12px; }
#form-status { margin-top: 14px; font-weight: 600; display: none; padding: 12px 16px; border-radius: 10px; }
#form-status.ok { display: block; background: #E7F6EC; color: var(--green-dark); }

.map-embed { border: 0; width: 100%; height: 380px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
footer.site {
  background: var(--ink); color: #B9CDBF; padding: 70px 0 0; font-size: 0.93rem;
}
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.foot-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; position: relative; padding-bottom: 10px; }
.foot-grid h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 3px; background: var(--orange); border-radius: 2px; }
.foot-grid ul { list-style: none; }
.foot-grid li { padding: 5px 0; }
.foot-grid a { color: #B9CDBF; }
.foot-grid a:hover { color: var(--cyan); }
.foot-brand img { height: 60px; margin-bottom: 14px; }
.foot-brand p { margin-top: 10px; max-width: 300px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,0.08); transition: 0.2s;
}
.socials a:hover { background: var(--green); transform: translateY(-3px); }
.socials svg { width: 17px; height: 17px; fill: #fff; }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0; text-align: center; font-size: 0.83rem; color: #7E948A;
}
.foot-bottom .tri-rule { margin: 0 auto 14px; }

/* Floating call CTA (mobile-friendly) */
.float-call {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  background: var(--orange); color: #fff; border-radius: 999px;
  padding: 13px 22px; font-family: var(--font-display); font-weight: 700;
  box-shadow: 0 8px 24px rgba(242,140,30,0.45); display: inline-flex; gap: 8px; align-items: center;
}
.float-call:hover { background: var(--orange-dark); color: #fff; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .slide { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  nav.main {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 85vw);
    background: #fff; box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    transform: translateX(100%); transition: transform 0.3s ease; padding: 90px 20px 30px;
    overflow-y: auto; z-index: 55;
  }
  nav.main.open { transform: none; }
  nav.main ul { flex-direction: column; align-items: stretch; gap: 2px; }
  nav.main a.active { box-shadow: inset 3px 0 0 var(--cyan); border-radius: 8px; }
  nav.main ul.dropdown { position: static; display: flex; box-shadow: none; border: none; padding-left: 14px; min-width: 0; }
  .has-drop > a::after { content: ""; }
  .nav-toggle { display: block; z-index: 60; position: relative; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  nav.main .nav-cta { margin: 12px 0 0; text-align: center; }
}
@media (max-width: 720px) {
  .section { padding: 60px 0; }
  .grid-3, .grid-2, .svc-list, .contact-grid, .form-row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar .tb-hide { display: none; }
  .brand-name { font-size: 0.98rem; }
  .hero { min-height: 480px; }
  .hero-arrow { display: none; }
  .cta-band .container { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .stat .num { font-size: 2.1rem; }
}
