/* ============================================================
   base.css - reset, design tokens, typography
   Bang mau & khoang cach lay cam hung tu he thong thiet ke Samsung:
   nen trang, chu den, xanh thuong hieu, nhieu khoang trong.
   ============================================================ */

:root {
  /* Mau thuong hieu - duoc ghi de runtime tu CMS (settings.themeColor) */
  --brand: #1428a0;
  --brand-dark: #0e1c6e;
  --brand-soft: #eef2fb;
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-dark: #0b0c0f;
  --danger: #d92d20;
  --success: #067647;
  --warning: #b54708;

  /* Chieu cao header dung cho scroll-margin cua cac section */
  --header-h: 64px;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.14);

  --container: 1440px;
  --gutter: clamp(20px, 5vw, 72px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 260ms;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', sans-serif;
}

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

/* ============================================================
   QUAN TRONG: thuoc tinh `hidden` phai thang moi quy tac display.
   Trinh duyet chi dat [hidden]{display:none} trong bang mac dinh, nen bat ky
   quy tac display nao cua ta (vi du .modal{display:grid}) cung de dang ghi de no.
   Hau qua: mot khoi "dang an" van chiem cho, che kin man hinh va nuot het cu nhap.
   ============================================================ */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

img,
video,
svg {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/**
 * Các mục điều hướng trong trang là <button> chứ không phải <a href>, để thanh
 * địa chỉ không đổi và rê chuột không hiện đường dẫn ở góc màn hình.
 * Trình duyệt tự cho <button> nền xám, viền và chữ căn giữa — gỡ hết đi để nó
 * trông y hệt liên kết như trước.
 */
button[data-scroll-to]:not(.btn) {
  padding: 0;
  border: 0;
  background: none;
  text-align: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Typography scale --- */
.t-display {
  font-size: clamp(2.4rem, 5.2vw, 4.25rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.t-h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 700;
}

.t-h3 {
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 600;
}

.t-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

.t-lead {
  font-size: clamp(1rem, 1.4vw, 1.185rem);
  color: var(--ink-2);
  line-height: 1.62;
}

.t-muted {
  color: var(--ink-3);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--brand);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: #fff;
  transition: opacity 320ms var(--ease), visibility 320ms;
}

.site-loader[hidden],
.site-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-loader__spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

