/**
 * Modern CSS Reset
 * Based on modern best practices and accessibility standards
 */

/* ========================================
   BOX SIZING
   ======================================== */

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

/* ========================================
   REMOVE DEFAULT MARGINS
   ======================================== */

* {
    margin: 0;
    padding: 0;
}

/* ========================================
   HTML & BODY
   ======================================== */

html {
    /* Smooth scrolling for anchor links */
    scroll-behavior: smooth;
    
    /* Prevent font size adjustments on orientation change */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    
    /* Better font rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    line-height: var(--line-height-normal);
    text-rendering: optimizeLegibility;
}

/* ========================================
   MEDIA ELEMENTS
   ======================================== */

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

/* ========================================
   FORM ELEMENTS
   ======================================== */

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

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

/* Remove default button styles */
button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
}

/* Remove spinner from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
    hyphens: auto;
}

/* ========================================
   LINKS
   ======================================== */

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

a:not([class]) {
    text-decoration-skip-ink: auto;
}

/* ========================================
   LISTS
   ======================================== */

ul,
ol {
    list-style: none;
}

/* ========================================
   TABLES
   ======================================== */

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Allow screen reader content to be focusable */
.sr-only-focusable:active,
.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    padding: var(--space-sm) var(--space-md);
    background-color: var(--color-turquoise);
    color: var(--color-white);
    font-weight: var(--font-weight-semibold);
    z-index: var(--z-tooltip);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   FOCUS STYLES
   ======================================== */

/* Default focus style */
:focus {
    outline: 2px solid var(--color-turquoise);
    outline-offset: 2px;
}

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

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

/* ========================================
   REDUCED MOTION
   ======================================== */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   WORDPRESS CORE RESETS
   ======================================== */

/* Remove default WordPress styles */
.alignleft {
    float: left;
    margin-right: var(--space-md);
}

.alignright {
    float: right;
    margin-left: var(--space-md);
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Clear floats */
.clearfix::after,
.entry-content::after {
    content: "";
    display: table;
    clear: both;
}