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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + var(--space-4));
}

body {
    font-family: var(--font-base);
    font-size: var(--text-base);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: var(--leading-normal);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--color-primary);
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl)); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

a {
    color: var(--color-primary-mid);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--color-primary); }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.skip-link {
    position: fixed;
    top: var(--space-3);
    left: var(--space-3);
    z-index: var(--z-modal);
    transform: translateY(-160%);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-full);
    background-color: var(--color-accent);
    color: var(--color-white);
    font-weight: var(--weight-bold);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-fast);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-main {
    overflow: hidden;
}

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

p {
    margin-bottom: var(--space-4);
}
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: var(--space-6); }

[lang="ur"] ul,
[lang="ur"] ol { padding-left: 0; padding-right: var(--space-6); }

figure { margin: 0; }

button, input, select, textarea {
    font-family: var(--font-base);
    font-size: var(--text-base);
}

@media (max-width: 640px) {
    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
    h3 { font-size: var(--text-xl); }
}
