/* ============================================================
   RESET.CSS — Tattered Flag Foundation
   Global resets & baseline browser normalization.
   Link this after tokens.css, before any page-specific CSS.
   ============================================================ */

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

body, h1, h2, h3, h4, h5, h6, p, ul, ol, li {
    margin: 0;
    padding: 0;
}

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

p {
    text-wrap: pretty;
}

h1, h2, h3 {
    text-wrap: balance;
}

html {
    overflow-x: hidden; /* safety net against any remaining overflow culprits */
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

/* ===============================
   Typography & Font Smoothing
   =============================== */
body {
    -webkit-font-smoothing: antialiased;      /* Chrome, Safari, Edge — crisp text on retina */
    -moz-osx-font-smoothing: grayscale;       /* Firefox on Mac */
    -webkit-text-size-adjust: 100%;           /* Prevents iOS Safari auto text resize on rotate */
}

/* ===============================
   Custom Scrollbar
   Chrome, Safari, Edge
   =============================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #888 transparent;
}

/* ===============================
   Accessibility Utilities
   =============================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===============================
   Form Elements
   =============================== */
input, button, textarea, select {
    -webkit-appearance: none;                 /* Remove default browser form styling */
    appearance: none;                         /* Official standard — write both */
}
