/*
 * Autos Esquivel — premium public footer
 * Monochrome, responsive and intentionally image-free to keep the public site light.
 */

html {
    --ae-footer-bg: #050506;
    --ae-footer-surface: #0d0d0f;
    --ae-footer-surface-strong: #141416;
    --ae-footer-text: #f6f6f7;
    --ae-footer-soft: #adadb2;
    --ae-footer-muted: #747479;
    --ae-footer-border: #252528;
    --ae-footer-border-strong: #3a3a3e;
    --ae-footer-white: #ffffff;
    --ae-footer-black: #080809;
    --ae-footer-font: var(--ae-header-font, "Manrope", "Avenir Next", "Segoe UI Variable", "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif);
}

.ae-footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--ae-footer-border);
    background:
        radial-gradient(circle at 88% 12%, rgba(255,255,255,.07), transparent 30%),
        radial-gradient(circle at 8% 82%, rgba(255,255,255,.035), transparent 28%),
        var(--ae-footer-bg);
    color: var(--ae-footer-text);
    font-family: var(--ae-footer-font);
    content-visibility: auto;
    contain-intrinsic-size: 760px;
}

.ae-footer::before {
    content: "AUTOS ESQUIVEL";
    position: absolute;
    right: -1vw;
    top: 112px;
    z-index: -1;
    color: transparent;
    font-size: clamp(72px, 11vw, 180px);
    font-weight: 800;
    letter-spacing: -.065em;
    line-height: .8;
    white-space: nowrap;
    -webkit-text-stroke: 1px rgba(255,255,255,.035);
    user-select: none;
    pointer-events: none;
}

.ae-footer a {
    color: inherit;
    text-decoration: none;
}

.ae-footer__race-rail {
    height: 8px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    background-image:
        linear-gradient(45deg, #fff 25%, transparent 25%),
        linear-gradient(-45deg, #fff 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #fff 75%),
        linear-gradient(-45deg, transparent 75%, #fff 75%);
    background-position: 0 0, 0 4px, 4px -4px, -4px 0;
    background-size: 8px 8px;
    opacity: .74;
    animation: ae-footer-race 12s linear infinite;
}

.ae-footer__cta {
    position: relative;
    min-height: 248px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) auto;
    align-items: end;
    gap: clamp(34px, 7vw, 110px);
    padding-block: clamp(54px, 7vw, 92px) clamp(46px, 6vw, 74px);
    border-bottom: 1px solid var(--ae-footer-border);
}

.ae-footer__cta::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    width: clamp(120px, 21vw, 310px);
    height: 1px;
    background: var(--ae-footer-white);
    opacity: .8;
}

.ae-footer__cta-copy {
    max-width: 760px;
}

.ae-footer__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--ae-footer-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
    line-height: 1.3;
    text-transform: uppercase;
}

.ae-footer__eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: currentColor;
}

.ae-footer__cta h2 {
    max-width: 760px;
    margin: 0;
    color: var(--ae-footer-text);
    font-size: clamp(38px, 5.3vw, 76px);
    font-weight: 650;
    letter-spacing: -.055em;
    line-height: .98;
    text-wrap: balance;
}

.ae-footer__cta p {
    max-width: 620px;
    margin: 22px 0 0;
    color: var(--ae-footer-soft);
    font-size: clamp(14px, 1.25vw, 17px);
    font-weight: 400;
    line-height: 1.65;
}

.ae-footer__cta-actions {
    min-width: min(100%, 274px);
    display: grid;
    gap: 10px;
}

.ae-footer__button {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 0 20px;
    border: 1px solid var(--ae-footer-border-strong);
    border-radius: 2px;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: -.01em;
    transition: background 190ms cubic-bezier(.2,.8,.2,1), color 190ms cubic-bezier(.2,.8,.2,1), border-color 190ms ease, transform 190ms cubic-bezier(.2,.8,.2,1);
}

.ae-footer__button i {
    font-style: normal;
    font-size: 17px;
    transition: transform 190ms cubic-bezier(.2,.8,.2,1);
}

.ae-footer__button--primary {
    border-color: var(--ae-footer-white);
    background: var(--ae-footer-white);
    color: var(--ae-footer-black);
}

.ae-footer__button--secondary {
    background: rgba(255,255,255,.025);
    color: var(--ae-footer-text);
}

.ae-footer__button:hover,
.ae-footer__button:focus-visible {
    transform: translateY(-2px);
}

.ae-footer__button--primary:hover,
.ae-footer__button--primary:focus-visible {
    background: #e5e5e7;
    border-color: #e5e5e7;
}

.ae-footer__button--secondary:hover,
.ae-footer__button--secondary:focus-visible {
    background: var(--ae-footer-surface-strong);
    border-color: #56565b;
}

.ae-footer__button:hover i,
.ae-footer__button:focus-visible i {
    transform: translate(3px, -1px);
}

.ae-footer__main {
    display: grid;
    grid-template-columns: minmax(260px, 1.55fr) minmax(130px, .8fr) minmax(150px, .9fr) minmax(220px, 1.15fr);
    gap: clamp(36px, 5vw, 74px);
    padding-block: clamp(48px, 6vw, 76px);
}

.ae-footer__brand {
    min-width: 0;
}

.ae-footer__logo {
    width: min(100%, 184px);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 24px;
}

.ae-footer__logo img {
    width: 100%;
    height: 72px;
    display: block;
    object-fit: contain;
    object-position: left center;
    transition: opacity 190ms ease, transform 190ms cubic-bezier(.2,.8,.2,1);
}

.ae-footer__logo:hover img,
.ae-footer__logo:focus-visible img {
    opacity: .82;
    transform: translateY(-2px);
}

.ae-footer__brand > p {
    max-width: 430px;
    margin: 0;
    color: var(--ae-footer-soft);
    font-size: 13.5px;
    line-height: 1.7;
}

.ae-footer__whatsapp {
    width: min(100%, 355px);
    min-height: 48px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 0 14px;
    border: 1px solid var(--ae-footer-border);
    background: rgba(255,255,255,.025);
    color: var(--ae-footer-text);
    font-size: 12px;
    font-weight: 600;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms cubic-bezier(.2,.8,.2,1);
}

.ae-footer__whatsapp:hover,
.ae-footer__whatsapp:focus-visible {
    border-color: var(--ae-footer-border-strong);
    background: rgba(255,255,255,.05);
    transform: translateY(-1px);
}

.ae-footer__whatsapp i {
    font-style: normal;
    color: var(--ae-footer-muted);
}

.ae-footer__whatsapp-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ae-footer-white);
    box-shadow: 0 0 0 4px rgba(255,255,255,.08);
}

.ae-footer__column {
    min-width: 0;
    align-content: start;
    display: grid;
    gap: 10px;
}

.ae-footer__column > strong {
    margin-bottom: 11px;
    color: var(--ae-footer-text);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .15em;
    line-height: 1.25;
    text-transform: uppercase;
}

.ae-footer__column > a,
.ae-footer__column > span {
    width: fit-content;
    max-width: 100%;
    color: var(--ae-footer-soft);
    font-size: 12.5px;
    font-weight: 450;
    line-height: 1.45;
}

.ae-footer__column > a {
    position: relative;
    transition: color 170ms ease, transform 170ms cubic-bezier(.2,.8,.2,1);
}

.ae-footer__column > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -3px;
    height: 1px;
    background: var(--ae-footer-text);
    transition: right 190ms cubic-bezier(.2,.8,.2,1);
}

.ae-footer__column > a:hover,
.ae-footer__column > a:focus-visible {
    color: var(--ae-footer-text);
    transform: translateX(2px);
}

.ae-footer__column > a:hover::after,
.ae-footer__column > a:focus-visible::after {
    right: 0;
}

.ae-footer__contact-primary {
    color: var(--ae-footer-text) !important;
    font-size: 17px !important;
    font-weight: 620 !important;
    letter-spacing: -.02em;
}

.ae-footer__branches {
    display: grid;
    gap: 8px;
    grid-column: 1 / -1;
    margin: -1px 0 1px;
}

.ae-footer__contact > strong {
    margin-bottom: 1px;
}

.ae-footer__branch {
    position: relative;
    display: grid;
    gap: 5px;
    min-height: 123px;
    padding: 13px 14px 12px 16px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
    overflow: hidden;
    transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ae-footer__branch::before {
    content: "";
    position: absolute;
    inset: 14px auto 14px 0;
    width: 2px;
    border-radius: 0 999px 999px 0;
    background: var(--ae-footer-text);
    opacity: 0;
    transform: scaleY(.5);
    transition: opacity 180ms ease, transform 180ms ease;
}

.ae-footer__branch.is-recommended {
    border-color: rgba(255, 255, 255, .78);
    background: linear-gradient(145deg, rgba(255, 255, 255, .095), rgba(255, 255, 255, .025));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .10), 0 10px 24px rgba(0, 0, 0, .14);
    transform: translateY(-1px);
}

.ae-footer__branch.is-recommended::before {
    opacity: 1;
    transform: scaleY(1);
}

.ae-footer__branch:hover {
    border-color: rgba(255, 255, 255, .34);
    background: linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .02));
    transform: translateY(-1px);
}

html[data-theme="light"] .ae-footer__branch.is-recommended {
    border-color: rgba(17, 19, 21, .72);
    background: linear-gradient(145deg, rgba(17, 19, 21, .08), rgba(17, 19, 21, .025));
    box-shadow: 0 0 0 1px rgba(17, 19, 21, .08), 0 10px 24px rgba(10, 12, 14, .10);
}

html[data-theme="light"] .ae-footer__branch {
    border-color: rgba(17, 19, 21, .12);
    background: linear-gradient(145deg, rgba(17, 19, 21, .025), rgba(17, 19, 21, .008));
}

html[data-theme="light"] .ae-footer__branch:hover {
    border-color: rgba(17, 19, 21, .30);
    background: linear-gradient(145deg, rgba(17, 19, 21, .05), rgba(17, 19, 21, .015));
}

.ae-footer__branch-label,
.ae-footer__branch-badge {
    color: var(--ae-footer-muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.ae-footer__branch strong {
    color: var(--ae-footer-text);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.015em;
}

.ae-footer__branch a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    color: var(--ae-footer-soft);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: color 170ms ease, transform 170ms ease;
}

.ae-footer__branch-phone-icon,
.ae-footer__branch-locate-icon {
    display: block;
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.ae-footer__branch a:hover,
.ae-footer__branch a:focus-visible {
    color: var(--ae-footer-text);
    transform: translateX(2px);
}

.ae-footer__branch-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 1px;
    padding: 4px 7px;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: var(--ae-footer-text);
    font-size: 7px;
    letter-spacing: .06em;
}

.ae-footer__branch-locate {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    grid-column: 1 / -1;
    width: fit-content;
    margin: 1px 0 2px;
    padding: 7px 10px;
    border: 1px solid var(--ae-footer-border);
    border-radius: 999px;
    background: transparent;
    color: var(--ae-footer-soft);
    font: inherit;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: color 170ms ease, transform 170ms ease;
}

.ae-footer__branch-locate-icon {
    width: 13px;
    height: 13px;
    color: var(--ae-footer-text);
}

.ae-footer__branch-locate:hover,
.ae-footer__branch-locate:focus-visible {
    border-color: var(--ae-footer-border-strong);
    color: var(--ae-footer-text);
    background: var(--ae-footer-surface-strong);
    transform: translateY(-1px);
    outline: none;
}

.ae-footer__contact-meta {
    display: grid;
    gap: 4px;
    grid-column: 1 / -1;
    margin-top: 1px;
    padding-top: 9px;
    border-top: 1px solid var(--ae-footer-border);
}

.ae-footer__contact-meta a,
.ae-footer__contact-meta span {
    width: fit-content;
    max-width: 100%;
    color: var(--ae-footer-soft);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .04em;
    line-height: 1.4;
}

.ae-footer__contact-meta a {
    text-decoration: none;
    transition: color 170ms ease, transform 170ms ease;
}

.ae-footer__contact-meta a:hover,
.ae-footer__contact-meta a:focus-visible {
    color: var(--ae-footer-text);
    transform: translateX(2px);
    outline: none;
}

.ae-footer__branch-badge[hidden] {
    display: none;
}

.ae-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.ae-footer__social a {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid var(--ae-footer-border);
    border-radius: 999px;
    color: var(--ae-footer-soft);
    font-size: 9.5px;
    font-weight: 650;
    letter-spacing: .02em;
    transition: background 170ms ease, border-color 170ms ease, color 170ms ease, transform 170ms cubic-bezier(.2,.8,.2,1);
}

.ae-footer__social a:hover,
.ae-footer__social a:focus-visible {
    border-color: var(--ae-footer-border-strong);
    background: var(--ae-footer-surface-strong);
    color: var(--ae-footer-text);
    transform: translateY(-1px);
}

.ae-footer__social i {
    color: var(--ae-footer-muted);
    font-style: normal;
    font-size: 10px;
}

.ae-footer__bottom {
    min-height: 66px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: clamp(18px, 4vw, 46px);
    border-top: 1px solid var(--ae-footer-border);
    color: var(--ae-footer-muted);
    font-size: 10.5px;
    line-height: 1.45;
}

.ae-footer__bottom-location {
    text-align: center;
}

.ae-footer__crm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ae-footer-muted) !important;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: color 170ms ease;
}

.ae-footer__crm:hover,
.ae-footer__crm:focus-visible {
    color: var(--ae-footer-text) !important;
}

.ae-footer a:focus-visible {
    outline: 2px solid var(--ae-footer-white);
    outline-offset: 4px;
}

@keyframes ae-footer-race {
    to { background-position: 64px 0, 64px 4px, 68px -4px, 60px 0; }
}

@supports (animation-timeline: view()) {
    .ae-footer__cta-copy,
    .ae-footer__cta-actions,
    .ae-footer__brand,
    .ae-footer__column {
        animation: ae-footer-reveal linear both;
        animation-timeline: view();
        animation-range: entry 2% cover 24%;
    }

    .ae-footer__cta-actions { animation-range: entry 5% cover 28%; }
    .ae-footer__column:nth-child(2) { animation-range: entry 4% cover 23%; }
    .ae-footer__column:nth-child(3) { animation-range: entry 7% cover 26%; }
    .ae-footer__column:nth-child(4) { animation-range: entry 10% cover 29%; }
}

@keyframes ae-footer-reveal {
    from { opacity: .38; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1040px) {
    .ae-footer__cta {
        grid-template-columns: minmax(0, 1fr) minmax(230px, 270px);
        gap: 42px;
    }

    .ae-footer__main {
        grid-template-columns: minmax(280px, 1.5fr) repeat(2, minmax(150px, 1fr));
    }

    .ae-footer__contact {
        grid-column: 2 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 24px;
    }

    .ae-footer__contact > strong,
    .ae-footer__social {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .ae-footer {
        contain-intrinsic-size: 1080px;
    }

    .ae-footer::before {
        top: 178px;
        right: -26px;
        font-size: 72px;
    }

    .ae-footer__race-rail {
        height: 6px;
    }

    .ae-footer__cta {
        min-height: 0;
        grid-template-columns: 1fr;
        align-items: start;
        gap: 30px;
        padding-block: 48px 42px;
    }

    .ae-footer__cta h2 {
        max-width: 540px;
        font-size: clamp(38px, 12vw, 58px);
    }

    .ae-footer__cta p {
        margin-top: 18px;
    }

    .ae-footer__cta-actions {
        width: 100%;
        min-width: 0;
        grid-template-columns: 1fr 1fr;
    }

    .ae-footer__button {
        min-height: 54px;
        padding-inline: 15px;
        gap: 12px;
    }

    .ae-footer__main {
        grid-template-columns: 1fr 1fr;
        gap: 42px 24px;
        padding-block: 48px;
    }

    .ae-footer__brand {
        grid-column: 1 / -1;
        padding-bottom: 4px;
    }

    .ae-footer__contact {
        grid-column: 1 / -1;
        grid-template-columns: 1fr 1fr;
    }

    .ae-footer__bottom {
        min-height: 0;
        grid-template-columns: 1fr auto;
        align-items: start;
        gap: 10px 20px;
        padding-block: 20px 6px;
    }

    .ae-footer__bottom-location {
        grid-column: 1 / -1;
        grid-row: 2;
        text-align: left;
    }
}

@media (max-width: 520px) {
    .ae-footer__eyebrow {
        max-width: 90%;
        align-items: flex-start;
        letter-spacing: .11em;
    }

    .ae-footer__cta-actions {
        grid-template-columns: 1fr;
    }

    .ae-footer__main {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .ae-footer__brand,
    .ae-footer__contact {
        grid-column: auto;
    }

    .ae-footer__contact {
        grid-template-columns: 1fr;
    }

    .ae-footer__contact > strong,
    .ae-footer__social {
        grid-column: auto;
    }

    .ae-footer__logo {
        width: 158px;
    }

    .ae-footer__logo img {
        height: 64px;
    }

    .ae-footer__whatsapp {
        width: 100%;
    }

    .ae-footer__bottom {
        grid-template-columns: 1fr;
    }

    .ae-footer__crm {
        grid-row: 3;
        width: fit-content;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ae-footer__race-rail,
    .ae-footer__cta-copy,
    .ae-footer__cta-actions,
    .ae-footer__brand,
    .ae-footer__column {
        animation: none !important;
    }

    .ae-footer *,
    .ae-footer *::before,
    .ae-footer *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}


/* Inventario jerárquico del footer. Header y footer consumen la misma
 * taxonomía dinámica derivada de las unidades publicadas. */
.ae-footer__inventory-group {
    min-width: 0;
    display: grid;
    gap: 6px;
    padding-block: 2px;
}

.ae-footer__inventory-parent,
.ae-footer__inventory-child {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    color: var(--ae-footer-soft);
    transition: color 170ms ease, transform 170ms cubic-bezier(.2,.8,.2,1);
}

.ae-footer__inventory-parent {
    width: 100%;
    font-size: 12.5px;
    font-weight: 580;
    line-height: 1.4;
}

.ae-footer__inventory-parent small,
.ae-footer__inventory-child small {
    flex: 0 0 auto;
    color: var(--ae-footer-muted);
    font-size: 8.5px;
    font-weight: 650;
    letter-spacing: .04em;
}

.ae-footer__inventory-children {
    display: grid;
    gap: 5px;
    margin-left: 3px;
    padding: 2px 0 3px 11px;
    border-left: 1px solid var(--ae-footer-border);
}

.ae-footer__inventory-child {
    width: 100%;
    font-size: 10.5px;
    font-weight: 450;
    line-height: 1.35;
}

.ae-footer__inventory-parent:hover,
.ae-footer__inventory-parent:focus-visible,
.ae-footer__inventory-child:hover,
.ae-footer__inventory-child:focus-visible {
    color: var(--ae-footer-text);
    transform: translateX(2px);
}

@media (max-width: 520px) {
    .ae-footer__inventory-group {
        max-width: 320px;
    }
}
