/* base.css — modern reset, body styles, typography baseline, links, focus rings.
   References tokens only. A literal-valued subset of these rules is inlined as critical
   CSS in App.razor for first paint; this file is the full, token-driven version. */

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

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

body {
    margin: 0;
    /* Real-phone floor: below 360px the page scrolls horizontally rather than breaking. */
    min-width: 360px;
    background: var(--color-page-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--space-3);
    font-family: var(--font-display);
    color: var(--color-title);
    font-weight: 400;
    line-height: var(--line-height-heading);
}

h1 { font-size: var(--title-lg); }
h2 { font-size: var(--title-md); }
h3 { font-size: var(--title-sm); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-base); }

p {
    margin: 0 0 var(--space-3);
}

/* Default link = body colour, no underline at rest, underline on hover (locked colour standard: links =
   --color-text, not navy/blue). Chrome links (nav, footer, mega-menu, account/cart menus) override colour
   themselves; inline/content links that should read as links add their own rest-state underline. */
a {
    color: var(--color-text);
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

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

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

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* FocusOnNavigate (Routes.razor) focuses the first <h1> after navigation for screen readers, making it
   focusable via tabindex="-1". Such non-interactive programmatic targets shouldn't show a visual focus
   ring (real keyboard focus on links/buttons — which don't carry tabindex="-1" — keeps its outline). */
[tabindex="-1"]:focus { outline: none; }
