/*
 * Legacy / global styles — fully tokenized post-design-modernization.
 * Most navbar/footer/hero rules moved into system.css under .qd-* classes.
 * This file is now a thin compatibility layer for templates that still
 * reference older class names (.contact-us, etc.) and a place for global
 * resets that don't belong in tokens.css.
 */

/* Reset / base */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
    font-family: var(--type-family);
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Prevent flex children whose intrinsic content (e.g. marquee tracks
     * with width: max-content, or wide hero mesh blobs) from forcing the
     * body wider than the viewport on narrow screens. */
    min-width: 0;
    overflow-x: hidden;
}

/* min-width: 0 on the immediate flex children so their intrinsic content
 * size doesn't dictate the body width. Without this, a marquee track 3000px
 * wide makes the body 3000px wide on mobile even though .qd-marquee clips. */
body > * { min-width: 0; }

main { flex: 1; min-width: 0; }

/* Layout helper retained for legacy templates that use .container outside Bootstrap context. */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Legacy "contact us" CTA strip used in older templates. Tokenized. */
.contact-us {
    background: var(--color-surface);
    padding: var(--space-5) 0;
    margin-bottom: var(--space-5);
    border-top: 1px solid var(--color-border);
}

.contact-us a {
    display: inline-block;
    text-decoration: none;
    font-size: var(--type-size-md);
    font-weight: var(--type-weight-semibold);
    color: #FFFFFF;
    padding: var(--space-2) var(--space-6);
    background: var(--color-accent);
    border-radius: var(--radius-pill);
    transition: background-color var(--motion-fast), transform var(--motion-fast);
}

.contact-us a:hover {
    background: var(--color-accent-hover);
    color: #FFFFFF;
    transform: translateY(-1px);
}

/* Error pages (templates/{400,403,404,500}.html) — tokenized */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-12) var(--space-4);
}

.error-content {
    text-align: center;
    max-width: 520px;
}

.error-content h1 {
    font-size: clamp(var(--type-size-4xl), 12vw, var(--type-size-5xl));
    font-weight: var(--type-weight-bold);
    color: var(--color-accent);
    margin: 0 0 var(--space-3);
    line-height: 1;
    letter-spacing: -0.04em;
}

.error-content h2 {
    font-size: var(--type-size-xl);
    font-weight: var(--type-weight-semibold);
    color: var(--color-text);
    margin: 0 0 var(--space-3);
}

.error-content p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
    font-size: var(--type-size-md);
}

.error-content .cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    background: var(--color-accent);
    color: #FFFFFF;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: var(--type-weight-semibold);
    font-size: var(--type-size-sm);
    transition: background-color var(--motion-fast);
}

.error-content .cta-button:hover,
.error-content .cta-button:focus {
    background: var(--color-accent-hover);
    color: #FFFFFF;
}
