/* base.css — Reset, typography, and global styles
 * CSS reset/normalize, body defaults, heading hierarchy, link styles,
 * utility classes, and any global layout rules.
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ── Reset ── */

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

/* ── Base ── */

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

input:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 255, 43, 0.15);
}

input::placeholder {
    color: var(--text-dim);
}

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

/* ── Typography — fluid sizing ── */

h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 500;
    line-height: 1.1;
}

h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    font-weight: 500;
    line-height: 1.2;
}

h3 {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 400;
    line-height: 1.3;
}

h4 {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 600;
    line-height: 1.4;
}

/* ── Layout ── */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: var(--space-4xl) 0;
}

@media (min-width: 768px) {
    .container {
        padding: 0 32px;
    }

    section {
        padding: var(--space-5xl) 0;
    }
}

/* ── Keyframes ── */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@keyframes checkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Fade-up utilities ── */

.fade-up {
    opacity: 0;
}

.fade-up.visible {
    animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.fade-up-1 { animation-delay: 0.1s; }
.fade-up-2 { animation-delay: 0.2s; }
.fade-up-3 { animation-delay: 0.3s; }
.fade-up-4 { animation-delay: 0.4s; }
.fade-up-5 { animation-delay: 0.5s; }
.fade-up-6 { animation-delay: 0.6s; }

/* ── Accessibility utilities ── */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus,
.sr-only:focus-visible {
    position: static;
    width: auto;
    height: auto;
    padding: 12px 16px;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    z-index: 200;
}

/* Breakpoints: sm 640px, md 768px, lg 1024px, xl 1200px */
