/**
 * Projeto: Mettric App
 * Arquivo: theme.css
 * Autor: Djeferson Capelli
 * Versão: 2.0.0
 * Última revisão: 2026-05-04
 * Descrição: Foundation — tokens completos (paleta brand 50→950, neutros,
 *            spacing base-4 sem buracos, shadow ladder em camadas, motion
 *            cubic-bezier, focus-ring acessível), tipografia Geist,
 *            reset minimal + utilitárias. Brand: #0D5BD7 (Azul Mettric).
 */

@font-face {
    font-family: "Geist";
    src: url("/assets/fonts/Geist-Variable.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    size-adjust: 100%;
    ascent-override: 90%;
    descent-override: 22%;
    line-gap-override: 0%;
}

@font-face {
    font-family: "Geist Mono";
    src: url("/assets/fonts/GeistMono-Variable.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* ===== Mettric Blue — escala derivada de #0D5BD7 (azul oficial) ===== */
    --mt-blue-50:  #EFF4FE;
    --mt-blue-100: #DCE7FC;
    --mt-blue-200: #BFD2FA;
    --mt-blue-300: #93B3F5;
    --mt-blue-400: #608AED;
    --mt-blue-500: #3B6BE4;
    --mt-blue-600: #0D5BD7;   /* BRAND — Azul Mettric oficial */
    --mt-blue-700: #0E4AB0;
    --mt-blue-800: #103E8E;
    --mt-blue-900: #123772;
    --mt-blue-950: #0C2453;

    /* ===== Neutros (cool gray, alinhada ao azul) ===== */
    --mt-gray-50:  #F7F9FC;
    --mt-gray-100: #EFF2F7;
    --mt-gray-200: #E2E8F0;
    --mt-gray-300: #CAD3E0;
    --mt-gray-400: #94A3B8;
    --mt-gray-500: #64748B;
    --mt-gray-600: #475569;
    --mt-gray-700: #334155;
    --mt-gray-800: #1E293B;
    --mt-gray-900: #0F172A;
    --mt-gray-950: #060B1A;

    --mt-ink:   var(--mt-gray-900);
    --mt-snow:  #F8FAFC;
    --mt-night: #040D1A;

    /* ===== Spacing (base 4 — sem buracos) ===== */
    --mt-space-1:  4px;
    --mt-space-2:  8px;
    --mt-space-3:  12px;
    --mt-space-4:  16px;
    --mt-space-5:  20px;
    --mt-space-6:  24px;
    --mt-space-7:  28px;
    --mt-space-8:  32px;
    --mt-space-10: 40px;
    --mt-space-12: 48px;
    --mt-space-14: 56px;
    --mt-space-16: 64px;
    --mt-space-20: 80px;
    --mt-space-24: 96px;

    --mt-radius-sm:   4px;
    --mt-radius-md:   8px;
    --mt-radius-lg:   12px;
    --mt-radius-xl:   16px;
    --mt-radius-2xl:  24px;
    --mt-radius-full: 999px;

    --mt-font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --mt-font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

    /* ===== Brand semantic tokens ===== */
    --mt-brand:        var(--mt-blue-600);
    --mt-brand-hover:  var(--mt-blue-700);
    --mt-brand-soft:   var(--mt-blue-50);
    --mt-brand-soft-2: var(--mt-blue-100);

    --mt-bg:          var(--mt-snow);
    --mt-bg-elevated: #FFFFFF;
    --mt-bg-subtle:   var(--mt-gray-50);
    --mt-text:        var(--mt-ink);
    --mt-text-muted:  var(--mt-gray-500);
    --mt-text-subtle: var(--mt-gray-400);
    --mt-border:      var(--mt-gray-200);
    --mt-border-strong: var(--mt-gray-300);
    --mt-primary:       var(--mt-brand);
    --mt-primary-hover: var(--mt-brand-hover);
    --mt-accent:        var(--mt-brand);

    --mt-container-max:     1200px;
    --mt-container-padding: var(--mt-space-6);

    /* ===== Shadows em camadas (Linear-style) ===== */
    --mt-shadow-xs: 0 1px 2px rgba(13, 91, 215, 0.04);
    --mt-shadow-sm:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 1px 3px rgba(15, 23, 42, 0.06);
    --mt-shadow-md:
        0 1px 1px rgba(15, 23, 42, 0.04),
        0 2px 4px rgba(15, 23, 42, 0.04),
        0 8px 16px -4px rgba(15, 23, 42, 0.06);
    --mt-shadow-lg:
        0 1px 1px rgba(15, 23, 42, 0.04),
        0 4px 6px -1px rgba(15, 23, 42, 0.05),
        0 12px 24px -6px rgba(15, 23, 42, 0.08),
        0 24px 48px -12px rgba(15, 23, 42, 0.10);
    --mt-shadow-xl:
        0 1px 1px rgba(15, 23, 42, 0.04),
        0 8px 12px -4px rgba(15, 23, 42, 0.06),
        0 24px 48px -12px rgba(15, 23, 42, 0.12),
        0 48px 96px -24px rgba(15, 23, 42, 0.18);
    --mt-shadow-brand:
        0 1px 2px rgba(13, 91, 215, 0.10),
        0 8px 16px -4px rgba(13, 91, 215, 0.18);

    /* ===== Motion ===== */
    --mt-ease:        cubic-bezier(0.4, 0, 0.2, 1);
    --mt-ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
    --mt-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --mt-dur-fast:    120ms;
    --mt-dur:         200ms;
    --mt-dur-slow:    320ms;

    /* ===== Focus ring ===== */
    --mt-focus-ring: 0 0 0 3px rgba(13, 91, 215, 0.32);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--mt-font-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--mt-text);
    background: var(--mt-bg);
}

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

a { color: var(--mt-accent); text-decoration: none; transition: color var(--mt-dur) var(--mt-ease); }
a:hover { text-decoration: underline; }
a:focus-visible {
    outline: none;
    border-radius: 4px;
    box-shadow: var(--mt-focus-ring);
}

/* Inputs com focus ring premium */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: none;
    box-shadow: var(--mt-focus-ring);
}

/* Respeitar usuários que preferem menos movimento */
@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;
    }
}

h1, h2, h3, h4, h5, h6, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

button {
    font-family: inherit;
    cursor: pointer;
    border: 0;
    background: none;
}

.mt-display-lg { font-size: 56px; line-height: 60px; font-weight: 700; letter-spacing: -1.5%; }
.mt-display    { font-size: 40px; line-height: 48px; font-weight: 700; letter-spacing: -1%; }
.mt-h1         { font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -.5%; }
.mt-h2         { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.3%; }
.mt-h3         { font-size: 20px; line-height: 28px; font-weight: 600; }
.mt-body-lg    { font-size: 18px; line-height: 28px; font-weight: 400; }
.mt-body       { font-size: 16px; line-height: 24px; font-weight: 400; }
.mt-body-sm    { font-size: 14px; line-height: 20px; font-weight: 400; }
.mt-caption    { font-size: 12px; line-height: 16px; font-weight: 400; letter-spacing: .2%; }
.mt-button-text{ font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: .2%; }

@media (max-width: 640px) {
    .mt-display-lg { font-size: 40px; line-height: 44px; }
    .mt-display    { font-size: 32px; line-height: 38px; }
    .mt-h1         { font-size: 28px; line-height: 34px; }
    .mt-h2         { font-size: 22px; line-height: 28px; }
}

.mt-container {
    width: 100%;
    max-width: var(--mt-container-max);
    margin: 0 auto;
    padding-left: var(--mt-container-padding);
    padding-right: var(--mt-container-padding);
}

.mt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--mt-space-2);
    padding: var(--mt-space-3) var(--mt-space-6);
    border-radius: var(--mt-radius-lg);
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    letter-spacing: .2%;
    transition:
        background var(--mt-dur) var(--mt-ease),
        color var(--mt-dur) var(--mt-ease),
        border-color var(--mt-dur) var(--mt-ease),
        transform var(--mt-dur-fast) var(--mt-ease),
        box-shadow var(--mt-dur) var(--mt-ease);
    text-decoration: none;
    white-space: nowrap;
}
.mt-btn:hover { text-decoration: none; }
.mt-btn:active { transform: translateY(1px); }
.mt-btn:focus-visible {
    outline: none;
    box-shadow: var(--mt-focus-ring);
}

.mt-btn-primary {
    background: var(--mt-primary);
    color: var(--mt-snow);
    box-shadow: var(--mt-shadow-brand);
}
.mt-btn-primary:hover {
    background: var(--mt-primary-hover);
    box-shadow:
        0 1px 2px rgba(13, 91, 215, 0.20),
        0 12px 24px -6px rgba(13, 91, 215, 0.32);
    transform: translateY(-1px);
}
.mt-btn-primary:focus-visible {
    box-shadow: var(--mt-shadow-brand), var(--mt-focus-ring);
}

.mt-btn-secondary {
    background: var(--mt-bg-elevated);
    color: var(--mt-text);
    border: 1px solid var(--mt-border);
    box-shadow: var(--mt-shadow-xs);
}
.mt-btn-secondary:hover {
    background: var(--mt-bg-elevated);
    color: var(--mt-primary);
    border-color: var(--mt-border-strong);
    box-shadow: var(--mt-shadow-sm);
    transform: translateY(-1px);
}

.mt-btn-ghost {
    background: transparent;
    color: var(--mt-text);
}
.mt-btn-ghost:hover { background: var(--mt-brand-soft); color: var(--mt-primary); }

.mt-btn-lg { padding: var(--mt-space-4) var(--mt-space-8); font-size: 16px; line-height: 24px; }

/* ============ MARQUEE INFINITO (logo bar animada) ============ */
.mt-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
}
.mt-marquee-track {
    display: flex;
    align-items: center;
    gap: var(--mt-space-12);
    width: max-content;
    animation: mt-marquee-scroll 32s linear infinite;
    will-change: transform;
}
.mt-marquee:hover .mt-marquee-track { animation-play-state: paused; }
.mt-marquee-item {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 var(--mt-space-4);
    color: var(--mt-text-muted);
}
.mt-marquee-item img {
    height: 32px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    opacity: .55;
    filter: grayscale(1);
    transition: opacity var(--mt-dur) var(--mt-ease), filter var(--mt-dur) var(--mt-ease);
}
.mt-marquee:hover .mt-marquee-item img { opacity: .8; }
.mt-marquee-item img:hover {
    opacity: 1;
    filter: grayscale(0);
}
@keyframes mt-marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .mt-marquee {
        -webkit-mask-image: none;
                mask-image: none;
    }
    .mt-marquee-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--mt-space-6) var(--mt-space-8);
        width: 100%;
        max-width: var(--mt-container-max);
        margin: 0 auto;
        padding: 0 var(--mt-container-padding);
    }
    .mt-marquee-item[aria-hidden="true"] { display: none; }
}

/* ============ WHATSAPP FLOAT BUTTON ============ */
.mt-wa-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px 14px 16px;
    background: #25D366;
    color: #fff;
    border-radius: var(--mt-radius-full);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 12px 28px rgba(37, 211, 102, .35), 0 4px 12px rgba(0, 0, 0, .15);
    transition: transform .15s ease, box-shadow .15s ease;
}
.mt-wa-float:hover {
    text-decoration: none;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(37, 211, 102, .45), 0 6px 16px rgba(0, 0, 0, .2);
}
.mt-wa-float svg { width: 22px; height: 22px; flex-shrink: 0; }
@media (max-width: 640px) {
    .mt-wa-float .mt-wa-label { display: none; }
    .mt-wa-float { padding: 14px; }
}
