/* Responsive foundation + accessibility helpers (non-destructive overrides) */
:root {
    --container-max: 1200px;
    --gutter: clamp(1rem, 3vw, 2rem);
    --section-padding: clamp(2.5rem, 6vw, 6rem);
    --radius: 16px;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-size: clamp(1rem, 0.96rem + 0.3vw, 1.125rem);
    line-height: 1.6;
    overflow-x: hidden;
}

img,
video,
svg,
iframe,
embed,
object {
    max-width: 100%;
    height: auto;
}

video,
iframe {
    width: 100%;
}

figure {
    margin: 0;
}

table {
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;
}

a,
button,
input,
select,
textarea {
    touch-action: manipulation;
}

button,
.cta-button,
.secondary-button,
.header-call-btn {
    min-height: 44px;
    min-width: 44px;
}

input,
select,
textarea {
    width: 100%;
    max-width: 100%;
}

section,
.section {
    padding-inline: var(--gutter);
}

.container,
.content-wrapper,
.section-container,
.inner-container {
    width: min(var(--container-max), calc(100% - (var(--gutter) * 2)));
    margin-inline: auto;
}

h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 2rem); }

p,
li {
    font-size: clamp(1rem, 1.1vw, 1.125rem);
}

/* Basic responsive media wrapper support */
.responsive-media {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: var(--radius);
    overflow: hidden;
}

.responsive-media > iframe,
.responsive-media > video,
.responsive-media > embed,
.responsive-media > object {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Navigation tweaks */
@media (max-width: 1024px) {
    nav ul {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

@media (max-width: 767px) {
    header {
        padding: 12px var(--gutter);
    }

    nav {
        position: static;
        transform: none;
    }

    nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .desktop-nav {
        display: none !important;
    }

    .header-call-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
        min-width: auto;
        min-height: 44px;
        border-radius: 25px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        white-space: nowrap;
    }

    .header-call-btn i {
        font-size: 0.9rem;
    }

    .mobile-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        max-width: 100vw;
        height: 100dvh;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .mobile-nav.is-open {
        transform: translateX(0);
    }

    body.nav-open {
        overflow: hidden;
    }

    body.nav-open .theme-button {
        display: none;
    }

    .hero,
    .hero-section,
    .page-hero,
    .service-hero,
    .contact-hero,
    .about-hero,
    .blog-hero {
        min-height: auto;
        height: auto;
        padding-top: 7rem;
        padding-bottom: 5.5rem;
        align-items: flex-start;
        margin-top: 110px;
    }

    .service-hero,
    .contact-hero,
    .about-hero,
    .blog-hero,
    .hero {
        background-attachment: scroll;
    }

    .hero-content,
    .page-hero-content,
    .service-hero-content,
    .contact-hero-content,
    .about-hero-content,
    .blog-hero-content {
        width: 100%;
        max-width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .hero-buttons .cta-button,
    .hero-buttons .secondary-button {
        width: 100%;
        justify-content: center;
    }
}

/* Breakpoint annotations */
@media (min-width: 320px) and (max-width: 480px) {
    body { font-size: 1rem; }
}

@media (min-width: 481px) and (max-width: 767px) {
    body { font-size: 1.02rem; }
}

@media (min-width: 768px) and (max-width: 1024px) {
    body { font-size: 1.05rem; }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    body { font-size: 1.08rem; }
}

@media (min-width: 1441px) {
    body { font-size: 1.12rem; }
}

/* Focus visibility */
:focus-visible {
    outline: 3px solid rgba(56, 113, 193, 0.6);
    outline-offset: 2px;
}
