/* ==========================================================================
   Nền tảng: biến màu/chữ, reset, chữ, nút. Tông chủ đạo: vàng cam đặc trưng HMT.
   ========================================================================== */
:root {
  /* Cam HMT (lấy từ logo) */
  --brand: #f76300;           /* cam logo: viền, nền ảnh, trang trí */
  --brand-deep: #c94f00;      /* cam đậm: nền nút/chip có chữ trắng (tương phản 4.6:1) */
  --brand-darker: #a84200;
  /* Sân khấu vinh danh: cam đậm → hổ phách */
  --stage: #c44b00;
  --stage-2: #a33c00;
  --stage-deep: #3a1c0a;      /* nền sau ảnh học sinh */
  /* Chữ */
  --ink: #2b1a10;
  --ink-soft: #6b5446;
  /* Giấy ấm */
  --paper: #fff7f0;
  --paper-2: #ffecd9;
  --card: #ffffff;
  /* Vàng cam */
  --gold: #f5a524;
  --gold-deep: #b34800;       /* chữ nhấn trên nền sáng (đạt tương phản) */
  --gold-soft: #ffe3b3;
  --gold-tint: #fff3e4;       /* nền nhạt cho nhãn, ô thành tích */
  /* Vàng ánh kim sáng — cho chữ trên nền cam */
  --gold-foil: linear-gradient(100deg, #ffe0a3 0%, #ffffff 26%, #ffd27a 46%, #fff7e3 62%, #ffc65c 80%, #ffe9be 100%);

  --line: rgba(43, 26, 16, .12);
  --line-gold: rgba(245, 165, 36, .5);     /* viền trên nền sáng */
  --line-stage: rgba(255, 231, 190, .55);  /* viền trên nền cam */

  --f-display: "Lora", Georgia, "Times New Roman", serif;
  --f-body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Thang chữ ~1.25 */
  --t-sm: .875rem;
  --t-md: 1rem;
  --t-lg: 1.25rem;
  --t-xl: 1.5625rem;
  --t-2xl: clamp(1.75rem, 3.2vw, 2.4rem);
  --t-3xl: clamp(2.1rem, 4.4vw, 3.05rem);

  --radius-s: 6px;
  --radius-m: 12px;
  --header-h: 68px;

  color-scheme: light;
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button { cursor: pointer; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.22;
  text-wrap: balance;
}

p { margin: 0; }

a { color: inherit; }

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

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

.wrap--narrow { max-width: 960px; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--stage-deep);
  color: #fff;
  border-radius: var(--radius-s);
}
.skip-link:focus { top: 12px; }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--t-md);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn--gold {
  background: var(--gold-foil);
  background-size: 200% 100%;
  color: #7a2c00;
  box-shadow: 0 8px 24px rgba(90, 30, 0, .28), inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.btn--gold:hover { background-position: 100% 0; color: #5c2000; }

.btn--brand {
  background: var(--brand-deep);
  color: #fff;
  box-shadow: 0 6px 18px rgba(247, 99, 0, .28);
}
.btn--brand:hover { background: var(--brand-darker); }
.btn--brand:disabled { opacity: .6; cursor: progress; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--gold); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Thanh báo chế độ xem trước của nhân sự (?preview=1) */
.preview-banner {
  position: relative; z-index: 100;
  padding: 8px 16px; text-align: center;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
}

/* Xuống dòng đẹp: không để một chữ lẻ loi ở dòng cuối (vd "học.") */
h1, h2, h3, .hero__message, .stage-video__title { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
