/**
 * OBX Labs - Base Styles
 * 
 * Reset, typography, and foundational styles.
 */

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

/* Reset margins */
* {
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-family-sans);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--color-gray-900);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main content */
main {
    flex: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    color: var(--color-black);
    letter-spacing: var(--tracking-tight);
}

h1 {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
}

h2 {
    font-size: var(--text-3xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

p {
    color: var(--color-gray-600);
    line-height: var(--leading-relaxed);
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

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

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

/* Images */
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;
}

/* Remove input appearance */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

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

/* Text selection */
::selection {
    background-color: var(--color-accent);
    color: var(--color-white);
}

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

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

/* Strong & Bold */
strong, b {
    font-weight: var(--font-semibold);
}

/* Small text */
small {
    font-size: var(--text-sm);
}

/* Horizontal rule */
hr {
    border: none;
    border-top: 1px solid var(--color-gray-200);
    margin: var(--space-8) 0;
}

/* Blockquote */
blockquote {
    border-left: 4px solid var(--color-gray-200);
    padding-left: var(--space-4);
    font-style: italic;
    color: var(--color-gray-600);
}

/* Code */
code {
    font-family: var(--font-family-mono);
    font-size: 0.875em;
    background-color: var(--color-gray-100);
    padding: 0.125em 0.25em;
    border-radius: var(--radius-sm);
}

pre {
    font-family: var(--font-family-mono);
    font-size: var(--text-sm);
    background-color: var(--color-gray-900);
    color: var(--color-gray-100);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
}

/* Reduced motion */
@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;
    }
}
