/* ============================================================
   Makrochip Tecnologia — Estilos do site
   Paleta da marca + tipografia (Poppins / Barlow)
   ============================================================ */

:root {
    --mk-red: #951F20;
    --mk-red-dark: #7a1718;
    --mk-navy: #1e2a5e;
    --mk-dark: #1c1c1c;
    --mk-gray-100: #f6f6f4;
    --mk-gray-200: #efeeec;
    --mk-gray-300: #e2e1de;
    --mk-text: #2b2b2b;
    --mk-muted: #6b6b6b;
    --mk-whatsapp: #25D366;
    --mk-shadow: 0 10px 30px rgba(0, 0, 0, .07);
    --mk-radius: 10px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Barlow', system-ui, sans-serif;
    color: var(--mk-text);
    font-size: 1rem;
    line-height: 1.6;
    background: #fff;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, .font-poppins {
    font-family: 'Poppins', sans-serif;
}

a { text-decoration: none; transition: color .2s ease, opacity .2s ease; }

/* ---------- Cabeçalho ---------- */
.site-header {
    background: #fff;
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .05);
}
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.site-logo img { height: 72px; width: auto; }

.header-contact { text-align: right; }
.header-contact__row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    margin-bottom: .4rem;
}
.header-phone {
    color: var(--mk-dark);
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-family: 'Poppins', sans-serif;
}
.header-phone i { color: var(--mk-red); font-size: 1.05rem; }
.header-phone__ddd { font-size: .95rem; font-weight: 400; }
.header-phone__num { font-size: 1.25rem; font-weight: 600; letter-spacing: .01em; }
.header-phone:hover { color: var(--mk-red); }
.header-hours { color: var(--mk-muted); font-size: .82rem; }

.btn-whatsapp {
    background: var(--mk-red);
    color: #fff;
    padding: .5rem 1.1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: .9rem;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}
.btn-whatsapp:hover { color: #fff; background: var(--mk-red-dark); transform: translateY(-1px); }
.btn-whatsapp .wa-short { display: none; }

/* ---------- Navegação (habilitada em fase futura) ---------- */
.main-nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--mk-gray-200);
}
.main-nav a { color: var(--mk-text); font-weight: 500; font-size: .95rem; }
.main-nav a:hover, .main-nav a.is-active { color: var(--mk-red); }
.main-nav .btn-cliente {
    margin-left: auto;
    background: var(--mk-gray-200);
    padding: .45rem 1rem;
    border-radius: 4px;
    font-weight: 500;
}

/* ---------- Banner da página ---------- */
.page-hero {
    height: 230px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.page-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(28,28,28,.35), rgba(149,31,32,.18));
}

/* ---------- Breadcrumb ---------- */
.breadcrumb-bar {
    background: var(--mk-gray-100);
    border-bottom: 1px solid var(--mk-gray-300);
    padding: .7rem 0;
    font-size: .88rem;
}
.breadcrumb-bar a { color: var(--mk-muted); }
.breadcrumb-bar a:hover { color: var(--mk-red); }
.breadcrumb-bar span { color: var(--mk-muted); margin: 0 .35rem; }
.breadcrumb-bar strong { color: var(--mk-red); font-weight: 600; }

/* ---------- Títulos de seção ---------- */
.section-intro { padding-top: 3rem; }
.section-eyebrow {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--mk-dark);
    text-transform: uppercase;
    font-size: .95rem;
    position: relative;
    padding-bottom: .6rem;
    margin-bottom: 1rem;
}
.section-eyebrow::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 46px; height: 3px;
    background: var(--mk-red);
}
.section-title {
    font-weight: 400;
    color: var(--mk-muted);
    font-size: 2rem;
    margin-bottom: 1rem;
}
.section-title strong { color: var(--mk-dark); font-weight: 700; }
.section-lead {
    color: var(--mk-muted);
    max-width: 880px;
    border-bottom: 1px solid var(--mk-gray-300);
    padding-bottom: 1.4rem;
}

/* ---------- Cards de canais ---------- */
.channels { padding-top: 2.4rem; }
.channel-card {
    background: var(--mk-gray-100);
    border-radius: var(--mk-radius);
    padding: 1.8rem;
    border: 1px solid transparent;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.channel-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--mk-shadow);
    border-color: var(--mk-gray-300);
}
.channel-card__icon {
    font-size: 2.1rem;
    color: var(--mk-navy);
    margin-bottom: .8rem;
    line-height: 1;
}
.channel-card__title {
    color: var(--mk-red);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: .6rem;
}
.channel-card__desc { color: var(--mk-muted); font-size: .95rem; margin-bottom: 1rem; }
.channel-card__divider { height: 2px; background: var(--mk-red); width: 100%; opacity: .8; margin-bottom: 1rem; }
.channel-card__contacts { list-style: none; padding: 0; margin: 0; }
.channel-card__contacts li { margin-bottom: .5rem; }
.channel-card__contacts a {
    color: var(--mk-text);
    font-size: .92rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.channel-card__contacts a i { color: var(--mk-red); width: 16px; }
.channel-card__contacts a:hover { color: var(--mk-red); }

/* ---------- Formulário ---------- */
.form-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.contato-form .form-control {
    background: var(--mk-gray-100);
    border: 1px solid var(--mk-gray-200);
    border-radius: 6px;
    padding: .85rem 1rem;
    font-size: .95rem;
    color: var(--mk-text);
}
.contato-form .form-control::placeholder { color: var(--mk-muted); }
.contato-form .form-control:focus {
    background: #fff;
    border-color: var(--mk-red);
    box-shadow: 0 0 0 .2rem rgba(149, 31, 32, .12);
}
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.form-section__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.btn-enviar {
    background: var(--mk-red);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: .8rem 2.4rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: .95rem;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin-left: auto;
    transition: background .2s ease, transform .15s ease;
}
.btn-enviar:hover { background: var(--mk-red-dark); transform: translateY(-2px); }
.btn-enviar:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.btn-enviar__spinner { display: none; }
.btn-enviar.is-loading .btn-enviar__spinner { display: inline-block; }

.form-alert {
    display: none;
    padding: .7rem 1rem;
    border-radius: 6px;
    font-size: .9rem;
    flex: 1 1 280px;
}
.form-alert.is-success { display: block; background: #e7f6ec; color: #1d7a3e; border: 1px solid #b7e3c5; }
.form-alert.is-error { display: block; background: #fdeaea; color: #b32626; border: 1px solid #f4c4c4; }

/* Painel de sucesso (substitui o formulário após o envio) */
.form-success {
    text-align: center;
    background: var(--mk-gray-100);
    border: 1px solid var(--mk-gray-200);
    border-radius: var(--mk-radius);
    padding: 3.2rem 2rem;
    animation: success-pop .45s ease both;
}
@keyframes success-pop { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.form-success__icon {
    width: 86px; height: 86px;
    margin: 0 auto 1.3rem;
    border-radius: 50%;
    background: #e7f6ec;
    color: #1d7a3e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.7rem;
    animation: check-pop .45s .15s both cubic-bezier(.2, .8, .2, 1.5);
}
@keyframes check-pop { from { transform: scale(0); } to { transform: scale(1); } }
.form-success__title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--mk-dark);
    font-size: 1.4rem;
    margin-bottom: .5rem;
}
.form-success__text { color: var(--mk-muted); max-width: 460px; margin: 0 auto 1.7rem; }
.form-success .btn-enviar { margin: 0 auto; }

.btn-enviar--ghost { background: transparent; color: var(--mk-red); border: 1.5px solid var(--mk-red); }
.btn-enviar--ghost:hover { background: var(--mk-red); color: #fff; }

/* ---------- Rodapé ---------- */
.site-footer {
    background: var(--mk-gray-100);
    border-top: 1px solid var(--mk-gray-300);
    padding: 3rem 0 0;
    margin-top: 1rem;
    color: var(--mk-muted);
    font-size: .9rem;
}
.footer-grid {
    display: grid;
    /* 2 colunas enquanto o "Mapa do site" está oculto (volta a 3 quando reativado) */
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
}
.footer-col--map { max-width: 420px; }
/* Divisórias verticais entre colunas */
.footer-col + .footer-col {
    border-left: 1px solid var(--mk-gray-300);
    padding-left: 2.5rem;
}
.footer-logo { height: 58px; margin-bottom: 1.4rem; }
.footer-info { list-style: none; padding: 0; margin: 0; }
.footer-info li { display: flex; gap: .8rem; margin-bottom: 1.1rem; align-items: flex-start; }
.footer-ico {
    flex: 0 0 auto;
    width: 26px; height: 26px;
    border: 1.5px solid var(--mk-red);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--mk-red);
    font-size: .8rem;
    margin-top: .1rem;
}
.footer-phone { font-weight: 600; color: var(--mk-dark); font-size: 1.05rem; }
.footer-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mk-dark);
    margin-bottom: 1rem;
}
.footer-map { border-radius: 6px; overflow: hidden; box-shadow: var(--mk-shadow); }
.footer-map__link {
    display: inline-block;
    margin-top: .6rem;
    color: var(--mk-red);
    font-size: .85rem;
    font-weight: 500;
}
.footer-map__link:hover { color: var(--mk-red-dark); text-decoration: underline; }
.footer-links { list-style: none; padding: 0; margin: 0 0 1rem; }
.footer-links li { margin-bottom: .35rem; }
.footer-links a { color: var(--mk-red); }
.footer-links a:hover { color: var(--mk-red-dark); text-decoration: underline; }
.footer-links--muted a { color: var(--mk-muted); }
.footer-links--muted a:hover { color: var(--mk-red); }

.footer-bottom {
    border-top: 1px solid var(--mk-gray-300);
    background: #fff;
    padding: 1.2rem 0;
    font-size: .85rem;
}
.footer-bottom__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}
.footer-rights { color: var(--mk-muted); }
.footer-signature {
    display: inline-flex;
    align-items: center;
    gap: .9rem;
    color: var(--mk-muted);
}
.footer-signature img { height: 34px; width: auto; }
.footer-signature a { display: inline-flex; transition: opacity .2s ease; }
.footer-signature a:hover { opacity: .75; }

/* ---------- WhatsApp flutuante ---------- */
.whatsapp-float {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 56px;
    height: 56px;
    background: var(--mk-whatsapp);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    z-index: 1030;
    box-shadow: 0 6px 20px rgba(37, 211, 102, .45);
    animation: mk-pulse 2.4s infinite;
}
.whatsapp-float:hover { color: #fff; transform: scale(1.08); }
@keyframes mk-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); }
    70%  { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ============================================================
   Página 404 — tema "chip" com glitch e circuito animado
   ============================================================ */
.error-404 {
    position: relative;
    min-height: calc(100vh - 220px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 30%, rgba(149,31,32,.06), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(30,42,94,.06), transparent 40%),
        #fff;
}
/* Grade de circuito ao fundo */
.error-404::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(149,31,32,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(149,31,32,.05) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 75%);
            mask-image: radial-gradient(circle at center, #000 30%, transparent 75%);
    animation: grid-drift 18s linear infinite;
}
@keyframes grid-drift {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 46px 46px, 46px 46px; }
}

.error-404__inner { position: relative; z-index: 1; animation: float-y 5s ease-in-out infinite; }
@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* "404" com o chip no lugar do zero */
.glitch-404 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(.5rem, 2.5vw, 1.5rem);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(5rem, 20vw, 11rem);
    line-height: 1;
    color: var(--mk-dark);
}
.glitch-404 .digit {
    position: relative;
    animation: glitch 2.6s infinite;
}
.glitch-404 .digit::before,
.glitch-404 .digit::after {
    content: attr(data-d);
    position: absolute;
    inset: 0;
}
.glitch-404 .digit::before { color: var(--mk-red); animation: glitch-shift 2.6s infinite; opacity: .8; }
.glitch-404 .digit::after  { color: var(--mk-navy); animation: glitch-shift 2.6s infinite reverse; opacity: .6; }
@keyframes glitch { 0%,92%,100%{transform:translate(0);} 94%{transform:translate(-2px,1px);} 96%{transform:translate(2px,-1px);} 98%{transform:translate(-1px,1px);} }
@keyframes glitch-shift { 0%,92%,100%{transform:translate(0);clip-path:inset(0 0 0 0);} 93%{transform:translate(-3px,-2px);} 95%{transform:translate(3px,2px);clip-path:inset(20% 0 40% 0);} 97%{transform:translate(-2px,2px);clip-path:inset(60% 0 10% 0);} }

/* Microchip CSS no lugar do "0" */
.chip {
    position: relative;
    width: clamp(80px, 17vw, 150px);
    height: clamp(80px, 17vw, 150px);
    border-radius: 16px;
    background: linear-gradient(145deg, #2a2a2a, #141414);
    box-shadow: 0 0 0 3px var(--mk-red), 0 0 35px rgba(149,31,32,.45), inset 0 0 25px rgba(0,0,0,.6);
    animation: chip-glow 2.2s ease-in-out infinite;
}
@keyframes chip-glow {
    0%,100% { box-shadow: 0 0 0 3px var(--mk-red), 0 0 25px rgba(149,31,32,.35), inset 0 0 25px rgba(0,0,0,.6); }
    50%     { box-shadow: 0 0 0 3px var(--mk-red), 0 0 50px rgba(149,31,32,.75), inset 0 0 25px rgba(0,0,0,.6); }
}
/* Pinos do chip (cima/baixo e laterais) */
.chip::before, .chip::after {
    content: "";
    position: absolute;
    left: 16%; right: 16%;
    height: 9px;
    background: repeating-linear-gradient(90deg, var(--mk-red) 0 7px, transparent 7px 15px);
}
.chip::before { top: -9px; }
.chip::after  { bottom: -9px; }
.chip .pins-x { position: absolute; top: 16%; bottom: 16%; width: 9px; background: repeating-linear-gradient(0deg, var(--mk-red) 0 7px, transparent 7px 15px); }
.chip .pins-x.l { left: -9px; }
.chip .pins-x.r { right: -9px; }
/* Núcleo do chip com linha de varredura */
.chip .core {
    position: absolute;
    inset: 22%;
    border-radius: 6px;
    background: linear-gradient(145deg, #3a3a3a, #1d1d1d);
    box-shadow: inset 0 0 0 1px rgba(149,31,32,.5);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mk-red);
    font-size: clamp(1.2rem, 4vw, 2.2rem);
}
.chip .core::after {
    content: "";
    position: absolute;
    left: 0; right: 0; height: 28%;
    background: linear-gradient(180deg, transparent, rgba(149,31,32,.55), transparent);
    animation: scan 2.4s linear infinite;
}
@keyframes scan { 0%{top:-30%;} 100%{top:100%;} }

.error-404__title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: clamp(1.4rem, 4vw, 2.1rem);
    color: var(--mk-dark);
    margin: 2rem 0 .6rem;
}
.error-404__text {
    color: var(--mk-muted);
    max-width: 520px;
    margin: 0 auto 2rem;
}
.error-404__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-404 {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .8rem 1.8rem;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: .95rem;
    transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn-404--primary { background: var(--mk-red); color: #fff; }
.btn-404--primary:hover { background: var(--mk-red-dark); color: #fff; transform: translateY(-2px); }
.btn-404--ghost { background: transparent; color: var(--mk-dark); border: 1.5px solid var(--mk-gray-300); }
.btn-404--ghost:hover { border-color: var(--mk-red); color: var(--mk-red); transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
    .error-404 *, .error-404::before { animation: none !important; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 991.98px) {
    .page-hero { height: 170px; }
    .section-title { font-size: 1.6rem; }
    /* Rodapé: empilha colunas (alinhado à esquerda) e remove divisórias */
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .footer-col + .footer-col { border-left: 0; padding-left: 0; }
    .footer-col--map { max-width: none; }          /* mapa ocupa 100% da largura */
}
@media (max-width: 767.98px) {
    /* Mais respiro nas laterais em telas pequenas */
    .container { padding-left: 1.4rem; padding-right: 1.4rem; }

    /* Cabeçalho: logo à esquerda (alinhada ao topo); à direita telefone em
       cima e WhatsApp embaixo. Horário de atendimento oculto no mobile. */
    .header-top { align-items: flex-start; gap: .75rem; }
    .site-logo img { height: 66px; }
    .header-contact { text-align: right; flex: 0 0 auto; }
    .header-contact__row {
        flex-direction: column;
        align-items: flex-end;
        gap: .5rem;
    }
    .header-hours { display: none; }

    /* Rodapé (mobile): coluna de contato centralizada, ícone maior acima do texto */
    .footer-col--info { text-align: center; }
    .footer-info li {
        flex-direction: column;
        align-items: center;
        gap: .55rem;
        text-align: center;
    }
    .footer-ico {
        width: 42px;
        height: 42px;
        font-size: 1.15rem;
    }
}
@media (max-width: 575.98px) {
    /* Botão WhatsApp encurtado libera espaço para o logo crescer */
    .btn-whatsapp .wa-full { display: none; }
    .btn-whatsapp .wa-short { display: inline; }
    .btn-whatsapp { font-size: .85rem; padding: .5rem .9rem; }
    .site-logo img { height: 60px; }      /* maior que o logo do rodapé (50px no mobile) */
    .footer-logo { height: 50px; }
    .header-phone__ddd { font-size: .8rem; }
    .header-phone__num { font-size: 1rem; }
    .section-intro { padding-top: 2rem; }
    .btn-enviar { width: 100%; justify-content: center; }
    /* Barra inferior: direitos à esquerda, agência à direita */
    .footer-bottom__inner { justify-content: space-between; gap: 1rem; }
    .footer-rights { text-align: left; }
    .footer-signature { flex-direction: column; align-items: flex-end; gap: .35rem; text-align: right; }
}
