/* ════════════════════════════════════════════════════
   KOGENERGY INTERNATIONAL — Shared Design System
   style.css
════════════════════════════════════════════════════ */

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ─── DESIGN TOKENS ─── */
:root {
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --nav-bg: #0F1E35;
  --navy: #0F1E35;
  --navy-mid: #1A3150;
  --navy-deep: #08131F;
  --navy-lt: #E8EDF5;
  --green: #1A7A4A;
  --green-mid: #2E9E65;
  --green-lt: #E8F5EE;
  --amber: #C07A1A;
  --steel: #4A6FA5;
  --steel-lt: #B8D4FF;
  --text: #0F1E35;
  --text-muted: #3D4F6A;
  --text-faint: #556779;
  --border: #D0D7E3;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-ui: 'General Sans', system-ui, sans-serif;
  --font-body: 'Switzer', system-ui, sans-serif;
  --shadow-card: 0 1px 2px rgba(15,30,53,0.04), 0 8px 24px rgba(15,30,53,0.06);
  --shadow-card-hover: 0 4px 12px rgba(15,30,53,0.06), 0 16px 40px rgba(15,30,53,0.12);
  --max-w: 1280px;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}

/* ─── ACCESSIBILITY ─── */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ════════════════════════════════════════════════════
   NAV
════════════════════════════════════════════════════ */
.nav {
  background: var(--nav-bg);
  padding: 0 clamp(1.25rem, 5vw, 4rem);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.nav.scrolled {
  border-bottom-color: rgba(255,255,255,0.06);
  box-shadow: 0 4px 24px rgba(0,0,0,0.22);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 110;
}
.nav-logo-mark { width: 34px; height: 34px; flex-shrink: 0; }
.nav-logo-text {
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1;
}
.nav-logo-sub {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  display: block;
  margin-top: 3px;
}
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.58);
  transition: color 150ms ease;
  position: relative;
  padding: 6px 0;
}
.nav-links a:hover { color: #fff; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--green-mid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: #fff; }

.nav-cta {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 22px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 150ms, transform 150ms;
  letter-spacing: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.nav-cta:hover { background: var(--green-mid); transform: translateY(-1px); }

/* Hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}
.nav-hamburger svg { width: 24px; height: 24px; }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(360px, 85vw);
  background: var(--nav-bg);
  padding: 100px 2rem 2rem;
  z-index: 105;
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: -8px 0 32px rgba(0,0,0,0.35);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 150ms;
  letter-spacing: -0.01em;
}
.mobile-menu a:hover { color: #fff; }
.mobile-menu-cta {
  margin-top: 1.5rem;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 24px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
}
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8,19,31,0.55);
  backdrop-filter: blur(4px);
  z-index: 104;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.mobile-backdrop.open { opacity: 1; pointer-events: auto; }

/* ════════════════════════════════════════════════════
   PAGE HERO (inner pages — smaller than homepage)
════════════════════════════════════════════════════ */
.page-hero {
  background: var(--navy);
  padding: clamp(4rem, 7vw, 6.5rem) clamp(1.5rem, 5vw, 4.5rem) clamp(3.5rem, 6vw, 5.5rem);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 10% 50%, rgba(74,111,165,0.12), transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(46,158,101,0.07), transparent 50%);
  pointer-events: none;
}
.page-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.page-hero .section-overline { color: var(--steel-lt); }
.page-hero .section-overline::before { background: var(--steel-lt); opacity: 0.5; }
.page-hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  text-wrap: balance;
  max-width: 18ch;
}
.page-hero-h1 em {
  font-style: italic;
  color: #d0e4ff;
}
.page-hero-lead {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  font-weight: 400;
  color: rgba(255,255,255,0.92);
  max-width: 55ch;
  line-height: 1.7;
  text-shadow: 0 1px 12px rgba(0,0,0,0.5);
}

/* ════════════════════════════════════════════════════
   SECTION SHELL
════════════════════════════════════════════════════ */
.section {
  padding: clamp(4.5rem, 8vw, 7.5rem) clamp(1.5rem, 5vw, 4.5rem);
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-overline {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-overline::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--steel);
}
.section-overline.on-dark { color: var(--steel-lt); }
.section-overline.on-dark::before { background: var(--steel-lt); opacity: 0.5; }

.section-h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}
.section-h2 em { font-style: italic; color: var(--steel); }
.section-h2.on-dark { color: #fff; }
.section-h2.on-dark em { color: var(--steel-lt); }

.section-lead {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 58ch;
  margin-bottom: 3.25rem;
}
.section-lead.on-dark { color: rgba(255,255,255,0.58); }

/* ════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════ */
.btn-primary {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 28px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 150ms, transform 150ms, box-shadow 150ms;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--green-mid);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(26,122,74,0.3);
}
.btn-outline {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 24px;
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  cursor: pointer;
  transition: all 150ms;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-outline:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.04);
}
.btn-on-dark {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 28px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  cursor: pointer;
  transition: all 150ms;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-on-dark:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  padding: 13px 24px;
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: all 150ms;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-ghost:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* ════════════════════════════════════════════════════
   CARDS — Service / Solution
════════════════════════════════════════════════════ */
.sol-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2.25rem 2rem 2rem;
  transition: box-shadow 250ms ease, transform 250ms ease, border-color 250ms ease;
  position: relative;
  overflow: hidden;
}
.sol-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--green), var(--steel));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 350ms ease;
}
.sol-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
  border-color: transparent;
}
.sol-card:hover::before { transform: scaleX(1); }
.sol-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 400;
  color: var(--navy-lt);
  line-height: 1;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.sol-icon {
  width: 48px;
  height: 48px;
  background: var(--green-lt);
  border: 1px solid rgba(26,122,74,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}
.sol-icon svg { width: 22px; height: 22px; }
.sol-title {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.7rem;
}
.sol-body {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-faint);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.sol-tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  transition: border-color 200ms, color 200ms;
}
.sol-card:hover .sol-tag {
  border-color: var(--steel);
  color: var(--navy);
}

/* ════════════════════════════════════════════════════
   KPI STRIP
════════════════════════════════════════════════════ */
.kpi {
  background:
    linear-gradient(to bottom, rgba(15,30,53,0.85), var(--navy-mid) 60%);
  padding: 0 clamp(1.5rem, 5vw, 4.5rem);
  display: flex;
  border-top: 1px solid rgba(255,255,255,0.06);
  position: relative;
  z-index: 3;
}
.kpi.light {
  background: var(--surface);
  border-top: none;
  border-bottom: 1px solid var(--border);
}
.kpi-item {
  flex: 1;
  padding: 1.85rem 2rem;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.kpi.light .kpi-item { border-right-color: var(--border); }
.kpi-item:first-child { padding-left: 0; }
.kpi-item:last-child { padding-right: 0; border-right: none; }
.kpi-icon {
  width: 42px;
  height: 42px;
  background: rgba(46,158,101,0.18);
  border: 1px solid rgba(46,158,101,0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-mid);
  flex-shrink: 0;
}
.kpi.light .kpi-icon { background: var(--green-lt); border-color: rgba(26,122,74,0.2); color: var(--green); }
.kpi-icon svg { width: 20px; height: 20px; }
.kpi-val {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 400;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}
.kpi.light .kpi-val { color: var(--navy); }
.kpi-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.60);
}
.kpi.light .kpi-label { color: var(--text-faint); }

/* ════════════════════════════════════════════════════
   CTA BAND
════════════════════════════════════════════════════ */
.cta-band {
  background: var(--navy);
  padding: clamp(4rem, 7vw, 6rem) clamp(1.5rem, 5vw, 4.5rem);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(74,111,165,0.55), transparent);
}
.cta-band::after {
  content: '';
  position: absolute;
  top: 0; right: -200px;
  width: 600px; height: 100%;
  background: radial-gradient(ellipse at center, rgba(74,111,165,0.12), transparent 60%);
  pointer-events: none;
}
.cta-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 2;
}
.cta-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.85rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  color: #fff;
  margin: 0;
  text-wrap: balance;
  line-height: 1.15;
}
.cta-h2 em { font-style: italic; color: var(--steel-lt); }
.cta-sub {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  margin-top: 0.85rem;
  max-width: 52ch;
  line-height: 1.65;
}
.cta-btns {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════ */
.footer {
  background: var(--navy-deep);
  padding: 4rem clamp(1.5rem, 5vw, 4.5rem) 2rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
}
.footer-brand-text {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}
.footer-brand-sub {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  display: block;
  margin-top: 2px;
}
.footer-tagline {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.60);
  line-height: 1.7;
  max-width: 32ch;
  margin-bottom: 1.5rem;
}
.footer-offices { display: flex; flex-direction: column; gap: 1rem; }
.footer-office {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}
.footer-office strong {
  font-family: var(--font-ui);
  display: block;
  color: rgba(255,255,255,0.85);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.footer-office a { color: rgba(255,255,255,0.7); transition: color 150ms; }
.footer-office a:hover { color: #fff; }
.footer-col-title {
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.25rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-links a {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  transition: color 150ms ease;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy { font-family: var(--font-ui); font-size: 12px; color: rgba(255,255,255,0.50); }
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { font-family: var(--font-ui); font-size: 12px; color: rgba(255,255,255,0.50); transition: color 150ms; }
.footer-legal a:hover { color: rgba(255,255,255,0.7); }


/* ════════════════════════════════════════════════════
   SCROLL REVEAL
════════════════════════════════════════════════════ */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.js-ready .reveal.visible { opacity: 1; transform: translateY(0); }
.js-ready .reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.js-ready .reveal-stagger.visible > *:nth-child(1) { transition-delay: 0ms;   opacity: 1; transform: translateY(0); }
.js-ready .reveal-stagger.visible > *:nth-child(2) { transition-delay: 80ms;  opacity: 1; transform: translateY(0); }
.js-ready .reveal-stagger.visible > *:nth-child(3) { transition-delay: 160ms; opacity: 1; transform: translateY(0); }
.js-ready .reveal-stagger.visible > *:nth-child(4) { transition-delay: 240ms; opacity: 1; transform: translateY(0); }
.js-ready .reveal-stagger.visible > *:nth-child(5) { transition-delay: 300ms; opacity: 1; transform: translateY(0); }
.js-ready .reveal-stagger.visible > *:nth-child(6) { transition-delay: 360ms; opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .js-ready .reveal, .js-ready .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
  .hero-bg { transition: none; transform: none; }
}

/* ════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: block; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .kpi { flex-wrap: wrap; padding: 0; }
  .kpi-item {
    flex: 1 1 50%;
    min-width: 50%;
    max-width: 50%;
    padding: 1.5rem clamp(1rem, 4vw, 1.5rem);
    border-right: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .kpi-item:first-child, .kpi-item:last-child {
    padding-left: clamp(1rem, 4vw, 1.5rem);
    padding-right: clamp(1rem, 4vw, 1.5rem);
  }
  .kpi-item:nth-child(even) { border-right: none; }
  .kpi-item:nth-child(3), .kpi-item:nth-child(4) { border-bottom: none; }
  .kpi.light .kpi-item { border-right-color: var(--border); border-bottom-color: var(--border); }
  .cta-inner { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 760px) {
  .page-hero { padding: 3rem 1.5rem 2.5rem; }
  .page-hero-h1 { font-size: 2rem; max-width: none; }
}
@media (max-width: 560px) {
  .section-h2, .cta-h2 { font-size: 1.8rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: flex-start; }
}
