/*
 * Echelon 42 Base Styles
 * Reset, typography, and foundational styles
 */

/* ================================
   RESET
   ================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-relaxed);
    color: var(--gray-800);
    background-color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

/* ================================
   TYPOGRAPHY
   ================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-bold);
    line-height: var(--leading-snug);
    color: var(--navy);
    letter-spacing: var(--tracking-tight);
}

h1 {
    font-size: var(--text-2xl);
    line-height: var(--leading-tight);
}

h2 {
    font-size: var(--text-xl);
}

h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    line-height: var(--leading-snug);
}

h4 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
}

p {
    margin-bottom: 1em;
}

p:last-child {
    margin-bottom: 0;
}

.text-lg {
    font-size: var(--text-lg);
    line-height: var(--leading-loose);
}

.text-sm {
    font-size: 0.875rem;
    line-height: var(--leading-relaxed);
}

.text-muted {
    color: var(--gray-600);
}

.text-white {
    color: var(--white);
}

.text-white-muted {
    color: rgba(255, 255, 255, 0.7);
}

/* Eyebrow / Label */
.eyebrow {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--teal);
    margin-bottom: var(--space-4);
}

/* Metric values */
.metric-value {
    font-size: var(--text-metric);
    font-weight: var(--font-bold);
    line-height: var(--leading-none);
    color: var(--navy);
}

/* Links */
.link {
    color: var(--sky);
    transition: color var(--transition-fast);
}

.link:hover {
    color: var(--teal);
}

.link-underline {
    position: relative;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width var(--transition-fast);
}

.link-underline:hover::after {
    width: 100%;
}

/* ================================
   FOCUS STATES (Accessibility)
   ================================ */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--sky);
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-3) var(--space-5);
    background: var(--navy);
    color: var(--white);
    border-radius: var(--radius-sm);
    z-index: var(--z-overlay);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
}

/* ================================
   UTILITIES
   ================================ */
.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;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* Spacing utilities */
.mb-2 {
    margin-bottom: var(--space-2);
}

.mb-3 {
    margin-bottom: var(--space-3);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-5 {
    margin-bottom: var(--space-5);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mb-10 {
    margin-bottom: var(--space-10);
}

.mb-12 {
    margin-bottom: var(--space-12);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mt-auto {
    margin-top: auto;
}