/* ==================================================
   KEC Website — Professional Design System v3.0
   "Precision Engineering" — refined, smooth, premium
   ================================================== */

/* --- Design Tokens --- */
:root {
  /* Color */
  --color-bg:            #ffffff;
  --color-bg-alt:        #f5f7fa;
  --color-bg-deep:       #eef2f7;
  --color-surface:       #ffffff;
  --color-ink:           #0a1220;
  --color-ink-soft:      #101c30;
  --color-border:        rgba(13, 27, 52, 0.08);
  --color-border-mid:    rgba(13, 27, 52, 0.16);
  --color-text-primary:  #0d1b34;
  --color-text-secondary:#4e5a6e;
  --color-text-tertiary: #8a94a6;
  --color-accent:        #0056d6;
  --color-accent-hover:  #0064f0;
  --color-accent-dark:   #003e9c;
  --color-accent-soft:   rgba(0, 86, 214, 0.08);
  --color-accent-ring:   rgba(0, 86, 214, 0.16);
  --color-green:         #18b663;
  --gradient-accent:     linear-gradient(135deg, #0056d6 0%, #0091ff 100%);
  --gradient-ink:        linear-gradient(150deg, #0a1220 0%, #10213f 55%, #0b2f66 100%);

  /* Type — same system font stack as live kec.sg */
  --font-display: -apple-system, 'SF Pro Display', BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --font-body:    -apple-system, 'SF Pro Text', BlinkMacSystemFont, 'Helvetica Neue', sans-serif;

  /* Layout */
  --nav-height: 64px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 26px;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(13, 27, 52, 0.05), 0 1px 3px rgba(13, 27, 52, 0.05);
  --shadow-sm: 0 2px 6px rgba(13, 27, 52, 0.05), 0 6px 16px rgba(13, 27, 52, 0.06);
  --shadow-md: 0 4px 10px rgba(13, 27, 52, 0.05), 0 14px 32px rgba(13, 27, 52, 0.09);
  --shadow-lg: 0 8px 20px rgba(13, 27, 52, 0.07), 0 24px 56px rgba(13, 27, 52, 0.12);
  --shadow-xl: 0 12px 28px rgba(13, 27, 52, 0.09), 0 36px 80px rgba(13, 27, 52, 0.16);
  --shadow-accent: 0 8px 24px rgba(0, 86, 214, 0.28);

  /* Motion */
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-swift: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.35s var(--ease-out);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
video { -webkit-tap-highlight-color: transparent; outline: none; }
::selection { background: rgba(0, 86, 214, 0.14); color: var(--color-accent-dark); }

/* Refined scrollbar (WebKit) */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--color-bg-alt); }
::-webkit-scrollbar-thumb { background: #c3ccd9; border-radius: 8px; border: 3px solid var(--color-bg-alt); }
::-webkit-scrollbar-thumb:hover { background: #a8b3c4; }

/* Accessible focus */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==================================================
   NAVIGATION
   ================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: background 0.35s var(--ease-swift), border-color 0.35s var(--ease-swift), box-shadow 0.35s var(--ease-swift);
}
.nav.nav-solid,
.nav.nav-solid.scrolled {
  background: #fff;
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--color-border);
  box-shadow: 0 1px 0 rgba(13, 27, 52, 0.04), 0 8px 32px rgba(13, 27, 52, 0.06);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 28px;
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--color-text-primary); white-space: nowrap; font-family: var(--font-display);
  transition: opacity 0.25s var(--ease-swift);
}
.nav-logo:hover { opacity: 0.8; }
.nav-logo img { height: 44px !important; width: auto; object-fit: contain; }
.nav-logo-text span { color: var(--color-accent); }

.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.nav-links a {
  position: relative;
  font-size: 14px; font-weight: 500; color: var(--color-text-secondary);
  padding: 0 14px; height: var(--nav-height);
  display: flex; align-items: center;
  transition: color 0.25s var(--ease-swift);
  white-space: nowrap;
}
.nav-links > li > a::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 16px;
  height: 2px; background: var(--color-accent); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.nav-links > li > a:hover { color: var(--color-text-primary); }
.nav-links > li > a:hover::after { transform: scaleX(1); }

.nav-links .has-dropdown { position: relative; }
.nav-links .has-dropdown:hover .dropdown,
.nav-links .has-dropdown:focus-within .dropdown {
  opacity: 1; pointer-events: all;
  transform: translateX(-50%) translateY(0) scale(1);
}
.dropdown {
  position: absolute; top: calc(var(--nav-height) - 8px); left: 50%;
  transform: translateX(-50%) translateY(-8px) scale(0.98);
  transform-origin: top center;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 260px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s var(--ease-out), transform 0.28s var(--ease-out);
}
.dropdown a {
  display: block; padding: 11px 14px;
  font-size: 13.5px; font-weight: 500; color: var(--color-text-secondary);
  height: auto; border-radius: 9px;
  transition: color 0.2s var(--ease-swift), background 0.2s var(--ease-swift), padding-left 0.25s var(--ease-out);
}
.dropdown a:hover {
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding-left: 18px;
}

.nav-cta {
  font-size: 13.5px; font-weight: 600;
  background: var(--gradient-accent); color: #fff;
  padding: 9px 22px; border-radius: 22px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 86, 214, 0.22);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-accent); }
.nav-cta:active { transform: translateY(0); }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; background: none; border: none;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.25s var(--ease-swift);
}
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-nav {
  display: flex; position: fixed;
  top: var(--nav-height); left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 999; padding: 20px 28px 48px;
  flex-direction: column; gap: 0; overflow-y: auto;
  opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.mobile-nav.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.mobile-nav a {
  font-size: 17px; color: var(--color-text-primary);
  padding: 16px 0; border-bottom: 1px solid var(--color-border);
  font-weight: 600; display: block; width: 100%;
  font-family: var(--font-display); letter-spacing: -0.01em;
  transition: color 0.2s var(--ease-swift), padding-left 0.25s var(--ease-out);
}
.mobile-nav a:hover { color: var(--color-accent); padding-left: 6px; }
.mobile-nav .mobile-sub {
  display: flex; flex-direction: column;
  background: var(--color-bg-alt); border-radius: var(--radius-sm);
  border-bottom: none; padding: 6px 0; margin: 4px 0 8px;
}
.mobile-nav .mobile-sub a {
  font-size: 14px; padding: 11px 20px; border-bottom: none;
  color: var(--color-text-secondary); font-weight: 500;
  font-family: var(--font-body);
}
.mobile-nav .mobile-nav-cta {
  margin-top: 24px; text-align: center;
  background: var(--gradient-accent); color: #fff;
  border-radius: var(--radius-md); border-bottom: none;
  padding: 15px; font-family: var(--font-body); font-size: 15px;
  box-shadow: var(--shadow-accent);
}
.mobile-nav .mobile-nav-cta:hover { color: #fff; padding-left: 15px; }

/* ==================================================
   BUTTONS
   ================================================== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gradient-accent); color: #fff;
  padding: 14px 30px; border-radius: 28px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.005em;
  border: none; cursor: pointer; font-family: var(--font-body);
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0, 86, 214, 0.24);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), filter 0.3s var(--ease-swift);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-accent); filter: brightness(1.06); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--color-accent);
  padding: 14px 30px; border-radius: 28px;
  font-size: 15px; font-weight: 600;
  border: 1px solid rgba(0, 86, 214, 0.35); cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.3s var(--ease-swift), border-color 0.3s var(--ease-swift), transform 0.3s var(--ease-out);
}
.btn-secondary:hover { background: var(--color-accent-soft); border-color: var(--color-accent); transform: translateY(-2px); }

/* Secondary button inside dark hero */
.hero .btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero .btn-secondary:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.65); }

.btn-ghost {
  font-size: 15px; color: var(--color-accent); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap 0.25s var(--ease-out);
}
.btn-ghost:hover { gap: 11px; }

/* ==================================================
   HERO
   ================================================== */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: calc(var(--nav-height) + 80px) 24px 96px;
  position: relative; overflow: hidden;
  background: var(--color-ink);
  isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: -4%;
  background: url('../images/main_backdrop.png') center center / cover no-repeat;
  z-index: -2;
  animation: heroZoom 22s var(--ease-swift) forwards;
}
@keyframes heroZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.09); }
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1100px 480px at 50% -10%, rgba(0, 100, 240, 0.22), transparent 65%),
    linear-gradient(165deg, rgba(6, 12, 26, 0.78) 0%, rgba(8, 18, 40, 0.68) 45%, rgba(4, 10, 24, 0.86) 100%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 900px; }
.hero-content > * { animation: heroRise 0.9s var(--ease-out) both; }
.hero-content > *:nth-child(1) { animation-delay: 0.08s; }
.hero-content > *:nth-child(2) { animation-delay: 0.18s; }
.hero-content > *:nth-child(3) { animation-delay: 0.30s; }
.hero-content > *:nth-child(4) { animation-delay: 0.42s; }
.hero-content > *:nth-child(5) { animation-delay: 0.54s; }
@keyframes heroRise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: #9cc4ff;
  margin-bottom: 26px;
  background: rgba(120, 170, 255, 0.10);
  padding: 7px 18px; border-radius: 22px;
  border: 1px solid rgba(140, 180, 255, 0.28);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hero-title {
  font-size: clamp(46px, 7.2vw, 92px);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.03;
  color: #ffffff; margin-bottom: 26px;
  font-family: var(--font-display);
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.45);
}
.hero-title span {
  background: linear-gradient(100deg, #6db3ff 0%, #a8d2ff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-subtitle {
  font-size: clamp(17px, 2vw, 20px);
  color: rgba(230, 238, 250, 0.82);
  max-width: 600px; margin: 0 auto 34px; line-height: 1.6;
  font-weight: 400;
}
.hero-badge {
  display: inline-block; text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 26px; padding: 9px 22px;
  font-size: 14px; color: rgba(235, 242, 252, 0.88);
  margin-bottom: 42px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.hero-badge strong { color: #ffffff; font-weight: 600; }
.hero-badge-dot {
  display: inline-block; margin-right: 9px; vertical-align: middle;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-green);
  box-shadow: 0 0 0 0 rgba(24, 182, 99, 0.5);
  animation: pulseDot 2.4s var(--ease-swift) infinite;
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(24, 182, 99, 0.45); }
  60%  { box-shadow: 0 0 0 9px rgba(24, 182, 99, 0); }
  100% { box-shadow: 0 0 0 0 rgba(24, 182, 99, 0); }
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.scroll-indicator {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  animation: scrollHint 2.4s var(--ease-swift) infinite;
  z-index: 1;
}
@keyframes scrollHint {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.55; }
  50%      { transform: translateX(-50%) translateY(6px); opacity: 0.9; }
}

/* ==================================================
   SECTIONS
   ================================================== */
section { padding: 108px 24px; }
.section-inner { max-width: 1240px; margin: 0 auto; }
.section-label {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--color-accent);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.08;
  font-family: var(--font-display);
  margin-bottom: 16px;
  color: var(--color-text-primary);
}
.section-subtitle {
  font-size: clamp(15.5px, 1.5vw, 18px);
  color: var(--color-text-secondary);
  max-width: 620px; margin-bottom: 56px; line-height: 1.65;
}
.section-subtitle a { color: var(--color-accent); font-weight: 500; }
.section-subtitle a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bg-alt { background: var(--color-bg-alt); }
.bg-deep { background: var(--color-bg-deep); }
hr.divider { border: none; border-top: 1px solid var(--color-border); }

/* ==================================================
   STATS BAR
   ================================================== */
.stats-bar {
  background: var(--gradient-ink);
  position: relative; overflow: hidden;
  border: none; padding: 0;
}
.stats-bar::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(720px 300px at 15% 0%, rgba(0, 120, 255, 0.14), transparent 60%),
    radial-gradient(720px 300px at 85% 100%, rgba(0, 120, 255, 0.10), transparent 60%);
  pointer-events: none;
}
.stats-grid {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  position: relative;
  background: transparent;
}
.stat-item {
  background: transparent;
  padding: 58px 32px; text-align: center;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.stat-item:first-child { border-left: none; }
.stat-number {
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 700; letter-spacing: -0.03em;
  color: #ffffff;
  font-family: var(--font-display);
  line-height: 1; margin-bottom: 10px;
}
.stat-number span {
  background: linear-gradient(100deg, #6db3ff 0%, #b1d6ff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat-label {
  font-size: 13px; font-weight: 500;
  color: rgba(210, 224, 245, 0.66);
  letter-spacing: 0.04em; text-transform: uppercase;
}

/* ==================================================
   CARDS
   ================================================== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-swift);
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--gradient-accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--color-border-mid); }
.card:hover::before { transform: scaleX(1); }
.card-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent-ring);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px; font-size: 22px;
  color: var(--color-accent);
  transition: transform 0.4s var(--ease-out), background 0.4s var(--ease-swift), color 0.4s var(--ease-swift), box-shadow 0.4s var(--ease-out);
}
.card:hover .card-icon {
  background: var(--gradient-accent); color: #fff;
  transform: scale(1.06);
  box-shadow: var(--shadow-accent);
  border-color: transparent;
}
.card-icon svg { width: 24px; height: 24px; }
.card-title { font-size: 19px; font-weight: 600; margin-bottom: 10px; color: var(--color-text-primary); font-family: var(--font-display); letter-spacing: -0.01em; }
.card-desc { font-size: 14.5px; color: var(--color-text-secondary); line-height: 1.68; }
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--color-accent);
  margin-top: 20px; font-weight: 600;
  transition: gap 0.25s var(--ease-out);
}
.card-link:hover { gap: 11px; }

/* ==================================================
   FEATURE SPLIT
   ================================================== */
.feature-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 76px 68px; margin-bottom: 16px;
  overflow: hidden; position: relative;
  box-shadow: var(--shadow-sm);
}
.feature-split.reverse { direction: rtl; }
.feature-split.reverse > * { direction: ltr; }
.feature-tag {
  display: inline-block;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent-ring);
  color: var(--color-accent);
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 14px; border-radius: 20px; margin-bottom: 20px;
}
.feature-visual {
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}
.feature-visual img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s var(--ease-out); }
.feature-visual:hover img { transform: scale(1.03); }
.feature-visual.ratio-4-3 { aspect-ratio: 4 / 3; }

/* ==================================================
   IMAGE CARDS (overlay style)
   ================================================== */
.img-card {
  border-radius: var(--radius-lg); overflow: hidden; position: relative;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
.img-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }
.img-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.8s var(--ease-out); }
.img-card:hover img { transform: scale(1.06); }
.img-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6, 14, 30, 0.85) 0%, rgba(6, 14, 30, 0.28) 52%, rgba(6, 14, 30, 0.05) 100%);
  transition: background 0.45s var(--ease-swift);
}
.img-card:hover .img-card-overlay {
  background: linear-gradient(to top, rgba(4, 20, 48, 0.9) 0%, rgba(4, 20, 48, 0.34) 55%, rgba(4, 20, 48, 0.08) 100%);
}
.img-card-content {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 28px;
  transform: translateY(4px);
  transition: transform 0.45s var(--ease-out);
}
.img-card:hover .img-card-content { transform: translateY(0); }
.img-card-icon {
  font-size: 22px; margin-bottom: 10px; color: #fff;
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
}
.img-card-icon svg { width: 21px; height: 21px; }
.img-card-title { font-size: 21px; font-weight: 600; color: #fff; font-family: var(--font-display); letter-spacing: -0.01em; }
.img-card-desc { font-size: 13.5px; color: rgba(255, 255, 255, 0.78); margin-top: 5px; line-height: 1.55; }

/* --- Industries grid --- */
.industries-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.industry-card { aspect-ratio: 4 / 3; }

/* ==================================================
   SERVICE CARDS
   ================================================== */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-swift);
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--gradient-accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--color-border-mid); }
.service-card:hover::before { transform: scaleX(1); }
.service-card .icon-xl {
  font-size: 30px; margin-bottom: 24px;
  width: 60px; height: 60px; border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent-ring);
  color: var(--color-accent);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.4s var(--ease-out), background 0.4s var(--ease-swift), color 0.4s var(--ease-swift), box-shadow 0.4s var(--ease-out);
}
.service-card:hover .icon-xl {
  background: var(--gradient-accent); color: #fff;
  transform: scale(1.06); box-shadow: var(--shadow-accent);
  border-color: transparent;
}
.service-card .icon-xl svg { width: 27px; height: 27px; }
.service-card h3 { font-size: 20px; font-weight: 600; color: var(--color-text-primary); margin-bottom: 12px; font-family: var(--font-display); letter-spacing: -0.01em; line-height: 1.3; }
.service-card p { font-size: 14.5px; color: var(--color-text-secondary); line-height: 1.7; margin-bottom: 22px; }
.service-card p a { color: var(--color-accent); font-weight: 500; }
.service-card p a:hover { text-decoration: underline; text-underline-offset: 3px; }
.service-list { padding: 0; }
.service-list li {
  font-size: 13.5px; color: var(--color-text-secondary);
  padding: 6px 0 6px 24px; position: relative; line-height: 1.55;
}
.service-list li::before {
  content: ''; position: absolute; left: 2px; top: 11px;
  width: 11px; height: 5px;
  border-left: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transform: rotate(-45deg);
}

/* ==================================================
   TEAM
   ================================================== */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.team-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-swift);
}
.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--color-border-mid); }
.team-photo { overflow: hidden; background: var(--color-bg-alt); }
.team-photo img { width: 100%; height: auto; display: block; object-fit: contain; transition: transform 0.7s var(--ease-out); }
.team-card:hover .team-photo img { transform: scale(1.04); }
.team-info { padding: 28px; }
.team-name { font-size: 18px; font-weight: 600; color: var(--color-text-primary); margin-bottom: 4px; font-family: var(--font-display); }
.team-role {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--color-accent); margin-bottom: 12px;
}
.team-bio { font-size: 13.5px; color: var(--color-text-secondary); line-height: 1.68; }

/* ==================================================
   LABWEAVE MODULE CARDS
   ================================================== */
.labweave-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.labweave-card {
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex; flex-direction: column; cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-swift);
}
.labweave-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--color-border-mid); }
.labweave-card-img { aspect-ratio: 16 / 10; overflow: hidden; }
.labweave-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease-out); }
.labweave-card:hover .labweave-card-img img { transform: scale(1.05); }
.labweave-card-body { padding: 28px; flex: 1; }
.labweave-card-body h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: var(--color-text-primary); font-family: var(--font-display); }
.labweave-card-body p { font-size: 13.5px; color: var(--color-text-secondary); line-height: 1.68; }

/* ==================================================
   PILLARS
   ================================================== */
.pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 40px; text-align: center;
  box-shadow: var(--shadow-xs);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-swift);
}
.pillar-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--color-border-mid); }
.pillar-img { border-radius: var(--radius-md); overflow: hidden; margin-bottom: 26px; aspect-ratio: 16 / 10; }
.pillar-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease-out); }
.pillar-card:hover .pillar-img img { transform: scale(1.05); }
.pillar-card h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; font-family: var(--font-display); letter-spacing: -0.01em; }
.pillar-card p { font-size: 14.5px; color: var(--color-text-secondary); line-height: 1.68; }
.pillar-card p a { color: var(--color-accent); font-weight: 500; }
.pillar-card p a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ==================================================
   PARTNERS
   ================================================== */
.partners-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 40px; }
.partner-badge {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 28px;
  font-size: 14px; font-weight: 500; color: var(--color-text-primary);
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s var(--ease-swift);
}
.partner-badge:hover { transform: translateY(-3px); border-color: var(--color-accent-ring); box-shadow: var(--shadow-md); }
.partner-badge span {
  font-size: 18px; color: var(--color-accent);
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--color-accent-soft);
  flex-shrink: 0;
}
.partner-badge span svg { width: 18px; height: 18px; }

/* --- Customers --- */
.customers-img {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.customers-img img { width: 100%; display: block; }

/* ==================================================
   CTA BANNER
   ================================================== */
.cta-banner {
  border-radius: var(--radius-xl); overflow: hidden; position: relative;
  background: var(--gradient-ink);
  text-align: center; padding: 110px 48px;
  box-shadow: var(--shadow-xl);
}
.cta-banner::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 50% -20%, rgba(0, 110, 255, 0.28), transparent 65%),
    radial-gradient(600px 320px at 90% 110%, rgba(0, 145, 255, 0.16), transparent 60%);
  pointer-events: none;
}
.cta-banner-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.14;
  mix-blend-mode: luminosity;
}
.cta-banner-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.cta-banner h2 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700; letter-spacing: -0.03em;
  color: #fff; margin-bottom: 18px;
  font-family: var(--font-display); line-height: 1.08;
}
.cta-banner p { font-size: 18px; color: rgba(220, 232, 250, 0.75); margin-bottom: 40px; line-height: 1.6; }
.cta-banner .btn-white {
  background: #fff; color: var(--color-accent-dark);
  padding: 14px 30px; border-radius: 28px;
  font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.cta-banner .btn-white:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35); }
.cta-banner .btn-outline-white {
  background: rgba(255, 255, 255, 0.05); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  padding: 14px 30px; border-radius: 28px;
  font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background 0.3s var(--ease-swift), border-color 0.3s var(--ease-swift), transform 0.3s var(--ease-out);
}
.cta-banner .btn-outline-white:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.7); transform: translateY(-2px); }

/* ==================================================
   CONTACT
   ================================================== */
.contact-section { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 72px; align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label { font-size: 13px; color: var(--color-text-primary); font-weight: 600; letter-spacing: 0.01em; }
.form-group input, .form-group textarea, .form-group select {
  background: var(--color-surface);
  border: 1px solid var(--color-border-mid);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 15px; color: var(--color-text-primary);
  font-family: var(--font-body);
  transition: border-color 0.25s var(--ease-swift), box-shadow 0.25s var(--ease-swift);
  outline: none; -webkit-appearance: none;
}
.form-group input:hover, .form-group textarea:hover, .form-group select:hover { border-color: rgba(13, 27, 52, 0.28); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(0, 86, 214, 0.10);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-info-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-info-icon {
  width: 46px; height: 46px;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent-ring);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; color: var(--color-accent);
}
.contact-info-icon svg { width: 21px; height: 21px; }
.contact-info-text h4 { font-size: 15px; font-weight: 600; color: var(--color-text-primary); margin-bottom: 4px; }
.contact-info-text p { font-size: 13.5px; color: var(--color-text-secondary); line-height: 1.6; }
.social-links { display: flex; gap: 10px; margin-top: 8px; }
.social-link {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--color-text-secondary);
  transition: transform 0.3s var(--ease-out), background 0.3s var(--ease-swift), color 0.3s var(--ease-swift), border-color 0.3s var(--ease-swift), box-shadow 0.3s var(--ease-out);
}
.social-link:hover {
  border-color: transparent; color: #fff;
  background: var(--gradient-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

/* ==================================================
   PAGE HERO (sub-pages)
   ================================================== */
.page-hero {
  padding: calc(var(--nav-height) + 96px) 24px 84px;
  background:
    radial-gradient(900px 380px at 50% -15%, rgba(0, 86, 214, 0.07), transparent 65%),
    var(--color-bg-alt);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  position: relative; overflow: hidden;
}
.page-hero-inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 1; }
.page-hero-inner > * { animation: heroRise 0.8s var(--ease-out) both; }
.page-hero-inner > *:nth-child(2) { animation-delay: 0.1s; }
.page-hero-inner > *:nth-child(3) { animation-delay: 0.2s; }
.page-hero-img {
  margin: 56px auto 0; max-width: 920px;
  border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  animation: heroRise 0.9s var(--ease-out) 0.25s both;
}
.page-hero-img img { width: 100%; display: block; }

/* ==================================================
   FOOTER — dark, professional
   ================================================== */
.footer {
  background: var(--color-ink);
  border-top: none;
  padding: 80px 24px 36px;
  position: relative; overflow: hidden;
}
.footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 130, 255, 0.45), transparent);
}
.footer-inner { max-width: 1240px; margin: 0 auto; position: relative; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 56px; }
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 700; color: #fff;
  font-family: var(--font-display);
}
.footer-logo img {
  height: 44px; width: auto;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 10px;
}
.footer-logo span { color: #6db3ff; }
.footer-desc { font-size: 13.5px; color: rgba(200, 214, 235, 0.55); line-height: 1.75; max-width: 300px; }
.footer-col h4 {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(235, 242, 252, 0.92);
  margin-bottom: 18px;
}
.footer-col a {
  display: block; font-size: 13.5px;
  color: rgba(200, 214, 235, 0.55);
  padding: 5px 0;
  transition: color 0.25s var(--ease-swift), padding-left 0.25s var(--ease-out);
}
.footer-col a:hover { color: #fff; padding-left: 4px; }
.footer .social-links { margin-top: 10px; }
.footer .social-link {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(220, 232, 250, 0.75);
}
.footer .social-link:hover { background: var(--gradient-accent); color: #fff; border-color: transparent; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 12.5px; color: rgba(180, 198, 224, 0.42); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 12.5px; color: rgba(180, 198, 224, 0.42); transition: color 0.25s var(--ease-swift); }
.footer-bottom-links a:hover { color: rgba(235, 242, 252, 0.9); }

/* ==================================================
   ANIMATIONS
   ================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  will-change: opacity, transform;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay-1 { transition-delay: 0.08s; }
.fade-in-delay-2 { transition-delay: 0.16s; }
.fade-in-delay-3 { transition-delay: 0.24s; }
.fade-in-delay-4 { transition-delay: 0.32s; }
.fade-in-delay-5 { transition-delay: 0.40s; }

/* Reduced motion — respect user preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
}

/* ==================================================
   RESPONSIVE
   ================================================== */
@media (max-width: 1024px) {
  .feature-split { grid-template-columns: 1fr; padding: 52px 40px; gap: 44px; }
  .feature-split.reverse { direction: ltr; }
  .contact-section { grid-template-columns: 1fr; gap: 56px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item { border-left: none; border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 44px 28px; }
  .stat-item:nth-child(-n+2) { border-top: none; }
  .services-grid, .team-grid, .labweave-grid, .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .industries-grid { grid-template-columns: 1fr 1fr; }
}
/* Nav switches to hamburger below 900px — the full link row has almost no
   slack between 769–860px and looks crowded. */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
}
@media (max-width: 768px) {
  section { padding: 72px 20px; }
  .services-grid, .team-grid, .industries-grid, .labweave-grid, .pillar-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 72px 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; max-width: 320px; margin: 0 auto; }
  .hero { padding-bottom: 110px; }
  .page-hero { padding: calc(var(--nav-height) + 64px) 20px 60px; }
  .page-hero-img { margin-top: 36px; }
  .feature-split { padding: 40px 28px; }
}
/* Collapse fixed two-column inline grids (HIA/NEHR cards, capability lists,
   case-study pairs) to a single column on small screens. */
@media (max-width: 700px) {
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns:repeat(2,1fr)"] { grid-template-columns: 1fr !important; }

  /* Wide banner cards (e.g. Aerospace MRO link on the aerospace page):
     let the overlay content define the height instead of a fixed 21/8 ratio. */
  a[style*="aspect-ratio:21/8"] { aspect-ratio: auto !important; }
  a[style*="aspect-ratio:21/8"] > img { position: absolute; inset: 0; }
  a[style*="aspect-ratio:21/8"] .img-card-content { position: relative; transform: none; padding: 24px 20px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item { border-top: 1px solid rgba(255, 255, 255, 0.08); }
  .stat-item:first-child { border-top: none; }
  .partner-badge { width: 100%; justify-content: center; }
}
