/* ============================================
   Global Styles — Typography, Layout, Utilities
   ============================================ */

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--fw-regular);
    color: var(--color-slate-dark);
    background-color: var(--color-pure-white);
}

/* --- Typography --- */

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-dark);
}

h1 {
    font-size: var(--text-4xl);
    font-weight: var(--fw-bold);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--text-3xl);
    font-weight: var(--fw-bold);
    letter-spacing: -0.01em;
}

h3 {
    font-size: var(--text-2xl);
    font-weight: var(--fw-semibold);
}

h4 {
    font-size: var(--text-xl);
    font-weight: var(--fw-semibold);
}

p {
    line-height: var(--leading-relaxed);
    color: var(--color-slate);
}

strong {
    font-weight: var(--fw-semibold);
}

/* --- Desktop type scale --- */
@media (min-width: 768px) {
    h1 { font-size: var(--text-5xl); }
    h2 { font-size: var(--text-4xl); }
    h3 { font-size: var(--text-3xl); }
    h4 { font-size: var(--text-2xl); }
}

/* --- Layout --- */

.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container--narrow {
    max-width: var(--container-md);
}

.container--wide {
    max-width: var(--container-max);
}

.section {
    padding: var(--space-16) 0;
}

.section--lg {
    padding: var(--space-24) 0;
}

/* --- Links --- */

a.link {
    color: var(--color-violet);
    font-weight: var(--fw-medium);
    transition: color var(--duration-fast) ease;
}

a.link:hover {
    color: var(--color-cyan);
}

/* --- Gradient Text --- */

.gradient-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Section Headers --- */

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-12);
}

.section-label {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-violet);
    margin-bottom: var(--space-4);
}

.section-header p {
    font-size: var(--text-lg);
    margin-top: var(--space-4);
}

/* --- Scroll Animations --- */

.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duration-slow) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger > .fade-up:nth-child(1) { transition-delay: 0ms; }
.stagger > .fade-up:nth-child(2) { transition-delay: 80ms; }
.stagger > .fade-up:nth-child(3) { transition-delay: 160ms; }
.stagger > .fade-up:nth-child(4) { transition-delay: 240ms; }

/* --- Utility Classes --- */

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

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

.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 { display: grid; }
