/* Base Styles */
/* Reset, Typography, and Base Elements */

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

/* Body */
body {
    font-family: var(--font-family-body);
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    color: var(--color-text);
    background-color: var(--color-background);
    overflow-x: hidden;
    transition: background-color 0.6s ease;
}

/* Front page - orange background */
body.is-front-page,
body.home:not(.archive):not(.search):not(.single):not(.error404) {
    background-color: var(--color-background-dark);
}

/* Typography - Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-normal);
    font-variation-settings: var(--font-variation-settings);
    margin: 0;
}

h1 {
    font-size: var(--font-size-h1-mobile);
    line-height: var(--line-height-h1-mobile);
}

h2 {
    font-size: var(--font-size-h2-mobile);
    line-height: var(--line-height-h2-mobile);
}

h3 {
    font-size: var(--font-size-h3-mobile);
    line-height: var(--line-height-h3-mobile);
}

h4 {
    font-size: var(--font-size-h4-mobile);
    line-height: var(--line-height-h4-mobile);
}

h5 {
    font-size: var(--font-size-h5-mobile);
    line-height: var(--line-height-h5-mobile);
}

h6 {
    font-size: var(--font-size-h6);
    line-height: var(--line-height-h6);
}

/* Responsive Typography - Tablet (768px+) */
@media (min-width: 768px) {
    h1 {
        font-size: var(--font-size-h1);
        line-height: var(--line-height-h1);
    }
    
    h2 {
        font-size: var(--font-size-h2);
        line-height: var(--line-height-h2);
    }
    
    h3 {
        font-size: var(--font-size-h3);
        line-height: var(--line-height-h3);
    }
    
    h4 {
        font-size: var(--font-size-h4);
        line-height: var(--line-height-h4);
    }
    
    h5 {
        font-size: var(--font-size-h5);
        line-height: var(--line-height-h5);
    }
}

/* Responsive Typography - Tablet Breakpoint (1200px+) */
@media (min-width: 1200px) {
    h1 {
        font-size: var(--font-size-h1);
        line-height: var(--line-height-h1);
    }
    
    h2 {
        font-size: var(--font-size-h2);
        line-height: var(--line-height-h2);
    }
}

/* Responsive Body - Mobile First */
body {
    font-size: var(--font-size-body-mobile);
    line-height: var(--line-height-body-mobile);
}

@media (min-width: 768px) {
    body {
        font-size: var(--font-size-body);
        line-height: var(--line-height-body);
    }
}

/* Links */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

a:hover {
    opacity: 0.8;
}

/* Buttons Base */
button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

/* Scroll Reveal Heading Animation */
.scroll-reveal-heading {
    position: relative;
    display: block;
    overflow: hidden;
    color: transparent !important;
    padding: 0.05em 0 0.1em;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.scroll-reveal-heading::after {
    content: attr(data-heading);
    display: inline-block;
    width: 100%;
    transform: translate3d(0, 110%, 0);
    opacity: 0;
    color: var(--reveal-heading-color, currentColor);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    transition: transform 0.85s cubic-bezier(.19, 1, .22, 1), opacity 0.6s ease, color 0.3s ease;
    transition-delay: var(--reveal-delay, 0ms);
    will-change: transform, opacity;
}

.scroll-reveal-heading.is-visible::after {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

/* Generic fade-up reveal animation */
.reveal-up {
    opacity: 0;
    transform: translateY(24px);
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
    transition-delay: var(--reveal-up-delay, 0ms);
    will-change: transform, opacity;
}

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

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lists */
ul, ol {
    list-style: none;
}

/* Paragraphs */
p {
    margin: 0;
}

