/* ========================================
   Typography Base
   ======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text);
}

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

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

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

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

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

h6 {
    font-size: var(--font-size-md);
}

p {
    margin-bottom: var(--space-4);
    line-height: var(--line-height-relaxed);
}

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

strong,
b {
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
}

em,
i {
    font-style: italic;
}

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

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

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

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

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

img {
    image-rendering: -webkit-optimize-contrast;
}

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

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

input,
select,
textarea {
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--color-text-muted);
    opacity: 1;
}

/* Remove default focus outline, we'll add custom ones */
:focus {
    outline: none;
}

/* Custom focus styles */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

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

::-moz-selection {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-400);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-gray-100);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-500);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-gray-400) var(--color-gray-100);
}