/* ═══════════════════════════════════════════════════════════════════
   FREE TECNOLOGIA — Sistema de Design
   Alinhado à Identidade Visual oficial
   Paleta: Navy + Cyan (circuito) + Ice — leve, humanizado, resultado
   ═══════════════════════════════════════════════════════════════════ */

:root {
    /* ─── Brand colors (da identidade visual) ─── */
    --brand-navy-deep:   #0B2C45;   /* Navy mais profundo (backgrounds) */
    --brand-navy:        #174C6F;   /* Azul principal da identidade */
    --brand-navy-soft:   #1F5A80;   /* Navy intermediário */
    --brand-blue:        #3E7FB4;   /* Azul dos traços de circuito */
    --brand-cyan:        #5AA3CC;   /* Cyan médio do gradiente */
    --brand-cyan-light:  #85CDE6;   /* Cyan claro (glow, highlights) */
    --brand-ice:         #ABCCD8;   /* Azul celeste claro (fundos claros) */
    --brand-mist:        #D8E6EE;   /* Tom próximo ao branco azulado */

    /* ─── Semantic aliases ─── */
    --primary-dark:    var(--brand-navy-deep);
    --primary-mid:     var(--brand-navy);
    --gradient-start:  var(--brand-blue);
    --gradient-end:    var(--brand-cyan-light);
    --accent-primary:  var(--brand-cyan);
    --accent-soft:     var(--brand-cyan-light);
    --accent-warm:     #E8B94A;  /* dourado suave — usado em destaques pontuais */

    /* Alias compatível com nomes antigos (evitar quebra em páginas já escritas) */
    --accent-teal:     var(--brand-cyan);

    /* ─── Text ─── */
    --text-primary:   #F1F7FB;         /* títulos em fundo escuro */
    --text-light:     #CBDAE4;         /* corpo em fundo escuro */
    --text-muted:     #8FA8BC;         /* labels/metadados */
    --text-on-light:  #12304A;         /* sobre fundos claros */
    --text-body-dark: #1F3A52;

    /* ─── Backgrounds & surfaces ─── */
    --background:     #061827;         /* navy ainda mais escuro para contraste */
    --surface:        #0D2E47;         /* navy médio-escuro (cards) */
    --surface-2:      #154162;         /* navy claro (seções alternadas) */
    --section-alt:    rgba(23, 76, 111, 0.55);

    /* ─── Tipografia ─── */
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Orbitron', 'Rajdhani', 'Inter', sans-serif;  /* Headlines com ar tech */
    --font-brand:   'Orbitron', 'Azonix', 'Michroma', sans-serif; /* Logo e eyebrow */

    /* ─── Escala tipográfica ─── */
    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-lg:   1.125rem;
    --text-xl:   1.25rem;
    --text-2xl:  1.5rem;
    --text-3xl:  1.875rem;
    --text-4xl:  2.25rem;
    --text-5xl:  3rem;

    /* ─── Radius ─── */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 999px;

    /* ─── Spacing ─── */
    --space-1: 4px;   --space-2: 8px;   --space-3: 12px;   --space-4: 16px;
    --space-6: 24px;  --space-8: 32px;  --space-12: 48px;  --space-16: 64px;

    /* ─── Section rhythm ─── */
    --section-hero: 6rem;
    --section-main: 5rem;
    --section-sep:  3.5rem;
    --section-cta:  7rem;

    /* ─── Transitions ─── */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: 300ms var(--ease);
    --transition-fast: 180ms var(--ease);

    /* ─── Borders ─── */
    --border-subtle:  rgba(171, 204, 216, 0.08);
    --border-default: rgba(171, 204, 216, 0.14);
    --border-strong:  rgba(171, 204, 216, 0.28);
    --border-accent:  rgba(90, 163, 204, 0.45);
    --border-warm:    rgba(232, 185, 74, 0.40);
    --border-navy:    rgba(23, 76, 111, 0.60);

    /* ─── Glass ─── */
    --glass-bg:   rgba(13, 46, 71, 0.55);
    --glass-blur: blur(16px);

    /* ─── Feedback ─── */
    --success: #2BB673;  --success-bg: rgba(43, 182, 115, 0.12);
    --error:   #E45858;  --error-bg:   rgba(228, 88, 88, 0.12);
    --warning: #E8B94A;  --warning-bg: rgba(232, 185, 74, 0.12);

    /* Gradientes principais */
    --gradient-brand: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-cyan) 55%, var(--brand-cyan-light) 100%);
    --gradient-bg-hero: radial-gradient(ellipse 70% 50% at 20% 20%, rgba(62, 127, 180, 0.28) 0%, transparent 60%),
                        radial-gradient(ellipse 60% 55% at 85% 85%, rgba(133, 205, 230, 0.16) 0%, transparent 65%),
                        radial-gradient(ellipse 50% 40% at 50% 10%, rgba(23, 76, 111, 0.40) 0%, transparent 70%);
}

/* ─── Reset focus ─── */
*:focus:not(:focus-visible) { outline: none; }
input:focus, button:focus, textarea:focus, select:focus, a:focus { outline: none; }

/* ─── Base ─── */
html, body {
    font-family: var(--font-primary);
    font-size: 16px;
    background-color: var(--background);
    color: var(--text-light);
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Glow ambiente estático (circuito da identidade) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--gradient-bg-hero);
    pointer-events: none;
    z-index: 0;
}

/* Circuito sutil de fundo (remete ao logo) */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 800'><g fill='none' stroke='%233E7FB4' stroke-width='1' stroke-opacity='0.05'><circle cx='700' cy='120' r='90'/><circle cx='120' cy='680' r='70'/><path d='M40 680 L 120 680 M 120 680 L 160 720'/><path d='M 640 120 L 700 120'/></g></svg>");
    background-size: cover;
    pointer-events: none;
    z-index: 0;
    opacity: 0.9;
}

.container, .card, .contact-card, .hero-content {
    position: relative;
    z-index: 1;
}

main, .page-wrapper { animation: pageEnter 0.8s var(--ease); }

@keyframes pageEnter {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Links ─── */
a {
    color: var(--brand-cyan-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--brand-ice); opacity: 0.95; }

.link-underline { position: relative; }
.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-brand);
    transition: width 0.4s var(--ease);
}
.link-underline:hover::after { width: 100%; }

.btn-link {
    color: var(--brand-cyan-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

/* ─── Headings ─── */
h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-5xl);
    line-height: 1.08;
    letter-spacing: 0.01em;
    text-wrap: balance;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--text-4xl); line-height: 1.18; text-wrap: balance; margin-bottom: 1rem;   color: var(--text-primary); letter-spacing: -0.01em; }
h3 { font-family: var(--font-primary); font-weight: 600; font-size: var(--text-2xl); line-height: 1.30; text-wrap: balance; margin-bottom: 0.75rem; color: var(--text-primary); }
h4 { font-family: var(--font-primary); font-weight: 600; font-size: var(--text-xl);  line-height: 1.35; text-wrap: balance; margin-bottom: 0.5rem;  color: var(--text-primary); }
h5 { font-family: var(--font-primary); font-weight: 500; font-size: var(--text-lg);  line-height: 1.40; text-wrap: balance; margin-bottom: 0.5rem;  color: var(--text-light); }
h6 { font-family: var(--font-primary); font-weight: 500; font-size: var(--text-base); line-height: 1.50; text-wrap: balance; margin-bottom: 0.5rem;  color: var(--text-muted); }

/* Texto com gradiente da marca */
.gradient-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.gradient-text--animated {
    background-size: 220% 220%;
    animation: gradientShift 8s ease infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* ─── Botões ─── */
.btn-primary {
    background: var(--gradient-brand);
    border: none;
    color: #fff;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
    box-shadow: 0 6px 20px rgba(62, 127, 180, 0.35);
}
.btn-primary:hover {
    color: #fff;
    opacity: 1;
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 10px 30px rgba(90, 163, 204, 0.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-whatsapp {
    background: #25d366;
    border: none;
    color: #fff !important;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.28);
}
.btn-whatsapp:hover {
    background: #20b858;
    color: #fff !important;
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(37, 211, 102, 0.42);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-strong);
    color: var(--text-light);
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.btn-outline:hover {
    background: rgba(133, 205, 230, 0.08);
    border-color: var(--brand-cyan);
    color: var(--text-primary);
    opacity: 1;
    transform: translateY(-2px);
}

.btn-primary::after,
.btn-whatsapp::after,
.btn-outline::after { display: none !important; }

/* ─── Cards ─── */
.card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    animation: cardEnter 0.55s var(--ease) backwards;
}
.card a, .card a::after { display: revert; }

.card:hover {
    transform: translateY(-6px);
    border-color: var(--border-accent);
    box-shadow: 0 18px 44px rgba(23, 76, 111, 0.35);
}
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.10s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.20s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.30s; }

@keyframes cardEnter {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Container/Layout ─── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

section { padding: 4rem 0; }

img, svg, video, canvas { max-width: 100%; height: auto; }

@media (max-width: 768px) {
    .container { padding-left: 1rem; padding-right: 1rem; }
    section    { padding: 3rem 0; }
}
@media (max-width: 480px) {
    .container { padding-left: 0.875rem; padding-right: 0.875rem; }
    section    { padding: 2.5rem 0; }
    .btn-primary, .btn-whatsapp, .btn-outline { width: 100%; justify-content: center; }
}

/* ─── Tipografia corpo ─── */
p {
    font-size: var(--text-base);
    line-height: 1.75;
    margin-bottom: 1rem;
    color: var(--text-light);
}
.lead { font-size: var(--text-lg); font-weight: 400; line-height: 1.7; color: var(--text-light); }

/* ─── Forms ─── */
.form-control {
    background: rgba(171, 204, 216, 0.04);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 0.875rem 1.25rem;
    transition: all 0.3s var(--ease);
    width: 100%;
}
.form-control:focus {
    outline: none;
    background: rgba(90, 163, 204, 0.06);
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 3px rgba(90, 163, 204, 0.18);
}
.form-control::placeholder { color: rgba(203, 218, 228, 0.42); }

button, input, textarea, select, a { transition: all 0.3s var(--ease); }

/* ─── Blazor Error UI ─── */
#blazor-error-ui {
    background: #fff3cd;
    color: #664d03;
    bottom: 0; left: 0;
    box-shadow: 0 -1px 8px rgba(0,0,0,0.25);
    display: none;
    padding: 0.8rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* ─── Utils ─── */
.hidden { display: none !important; }
.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;
}
