/* ==========================================================================
   TNAADO CSS Reset
   Modern CSS reset for consistent cross-browser styling
   ========================================================================== */

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

/* Remove default margin and padding */
* {
    margin: 0;
    padding: 0;
}

/* Prevent font size inflation */
html {
    margin: 0;
    padding: 0;
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

/* Remove default margin, set core body defaults */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100%;
    line-height: var(--leading-normal, 1.6);
    font-family: var(--font-primary, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4, h5, h6,
button, input, label {
    line-height: var(--leading-tight, 1.1);
}

/* Balance text wrapping on headings */
h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

/* Avoid orphans on paragraphs */
p {
    text-wrap: pretty;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
    color: currentColor;
}

/* Make images easier to work with */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
    min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
    scroll-margin-block: 5ex;
}

/* Remove list styles on ul, ol elements with a list role */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* Remove all animations and transitions for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Remove button styling */
button {
    background: none;
    border: none;
    cursor: pointer;
}

/* Remove fieldset styling */
fieldset {
    border: none;
}

/* Remove default table spacing */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Hidden attribute support */
[hidden] {
    display: none !important;
}

/* Focus visible for keyboard navigation.
   2px white outline + 2px offset is visible on both ink and bone backgrounds.
   Avoids using the red brand accent so red elements don't lose focus state. */
:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--red, #c8102e);
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Skip-to-content link — visible only when focused via keyboard.
   Allows screen-reader and keyboard users to bypass nav.
   See WCAG 2.4.1 Bypass Blocks. */
.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: var(--z-toast, 1200);
    padding: 0.75rem 1rem;
    background: var(--ink, #0a0a0a);
    color: var(--bone, #faf8f3);
    font-family: var(--font-mono, monospace);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-decoration: none;
    border: 2px solid var(--red, #c8102e);
    border-radius: 4px;
    transform: translateY(-200%);
    transition: transform 150ms ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0.5rem);
    outline: 2px solid var(--bone, #faf8f3);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .skip-link {
        transition: none;
    }
}
