/* ==========================================================================
   Reset + base — Landing page Hạt giống Hoa Sao Nhái
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* chừa chỗ cho header sticky khi nhảy anchor */
}

body,
h1, h2, h3, h4, p,
figure, blockquote,
dl, dd, ul, ol {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
}

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

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

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

/* Thuộc tính hidden phải luôn thắng.
   Mặc định trình duyệt đặt [hidden] { display: none } ở độ ưu tiên thấp nhất,
   nên bất kỳ rule nào của component có display: flex/grid cũng đè mất nó —
   dẫn tới phần tử đã đánh dấu ẩn vẫn hiện ra. */
[hidden] {
  display: none !important;
}

/* Ẩn về mặt thị giác nhưng vẫn đọc được bằng screen reader */
.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;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important; /* tắt chuyển động theo yêu cầu hệ thống */
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
