/**
 * SitesByHugo - Base Styles
 * Reset, typography, and foundational elements
 */

/* ===== Modern Reset ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-gray-100);
    background: var(--color-gray-950);
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: var(--color-primary-500);
    color: white;
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 2px;
}

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

h1 {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
}

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

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 {
    margin-bottom: var(--space-4);
    color: var(--color-gray-300);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--color-primary-400);
    text-decoration: none;
    transition: color var(--duration-200) var(--ease-out);
}

a:hover {
    color: var(--color-primary-300);
}

strong, b {
    font-weight: var(--font-semibold);
    color: white;
}

em, i {
    font-style: italic;
}

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

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

/* ===== Media ===== */
img, video, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

img {
    object-fit: cover;
}

/* ===== Forms ===== */
button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

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

input, textarea {
    border: none;
    background: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--color-gray-500);
}

/* ===== Table ===== */
table {
    border-collapse: collapse;
    width: 100%;
}

/* ===== Utilities ===== */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container--lg {
    max-width: var(--container-2xl);
}

.container--sm {
    max-width: var(--container-lg);
}

.section {
    padding: var(--space-24) 0;
    position: relative;
}

.section--lg {
    padding: var(--space-32) 0;
}

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted {
    color: var(--color-gray-400);
}

.text-balance {
    text-wrap: balance;
}

/* Visually Hidden */
.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;
}
