/* =============================================
   BASE STYLES - Typography, body, links
   ============================================= */

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-weight-regular);
    color: var(--color-text-body);
    background-color: var(--color-bg-light);
    line-height: var(--leading-normal);
}

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

h1 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-6);
}

h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-5);
}

h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
}

h4 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
}

h5 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

h6 {
    font-size: var(--text-base);
    margin-bottom: var(--space-2);
}

/* Body text */
p {
    margin-bottom: var(--space-4);
    line-height: var(--leading-relaxed);
}

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

/* Links */
a {
    color: var(--color-primary);
    transition: color var(--transition-fast);
}

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

/* Lists (within content areas) */
.content ul,
.content ol {
    padding-left: var(--space-6);
    margin-bottom: var(--space-4);
}

.content ul {
    list-style: disc;
}

.content ol {
    list-style: decimal;
}

.content li {
    margin-bottom: var(--space-2);
    line-height: var(--leading-relaxed);
}

/* Strong / Bold */
strong, b {
    font-weight: var(--font-weight-semibold);
}

/* Emphasis */
em, i {
    font-style: italic;
}

/* Small text */
small {
    font-size: var(--text-sm);
}

/* Horizontal rule */
hr {
    border: none;
    border-top: 1px solid var(--color-border-light);
    margin: var(--space-8) 0;
}

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

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Dark section text overrides */
.dark-section {
    color: var(--color-text-light);
    background-color: var(--color-bg-dark);
}

.dark-section h1,
.dark-section h2,
.dark-section h3,
.dark-section h4,
.dark-section h5,
.dark-section h6 {
    color: var(--color-text-white);
}

.dark-section a {
    color: var(--color-primary);
}

.dark-section a:hover {
    color: var(--color-text-white);
}

/* Orange heading style (from design) */
.heading-accent {
    color: var(--color-primary);
    font-style: italic;
    font-weight: var(--font-weight-light);
}

/* =============================================
   SCROLL REVEAL ANIMATIONS
   ============================================= */

/* Base state: hidden and offset */
.anim-fade-up,
.anim-fade-in,
.anim-slide-left,
.anim-slide-right {
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.anim-fade-up {
    transform: translateY(40px);
}

.anim-fade-in {
    transform: none;
}

.anim-slide-left {
    transform: translateX(-50px);
}

.anim-slide-right {
    transform: translateX(50px);
}

/* Revealed state */
.anim-visible {
    opacity: 1 !important;
    transform: translateY(0) translateX(0) !important;
}

/* Stagger delays for grid children (cards, etc.) */
.anim-stagger > *:nth-child(1) { transition-delay: 0s; }
.anim-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.anim-stagger > *:nth-child(3) { transition-delay: 0.15s; }
.anim-stagger > *:nth-child(4) { transition-delay: 0.2s; }
.anim-stagger > *:nth-child(5) { transition-delay: 0.25s; }
.anim-stagger > *:nth-child(6) { transition-delay: 0.3s; }
.anim-stagger > *:nth-child(7) { transition-delay: 0.35s; }
.anim-stagger > *:nth-child(8) { transition-delay: 0.4s; }
.anim-stagger > *:nth-child(9) { transition-delay: 0.45s; }
.anim-stagger > *:nth-child(10) { transition-delay: 0.5s; }
.anim-stagger > *:nth-child(11) { transition-delay: 0.55s; }
.anim-stagger > *:nth-child(12) { transition-delay: 0.6s; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .anim-fade-up,
    .anim-fade-in,
    .anim-slide-left,
    .anim-slide-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Screen reader only */
.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;
}
