/* ===================================================
   Njhingha Group
   Single stylesheet: tokens → base → layout → components → pages
   =================================================== */

/* ---------- Tokens ---------- */
:root,
[data-theme="light"] {
  --page-bg: #f4f5f7;
  --surface: #ffffff;
  --surface-soft: #eceef2;
  --text: #1b2129;
  --muted: #5d6673;
  --line: #dde1e7;
  --ink: #161c24;          /* always-dark panels (header, footer, bands) */
  --ink-2: #212935;
  --ink-text: #e9ecf0;
  --ink-muted: #a9b1bd;
  --orange: #f05a1a;
  --orange-strong: #d24a10;
  --orange-soft: #fde7dc;
  --blue: #2459b8;
  --radius: 10px;
  --shadow: 0 14px 34px rgba(16, 24, 36, 0.09);
  --max: 1180px;
  --font-head: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Barlow", "Segoe UI", Arial, sans-serif;
}

[data-theme="dark"] {
  --page-bg: #0f141a;
  --surface: #18202a;
  --surface-soft: #1d2631;
  --text: #e9ecf0;
  --muted: #a3acb8;
  --line: #2a3542;
  --ink: #0b0f14;
  --ink-2: #151c25;
  --orange-soft: #3a2116;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.45rem; }

p { margin: 0 0 1rem; }

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

.accent { color: var(--orange); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--orange);
  color: #fff;
}
.skip-link:focus { left: 0.5rem; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------- Layout ---------- */
.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-soft { background: var(--surface-soft); }
.section-ink { background: var(--ink); color: var(--ink-text); }
.section-ink p { color: var(--ink-muted); }

.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); }
.section-ink .section-head p { color: var(--ink-muted); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
}
.kicker::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--orange);
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split.reverse > :first-child { order: 2; }

.split-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  border-bottom: 3px solid var(--orange);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 76px;
}
.brand img { height: 46px; width: auto; }

.main-nav {
  display: flex;
  gap: 0.3rem;
  margin-left: auto;
}
.main-nav a {
  padding: 0.5rem 0.85rem;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-text);
  border-radius: 6px;
}
.main-nav a:hover { color: var(--orange); }
.main-nav a.active { color: var(--orange); box-shadow: inset 0 -2px 0 var(--orange); border-radius: 0; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #36414f;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-text);
  cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }
.menu-button { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-strong); }
.btn-ghost { border-color: currentColor; color: var(--ink-text); background: transparent; }
.btn-ghost:hover { color: var(--orange); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-sm { padding: 0.55rem 1rem; font-size: 1rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

/* ---------- Icons ---------- */
.ico {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.ico-badge {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  flex: none;
}
.ico-badge .ico { width: 28px; height: 28px; }

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--ink-text);
}
.hero::before {
  /* orange diagonal accent echoing the brochure */
  content: "";
  position: absolute;
  inset: 0 auto 0 -12%;
  width: 62%;
  background: var(--ink-2);
  transform: skewX(-12deg);
}
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 47%;
  width: 14px;
  height: 100%;
  background: var(--orange);
  transform: skewX(-12deg);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: clamp(3rem, 8vw, 5.5rem) 0;
}
.hero h1 span { display: block; }
.hero h1 .accent { font-size: 1.18em; }
.hero-sub {
  font-family: var(--font-head);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-text);
}
.hero p.lead { max-width: 34rem; color: var(--ink-muted); }

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 1.6rem 0 0;
  list-style: none;
}
.hero-tags li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid #36414f;
  border-radius: 999px;
}
.hero-tags .ico { width: 18px; height: 18px; color: var(--orange); }

.hero-visual img { width: 100%; filter: drop-shadow(0 30px 40px rgba(0,0,0,.35)); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  background:
    linear-gradient(100deg, rgba(14,19,26,.94) 0%, rgba(14,19,26,.82) 45%, rgba(14,19,26,.45) 100%),
    var(--hero-img, none) center / cover no-repeat,
    var(--ink);
  color: var(--ink-text);
  padding: clamp(4rem, 10vw, 6.5rem) 0;
  border-bottom: 6px solid var(--orange);
}
.page-hero p { max-width: 40rem; color: var(--ink-muted); font-size: 1.15rem; }

/* ---------- Feature strip ---------- */
.feature-strip {
  background: var(--ink-2);
  color: var(--ink-text);
}
.feature-strip ul {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}
.feature-strip li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.3rem 0.6rem;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-left: 1px solid #2c3644;
}
.feature-strip li:first-child { border-left: 0; }
.feature-strip .ico { color: var(--orange); width: 28px; height: 28px; }

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

.card {
  display: flex;
  flex-direction: column;
  padding: 1.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--orange);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 1rem; }
.card p { color: var(--muted); }
.card .card-link {
  margin-top: auto;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

/* ---------- Service detail ---------- */
.service {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  border-bottom: 1px solid var(--line);
}
.service:last-child { border-bottom: 0; }
.service:nth-child(even) .service-media { order: -1; }
.service-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.service-head h2 { margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.service p { color: var(--muted); }
.service-media img,
.service-media .media-panel {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.media-panel {
  display: grid;
  place-items: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--ink-2), var(--ink));
}

.bullets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1.5rem;
  padding: 0;
  margin: 1.2rem 0 0;
  list-style: none;
}
.bullets li {
  position: relative;
  padding-left: 1.1rem;
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  background: var(--orange);
  border-radius: 50%;
}
.bullets.single { grid-template-columns: 1fr; }

/* ---------- Checks (why choose) ---------- */
.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 2rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.checks li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.checks li::before {
  content: "";
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 15px no-repeat;
}

/* ---------- Industries ---------- */
.industries {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}
.industry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 1.8rem 1rem;
  text-align: center;
  background: var(--surface);
}
.industry .ico { width: 42px; height: 42px; stroke-width: 1.5; }
.industry span {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.industry-detail {
  display: flex;
  gap: 1.2rem;
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.industry-detail .ico { width: 40px; height: 40px; color: var(--orange); stroke-width: 1.5; }
.industry-detail h3 { margin: 0 0 0.4rem; font-size: 1.35rem; }
.industry-detail p { margin: 0; color: var(--muted); }

/* ---------- Photo strip ---------- */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.photo-strip img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* ---------- Promise / safety bands ---------- */
.band {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
}
.band-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-right: 2rem;
  border-right: 2px solid var(--orange);
}
.band-title .ico { width: 64px; height: 64px; color: var(--orange); stroke-width: 1.5; }
.band-title h2 { margin: 0; font-size: 2.2rem; }
.band p { margin: 0; }

.promise {
  position: relative;
  padding: clamp(2rem, 5vw, 3rem);
  background: var(--surface);
  border-left: 6px solid var(--orange);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.promise p { font-size: 1.2rem; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step {
  position: relative;
  padding: 1.6rem 1.6rem 1.6rem 4.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 1.4rem;
  top: 1.4rem;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--orange);
}
.step h3 { margin-bottom: 0.3rem; font-size: 1.3rem; }
.step p { margin: 0; color: var(--muted); }

/* ---------- CTA ---------- */
.cta {
  background: var(--orange);
  color: #fff;
}
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.6rem 0;
}
.cta h2 { margin: 0; }
.cta p { margin: 0.3rem 0 0; color: #fff; opacity: 0.92; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-list { display: grid; gap: 1.1rem; padding: 0; margin: 0; list-style: none; }
.contact-list li { display: flex; gap: 0.9rem; align-items: flex-start; }
.contact-list .ico { color: var(--orange); margin-top: 0.15rem; }
.contact-list a { color: inherit; text-decoration: none; }
.contact-list a:hover { color: var(--orange); }

.panel {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel-ink { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.panel-ink h3 { color: #fff; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.form-group label { font-weight: 600; font-size: 0.95rem; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--page-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: 2px solid var(--orange); border-color: transparent; }
.form-error { min-height: 1em; font-size: 0.88rem; color: #d23b2a; }
.form-note { font-size: 0.9rem; color: var(--muted); }
.form-success { padding: 1.5rem; border-left: 4px solid var(--orange); background: var(--orange-soft); border-radius: 6px; }

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

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--ink-muted);
  border-top: 4px solid var(--orange);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding: 3.5rem 0 2.5rem;
}
.footer-grid h4 { color: #fff; font-size: 1.2rem; letter-spacing: 0.06em; }
.footer-grid ul { display: grid; gap: 0.45rem; padding: 0; margin: 0; list-style: none; }
.footer-grid a { color: var(--ink-muted); text-decoration: none; }
.footer-grid a:hover { color: var(--orange); }
.footer-brand img { height: 52px; width: auto; margin-bottom: 1rem; }
.footer-services {
  padding: 1rem 0;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-text);
  background: var(--ink-2);
}
.footer-services span { color: var(--orange); margin: 0 0.6rem; }
.footer-bottom { padding: 1.2rem 0; font-size: 0.9rem; border-top: 1px solid #252e3a; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .feature-strip ul { grid-template-columns: repeat(3, 1fr); }
  .feature-strip li:nth-child(4) { border-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .industries { grid-template-columns: repeat(2, 1fr); }
  .menu-button { display: grid; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    padding: 0.8rem 1rem 1.2rem;
    background: var(--ink);
    border-bottom: 3px solid var(--orange);
  }
  .main-nav.open { display: flex; }
  .main-nav a.active { box-shadow: none; }
  .header-actions { margin-left: auto; }
  .header-actions .btn { display: none; }

  .hero::before { width: 120%; }
  .hero::after { display: none; }
  .hero-inner,
  .split,
  .service,
  .contact-grid,
  .grid-2,
  .grid-3 { grid-template-columns: 1fr; }
  .split.reverse > :first-child,
  .service:nth-child(even) .service-media { order: 0; }
  .hero-visual { max-width: 480px; }

  .band { grid-template-columns: 1fr; }
  .band-title { border-right: 0; padding-right: 0; }

  .photo-strip { grid-template-columns: repeat(2, 1fr); }
  .photo-strip img { height: 160px; }
}

@media (max-width: 560px) {

  .grid-4,
  .checks,
  .bullets,
  .form-row { grid-template-columns: 1fr; }
  .feature-strip ul { grid-template-columns: repeat(2, 1fr); }
  .feature-strip li { justify-content: flex-start; border-left: 0; padding-left: 1rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-services span { margin: 0 0.3rem; }
}

/* Industry tiles are links */
a.industry { color: var(--text); text-decoration: none; transition: color 0.2s, background 0.2s; }
a.industry:hover { color: var(--orange); background: var(--orange-soft); }

/* ---------- Group pages ---------- */
[id] { scroll-margin-top: 90px; }

.hero-visual .hero-photo {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border-bottom: 6px solid var(--orange);
}

.media-panel.split-img img { width: 100%; }

.industries.three { grid-template-columns: repeat(3, 1fr); }

.division { padding: clamp(2.5rem, 6vw, 4rem) 0; border-bottom: 1px solid var(--line); }
.division:first-child { padding-top: 0; }
.division:last-child { border-bottom: 0; padding-bottom: 0; }
.division .service { padding: 0; border-bottom: 0; }
.service.reverse .service-media { order: -1; }

.items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin-top: 2.5rem;
}
.item {
  padding: 1.3rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
}
.item h3 { margin-bottom: 0.35rem; font-size: 1.25rem; }
.item p { margin: 0; color: var(--muted); }
.item .bullets { margin-top: 0.6rem; }

.facts { display: grid; gap: 1rem; padding: 0; margin: 0; list-style: none; }
.facts li { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.facts span { color: var(--muted); }
.facts strong { font-family: var(--font-head); font-size: 1.25rem; letter-spacing: 0.04em; color: var(--text); }

@media (max-width: 860px) {
  .industries.three { grid-template-columns: repeat(2, 1fr); }
  .industries.three > :last-child:nth-child(odd) { grid-column: span 2; }
  .service.reverse .service-media { order: 0; }
  .items { grid-template-columns: 1fr; }
}
