/* ═══════════════════════════════════════════════════════
   PEPPWISE — SHARED STYLES
   Light theme · Premium consultancy aesthetic
   EB Garamond + Lato · Warm off-white palette
═══════════════════════════════════════════════════════ */

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Lato', sans-serif;
  background: var(--bg);
  color: var(--text-body);
  overflow-x: hidden;
  line-height: 1.7;
  font-weight: 400;
}

/* ─── CSS VARIABLES — LIGHT THEME ─── */
:root {
  /* Surfaces */
  --bg:            #FAFAF8;
  --bg-2:          #F4F2EE;
  --bg-3:          #EDE9E3;
  --surface:       #FFFFFF;

  /* Text */
  --text-primary:  #1A1612;
  --text-body:     #3D3530;
  --text-muted:    #7A6F66;
  --text-faint:    #B0A89E;

  /* Borders */
  --border:        rgba(26,22,18,0.10);
  --border-strong: rgba(26,22,18,0.18);

  /* Malaysia e-Invoice — slate blue */
  --einv-accent:   #2563A8;
  --einv-light:    #3B7BC5;
  --einv-pale:     #EBF2FB;
  --einv-border:   rgba(37,99,168,0.20);

  /* Peppol — warm amber/terracotta */
  --pep-accent:    #B45309;
  --pep-light:     #C96A1A;
  --pep-pale:      #FDF4E7;
  --pep-border:    rgba(180,83,9,0.20);

  /* Nav */
  --nav-bg:        rgba(250,250,248,0.95);

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(26,22,18,0.07), 0 1px 2px rgba(26,22,18,0.04);
  --shadow-md:     0 4px 14px rgba(26,22,18,0.09), 0 2px 4px rgba(26,22,18,0.05);
  --shadow-lg:     0 12px 32px rgba(26,22,18,0.11), 0 4px 8px rgba(26,22,18,0.06);
}

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  padding: 1.1rem 3rem;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'EB Garamond', serif;
  font-size: 1.4rem; font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-decoration: none;
}
.nav-logo span { color: var(--pep-accent); }

.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links a {
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a.nav-active {
  color: var(--text-primary);
  font-weight: 700;
  border-bottom-color: var(--text-primary);
  animation: navHeartbeat 1.6s ease-in-out infinite;
  display: inline-block;
}
@keyframes navHeartbeat {
  0%,100% { transform: scale(1); opacity: 1; }
  14%     { transform: scale(1.12); opacity: 0.85; }
  28%     { transform: scale(1);    opacity: 1; }
  42%     { transform: scale(1.07); opacity: 0.92; }
  70%     { transform: scale(1);    opacity: 1; }
}
.nav-cta {
  background: var(--text-primary) !important;
  color: var(--bg) !important;
  padding: 0.5rem 1.4rem !important;
  font-weight: 700 !important;
  border-bottom: none !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--text-body) !important; color: var(--bg) !important; }

/* ─── HAMBURGER ─── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px; height: 28px;
  cursor: pointer;
  background: none; border: none; padding: 0;
  z-index: 600;
}
.nav-hamburger span {
  display: block;
  width: 100%; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.nav-hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── MOBILE NAV OVERLAY ─── */
.nav-mobile-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(250,250,248,0.98);
  backdrop-filter: blur(24px);
  z-index: 499;
  flex-direction: column;
  justify-content: center; align-items: center;
  gap: 2rem;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.nav-mobile-overlay.open { display: flex; opacity: 1; }
.nav-mobile-overlay a {
  font-family: 'EB Garamond', serif;
  font-size: 1.9rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.03em;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s;
}
.nav-mobile-overlay.open a { opacity: 1; transform: translateY(0); }
.nav-mobile-overlay.open a:nth-child(1) { transition-delay: 0.06s; }
.nav-mobile-overlay.open a:nth-child(2) { transition-delay: 0.12s; }
.nav-mobile-overlay.open a:nth-child(3) { transition-delay: 0.18s; }
.nav-mobile-overlay.open a:nth-child(4) { transition-delay: 0.24s; }
.nav-mobile-overlay a:hover { color: var(--pep-accent); }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-2);
}
footer p { font-size: 0.7rem; letter-spacing: 0.07em; color: var(--text-faint); }
.footer-links { display: flex; gap: 2rem; }
.footer-links a {
  font-size: 0.67rem; letter-spacing: 0.09em;
  color: var(--text-faint); text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-muted); }

/* ─── TYPOGRAPHY ─── */
h2 {
  font-family: 'EB Garamond', serif;
  font-size: clamp(2rem, 3.2vw, 3.1rem);
  font-weight: 500; line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
h2 em { font-style: italic; }
h3 {
  font-family: 'EB Garamond', serif;
  font-size: 1.55rem; font-weight: 500;
  color: var(--text-primary); line-height: 1.2;
}
h4 { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.3rem; }

.eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.eyebrow::before {
  content: ''; display: block;
  width: 1.8rem; height: 1px; flex-shrink: 0;
}
.eyebrow-blue   { color: var(--einv-accent); }
.eyebrow-blue::before   { background: var(--einv-accent); }
.eyebrow-amber  { color: var(--pep-accent); }
.eyebrow-amber::before  { background: var(--pep-accent); }
.eyebrow-muted  { color: var(--text-muted); }
.eyebrow-muted::before  { background: var(--text-muted); }
.eyebrow-center { justify-content: center; }
.eyebrow-center::before { display: none; }

.lead {
  font-size: 1rem; line-height: 1.8;
  color: var(--text-muted); font-weight: 400;
  max-width: 54ch; margin-bottom: 3rem;
}

/* ─── LAYOUT ─── */
.section-wrap {
  padding: 6rem 3rem;
  border-top: 1px solid var(--border);
}
.section-wrap.no-border { border-top: none; }
.section-wrap.alt { background: var(--bg-2); }
.section-wrap.surface { background: var(--surface); }
.inner { max-width: 1160px; margin: 0 auto; }

/* ─── PILLS ─── */
.pill {
  font-size: 0.62rem; letter-spacing: 0.10em;
  text-transform: uppercase; padding: 0.28rem 0.85rem;
  border-radius: 100px; font-weight: 700; display: inline-block;
}
.pill-blue    { background: var(--einv-pale); color: var(--einv-accent); border: 1px solid var(--einv-border); }
.pill-amber   { background: var(--pep-pale);  color: var(--pep-accent);  border: 1px solid var(--pep-border); }
.pill-neutral { background: var(--bg-3); color: var(--text-muted); border: 1px solid var(--border-strong); }
.pills-row    { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 2rem; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; border: none; cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-blue  { background: var(--einv-accent); color: #fff; }
.btn-blue:hover  { background: var(--einv-light); box-shadow: var(--shadow-md); }
.btn-amber { background: var(--pep-accent);  color: #fff; }
.btn-amber:hover { background: var(--pep-light); box-shadow: var(--shadow-md); }
.btn-dark  { background: var(--text-primary); color: var(--bg); }
.btn-dark:hover  { background: var(--text-body); box-shadow: var(--shadow-md); }
.btn-ghost {
  display: inline-block;
  border: 1.5px solid var(--border-strong); color: var(--text-body);
  padding: 0.85rem 2rem; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--text-primary); color: var(--text-primary); }

/* ─── CARDS ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: box-shadow 0.25s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-blue  { border-left: 3px solid var(--einv-accent); }
.card-amber { border-left: 3px solid var(--pep-accent); }

/* ─── CHECKLIST ─── */
.checklist { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.checklist li {
  font-size: 0.88rem; color: var(--text-muted);
  display: flex; gap: 0.75rem; align-items: flex-start; line-height: 1.6;
}
.check-icon { flex-shrink: 0; margin-top: 2px; }
.check-blue  { color: var(--einv-accent); }
.check-amber { color: var(--pep-accent); }

/* ─── DIVIDER ─── */
.divider { height: 1px; background: var(--border); margin: 1.75rem 0; }

/* ─── STAT CALLOUT ─── */
.stat-callout {
  display: inline-flex; flex-direction: column;
  padding: 1rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.stat-number {
  font-family: 'EB Garamond', serif;
  font-size: 2.4rem; font-weight: 500; line-height: 1;
}
.stat-label { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-top: 0.3rem; }
.stat-blue .stat-number { color: var(--einv-accent); }
.stat-amber .stat-number { color: var(--pep-accent); }

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-group .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-group .reveal:nth-child(2) { transition-delay: 0.09s; }
.reveal-group .reveal:nth-child(3) { transition-delay: 0.18s; }
.reveal-group .reveal:nth-child(4) { transition-delay: 0.27s; }
.reveal-group .reveal:nth-child(5) { transition-delay: 0.36s; }
.reveal-group .reveal:nth-child(6) { transition-delay: 0.45s; }
.reveal-group .reveal:nth-child(7) { transition-delay: 0.54s; }
.reveal-group .reveal:nth-child(8) { transition-delay: 0.63s; }

/* ─── KEYFRAMES ─── */
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes pulseDot { 0%,100%{ box-shadow:0 0 0 0 rgba(37,99,168,0.35); } 60%{ box-shadow:0 0 0 7px rgba(37,99,168,0); } }
@keyframes pulseDotAmber { 0%,100%{ box-shadow:0 0 0 0 rgba(180,83,9,0.35); } 60%{ box-shadow:0 0 0 7px rgba(180,83,9,0); } }

/* ─── TABLET ─── */
@media (max-width: 1024px) {
  nav { padding: 1rem 2rem; }
  .section-wrap { padding: 5rem 2rem; }
  footer { padding: 1.75rem 2rem; }
}

/* ─── MOBILE ─── */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .section-wrap { padding: 4rem 1.5rem; }
  h2 { font-size: clamp(1.75rem, 6vw, 2.5rem); }
  .lead { font-size: 0.93rem; max-width: 100%; }
  footer {
    flex-direction: column; gap: 1rem;
    text-align: center; padding: 1.75rem 1.5rem;
  }
  .footer-links { justify-content: center; }
}

@media (max-width: 420px) {
  .section-wrap { padding: 3.5rem 1.2rem; }
}
