/* ============================================================
   ENEPRO Sdn Bhd — Design System
   Primary: #26247B  Yellow: #FFF100  Teal: #00C2C7 (minimal)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  --navy:      #26247B;
  --navy-dark: #1A1A2E;
  --text:      #1E1D54;   /* heading — deep navy, never black */
  --body:      #46456A;   /* body copy — medium navy */
  --muted:     #7C7B9C;   /* secondary / captions */
  --yellow:    #FFF100;
  --teal:      #00C2C7;
  --bg:        #FFFFFF;
  --bg-alt:    #F4F4FB;   /* alternate section */
  --border:    #DEDDF0;
  --radius:    10px;
  --shadow:    0 2px 20px rgba(38,36,123,.08);
  --max-w:     1280px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4 { color: var(--text); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 2.5vw, 2.2rem); }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: .95rem; font-weight: 600; }
p  { line-height: 1.78; }

/* ── Layout ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 48px; }
section    { padding: 88px 0; }

/* ── Section label ── */
.label {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: .55rem;
}

/* ── Section heading block ── */
.sh        { margin-bottom: 2rem; }
.sh h2     { margin-bottom: .4rem; }
.sh .bar   { display: inline-block; width: 40px; height: 3px; background: var(--yellow); border-radius: 2px; margin-top: .55rem; }
.sh.center { text-align: center; }
.sh.center .bar { display: block; margin: .55rem auto 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: 'Poppins', sans-serif; font-size: .82rem;
  font-weight: 600; border-radius: 6px;
  padding: .65rem 1.6rem; cursor: pointer; border: none;
  transition: all .2s ease; letter-spacing: .02em;
  line-height: 1;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #3533A0; }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-white   { background: #fff; color: var(--navy); }
.btn-white:hover { background: #eeeeff; }
.btn-yellow    { background: var(--yellow); color: var(--navy); }
.btn-yellow:hover { background: #FFF566; }
.btn-primary-y { background: var(--navy); color: var(--yellow); }
.btn-primary-y:hover { background: #3533A0; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Card ── */
.card {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ── Hex icon (SVG data-URI, 1:1, rounded corners, no animation) ── */
.hi {
  width: 52px; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative;
}
.hi::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M45.7 6.5 Q50 4 54.3 6.5 L85.7 24.5 Q90 27 90 32 L90 68 Q90 73 85.7 75.5 L54.3 93.5 Q50 96 45.7 93.5 L14.3 75.5 Q10 73 10 68 L10 32 Q10 27 14.3 24.5 Z' fill='%23FFF100'/%3E%3C/svg%3E") center/contain no-repeat;
}
.hi > * { position: relative; z-index: 1; }
.hi.hi-navy::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M45.7 6.5 Q50 4 54.3 6.5 L85.7 24.5 Q90 27 90 32 L90 68 Q90 73 85.7 75.5 L54.3 93.5 Q50 96 45.7 93.5 L14.3 75.5 Q10 73 10 68 L10 32 Q10 27 14.3 24.5 Z' fill='%2326247B'/%3E%3C/svg%3E");
}
.hi.hi-light::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M45.7 6.5 Q50 4 54.3 6.5 L85.7 24.5 Q90 27 90 32 L90 68 Q90 73 85.7 75.5 L54.3 93.5 Q50 96 45.7 93.5 L14.3 75.5 Q10 73 10 68 L10 32 Q10 27 14.3 24.5 Z' fill='%23EEEEF8'/%3E%3C/svg%3E");
}

/* ── Hex bullet (small, 18px) ── */
.hb {
  width: 18px; aspect-ratio: 1; flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M45.7 6.5 Q50 4 54.3 6.5 L85.7 24.5 Q90 27 90 32 L90 68 Q90 73 85.7 75.5 L54.3 93.5 Q50 96 45.7 93.5 L14.3 75.5 Q10 73 10 68 L10 32 Q10 27 14.3 24.5 Z' fill='%23FFF100'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ── Supply tags ── */
.stag {
  display: inline-block; margin: 3px;
  border: 1px solid var(--border);
  color: var(--body); border-radius: var(--radius);
  padding: 4px 12px; font-size: .74rem; font-weight: 500;
}

/* ── Nav ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1001;
  width: 100%;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(38,36,123,.07);
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease, transform .4s cubic-bezier(.4,0,.2,1);
  box-sizing: border-box;
}
#nav.nav-hidden { transform: translateY(-100%); }

/* Home page: blend into hero, reveal on scroll */
.home-page #nav           { background: transparent; border-color: transparent; box-shadow: none; }
.home-page #nav.nav-solid,
.home-page #nav.nav-open { background: rgba(255,255,255,.97); border-color: var(--border); box-shadow: 0 2px 16px rgba(38,36,123,.07); }
.home-page #nav:not(.nav-solid) .nav-links a           { color: var(--body); }
.home-page #nav:not(.nav-solid) .nav-links a:hover,
.home-page #nav:not(.nav-solid) .nav-links a.active    { color: var(--navy); }
.home-page #nav:not(.nav-solid) .nav-links a.active::after { background: var(--navy); }
.home-page #nav:not(.nav-solid) .nav-logo img          { filter: none; }
.home-page #nav:not(.nav-solid) .nav-ham span          { background: var(--navy); }
.home-page #nav:not(.nav-solid) .nav-cta               { background: var(--navy); border: 1.5px solid var(--navy); color: var(--yellow); }
.home-page #nav:not(.nav-solid) .nav-cta:hover         { background: var(--navy-dark); border-color: var(--navy-dark); }

.nav-inner {
  display: flex;
  align-items: center;
  height: 72px;
  padding: 0 48px;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  box-sizing: border-box;
}
.nav-logo { flex-shrink: 0; display: flex; align-items: center; }
.nav-logo img { height: 36px; width: auto; }
.nav-links {
  margin-left: 2.5rem;
  margin-right: auto;
  display: flex; align-items: center; gap: 2rem;
}
.nav-links a {
  font-size: .83rem; font-weight: 500; color: var(--body);
  transition: color .2s; position: relative; padding-bottom: 2px;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--yellow); border-radius: 1px;
}
.nav-right { flex-shrink: 0; display: flex; align-items: center; gap: .75rem; }
.nav-ham {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-ham span { display: block; width: 22px; height: 1.5px; background: var(--navy); border-radius: 1px; transition: all .25s; }
.nav-mob {
  display: none;
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--border);
  padding: .5rem 0;
}
.nav-mob a {
  display: block; padding: .65rem 21px .65rem 24px;
  font-size: .85rem; font-weight: 500; color: var(--body);
  border-left: 3px solid transparent; transition: color .2s, border-color .2s;
}
.nav-mob a:hover { color: var(--navy); }
.nav-mob a.active:not(.btn) { color: var(--navy); font-weight: 600; border-left-color: var(--yellow); }
.nav-mob .btn { margin: .5rem 24px; display: inline-flex; }
.nav-mob .btn-primary-y,
.nav-mob .btn-primary-y:visited,
.nav-mob .btn-primary-y:hover,
.nav-mob .btn-primary-y:active,
.nav-mob .btn-primary-y.active { color: var(--yellow); }

/* ── Footer ── */
footer {
  background: var(--navy);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem; margin-bottom: 3rem;
}
.footer-logo { height: 32px; filter: brightness(0) invert(1); margin-bottom: 1rem; }
.footer-desc { font-size: .82rem; color: rgba(255,255,255,.45); line-height: 1.7; max-width: 260px; }
footer h4 { color: var(--yellow); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; font-weight: 600; }
footer li { margin-bottom: .55rem; }
footer li a { font-size: .82rem; color: rgba(255,255,255,.45); transition: color .2s; }
footer li a:hover { color: rgba(255,255,255,.85); }
.footer-contact li { font-size: .82rem; color: rgba(255,255,255,.45); display: flex; align-items: flex-start; gap: .5rem; margin-bottom: .6rem; }
.footer-contact li svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 3px; color: var(--teal); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom p { font-size: .75rem; color: rgba(255,255,255,.3); }

/* ── Page hero (inner pages) — full navy overlay ── */
.page-hero {
  position: relative; overflow: hidden;
  min-height: 320px; display: flex; align-items: center;
  background: url('../assets/img-placeholder.webp') center center/cover no-repeat;
  padding: 140px 0 72px;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(38,36,123,.92) 0%, rgba(38,36,123,.78) 100%);
  z-index: 1;
}
.page-hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--yellow); z-index: 3;
}
.page-hero .container { position: relative; z-index: 2; width: 100%; }
.page-hero .label { color: rgba(255,255,255,.55); }
.page-hero h1 { color: #fff; margin-bottom: .6rem; font-size: clamp(1.8rem, 3vw, 2.8rem); }
.page-hero p  { color: rgba(255,255,255,.65); max-width: 520px; font-size: .92rem; }
.breadcrumb   { display: flex; align-items: center; gap: .4rem; font-size: .75rem; color: rgba(255,255,255,.4); margin-bottom: 1rem; }
.breadcrumb a { color: rgba(255,255,255,.4); transition: color .2s; }
.breadcrumb a:hover { color: rgba(255,255,255,.8); }

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 0; background: none; border: none; cursor: pointer; text-align: left;
  color: var(--text); font-family: 'Poppins', sans-serif; font-size: .9rem; font-weight: 600;
}
.faq-icon { transition: transform .25s ease; color: var(--navy); flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-body.open { max-height: 200px; }
.faq-body p { font-size: .87rem; color: var(--muted); padding-bottom: 1rem; line-height: 1.7; }

/* ── Reveal ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: none; }
.d1 { transition-delay: .1s; } .d2 { transition-delay: .2s; } .d3 { transition-delay: .3s; } .d4 { transition-delay: .4s; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Client Carousel ── */
.cl-wrap {
  overflow: hidden; padding: 2rem 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.cl-track {
  display: flex; align-items: center;
  width: max-content;
  animation: clScroll 32s linear infinite;
}
.cl-track:hover { animation-play-state: paused; }
.cl-item { flex-shrink: 0; height: 90px; display: flex; align-items: center; padding-right: 5rem; }
.cl-item img {
  height: 80px; width: auto; max-width: 200px; object-fit: contain;
  filter: grayscale(1) opacity(.45);
  transition: filter .35s;
}
.cl-item img:hover { filter: grayscale(0) opacity(1); }
@keyframes clScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Hero bg slides ── */
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1);
  transform-origin: center;
  transition: opacity 0.2s ease-in;
  will-change: opacity, transform;
}
.hero-bg.active {
  opacity: 0.75;
  animation: heroZoom 0.2s linear forwards;
}
@keyframes heroZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.1); }
}

/* ── Hero slideshow progress bars ── */
.hero-progress {
  position: absolute; bottom: 2rem; z-index: 3;
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--max-w);
  display: flex; gap: 8px;
  padding: 0 48px; box-sizing: border-box;
}
.hero-progress-bar {
  flex: 1; height: 2px;
  background: rgba(38,36,123,.20); border-radius: 1px;
  overflow: hidden; position: relative;
}
.hero-progress-bar::after {
  content: ''; position: absolute; inset: 0;
  width: 0%; background: var(--navy); border-radius: 1px;
}
.hero-progress-bar.active::after { animation: progressFill 9s linear forwards; }
.hero-progress-bar.done::after   { width: 100%; background: rgba(38,36,123,.45); }
@keyframes progressFill { from { width: 0%; } to { width: 100%; } }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .nav-inner { padding: 0 32px; }

  /* Always white nav on tablet & mobile — no transparent hero bleed */
  .home-page #nav {
    background: rgba(255,255,255,.97);
    border-color: var(--border);
    box-shadow: 0 2px 16px rgba(38,36,123,.07);
  }
}
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  section { padding: 60px 0; }
  .nav-links, .nav-right > .nav-cta { display: none; }
  .nav-ham { display: flex; }
  .nav-inner { padding: 0 20px; justify-content: space-between; }
  .page-hero { padding: 120px 0 48px; }

  /* Mobile nav menu slide */
  .nav-mob {
    display: block;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0;
    transition: max-height .35s cubic-bezier(.4,0,.2,1), opacity .25s ease, padding .35s ease;
  }
  .nav-mob.open {
    max-height: 400px;
    opacity: 1;
    padding: .5rem 0;
  }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; }
  .footer-bottom p { white-space: nowrap; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cl-track { animation: none; }
  .hero-bg.active { animation: none; background-size: 120% 120%; }
}
