
/**
 * elevate.css — Universal Base Structural CSS
 * KIT FILE — never modify during creative builds.
 * Handles: reset, box model, accessibility, base typography scale,
 * form baseline, button base, mobile nav, footer list reset (R68),
 * responsive foundation.
 *
 * Kit: Kit-LeadGen v1.3
 */

/* ─── Reset & Box Model ─── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    font: inherit;
}

/* ─── Accessibility ─── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    background: #000;
    color: #fff;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
}

/* ─── Typography Scale (base — creative overrides) ─── */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

/* ─── Layout Foundation ─── */
.container {
    /* Standard builds: 80% width centered on desktop.
       Full width on tablet and mobile.
       HERO FULL WIDTH Lead Gen preset overrides this in
       clone.css using padding-only on hero/cta-band sections. */
    width: 80%;
    max-width: 1400px;
    min-width: 0;
    margin: 0 auto;
    padding: 0 clamp(1rem, 2vw, 2rem);
}

@media (max-width: 1024px) {
    .container {
        width: 100%;
        padding: 0 clamp(1.25rem, 4vw, 2rem);
    }
}

section {
    padding: 4rem 0;
}

/* ─── Footer List Reset (R68) ─── */
footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer li {
    display: inline-block;
}

/* ─── Form Baseline ─── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #333;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23333'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.5rem;
}

/* ─── Form Status Messages ─── */
.form-status {
    padding: 0;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-weight: 500;
}
.form-status:empty { display: none; }
.form-success {
    display: block;
    padding: 0.75rem 1rem;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.form-error {
    display: block;
    padding: 0.75rem 1rem;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ─── Button Base ─── */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.2s, transform 0.1s;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Email Protection CSS (direction reversal) ─── */
.allbusinessai-email {
    unicode-bidi: bidi-override;
    direction: rtl;
}

/* ─── Mobile Navigation Pattern ─── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    transition: transform 0.3s ease, opacity 0.3s ease;
    margin: 3px 0;
}

/* Hamburger → X animation (toggle on .site-header.nav-open) */
.site-header.nav-open .nav-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(3.5px, 3.5px);
}
.site-header.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}
.site-header.nav-open .nav-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(3.5px, -3.5px);
}

/* ─── Responsive ─── */
/* NOTE: 1024px covers all phones portrait and landscape including large Android.
   768px was too narrow — landscape phones and small tablets were getting
   the desktop nav layout instead of the hamburger. */
@media (max-width: 1024px) {
    section { padding: 2.5rem 0; }
    /* Full width on all tablet/phone screens */
    .container { padding: 0 1rem; width: 100%; max-width: 100%; }

    /* Mobile nav — nav.js toggles nav-open on .site-header (not on nav element).
       All CSS triggers MUST use .site-header.nav-open as the parent selector.
       Using nav[role="navigation"].nav-open is WRONG — nav.js never sets it there. */
    .nav-toggle { display: flex; }
    nav[role="navigation"] ul { display: none; }

    .site-header.nav-open nav[role="navigation"] ul {
        display: block !important;
        position: fixed;
        top: 0;   /* Creative session sets exact top offset to match header height */
        left: 0;
        right: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        padding: 1rem 0;
        z-index: 9999;
        max-height: 80vh;
        overflow-y: auto;
    }

    nav[role="navigation"] ul li { display: block; }
    nav[role="navigation"] ul li a {
        display: block;
        padding: 0.75rem 1.5rem;
    }
}

/* ─── Reduced Motion (V46 — mandatory) ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ─── Card Grid — Flex-Wrap Centered (R-CG1) ─── */
/*
 * Base flex-wrap pattern for all card-based grid sections.
 * Eliminates left-stranded orphan rows on odd card counts.
 * Creative builds use .card-grid on the wrapper and .card-item
 * on each child. Named grids (e.g. .trust-card-grid .trust-card)
 * are scoped overrides of this base pattern — same structure,
 * section-specific selectors.
 * DO NOT use display:grid / auto-fit / minmax for card layouts.
 */
.card-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}
.card-grid .card-item {
    flex: 0 0 calc(33.333% - 1rem);
    max-width: 360px;
    min-width: 240px;
    box-sizing: border-box;
}
@media (max-width: 899px) {
    .card-grid .card-item {
        flex: 0 0 calc(50% - 0.75rem);
        max-width: none;
    }
}
@media (max-width: 599px) {
    .card-grid .card-item {
        flex: 0 0 100%;
        max-width: none;
    }
}

/* Named section overrides — same flex pattern, scoped selectors */
.trust-card-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-top: 2rem; }
.trust-card-grid .trust-card { flex: 0 0 calc(33.333% - 1rem); max-width: 360px; min-width: 240px; box-sizing: border-box; }

.cost-savings-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-top: 2rem; }
.cost-savings-grid .cost-item { flex: 0 0 calc(33.333% - 1rem); max-width: 360px; min-width: 240px; box-sizing: border-box; }

.method-stack-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-top: 2rem; }
.method-stack-grid .method-visual-item { flex: 0 0 calc(33.333% - 1rem); max-width: 360px; min-width: 240px; box-sizing: border-box; }

@media (max-width: 899px) {
    .trust-card-grid .trust-card,
    .cost-savings-grid .cost-item,
    .method-stack-grid .method-visual-item { flex: 0 0 calc(50% - 0.75rem); max-width: none; }
}
@media (max-width: 599px) {
    .trust-card-grid .trust-card,
    .cost-savings-grid .cost-item,
    .method-stack-grid .method-visual-item { flex: 0 0 100%; max-width: none; }
}

/* ─── Builder Attribution (R69 — locked visual standard) ─── */
/* DO NOT override in clone.css or creative.css. Style is locked system-wide. */
.builder-attribution {
    display: block;
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    color: #888;
    margin-top: 1.25rem;
    padding-top: 0.75rem;
}
.builder-attribution a {
    color: #888;
    text-decoration: none;
}
.builder-attribution a:hover {
    color: #aaa;
    text-decoration: none;
}

/* ─── Print ─── */
@media print {
    nav, footer .builder-attribution, .contact-form { display: none; }
    body { font-size: 12pt; line-height: 1.5; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}