/* ============================================
   CSS RESET - APEIRON
   Normalización de estilos entre navegadores
   ============================================ */

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

/* ----------------------------------------
   Reset Margins & Padding
---------------------------------------- */
* {
    margin: 0;
    padding: 0;
}

/* ----------------------------------------
   HTML & Body
---------------------------------------- */
html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    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 {
    cursor: pointer;
    background: none;
    border: none;
}

/* ----------------------------------------
   Links
---------------------------------------- */
a {
    color: inherit;
    text-decoration: none;
}

/* ----------------------------------------
   Lists
---------------------------------------- */
ul,
ol {
    list-style: none;
}

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

/* ----------------------------------------
   Typography
---------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: inherit;
    overflow-wrap: break-word;
}

p {
    overflow-wrap: break-word;
}

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

:focus:not(:focus-visible) {
    outline: none;
}

/* ----------------------------------------
   Selection
---------------------------------------- */
::selection {
    background: var(--color-accent-yellow);
    color: var(--color-bg-dark);
}

::-moz-selection {
    background: var(--color-accent-yellow);
    color: var(--color-bg-dark);
}

/* ----------------------------------------
   Scrollbar (Webkit)
---------------------------------------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--color-grid-line);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-yellow);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-grid-line) var(--color-bg-dark);
}

/* ----------------------------------------
   Reduced Motion
---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ----------------------------------------
   Screen Reader Only
---------------------------------------- */
.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;
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}
