/* ========================================
   CO-VER BASE STYLES
   Reset, Typography, Body
   ======================================== */

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

/* Remove default list styles */
ul,
ol {
    list-style: none;
}

/* Remove default anchor styles */
a {
    text-decoration: none;
    color: inherit;
}

/* Remove default button styles */
button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* Remove default form styles */
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* Remove default image styles */
img,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ========================================
   HTML & BODY
   ======================================== */

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

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

h1 {
    font-size: var(--font-size-hero);
    font-weight: var(--font-weight-extrabold);
}

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

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

/* Lead/Intro Text */
.text-lead {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary);
}

.text-large {
    font-size: var(--font-size-md);
}

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

.text-xs {
    font-size: var(--font-size-xs);
}

/* Text Colors */
.text-primary {
    color: var(--color-primary);
}

.text-accent {
    color: var(--color-accent);
}

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

.text-secondary {
    color: var(--color-text-secondary);
}

.text-white {
    color: var(--color-text-inverse);
}

/* Text Alignment */
.text-center {
    text-align: center;
}

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

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

/* Font Weights */
.font-regular {
    font-weight: var(--font-weight-regular);
}

.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

.font-bold {
    font-weight: var(--font-weight-bold);
}

.font-extrabold {
    font-weight: var(--font-weight-extrabold);
}

/* ========================================
   LINKS
   ======================================== */

a {
    color: var(--color-primary);
    transition: var(--transition-colors);
}

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

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

/* ========================================
   SELECTION
   ======================================== */

::selection {
    background-color: var(--color-grass-green-200);
    color: var(--color-text-primary);
}

/* ========================================
   FOCUS STATES (Accessibility)
   ======================================== */

:focus {
    outline: none;
}

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

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Display */
.hidden {
    display: none !important;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.grid {
    display: grid;
}

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

/* Overflow */
.overflow-hidden {
    overflow: hidden;
}

/* Position */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

/* ========================================
   HIGHLIGHT STYLES
   ======================================== */

.highlight {
    color: var(--color-accent);
}

.highlight-primary {
    color: var(--color-primary);
}

mark,
.mark {
    background-color: var(--color-grass-green-100);
    padding: 0.1em 0.3em;
    border-radius: var(--radius-sm);
}

/* ========================================
   GRAPH PAPER BACKGROUNDS
   Construction blueprint-style texture
   ======================================== */

.graph-paper-bg {
    background-image: var(--bg-graph-light);
    background-size: var(--bg-graph-size);
}

.graph-paper-dark {
    background-image: var(--bg-graph-dark);
    background-size: var(--bg-graph-size);
}
