/* ============================================================
   base.css — Reset, design tokens, typography, base elements
   ============================================================ */

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

:root {
    /* Color tokens */
    --color-bg: #191919;
    --color-bg-elevated: #212121;
    --color-bg-elevated-2: #2a2a2a;
    --color-surface: #1f1f1f;
    --color-accent: #04ab6c;
    --color-accent-hover: #03c47e;
    --color-accent-soft: rgba(4, 171, 108, 0.15);
    --color-text: #f5f5f5;
    --color-text-muted: #b5b5b5;
    --color-text-dim: #8a8a8a;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-strong: rgba(255, 255, 255, 0.16);
    --color-white: #ffffff;

    /* Typography */
    --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;

    /* Spacing scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-pill: 999px;

    /* Layout */
    --container-max: 1100px;
    --nav-height: 72px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s cubic-bezier(0.6, 0.4, 0, 1);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
    --shadow-accent: 0 8px 32px rgba(4, 171, 108, 0.25);
}

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

body {
    min-width: 320px;
    min-height: 100vh;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 1.6rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    display: block;
}

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

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

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

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

/* Headings */
h1,
h2,
h3,
h4 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(3rem, 6vw, 5rem);
}

h2 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
}

h3 {
    font-size: clamp(1.8rem, 2.5vw, 2.2rem);
}

h4 {
    font-size: 1.6rem;
}

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

strong {
    color: var(--color-text);
    font-weight: 600;
}

/* Utility */
.accent {
    color: var(--color-accent);
}

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
