/* ============================================================
   SŌLATI DESIGN SYSTEM — base.css
   Reset + typography nền + utility + accessibility.
   Nạp sau tokens.css, trước components.css.
   ============================================================ */

*,*::before,*::after{box-sizing:border-box}
*{margin:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{
  font-family:var(--font-body);font-size:var(--t-base);line-height:var(--lh-normal);
  font-weight:var(--fw-reg);color:var(--text);background:var(--bg);
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
}
img,svg,video,canvas{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit}
input,textarea,select{font:inherit}
:where(h1,h2,h3,h4){line-height:var(--lh-snug);font-weight:var(--fw-display);text-wrap:balance}
p{text-wrap:pretty}

/* ---------- LAYOUT UTILITY ---------- */
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 var(--gutter)}
@media(max-width:600px){.wrap{padding:0 16px}}

/* ---------- ACCESSIBILITY ---------- */
.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:8px;z-index:var(--z-toast);
  background:var(--c-n-900);color:var(--c-n-0);
  padding:10px 18px;border-radius:var(--r-md);font-size:var(--t-sm);
}
.skip-link:focus{left:8px}

/* focus ring nhất quán cho mọi phần tử focus được */
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- TÔN TRỌNG CÀI ĐẶT HỆ THỐNG ---------- */
/* trong suốt giảm → kính thành bề mặt đặc */
@media (prefers-reduced-transparency: reduce){
  .lg-1,.lg-2,.lg-3,.btn--glass,.lg-bar.scrolled,.lg-bar.is-on{
    -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
    background:var(--c-n-50)!important;
  }
}
/* chuyển động giảm → lưới an toàn toàn cục */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.001ms!important;animation-iteration-count:1!important;
    transition-duration:.001ms!important;scroll-behavior:auto!important;
  }
}
