/* ==========================================================================
   KCL — Shared design tokens & utilities
   Dùng chung cho KCL_Website.html · KCL_News.html · KCL_Admin.html
   ========================================================================== */

:root {
  /* Brand */
  --kcl-red: #D42B2B;
  --kcl-red-dark: #B52424;
  --kcl-red-light: #F5E8E8;
  --kcl-red-soft: #FDF0F0;
  --kcl-green: #1A5C1A;
  --kcl-green-dark: #0D3D0D;
  --kcl-green-light: #E8F2E8;
  --kcl-green-soft: #F0F8F0;
  --kcl-blue: #1A4A8A;

  /* Neutrals */
  --kcl-cream: #FAFAF8;
  --kcl-white: #FFFFFF;
  --kcl-gray-50: #F7F7F5;
  --kcl-gray-100: #EEEEEB;
  --kcl-gray-200: #DDDDD8;
  --kcl-gray-400: #9A9A94;
  --kcl-gray-600: #5A5A54;
  --kcl-gray-800: #2A2A26;
  --kcl-gray-900: #1A1A16;

  /* Shadows */
  --kcl-shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --kcl-shadow: 0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --kcl-shadow-lg: 0 12px 40px rgba(0,0,0,.1), 0 4px 12px rgba(0,0,0,.06);

  /* Typography stacks */
  --kcl-font-sans: 'DM Sans', 'Be Vietnam Pro', system-ui, -apple-system, Segoe UI, sans-serif;
  --kcl-font-serif: 'Playfair Display', Georgia, serif;
  --kcl-font-mono: 'Fira Code', 'Courier New', monospace;
}

/* Reset — đủ dùng, không xoá hành vi mặc định quan trọng */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* Focus ring thống nhất — a11y */
:focus-visible {
  outline: 2px solid var(--kcl-red);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Utility classes */
.kcl-sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Image defaults */
img { max-width: 100%; height: auto; display: block; }

/* Better text rendering cho tiếng Việt */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Scrollbar đồng bộ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--kcl-gray-50); }
::-webkit-scrollbar-thumb { background: var(--kcl-gray-200); border-radius: 5px; border: 2px solid var(--kcl-gray-50); }
::-webkit-scrollbar-thumb:hover { background: var(--kcl-gray-400); }

/* Reveal animation (dùng chung cho landing) */
@keyframes kcl-rev { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes kcl-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(212,43,43,.4); } 50% { box-shadow: 0 0 0 6px rgba(212,43,43,0); } }
.rev { animation: kcl-rev .7s ease-out both; }

/* Prefers-reduced-motion — tôn trọng lựa chọn của người dùng */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print — ẩn nav/footer khi in */
@media print {
  nav, footer, .mobile-menu, .hamburger, #proj-ticker, #cert-slider { display: none !important; }
  body { background: #fff; color: #000; }
}
