/* ===================================
   Base Styles - Reset & Typography
   =================================== */

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

/* HTML & Body */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

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

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    color: var(--color-gray-900);
}

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

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);
}

/* Paragraphs */
p {
    margin-bottom: var(--space-4);
}

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

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

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

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

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Buttons */
button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Inputs */
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
    color: inherit;
}

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

textarea {
    resize: vertical;
}

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

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

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

em,
i {
    font-style: italic;
}

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

/* Code */
code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
    background-color: var(--color-gray-100);
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Section */
.section {
    padding: var(--space-24) 0;
}

@media (max-width: 768px) {
    .section {
        padding: var(--space-16) 0;
    }
}

/* Hidden */
.hidden {
    display: none !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;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.font-heading {
    font-family: var(--font-heading);
}

.font-body {
    font-family: var(--font-body);
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

.capitalize {
    text-transform: capitalize;
}

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: var(--space-2);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

/* Grid Utilities */
.grid {
    display: grid;
}

/* Margin Utilities */
.mt-4 {
    margin-top: var(--space-4);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

/* Padding Utilities */
.p-4 {
    padding: var(--space-4);
}

.p-6 {
    padding: var(--space-6);
}

.p-8 {
    padding: var(--space-8);
}