/* Explain: Base reset and typography defaults for the application. */
* {
    box-sizing: border-box;
}

html {
    background: var(--background-color);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 2;
    animation: pageIn .5s ease both;
}

@keyframes pageIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    letter-spacing: -0.015em;
    overflow-wrap: break-word;
    word-break: break-word;
}

h1 {
    font-size: clamp(1.9rem, 4.2vw, 3.05rem);
    font-weight: 800;
    line-height: 1.25;
}

h2 {
    font-size: clamp(1.6rem, 3.6vw, 2.55rem);
}

h3 {
    font-size: clamp(1.15rem, 2vw, 1.45rem);
}

p {
    margin: 0;
    overflow-wrap: break-word;
}

a {
    color: inherit;
    text-decoration: none;
}

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

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

section[id],
div[id] {
    scroll-margin-top: 7rem;
}

::selection {
    background: var(--secondary-color);
    color: var(--navy-color);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity .9s cubic-bezier(.22, .61, .36, 1), transform .9s cubic-bezier(.22, .61, .36, 1);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

[hidden] {
    display: none !important;
}

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

    body {
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}