/* ═══════════════════════════════════════════
   Codemi — Common Styles
   Shared across all pages: reset, typography,
   header, footer, utilities.
   ═══════════════════════════════════════════ */

:root {
  --navy: #1A2654;
  --navy-light: #2A3870;
  --navy-soft: #2A3870;
  --green: #22A33F;
  --green-light: #3FBC5B;
  --green-hover: #1A8232;
  --green-deep: #1A8232;
  --green-pale: #F0FDF4;
  --blue: #203090;
  --blue-soft: #3D52A6;
  --teal: #1E8C7A;
  --teal-pale: #F0FDFA;
  --navy-deep: #101A45;
  --silver: #B0B0C0;
  --silver-light: #D4D4DC;
  /* Logo asli — exact source colors */
  --logo-blue: #203090;
  --logo-green: #30B040;
  --logo-silver: #B0B0C0;
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  /* Cream background system (Option C — homepage canvas) */
  --bg: #FDFBF7;
  --bg-alt: #F8F5EE;
  --bg-soft: #F1EBE0;
  --bg-pure: #FFFFFF;
  --border: #E8E2D4;
  --border-soft: #F0EADD;
  /* Text aliases */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;
  /* Radius + shadow scale */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.1);
  --shadow-xl: 0 40px 80px rgba(15, 23, 42, 0.14);
  --container: 1240px;
  --font: 'Plus Jakarta Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@keyframes page-in {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}
body {
  font-family: var(--font); background: var(--bg); color: var(--text-primary);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  animation: page-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow-x: hidden;
}
.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ═══════════════════════════════
   HEADER
═══════════════════════════════ */
#site-header { position: sticky; top: 0; z-index: 1000; }
.header {
  position: relative;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  height: 72px; display: flex; align-items: center; justify-content: space-between;
}
.header-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.header-logo-text { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; color: var(--navy); }
.header-logo-text span { color: var(--green); }

.header-nav { display: flex; align-items: center; gap: 8px; }
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  font-size: 15px; font-weight: 600; color: var(--gray-700);
  text-decoration: none; cursor: pointer; transition: all 0.15s;
  background: none; border: none; font-family: var(--font);
}
.nav-link:hover { background: var(--gray-50); color: var(--gray-900); }
a.nav-link.nav-active, a.nav-link.nav-active:hover { color: var(--green); background: var(--green-pale); }
.nav-chevron { 
  display: inline-block; width: 0; height: 0; 
  border-left: 4px solid transparent; border-right: 4px solid transparent; 
  border-top: 5px solid var(--gray-400); 
  transition: transform 0.2s; margin-left: 2px;
}
.nav-item:hover .nav-chevron { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--white); border: 1.5px solid var(--gray-200); border-radius: 14px;
  padding: 8px; min-width: 280px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: all 0.2s ease;
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 10px;
  text-decoration: none; transition: background 0.15s;
}
.dropdown-item:hover { background: var(--gray-50); }
.dropdown-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dropdown-label { font-size: 15px; font-weight: 600; color: var(--gray-900); }
.dropdown-desc { font-size: 13px; color: var(--gray-500); margin-top: 2px; }

/* ── Mega dropdown (Produk) — 2×2 grid ── */
.mega-dropdown {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px; padding: 8px;
  min-width: 520px;
  left: 50%; transform: translateX(-50%) translateY(-4px);
}
.nav-item:hover .mega-dropdown {
  transform: translateX(-50%) translateY(0);
}
.mega-product {
  display: flex; flex-direction: column; gap: 5px;
  padding: 14px 16px; border-radius: 10px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.mega-product:hover { background: var(--gray-50); }
.mega-product--featured { background: #F0FDF4; border-color: #BBF7D0; }
.mega-product--featured:hover { background: #DCFCE7; }
.mega-product-top { display: flex; align-items: center; gap: 8px; }
.mega-product-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.mega-product-name {
  font-size: 15px; font-weight: 700; color: var(--gray-900);
  display: flex; align-items: center; gap: 6px;
}
.mega-badge {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em;
  color: #16A34A; background: rgba(22,163,74,0.1);
  border: 1px solid rgba(22,163,74,0.25);
  padding: 2px 6px; border-radius: 20px;
}
.mega-product-desc {
  font-size: 13px; color: var(--gray-500);
  line-height: 1.45; padding-left: 17px;
}

.header-cta {
  padding: 10px 24px; background: var(--green); color: var(--white);
  border-radius: 8px; font-size: 15px; font-weight: 700;
  text-decoration: none; transition: background 0.15s;
}
.header-cta:hover { background: var(--green-hover); }

/* Mobile menu */
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; align-items: center; justify-content: center;
}
.hamburger-line {
  display: block; width: 20px; height: 2px; background: var(--gray-700);
  position: relative; transition: all 0.2s;
}
.hamburger-line::before, .hamburger-line::after {
  content: ''; position: absolute; left: 0; width: 20px; height: 2px;
  background: var(--gray-700); transition: all 0.2s;
}
.hamburger-line::before { top: -6px; }
.hamburger-line::after { top: 6px; }

.mobile-menu {
  display: none; position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
  background: var(--white); padding: 24px; z-index: 999;
  flex-direction: column; gap: 8px; overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  display: block; padding: 14px 16px; border-radius: 10px;
  font-size: 16px; font-weight: 600; color: var(--gray-700);
  text-decoration: none;
}
.mobile-menu a:hover { background: var(--gray-50); }
.mobile-menu-label {
  font-size: 12px; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.08em; padding: 14px 16px 6px;
}
.mobile-cta {
  display: block; text-align: center; margin-top: 16px;
  padding: 16px; background: var(--green); color: var(--white);
  border-radius: 10px; font-size: 16px; font-weight: 700;
  text-decoration: none;
}

/* ═══════════════════════════════
   FOOTER
═══════════════════════════════ */
.footer { background: var(--navy); padding: 64px 0 32px; color: var(--white); }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px;
}
.footer-logo { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 12px; }
.footer-logo span { color: var(--green); }
.footer-desc { font-size: 14px; color: rgba(255,255,255,0.4); line-height: 1.7; max-width: 280px; }
.footer-col-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.3); margin-bottom: 20px;
}
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-link {
  font-size: 15px; color: rgba(255,255,255,0.6);
  text-decoration: none; transition: color 0.15s;
}
.footer-link:hover { color: var(--white); }
.footer-bottom {
  max-width: 1200px; margin: 48px auto 0; padding: 24px 32px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
}
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.25); }
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-link { font-size: 13px; color: rgba(255,255,255,0.25); text-decoration: none; }
.footer-bottom-link:hover { color: rgba(255,255,255,0.5); }

/* Logo — inline SVG wordmark (vector, crisp at all resolutions) */
.header-logo-svg { height: 38px; width: auto; display: block; overflow: visible; }
.footer-logo-svg { height: 34px; width: auto; display: block; overflow: visible; margin-bottom: 12px; }
/* Fallback for older PNG img usage */
.header-logo-img { height: 40px; width: auto; display: block; }
.footer-logo-img { height: 36px; width: auto; filter: brightness(0) invert(1); margin-bottom: 12px; display: block; }
.footer-logo { display: block; margin-bottom: 12px; }

/* ═══════════════════════════════
   RESPONSIVE
═══════════════════════════════ */
@media (max-width: 768px) {
  .header-nav, .header-cta { display: none; }
  .hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
@media (max-width: 540px) {
  .container { padding: 0 20px; }
}
